From 0b76acd7cf7c17aaf4eeb01b00dcbd9e995dc2ce Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 14 Dec 2014 10:09:11 +0100 Subject: [PATCH] Added restriction Srv_startActivityAsCaller Refs #1757 --- CHANGELOG.md | 2 +- src/biz/bokhorst/xprivacy/Meta.java | 1 + src/biz/bokhorst/xprivacy/XActivityManager.java | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 573bd75d1..82ccb8e31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ Changelog **Next release** -* ... +* Added restriction *Srv_startActivityAsCaller* ([issue](/../../issues/1757)) [Open issues](https://github.com/M66B/XPrivacy/issues?state=open) diff --git a/src/biz/bokhorst/xprivacy/Meta.java b/src/biz/bokhorst/xprivacy/Meta.java index cc13f92da..8d5319dea 100644 --- a/src/biz/bokhorst/xprivacy/Meta.java +++ b/src/biz/bokhorst/xprivacy/Meta.java @@ -498,6 +498,7 @@ public static List get() { mListHook.add(new Hook(null, "Srv_startActivities", "", 19, null, null).AOSP(19)); mListHook.add(new Hook(null, "Srv_startActivity", "", 19, null, null).AOSP(19)); mListHook.add(new Hook(null, "Srv_startActivityAsUser", "", 19, null, null).AOSP(19)); + mListHook.add(new Hook(null, "Srv_startActivityAsCaller", "", 21, null, null).AOSP(21)); mListHook.add(new Hook(null, "Srv_startActivityAndWait", "", 19, null, null).AOSP(19)); mListHook.add(new Hook(null, "Srv_startActivityWithConfig", "", 19, null, null).AOSP(19)); diff --git a/src/biz/bokhorst/xprivacy/XActivityManager.java b/src/biz/bokhorst/xprivacy/XActivityManager.java index a48ef74d5..c3e18ba76 100644 --- a/src/biz/bokhorst/xprivacy/XActivityManager.java +++ b/src/biz/bokhorst/xprivacy/XActivityManager.java @@ -50,6 +50,7 @@ public String getClassName() { // public int startActivities(IApplicationThread caller, String callingPackage, Intent[] intents, String[] resolvedTypes, IBinder resultTo, Bundle options, int userId) // public int startActivity(IApplicationThread caller, String callingPackage, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int flags, String profileFile, ParcelFileDescriptor profileFd, Bundle options) + // public int startActivityAsCaller(IApplicationThread caller, String callingPackage, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int flags, ProfilerInfo profilerInfo, Bundle options, int userId) // public int startActivityAsUser(IApplicationThread caller, String callingPackage, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int flags, String profileFile,ParcelFileDescriptor profileFd, Bundle options, int userId) // public WaitResult startActivityAndWait(IApplicationThread caller, String callingPackage, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int flags, String profileFile, ParcelFileDescriptor profileFd, Bundle options, int userId) // public int startActivityWithConfig(IApplicationThread caller, String callingPackage, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int startFlags, Configuration newConfig, Bundle options, int userId) @@ -62,7 +63,7 @@ public String getClassName() { private enum Methods { getRecentTasks, getRunningAppProcesses, getRunningServices, getRunningTasks, Srv_getRecentTasks, Srv_getRunningAppProcesses, Srv_getServices, Srv_getTasks, - Srv_startActivities, Srv_startActivity, Srv_startActivityAsUser, Srv_startActivityAndWait, Srv_startActivityWithConfig + Srv_startActivities, Srv_startActivity, Srv_startActivityAsCaller, Srv_startActivityAsUser, Srv_startActivityAndWait, Srv_startActivityWithConfig }; // @formatter:on @@ -111,6 +112,7 @@ protected void before(XParam param) throws Throwable { break; case Srv_startActivity: + case Srv_startActivityAsCaller: case Srv_startActivityAsUser: case Srv_startActivityWithConfig: if (param.args.length > 2 && param.args[2] instanceof Intent) { @@ -167,6 +169,7 @@ protected void after(XParam param) throws Throwable { case Srv_startActivities: case Srv_startActivity: + case Srv_startActivityAsCaller: case Srv_startActivityAsUser: case Srv_startActivityAndWait: case Srv_startActivityWithConfig: