diff options
author | Christian S. <kriztan@users.noreply.github.com> | 2015-09-21 13:25:22 +0200 |
---|---|---|
committer | Christian S. <kriztan@users.noreply.github.com> | 2015-09-21 13:25:22 +0200 |
commit | fe8dcf95f4a4394d75f7d3df320155d7a6be5d6a (patch) | |
tree | c0461d104fb39c39177e871333c5940a9fa20f82 /src/main/java/eu/siacs/conversations/ui/UpdaterActivity.java | |
parent | 0a70e313d145a802a7d64c3ae1615408b2d35d35 (diff) |
disabled touch events on checking for updates
and fire a toast message
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/UpdaterActivity.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/UpdaterActivity.java b/src/main/java/eu/siacs/conversations/ui/UpdaterActivity.java index 19712922c..f2733bb9f 100644 --- a/src/main/java/eu/siacs/conversations/ui/UpdaterActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/UpdaterActivity.java @@ -47,7 +47,11 @@ public class UpdaterActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - + + //disable touch events + getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE, + WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE); + //Overall information about the contents of a package //This corresponds to all of the information collected from AndroidManifest.xml. PackageInfo pInfo = null; @@ -80,6 +84,10 @@ public class UpdaterActivity extends Activity { if(isNetworkAvailable(this)){ Intent msgIntent = new Intent(this, UpdaterWebService.class); msgIntent.putExtra(UpdaterWebService.REQUEST_STRING, Config.UPDATE_URL); + + Toast.makeText(getApplicationContext(), + getText(R.string.checking_for_updates), + Toast.LENGTH_LONG).show(); startService(msgIntent); } } @@ -97,6 +105,8 @@ public class UpdaterActivity extends Activity { this.unregisterReceiver(receiver); this.unregisterReceiver(downloadReceiver); super.onDestroy(); + //enable touch events + getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE); } @Override @@ -157,6 +167,9 @@ public class UpdaterActivity extends Activity { appURI = responseObj.getString("appURI"); //check if we need to upgrade? if(latestVersionCode > versionCode){ + //enable touch events + getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE); + //oh yeah we do need an upgrade, let the user know send an alert message AlertDialog.Builder builder = new AlertDialog.Builder(UpdaterActivity.this); builder.setCancelable(false); @@ -227,4 +240,4 @@ public class UpdaterActivity extends Activity { } }; -}
\ No newline at end of file +} |