Revert "Remove Permissions Hub."
This reverts commit 1e7c172ad5
.
Bug: 132292477
Test: None.
Change-Id: Icae2cd4edbb22e2f3ea72e20f0ebd818f1ac6629
This commit is contained in:
@@ -130,6 +130,11 @@ public final class Utils extends com.android.settingslib.Utils {
|
||||
public static final String PROPERTY_DEVICE_IDENTIFIER_ACCESS_RESTRICTIONS_DISABLED =
|
||||
"device_identifier_access_restrictions_disabled";
|
||||
|
||||
/**
|
||||
* Whether to show the Permissions Hub.
|
||||
*/
|
||||
public static final String PROPERTY_PERMISSIONS_HUB_ENABLED = "permissions_hub_enabled";
|
||||
|
||||
/**
|
||||
* Finds a matching activity for a preference's intent. If a matching
|
||||
* activity is not found, it will remove the preference.
|
||||
|
@@ -64,7 +64,9 @@ public class RecentLocationAccessPreferenceController extends AbstractPreference
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
return false;
|
||||
return Boolean.parseBoolean(
|
||||
DeviceConfig.getProperty(DeviceConfig.NAMESPACE_PRIVACY,
|
||||
Utils.PROPERTY_PERMISSIONS_HUB_ENABLED));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -89,7 +89,10 @@ public class PermissionBarChartPreferenceController extends BasePreferenceContro
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return UNSUPPORTED_ON_DEVICE;
|
||||
return Boolean.parseBoolean(
|
||||
DeviceConfig.getProperty(DeviceConfig.NAMESPACE_PRIVACY,
|
||||
com.android.settings.Utils.PROPERTY_PERMISSIONS_HUB_ENABLED)) ?
|
||||
AVAILABLE_UNSEARCHABLE : UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user