Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix 0.9.40 #2939

Merged
merged 4 commits into from
Aug 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions catroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,9 @@ android {
targetSdkVersion 22
applicationId appId
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
versionCode 45
versionCode 46
println "VersionCode is " + versionCode
versionName "0.9.38"
versionName "0.9.40"
println "VersionName is " + versionName
buildConfigField "String", "GIT_DESCRIBE", "\"${versionName}\""
buildConfigField "String", "GIT_CURRENT_BRANCH", "\"${getCurrentGitBranch()}\""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
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;
Expand Down Expand Up @@ -158,7 +159,16 @@ private void cloneFormulaBrick(FormulaBrick formulaBrick) {
}

private static void showFragment(View view, FormulaBrick formulaBrick, Brick.BrickField brickField, boolean showCustomView) {
Activity activity = (Activity) view.getContext();

Context context = view.getContext();
while (context instanceof ContextWrapper) {
if (context instanceof Activity) {
break;
}
context = ((ContextWrapper) context).getBaseContext();
}

Activity activity = (Activity) context;

FormulaEditorFragment formulaEditorFragment = (FormulaEditorFragment) activity.getFragmentManager()
.findFragmentByTag(FORMULA_EDITOR_FRAGMENT_TAG);
Expand Down