Lock drawer in EncryptFileActivity if called from intent

Closes #810
This commit is contained in:
Vincent Breitmoser 2014-09-01 23:46:22 +02:00
parent f8625f5310
commit a97ebc1ec9
2 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,7 @@ import android.os.Handler;
import android.os.Message;
import android.os.Messenger;
import android.support.v4.app.Fragment;
import android.support.v4.widget.DrawerLayout;
import android.view.Menu;
import android.view.MenuItem;
@ -426,6 +427,8 @@ public class EncryptFileActivity extends DrawerActivity implements EncryptActivi
// if called with an intent action, do not init drawer navigation
if (ACTION_ENCRYPT_FILE.equals(getIntent().getAction())) {
// lock drawer
((DrawerLayout) findViewById(R.id.drawer_layout)).setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
// TODO: back button to key?
} else {
setupDrawerNavigation(savedInstanceState);

View File

@ -26,6 +26,7 @@ import android.os.Handler;
import android.os.Message;
import android.os.Messenger;
import android.support.v4.app.Fragment;
import android.support.v4.widget.DrawerLayout;
import android.view.Menu;
import android.view.MenuItem;
@ -394,6 +395,8 @@ public class EncryptTextActivity extends DrawerActivity implements EncryptActivi
// if called with an intent action, do not init drawer navigation
if (ACTION_ENCRYPT_TEXT.equals(getIntent().getAction())) {
// lock drawer
((DrawerLayout) findViewById(R.id.drawer_layout)).setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
// TODO: back button to key?
} else {
setupDrawerNavigation(savedInstanceState);