diff options
| author | Steve Kondik <shade@chemlab.org> | 2013-06-12 00:47:55 -0700 |
|---|---|---|
| committer | Steve Kondik <shade@chemlab.org> | 2013-06-24 11:36:22 -0700 |
| commit | e48fce6da7bd839d70cbf69abb2780c6d30ea7f6 (patch) | |
| tree | 49dd160f5a5d10847fd446e0db7f31f2d800792f /core/java/android/app/ContextImpl.java | |
| parent | b429a08331e8ebea15113fe287f4e5c9478d7001 (diff) | |
| download | frameworks_base-e48fce6da7bd839d70cbf69abb2780c6d30ea7f6.zip frameworks_base-e48fce6da7bd839d70cbf69abb2780c6d30ea7f6.tar.gz frameworks_base-e48fce6da7bd839d70cbf69abb2780c6d30ea7f6.tar.bz2 | |
framework: Privacy Guard
* Introduce a new privacy feature which allows the user to run an
application with reduced visibility into his or her personal data.
* Adds a per-application flag and simple API to determine if this flag
is enabled for the current or calling process.
* This flag can be used by content providers to decide if they should
return a limited/empty dataset.
Change-Id: Id7c54d728e63acb2b02a2a9322930b54949f6c5d
Diffstat (limited to 'core/java/android/app/ContextImpl.java')
| -rw-r--r-- | core/java/android/app/ContextImpl.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java index 4d9f11e..21fbc1f 100644 --- a/core/java/android/app/ContextImpl.java +++ b/core/java/android/app/ContextImpl.java @@ -1550,6 +1550,16 @@ class ContextImpl extends Context { } @Override + public boolean isPrivacyGuardEnabled() { + try { + return ActivityManagerNative.getDefault().isPrivacyGuardEnabledForProcess(Binder.getCallingPid()); + } catch (RemoteException e) { + Log.e(TAG, e.getMessage(), e); + } + return false; + } + + @Override public int checkPermission(String permission, int pid, int uid) { if (permission == null) { throw new IllegalArgumentException("permission is null"); |
