Loading core/java/android/content/om/OverlayManager.java +1 −3 Original line number Diff line number Diff line Loading @@ -31,8 +31,6 @@ import android.os.RemoteException; import android.os.ServiceManager; import android.os.UserHandle; import com.android.server.SystemConfig; import java.util.List; /** Loading @@ -50,7 +48,7 @@ import java.util.List; * <overlayable name="OverlayableResourcesName" actor="overlay://namespace/actorName"> * }</pre></p> * * <p>Actors are defined through {@link SystemConfig}. Only system packages can be used. * <p>Actors are defined through SystemConfig. Only system packages can be used. * The namespace "android" is reserved for use by AOSP and any "android" definitions must * have an implementation on device that fulfill their intended functionality.</p> * Loading core/java/android/content/pm/ApplicationInfo.java +13 −3 Original line number Diff line number Diff line Loading @@ -45,7 +45,6 @@ import android.window.OnBackInvokedCallback; import com.android.internal.util.ArrayUtils; import com.android.internal.util.Parcelling; import com.android.internal.util.Parcelling.BuiltIn.ForBoolean; import com.android.server.SystemConfig; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; Loading Loading @@ -803,7 +802,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public static final int PRIVATE_FLAG_EXT_ATTRIBUTIONS_ARE_USER_VISIBLE = 1 << 2; /** * If false, {@link android.view.KeyEvent#KEYCODE_BACK} related events will be forwarded to * the Activities, Dialogs and Views and {@link android.app.Activity#onBackPressed()}, Loading @@ -815,12 +813,24 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public static final int PRIVATE_FLAG_EXT_ENABLE_ON_BACK_INVOKED_CALLBACK = 1 << 3; /** * Whether or not this package is allowed to access hidden APIs. Replacement for legacy * implementation of {@link #isPackageWhitelistedForHiddenApis()}. * * This is an internal flag and should never be used outside of this class. The real API for * the hidden API enforcement policy is {@link #getHiddenApiEnforcementPolicy()}. * * @hide */ public static final int PRIVATE_FLAG_EXT_ALLOWLISTED_FOR_HIDDEN_APIS = 1 << 4; /** @hide */ @IntDef(flag = true, prefix = { "PRIVATE_FLAG_EXT_" }, value = { PRIVATE_FLAG_EXT_PROFILEABLE, PRIVATE_FLAG_EXT_REQUEST_FOREGROUND_SERVICE_EXEMPTION, PRIVATE_FLAG_EXT_ATTRIBUTIONS_ARE_USER_VISIBLE, PRIVATE_FLAG_EXT_ENABLE_ON_BACK_INVOKED_CALLBACK, PRIVATE_FLAG_EXT_ALLOWLISTED_FOR_HIDDEN_APIS, }) @Retention(RetentionPolicy.SOURCE) public @interface ApplicationInfoPrivateFlagsExt {} Loading Loading @@ -2222,7 +2232,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { } private boolean isPackageWhitelistedForHiddenApis() { return SystemConfig.getInstance().getHiddenApiWhitelistedApps().contains(packageName); return (privateFlagsExt & PRIVATE_FLAG_EXT_ALLOWLISTED_FOR_HIDDEN_APIS) != 0; } /** Loading core/java/android/os/ISystemConfig.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -47,4 +47,9 @@ interface ISystemConfig { * @see SystemConfigManager#getEnabledComponentOverrides */ List<ComponentName> getEnabledComponentOverrides(String packageName); /** * @see SystemConfigManager#getDefaultVrComponents */ List<ComponentName> getDefaultVrComponents(); } core/java/android/os/SystemConfigManager.java +14 −0 Original line number Diff line number Diff line Loading @@ -147,4 +147,18 @@ public class SystemConfigManager { throw e.rethrowFromSystemServer(); } } /** * Return the components that are enabled by default as VR mode listener services. * @hide */ @RequiresPermission(android.Manifest.permission.QUERY_ALL_PACKAGES) public List<ComponentName> getDefaultVrComponents() { try { return mInterface.getDefaultVrComponents(); } catch (RemoteException e) { e.rethrowFromSystemServer(); } return Collections.emptyList(); } } packages/SettingsProvider/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ android:sharedUserId="android.uid.system"> <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" /> <application android:allowClearUserData="false" android:label="@string/app_label" Loading Loading
core/java/android/content/om/OverlayManager.java +1 −3 Original line number Diff line number Diff line Loading @@ -31,8 +31,6 @@ import android.os.RemoteException; import android.os.ServiceManager; import android.os.UserHandle; import com.android.server.SystemConfig; import java.util.List; /** Loading @@ -50,7 +48,7 @@ import java.util.List; * <overlayable name="OverlayableResourcesName" actor="overlay://namespace/actorName"> * }</pre></p> * * <p>Actors are defined through {@link SystemConfig}. Only system packages can be used. * <p>Actors are defined through SystemConfig. Only system packages can be used. * The namespace "android" is reserved for use by AOSP and any "android" definitions must * have an implementation on device that fulfill their intended functionality.</p> * Loading
core/java/android/content/pm/ApplicationInfo.java +13 −3 Original line number Diff line number Diff line Loading @@ -45,7 +45,6 @@ import android.window.OnBackInvokedCallback; import com.android.internal.util.ArrayUtils; import com.android.internal.util.Parcelling; import com.android.internal.util.Parcelling.BuiltIn.ForBoolean; import com.android.server.SystemConfig; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; Loading Loading @@ -803,7 +802,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public static final int PRIVATE_FLAG_EXT_ATTRIBUTIONS_ARE_USER_VISIBLE = 1 << 2; /** * If false, {@link android.view.KeyEvent#KEYCODE_BACK} related events will be forwarded to * the Activities, Dialogs and Views and {@link android.app.Activity#onBackPressed()}, Loading @@ -815,12 +813,24 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public static final int PRIVATE_FLAG_EXT_ENABLE_ON_BACK_INVOKED_CALLBACK = 1 << 3; /** * Whether or not this package is allowed to access hidden APIs. Replacement for legacy * implementation of {@link #isPackageWhitelistedForHiddenApis()}. * * This is an internal flag and should never be used outside of this class. The real API for * the hidden API enforcement policy is {@link #getHiddenApiEnforcementPolicy()}. * * @hide */ public static final int PRIVATE_FLAG_EXT_ALLOWLISTED_FOR_HIDDEN_APIS = 1 << 4; /** @hide */ @IntDef(flag = true, prefix = { "PRIVATE_FLAG_EXT_" }, value = { PRIVATE_FLAG_EXT_PROFILEABLE, PRIVATE_FLAG_EXT_REQUEST_FOREGROUND_SERVICE_EXEMPTION, PRIVATE_FLAG_EXT_ATTRIBUTIONS_ARE_USER_VISIBLE, PRIVATE_FLAG_EXT_ENABLE_ON_BACK_INVOKED_CALLBACK, PRIVATE_FLAG_EXT_ALLOWLISTED_FOR_HIDDEN_APIS, }) @Retention(RetentionPolicy.SOURCE) public @interface ApplicationInfoPrivateFlagsExt {} Loading Loading @@ -2222,7 +2232,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { } private boolean isPackageWhitelistedForHiddenApis() { return SystemConfig.getInstance().getHiddenApiWhitelistedApps().contains(packageName); return (privateFlagsExt & PRIVATE_FLAG_EXT_ALLOWLISTED_FOR_HIDDEN_APIS) != 0; } /** Loading
core/java/android/os/ISystemConfig.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -47,4 +47,9 @@ interface ISystemConfig { * @see SystemConfigManager#getEnabledComponentOverrides */ List<ComponentName> getEnabledComponentOverrides(String packageName); /** * @see SystemConfigManager#getDefaultVrComponents */ List<ComponentName> getDefaultVrComponents(); }
core/java/android/os/SystemConfigManager.java +14 −0 Original line number Diff line number Diff line Loading @@ -147,4 +147,18 @@ public class SystemConfigManager { throw e.rethrowFromSystemServer(); } } /** * Return the components that are enabled by default as VR mode listener services. * @hide */ @RequiresPermission(android.Manifest.permission.QUERY_ALL_PACKAGES) public List<ComponentName> getDefaultVrComponents() { try { return mInterface.getDefaultVrComponents(); } catch (RemoteException e) { e.rethrowFromSystemServer(); } return Collections.emptyList(); } }
packages/SettingsProvider/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ android:sharedUserId="android.uid.system"> <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" /> <application android:allowClearUserData="false" android:label="@string/app_label" Loading