From 478d8bf939d91b382b84583bde14c61a8cfbcd9a Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 15 Dec 2014 11:18:05 +0100 Subject: [PATCH] Added restriction Srv_getCurrentSyncsAsUser Refs #1757 --- CHANGELOG.md | 1 + res/values/functions.xml | 1 + src/biz/bokhorst/xprivacy/Meta.java | 1 + src/biz/bokhorst/xprivacy/XContentResolver.java | 6 +++++- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee36bf919..9f9b37fc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ Changelog * Added restrictions *IpPrefix.getAddress* and *IpPrefix.getRawAddress* ([issue](/../../issues/1757)) * Added restrictions for [LinkProperties](http://developer.android.com/reference/android/net/LinkProperties.html) * Added restrictions *InetAddress.getAllByNameOnNet* and *InetAddress.getByNameOnNet* ([issue](/../../issues/1757)) +* Added restriction *Srv_getCurrentSyncsAsUser* ([issue](/../../issues/1757)) [Open issues](https://github.com/M66B/XPrivacy/issues?state=open) diff --git a/res/values/functions.xml b/res/values/functions.xml index 247326b10..de247a7c9 100644 --- a/res/values/functions.xml +++ b/res/values/functions.xml @@ -22,6 +22,7 @@ Google documentation]]> Google documentation]]> Google documentation]]> + Google documentation]]> diff --git a/src/biz/bokhorst/xprivacy/Meta.java b/src/biz/bokhorst/xprivacy/Meta.java index 25bdf8a3d..2256f0ac6 100644 --- a/src/biz/bokhorst/xprivacy/Meta.java +++ b/src/biz/bokhorst/xprivacy/Meta.java @@ -73,6 +73,7 @@ public static List get() { mListHook.add(new Hook("accounts", "Srv_getAccountsForPackage", "GET_ACCOUNTS", 19, "3.5.6", null).AOSP(19)); mListHook.add(new Hook("accounts", "Srv_getSharedAccountsAsUser", "GET_ACCOUNTS", 19, "2.99", null).AOSP(19)); mListHook.add(new Hook("accounts", "Srv_getCurrentSyncs", "READ_SYNC_SETTINGS", 19, "2.99", "getCurrentSyncs").AOSP(19)); + mListHook.add(new Hook("accounts", "Srv_getCurrentSyncsAsUser", "READ_SYNC_SETTINGS", 21, "3.5.6", null).AOSP(21)); mListHook.add(new Hook("browser", "BrowserProvider2", "com.android.browser.permission.READ_HISTORY_BOOKMARKS,GLOBAL_SEARCH", 1, null, null)); mListHook.add(new Hook("browser", "Downloads", "ACCESS_DOWNLOAD_MANAGER,ACCESS_DOWNLOAD_MANAGER_ADVANCED,ACCESS_ALL_DOWNLOADS", 1, "1.99.43", null).dangerous()); diff --git a/src/biz/bokhorst/xprivacy/XContentResolver.java b/src/biz/bokhorst/xprivacy/XContentResolver.java index 6edbca1d9..231a92e06 100644 --- a/src/biz/bokhorst/xprivacy/XContentResolver.java +++ b/src/biz/bokhorst/xprivacy/XContentResolver.java @@ -88,6 +88,8 @@ public String getClassName() { // public void registerContentObserver(android.net.Uri uri, boolean notifyForDescendants, android.database.IContentObserver observer, int userHandle) // public void unregisterContentObserver(android.database.IContentObserver observer) // http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.2.2_r1/android/content/ContentService.java + // public List getCurrentSyncsAsUser(int userId) + // http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.0.0_r1/android/content/IContentService.java // public Bundle call(String method, String request, Bundle args) // http://developer.android.com/reference/android/provider/Settings.html @@ -103,7 +105,7 @@ private enum Methods { getCurrentSync, getCurrentSyncs, getSyncAdapterTypes, openAssetFile, openFile, openAssetFileDescriptor, openFileDescriptor, openInputStream, openOutputStream, openTypedAssetFileDescriptor, query, Srv_call, Srv_query, - Srv_getCurrentSyncs + Srv_getCurrentSyncs, Srv_getCurrentSyncsAsUser }; // @formatter:on @@ -224,6 +226,7 @@ protected void before(XParam param) throws Throwable { break; case Srv_getCurrentSyncs: + case Srv_getCurrentSyncsAsUser: // Do nothing break; } @@ -271,6 +274,7 @@ protected void after(XParam param) throws Throwable { break; case Srv_getCurrentSyncs: + case Srv_getCurrentSyncsAsUser: if (param.getResult() != null) if (isRestricted(param)) { int uid = Binder.getCallingUid();