Loading core/java/android/app/ActivityManagerNative.java +0 −22 Original line number Diff line number Diff line Loading @@ -1888,15 +1888,6 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM return true; } case IS_PRIVACY_GUARD_ENABLED_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); int pid = data.readInt(); boolean res = isPrivacyGuardEnabledForProcess(pid); reply.writeNoException(); reply.writeInt(res ? 1 : 0); return true; } } return super.onTransact(code, data, reply, flags); Loading Loading @@ -4322,18 +4313,5 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); } public boolean isPrivacyGuardEnabledForProcess(int pid) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeInt(pid); mRemote.transact(IS_PRIVACY_GUARD_ENABLED_TRANSACTION, data, reply, 0); reply.readException(); int res = reply.readInt(); data.recycle(); reply.recycle(); return res == 1; } private IBinder mRemote; } core/java/android/app/ApplicationPackageManager.java +0 −20 Original line number Diff line number Diff line Loading @@ -48,7 +48,6 @@ import android.content.res.Resources; import android.content.res.XmlResourceParser; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Binder; import android.os.Process; import android.os.RemoteException; import android.os.UserHandle; Loading Loading @@ -1310,25 +1309,6 @@ final class ApplicationPackageManager extends PackageManager { return PackageManager.COMPONENT_ENABLED_STATE_DEFAULT; } @Override public void setPrivacyGuardSetting(String packageName, boolean enabled) { try { mPM.setPrivacyGuardSetting(packageName, enabled, mContext.getUserId()); } catch (RemoteException e) { // Should never happen! } } @Override public boolean getPrivacyGuardSetting(String packageName) { try { return mPM.getPrivacyGuardSetting(packageName, mContext.getUserId()); } catch (RemoteException e) { // Should never happen! } return false; } /** * @hide */ Loading core/java/android/app/ContextImpl.java +0 −10 Original line number Diff line number Diff line Loading @@ -1592,16 +1592,6 @@ class ContextImpl extends Context { return new DropBoxManager(service); } @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) { Loading core/java/android/app/IActivityManager.java +1 −4 Original line number Diff line number Diff line Loading @@ -192,8 +192,6 @@ public interface IActivityManager extends IInterface { public void setProcessForeground(IBinder token, int pid, boolean isForeground) throws RemoteException; public boolean isPrivacyGuardEnabledForProcess(int pid) throws RemoteException; public int checkPermission(String permission, int pid, int uid) throws RemoteException; Loading Loading @@ -644,6 +642,5 @@ public interface IActivityManager extends IInterface { int KILL_UID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+164; int SET_USER_IS_MONKEY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+165; int HANG_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+166; int IS_PRIVACY_GUARD_ENABLED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+167; int GET_CALLING_PACKAGE_FOR_BROADCAST_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+168; } core/java/android/content/Context.java +0 −10 Original line number Diff line number Diff line Loading @@ -2311,16 +2311,6 @@ public abstract class Context { */ public static final String APP_OPS_SERVICE = "appops"; /** * Determine whether the application or calling application has * privacy guard. This is a privacy feature intended to permit the user * to control access to personal data. Applications and content providers * can check this value if they wish to honor privacy guard. * * @hide */ public abstract boolean isPrivacyGuardEnabled(); /** * Determine whether the given permission is allowed for a particular * process and user ID running in the system. Loading Loading
core/java/android/app/ActivityManagerNative.java +0 −22 Original line number Diff line number Diff line Loading @@ -1888,15 +1888,6 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM return true; } case IS_PRIVACY_GUARD_ENABLED_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); int pid = data.readInt(); boolean res = isPrivacyGuardEnabledForProcess(pid); reply.writeNoException(); reply.writeInt(res ? 1 : 0); return true; } } return super.onTransact(code, data, reply, flags); Loading Loading @@ -4322,18 +4313,5 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); } public boolean isPrivacyGuardEnabledForProcess(int pid) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeInt(pid); mRemote.transact(IS_PRIVACY_GUARD_ENABLED_TRANSACTION, data, reply, 0); reply.readException(); int res = reply.readInt(); data.recycle(); reply.recycle(); return res == 1; } private IBinder mRemote; }
core/java/android/app/ApplicationPackageManager.java +0 −20 Original line number Diff line number Diff line Loading @@ -48,7 +48,6 @@ import android.content.res.Resources; import android.content.res.XmlResourceParser; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Binder; import android.os.Process; import android.os.RemoteException; import android.os.UserHandle; Loading Loading @@ -1310,25 +1309,6 @@ final class ApplicationPackageManager extends PackageManager { return PackageManager.COMPONENT_ENABLED_STATE_DEFAULT; } @Override public void setPrivacyGuardSetting(String packageName, boolean enabled) { try { mPM.setPrivacyGuardSetting(packageName, enabled, mContext.getUserId()); } catch (RemoteException e) { // Should never happen! } } @Override public boolean getPrivacyGuardSetting(String packageName) { try { return mPM.getPrivacyGuardSetting(packageName, mContext.getUserId()); } catch (RemoteException e) { // Should never happen! } return false; } /** * @hide */ Loading
core/java/android/app/ContextImpl.java +0 −10 Original line number Diff line number Diff line Loading @@ -1592,16 +1592,6 @@ class ContextImpl extends Context { return new DropBoxManager(service); } @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) { Loading
core/java/android/app/IActivityManager.java +1 −4 Original line number Diff line number Diff line Loading @@ -192,8 +192,6 @@ public interface IActivityManager extends IInterface { public void setProcessForeground(IBinder token, int pid, boolean isForeground) throws RemoteException; public boolean isPrivacyGuardEnabledForProcess(int pid) throws RemoteException; public int checkPermission(String permission, int pid, int uid) throws RemoteException; Loading Loading @@ -644,6 +642,5 @@ public interface IActivityManager extends IInterface { int KILL_UID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+164; int SET_USER_IS_MONKEY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+165; int HANG_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+166; int IS_PRIVACY_GUARD_ENABLED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+167; int GET_CALLING_PACKAGE_FOR_BROADCAST_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+168; }
core/java/android/content/Context.java +0 −10 Original line number Diff line number Diff line Loading @@ -2311,16 +2311,6 @@ public abstract class Context { */ public static final String APP_OPS_SERVICE = "appops"; /** * Determine whether the application or calling application has * privacy guard. This is a privacy feature intended to permit the user * to control access to personal data. Applications and content providers * can check this value if they wish to honor privacy guard. * * @hide */ public abstract boolean isPrivacyGuardEnabled(); /** * Determine whether the given permission is allowed for a particular * process and user ID running in the system. Loading