Loading core/res/res/values/lineage_config.xml +7 −2 Original line number Diff line number Diff line Loading @@ -23,8 +23,13 @@ true will use SystemClock.elapsedRealtimeNanos() to set timestamp. --> <bool name="config_useSystemClockforRotationSensor">false</bool> <!-- The list of components which should be automatically disabled. --> <string-array name="config_disabledComponents" translatable="false"> <!-- The list of components which should be automatically disabled for a specific device. Note: this MUST not be used to randomly disable components, ask for approval first! --> <string-array name="config_deviceDisabledComponents" translatable="false"> </string-array> <!-- The list of components which should be automatically disabled for all devices. --> <string-array name="config_globallyDisabledComponents" translatable="false"> </string-array> <!-- The list of components which should be forced to be enabled. --> Loading core/res/res/values/lineage_symbols.xml +2 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,8 @@ <java-symbol type="bool" name="config_useSystemClockforRotationSensor" /> <!-- Package Manager --> <java-symbol type="array" name="config_disabledComponents" /> <java-symbol type="array" name="config_deviceDisabledComponents" /> <java-symbol type="array" name="config_globallyDisabledComponents" /> <java-symbol type="array" name="config_forceEnabledComponents" /> <!-- Privacy Guard --> Loading services/core/java/com/android/server/pm/PackageManagerService.java +21 −14 Original line number Diff line number Diff line Loading @@ -3183,20 +3183,10 @@ public class PackageManagerService extends IPackageManager.Stub // Disable components marked for disabling at build-time mDisabledComponentsList = new ArrayList<ComponentName>(); for (String name : mContext.getResources().getStringArray( com.android.internal.R.array.config_disabledComponents)) { ComponentName cn = ComponentName.unflattenFromString(name); mDisabledComponentsList.add(cn); Slog.v(TAG, "Disabling " + name); String className = cn.getClassName(); PackageSetting pkgSetting = mSettings.mPackages.get(cn.getPackageName()); if (pkgSetting == null || pkgSetting.pkg == null || !pkgSetting.pkg.hasComponentClassName(className)) { Slog.w(TAG, "Unable to disable " + name); continue; } pkgSetting.disableComponentLPw(className, UserHandle.USER_OWNER); } disableComponents(mContext.getResources().getStringArray( com.android.internal.R.array.config_deviceDisabledComponents)); disableComponents(mContext.getResources().getStringArray( com.android.internal.R.array.config_globallyDisabledComponents)); // Enable components marked for forced-enable at build-time for (String name : mContext.getResources().getStringArray( Loading Loading @@ -3329,6 +3319,23 @@ public class PackageManagerService extends IPackageManager.Stub Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER); } private void disableComponents(String[] components) { // Disable components marked for disabling at build-time for (String name : components) { ComponentName cn = ComponentName.unflattenFromString(name); mDisabledComponentsList.add(cn); Slog.v(TAG, "Disabling " + name); String className = cn.getClassName(); PackageSetting pkgSetting = mSettings.mPackages.get(cn.getPackageName()); if (pkgSetting == null || pkgSetting.pkg == null || !pkgSetting.pkg.hasComponentClassName(className)) { Slog.w(TAG, "Unable to disable " + name); continue; } pkgSetting.disableComponentLPw(className, UserHandle.USER_OWNER); } } /** * Uncompress and install stub applications. * <p>In order to save space on the system partition, some applications are shipped in a Loading
core/res/res/values/lineage_config.xml +7 −2 Original line number Diff line number Diff line Loading @@ -23,8 +23,13 @@ true will use SystemClock.elapsedRealtimeNanos() to set timestamp. --> <bool name="config_useSystemClockforRotationSensor">false</bool> <!-- The list of components which should be automatically disabled. --> <string-array name="config_disabledComponents" translatable="false"> <!-- The list of components which should be automatically disabled for a specific device. Note: this MUST not be used to randomly disable components, ask for approval first! --> <string-array name="config_deviceDisabledComponents" translatable="false"> </string-array> <!-- The list of components which should be automatically disabled for all devices. --> <string-array name="config_globallyDisabledComponents" translatable="false"> </string-array> <!-- The list of components which should be forced to be enabled. --> Loading
core/res/res/values/lineage_symbols.xml +2 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,8 @@ <java-symbol type="bool" name="config_useSystemClockforRotationSensor" /> <!-- Package Manager --> <java-symbol type="array" name="config_disabledComponents" /> <java-symbol type="array" name="config_deviceDisabledComponents" /> <java-symbol type="array" name="config_globallyDisabledComponents" /> <java-symbol type="array" name="config_forceEnabledComponents" /> <!-- Privacy Guard --> Loading
services/core/java/com/android/server/pm/PackageManagerService.java +21 −14 Original line number Diff line number Diff line Loading @@ -3183,20 +3183,10 @@ public class PackageManagerService extends IPackageManager.Stub // Disable components marked for disabling at build-time mDisabledComponentsList = new ArrayList<ComponentName>(); for (String name : mContext.getResources().getStringArray( com.android.internal.R.array.config_disabledComponents)) { ComponentName cn = ComponentName.unflattenFromString(name); mDisabledComponentsList.add(cn); Slog.v(TAG, "Disabling " + name); String className = cn.getClassName(); PackageSetting pkgSetting = mSettings.mPackages.get(cn.getPackageName()); if (pkgSetting == null || pkgSetting.pkg == null || !pkgSetting.pkg.hasComponentClassName(className)) { Slog.w(TAG, "Unable to disable " + name); continue; } pkgSetting.disableComponentLPw(className, UserHandle.USER_OWNER); } disableComponents(mContext.getResources().getStringArray( com.android.internal.R.array.config_deviceDisabledComponents)); disableComponents(mContext.getResources().getStringArray( com.android.internal.R.array.config_globallyDisabledComponents)); // Enable components marked for forced-enable at build-time for (String name : mContext.getResources().getStringArray( Loading Loading @@ -3329,6 +3319,23 @@ public class PackageManagerService extends IPackageManager.Stub Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER); } private void disableComponents(String[] components) { // Disable components marked for disabling at build-time for (String name : components) { ComponentName cn = ComponentName.unflattenFromString(name); mDisabledComponentsList.add(cn); Slog.v(TAG, "Disabling " + name); String className = cn.getClassName(); PackageSetting pkgSetting = mSettings.mPackages.get(cn.getPackageName()); if (pkgSetting == null || pkgSetting.pkg == null || !pkgSetting.pkg.hasComponentClassName(className)) { Slog.w(TAG, "Unable to disable " + name); continue; } pkgSetting.disableComponentLPw(className, UserHandle.USER_OWNER); } } /** * Uncompress and install stub applications. * <p>In order to save space on the system partition, some applications are shipped in a