Add hidden API for whether permission review mode is on.
BUG: 34240393 Change-Id: I68e55767a7da1d457a6cedd210aac9e339fb996c
This commit is contained in:
@@ -9790,6 +9790,7 @@ package android.content.pm {
|
||||
method public abstract android.content.res.XmlResourceParser getXml(java.lang.String, int, android.content.pm.ApplicationInfo);
|
||||
method public abstract boolean hasSystemFeature(java.lang.String);
|
||||
method public abstract boolean hasSystemFeature(java.lang.String, int);
|
||||
method public abstract boolean isPermissionReviewModeEnabled();
|
||||
method public abstract boolean isPermissionRevokedByPolicy(java.lang.String, java.lang.String);
|
||||
method public abstract boolean isSafeMode();
|
||||
method public abstract java.util.List<android.content.pm.ResolveInfo> queryBroadcastReceivers(android.content.Intent, int);
|
||||
@@ -38217,6 +38218,7 @@ package android.test.mock {
|
||||
method public android.content.res.XmlResourceParser getXml(java.lang.String, int, android.content.pm.ApplicationInfo);
|
||||
method public boolean hasSystemFeature(java.lang.String);
|
||||
method public boolean hasSystemFeature(java.lang.String, int);
|
||||
method public boolean isPermissionReviewModeEnabled();
|
||||
method public boolean isPermissionRevokedByPolicy(java.lang.String, java.lang.String);
|
||||
method public boolean isSafeMode();
|
||||
method public java.util.List<android.content.pm.ResolveInfo> queryBroadcastReceivers(android.content.Intent, int);
|
||||
|
||||
@@ -291,6 +291,12 @@ public class ApplicationPackageManager extends PackageManager {
|
||||
throw new NameNotFoundException(group);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPermissionReviewModeEnabled() {
|
||||
return mContext.getResources().getBoolean(
|
||||
com.android.internal.R.bool.config_permissionReviewRequired);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PermissionGroupInfo getPermissionGroupInfo(String name,
|
||||
int flags) throws NameNotFoundException {
|
||||
|
||||
@@ -2825,6 +2825,14 @@ public abstract class PackageManager {
|
||||
public abstract List<PermissionInfo> queryPermissionsByGroup(String group,
|
||||
@PermissionInfoFlags int flags) throws NameNotFoundException;
|
||||
|
||||
/**
|
||||
* Returns true if Permission Review Mode is enabled, false otherwise.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public abstract boolean isPermissionReviewModeEnabled();
|
||||
|
||||
/**
|
||||
* Retrieve all of the information we know about a particular group of
|
||||
* permissions.
|
||||
|
||||
@@ -140,6 +140,12 @@ public class MockPackageManager extends PackageManager {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@Override
|
||||
public boolean isPermissionReviewModeEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PermissionGroupInfo getPermissionGroupInfo(String name,
|
||||
int flags) throws NameNotFoundException {
|
||||
|
||||
@@ -126,6 +126,11 @@ public class BridgePackageManager extends PackageManager {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPermissionReviewModeEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PermissionGroupInfo getPermissionGroupInfo(String name, int flags)
|
||||
throws NameNotFoundException {
|
||||
|
||||
Reference in New Issue
Block a user