Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Added restriction Srv_startActivityAsCaller
Browse files Browse the repository at this point in the history
Refs #1757
  • Loading branch information
M66B committed Dec 14, 2014
1 parent 271540c commit ff8f2ca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Changelog

**Next release**

* ...
* Added restriction *Srv_startActivityAsCaller* ([issue](/../../issues/1757))

[Open issues](https://github.com/M66B/XPrivacy/issues?state=open)

Expand Down
1 change: 1 addition & 0 deletions src/biz/bokhorst/xprivacy/Meta.java
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ public static List<Hook> 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));

Expand Down
7 changes: 5 additions & 2 deletions src/biz/bokhorst/xprivacy/XActivityManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,17 @@ public String getClassName() {
// 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)

// http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.4.2_r1/com/android/server/am/ActivityManagerService.java
// 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)
// http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.0.0_r1/android/accounts/IAccountManager.java/

// @formatter:on

// @formatter:off
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

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit ff8f2ca

Please sign in to comment.