Skip to content

Commit

Permalink
Merge pull request #27 from percolate/fix_binderproxy_error
Browse files Browse the repository at this point in the history
Check Activity state before displaying Dialogs
  • Loading branch information
msya authored Nov 3, 2016
2 parents 4c85720 + aa23426 commit 1355f17
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion caffeine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version '1.0-SNAPSHOT'

android {
compileSdkVersion 24
buildToolsVersion "23.0.3"
buildToolsVersion = "24.0.3"

buildTypes {
debug {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ public static AlertDialog quickDialog(final Activity context, final String messa
final SpannableString s = new SpannableString(message); //Make links clickable
Linkify.addLinks(s, Linkify.ALL);

Builder builder = new AlertDialog.Builder(context);
final Builder builder = new AlertDialog.Builder(context);
builder.setMessage(s);
builder.setPositiveButton(android.R.string.ok, closeDialogListener());
AlertDialog dialog = builder.create();
dialog.show();
if(!context.isFinishing()) {
dialog.show();
}

((TextView) dialog.findViewById(android.R.id.message)).setMovementMethod(LinkMovementMethod.getInstance()); //Make links clickable

Expand Down
2 changes: 1 addition & 1 deletion tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion "23.0.3"
buildToolsVersion = "24.0.3"

defaultConfig {
applicationId "com.percolate.caffeine.testapp"
Expand Down

0 comments on commit 1355f17

Please sign in to comment.