diff options
author | Michal Kepkowski <michal.kepkowski@sagiton.pl> | 2016-04-06 19:16:10 +0200 |
---|---|---|
committer | Michal Kepkowski <michal.kepkowski@sagiton.pl> | 2016-04-06 19:16:10 +0200 |
commit | d9988a8cdacb38ce1a1874d1fbb65ff7eb8f8acd (patch) | |
tree | a2c6bad3a5da60d4e1fcfc75f2588821d699ea01 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/BaseActivity.java | |
parent | dac5f1db08b4dea5893d9fe0a1ab0daad5b44f09 (diff) | |
parent | 88ba5688d8e110fc6676c701359bb2bbca7efb77 (diff) | |
download | open-keychain-d9988a8cdacb38ce1a1874d1fbb65ff7eb8f8acd.tar.gz open-keychain-d9988a8cdacb38ce1a1874d1fbb65ff7eb8f8acd.tar.bz2 open-keychain-d9988a8cdacb38ce1a1874d1fbb65ff7eb8f8acd.zip |
Merge branch 'master' into okhttp3
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/BaseActivity.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/BaseActivity.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/BaseActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/BaseActivity.java index beaf68372..063181dfe 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/BaseActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/BaseActivity.java @@ -26,6 +26,7 @@ import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.Gravity; import android.view.LayoutInflater; +import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; @@ -65,6 +66,16 @@ public abstract class BaseActivity extends AppCompatActivity { } } + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case android.R.id.home : + onBackPressed(); + return true; + } + return super.onOptionsItemSelected(item); + } + public static void onResumeChecks(Context context) { KeyserverSyncAdapterService.cancelUpdates(context); // in case user has disabled sync from Android account settings |