diff options
Diffstat (limited to 'org_apg/src/org/thialfihar/android/apg/ui/EncryptActivity.java')
-rw-r--r-- | org_apg/src/org/thialfihar/android/apg/ui/EncryptActivity.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/org_apg/src/org/thialfihar/android/apg/ui/EncryptActivity.java b/org_apg/src/org/thialfihar/android/apg/ui/EncryptActivity.java index 29b1ab86a..ec7f26883 100644 --- a/org_apg/src/org/thialfihar/android/apg/ui/EncryptActivity.java +++ b/org_apg/src/org/thialfihar/android/apg/ui/EncryptActivity.java @@ -197,6 +197,13 @@ public class EncryptActivity extends SherlockFragmentActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + + // check permissions for intent actions without user interaction + String[] restrictedActions = new String[] { ACTION_ENCRYPT_AND_RETURN, + ACTION_GENERATE_SIGNATURE }; + OtherHelper.checkPackagePermissionForActions(this, this.getCallingPackage(), + Constants.PERMISSION_ACCESS_API, getIntent().getAction(), restrictedActions); + setContentView(R.layout.encrypt); // set actionbar without home button if called from another app @@ -841,8 +848,8 @@ public class EncryptActivity extends SherlockFragmentActivity { intent.putExtra(ApgIntentService.EXTRA_DATA, data); // Message is received after encrypting is done in ApgService - ApgIntentServiceHandler saveHandler = new ApgIntentServiceHandler(this, R.string.progress_encrypting, - ProgressDialog.STYLE_HORIZONTAL) { + ApgIntentServiceHandler saveHandler = new ApgIntentServiceHandler(this, + R.string.progress_encrypting, ProgressDialog.STYLE_HORIZONTAL) { public void handleMessage(Message message) { // handle messages by standard ApgHandler first super.handleMessage(message); |