From 89fbf78f97ba290c5309a965e2327e49bdcc86c6 Mon Sep 17 00:00:00 2001 From: "M. Mueller" Date: Thu, 16 Aug 2018 16:45:44 +0200 Subject: [PATCH] Revert "Hotfix 0.9.40" --- catroid/build.gradle | 4 ++-- .../catroid/ui/fragment/FormulaEditorFragment.java | 12 +----------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/catroid/build.gradle b/catroid/build.gradle index 259b43ba0fc..18f08907a6d 100644 --- a/catroid/build.gradle +++ b/catroid/build.gradle @@ -279,9 +279,9 @@ android { targetSdkVersion 22 applicationId appId testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner' - versionCode 46 + versionCode 45 println "VersionCode is " + versionCode - versionName "0.9.40" + versionName "0.9.38" println "VersionName is " + versionName buildConfigField "String", "GIT_DESCRIBE", "\"${versionName}\"" buildConfigField "String", "GIT_CURRENT_BRANCH", "\"${getCurrentGitBranch()}\"" diff --git a/catroid/src/main/java/org/catrobat/catroid/ui/fragment/FormulaEditorFragment.java b/catroid/src/main/java/org/catrobat/catroid/ui/fragment/FormulaEditorFragment.java index 9a5aae12c23..c42975d34ee 100644 --- a/catroid/src/main/java/org/catrobat/catroid/ui/fragment/FormulaEditorFragment.java +++ b/catroid/src/main/java/org/catrobat/catroid/ui/fragment/FormulaEditorFragment.java @@ -26,7 +26,6 @@ import android.app.Fragment; import android.app.FragmentManager; import android.content.Context; -import android.content.ContextWrapper; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.Intent; @@ -159,16 +158,7 @@ private void cloneFormulaBrick(FormulaBrick formulaBrick) { } private static void showFragment(View view, FormulaBrick formulaBrick, Brick.BrickField brickField, boolean showCustomView) { - - Context context = view.getContext(); - while (context instanceof ContextWrapper) { - if (context instanceof Activity) { - break; - } - context = ((ContextWrapper) context).getBaseContext(); - } - - Activity activity = (Activity) context; + Activity activity = (Activity) view.getContext(); FormulaEditorFragment formulaEditorFragment = (FormulaEditorFragment) activity.getFragmentManager() .findFragmentByTag(FORMULA_EDITOR_FRAGMENT_TAG);