Merge "Add feature to disable slices"

This commit is contained in:
Abhijit Adsule
2020-02-28 22:13:01 +00:00
committed by Gerrit Code Review
2 changed files with 8 additions and 2 deletions

View File

@@ -2883,6 +2883,13 @@ public abstract class PackageManager {
@SdkConstant(SdkConstantType.FEATURE) @SdkConstant(SdkConstantType.FEATURE)
public static final String FEATURE_IPSEC_TUNNELS = "android.software.ipsec_tunnels"; public static final String FEATURE_IPSEC_TUNNELS = "android.software.ipsec_tunnels";
/**
* Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}:
* The device does not have a slices implementation.
* @hide
*/
@SdkConstant(SdkConstantType.FEATURE)
public static final String FEATURE_SLICES_DISABLED = "android.software.slices_disabled";
/** /**
* Extra field name for the URI to a verification file. Passed to a package * Extra field name for the URI to a verification file. Passed to a package
* verifier. * verifier.

View File

@@ -939,7 +939,6 @@ public final class SystemServer {
false); false);
boolean disableCameraService = SystemProperties.getBoolean("config.disable_cameraservice", boolean disableCameraService = SystemProperties.getBoolean("config.disable_cameraservice",
false); false);
boolean disableSlices = SystemProperties.getBoolean("config.disable_slices", false);
boolean enableLeftyService = SystemProperties.getBoolean("config.enable_lefty", false); boolean enableLeftyService = SystemProperties.getBoolean("config.enable_lefty", false);
boolean isEmulator = SystemProperties.get("ro.kernel.qemu").equals("1"); boolean isEmulator = SystemProperties.get("ro.kernel.qemu").equals("1");
@@ -1911,7 +1910,7 @@ public final class SystemServer {
traceEnd(); traceEnd();
} }
if (!disableSlices) { if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_SLICES_DISABLED)) {
traceBeginAndSlog("StartSliceManagerService"); traceBeginAndSlog("StartSliceManagerService");
mSystemServiceManager.startService(SLICE_MANAGER_SERVICE_CLASS); mSystemServiceManager.startService(SLICE_MANAGER_SERVICE_CLASS);
traceEnd(); traceEnd();