DummyActivity: allow UNFREEZE_AND_LAUNCH from the same process

otherwise the unfreeze & launch option in context menu won't work
This commit is contained in:
Peter Cai 2018-09-21 07:39:01 +08:00
parent 2c65a8178a
commit 1882d6f967
No known key found for this signature in database
GPG key ID: 71F5FB4E4F3FD54F
2 changed files with 3 additions and 1 deletions

View file

@ -260,6 +260,7 @@ public class AppListFragment extends Fragment {
intent.setComponent(new ComponentName(getContext(), DummyActivity.class));
intent.putExtra("packageName", mSelectedApp.getPackageName());
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
DummyActivity.registerSameProcessRequest(intent);
startActivity(intent);
return true;
case MENU_ITEM_CREATE_UNFREEZE_SHORTCUT:

View file

@ -68,7 +68,8 @@ public class DummyActivity extends Activity {
// without a valid signature
private static final List<String> ACTIONS_ALLOWED_WITHOUT_SIGNATURE_SAME_PROCESS = Arrays.asList(
INSTALL_PACKAGE,
UNINSTALL_PACKAGE);
UNINSTALL_PACKAGE,
UNFREEZE_AND_LAUNCH);
private static final int REQUEST_INSTALL_PACKAGE = 1;
private static final int REQUEST_PERMISSION_EXTERNAL_STORAGE= 2;