Skip to content

Commit

Permalink
fixing the annyoing NoSuchMethodError "getContext" on Android version…
Browse files Browse the repository at this point in the history
… < M
  • Loading branch information
konradrenner committed Jan 18, 2016
1 parent 37b9779 commit bc0b1c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "org.kore.kolabnotes.android"
minSdkVersion 16
targetSdkVersion 23
versionCode 51
versionName "1.5.2"
versionCode 52
versionName "1.5.3"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ public void onColorPickerClicked(int position, Tag tag) {
chooseColor(item);
}

public Context getContext(){
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M){
return super.getContext();
}
return activity;
}

private class ActionModeCallback implements ActionMode.Callback {
@SuppressWarnings("unused")
private final String TAG = ActionModeCallback.class.getSimpleName();
Expand Down

0 comments on commit bc0b1c8

Please sign in to comment.