Add config for display Cloned Apps page in Settings.

Bug: 266548680
Test: manual
Change-Id: I6a89813dd266591ef001f9fc4ef2fde9427818c0
This commit is contained in:
Ankita Vyas
2023-03-01 12:34:54 +00:00
parent 3e41d936b3
commit c4ccf52658
2 changed files with 6 additions and 1 deletions

View File

@@ -698,4 +698,7 @@
<!-- Whether checking adaptive charging to define battery manager visibility. -->
<bool name="config_battery_manager_consider_ac">false</bool>
<!-- Whether to display Cloned Apps page in Settings (Settings > Apps > Cloned Apps).-->
<bool name="config_cloned_apps_page_enabled">false</bool>
</resources>

View File

@@ -56,7 +56,9 @@ public class ClonedAppsPreferenceController extends BasePreferenceController
@Override
public int getAvailabilityStatus() {
return DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_APP_CLONING,
PROPERTY_CLONED_APPS_ENABLED, false) ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
PROPERTY_CLONED_APPS_ENABLED, false)
&& mContext.getResources().getBoolean(R.bool.config_cloned_apps_page_enabled)
? AVAILABLE : UNSUPPORTED_ON_DEVICE;
}
@Override