Browse Source

DummyActivity: allow UNFREEZE_AND_LAUNCH from the same process

otherwise the unfreeze & launch option in context menu won't work
Peter Cai 1 year ago
parent
commit
1882d6f967
Signed by: Peter Cai <[email protected]> GPG Key ID: 71F5FB4E4F3FD54F

+ 1
- 0
app/src/main/java/net/typeblog/shelter/ui/AppListFragment.java View File

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

+ 2
- 1
app/src/main/java/net/typeblog/shelter/ui/DummyActivity.java View File

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

Loading…
Cancel
Save