Loading AconfigFlags.bp +16 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ aconfig_declarations_group { "android.app.flags-aconfig-java", "android.app.jank.flags-aconfig-java", "android.app.ondeviceintelligence-aconfig-java", "android.app.userrecovery.flags-aconfig-java", "android.app.smartspace.flags-aconfig-java", "android.app.supervision.flags-aconfig-java", "android.app.usage.flags-aconfig-java", Loading Loading @@ -1297,6 +1298,21 @@ aconfig_declarations { visibility: [":__subpackages__"], } // User Recovery aconfig_declarations { name: "android.app.userrecovery.flags-aconfig", exportable: true, package: "android.app.userrecovery.flags", container: "system", srcs: ["core/java/android/app/userrecovery/flags/flags.aconfig"], } java_aconfig_library { name: "android.app.userrecovery.flags-aconfig-java", aconfig_declarations: "android.app.userrecovery.flags-aconfig", defaults: ["framework-minus-apex-aconfig-java-defaults"], } // Thread network aconfig_declarations { name: "com.android.net.thread.platform.flags-aconfig", Loading core/java/android/app/SystemServiceRegistry.java +19 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.app; import static android.app.appfunctions.flags.Flags.enableAppFunctionManager; import static android.app.userrecovery.flags.Flags.enableUserRecoveryManager; import static android.hardware.serial.flags.Flags.enableSerialApi; import static android.provider.flags.Flags.newStoragePublicApi; import static android.server.Flags.removeGameManagerServiceFromWear; Loading Loading @@ -64,6 +65,8 @@ import android.app.usage.IStorageStatsManager; import android.app.usage.IUsageStatsManager; import android.app.usage.StorageStatsManager; import android.app.usage.UsageStatsManager; import android.app.userrecovery.IUserRecoveryManager; import android.app.userrecovery.UserRecoveryManager; import android.app.wallpapereffectsgeneration.IWallpaperEffectsGenerationManager; import android.app.wallpapereffectsgeneration.WallpaperEffectsGenerationManager; import android.app.wearable.IWearableSensingManager; Loading Loading @@ -973,6 +976,22 @@ public final class SystemServiceRegistry { }); } if (enableUserRecoveryManager()) { registerService(Context.USER_RECOVERY_SERVICE, UserRecoveryManager.class, new CachedServiceFetcher<>() { @Override public UserRecoveryManager createService(ContextImpl ctx) throws ServiceNotFoundException { IUserRecoveryManager service; service = IUserRecoveryManager.Stub.asInterface( ServiceManager.getServiceOrThrow( Context.USER_RECOVERY_SERVICE)); return new UserRecoveryManager(service, ctx.getOuterContext()); } }); } registerService(Context.VIRTUAL_DEVICE_SERVICE, VirtualDeviceManager.class, new CachedServiceFetcher<VirtualDeviceManager>() { @Override Loading core/java/android/app/userrecovery/IUserRecoveryManager.aidl 0 → 100644 +24 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.app.userrecovery; /** * Interface between an app and the server implementation service (UserRecoveryManagerService). * @hide */ oneway interface IUserRecoveryManager { } core/java/android/app/userrecovery/OWNERS 0 → 100644 +3 −0 Original line number Diff line number Diff line behnoodm@google.com hardikgoyal@google.com jadmanski@google.com core/java/android/app/userrecovery/UserRecoveryManager.java 0 → 100644 +47 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.app.userrecovery; import static android.app.userrecovery.flags.Flags.FLAG_ENABLE_USER_RECOVERY_MANAGER; import android.annotation.FlaggedApi; import android.annotation.SystemService; import android.content.Context; /** * Provides user recovery related functionalities. * * @hide */ @FlaggedApi(FLAG_ENABLE_USER_RECOVERY_MANAGER) @SystemService(Context.USER_RECOVERY_SERVICE) public final class UserRecoveryManager { @SuppressWarnings("unused") private final IUserRecoveryManager mService; @SuppressWarnings("unused") private final Context mContext; /** * TODO(b/415960504): add comments when implementing this class * * @hide */ public UserRecoveryManager(IUserRecoveryManager mService, Context context) { this.mService = mService; this.mContext = context; } } Loading
AconfigFlags.bp +16 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ aconfig_declarations_group { "android.app.flags-aconfig-java", "android.app.jank.flags-aconfig-java", "android.app.ondeviceintelligence-aconfig-java", "android.app.userrecovery.flags-aconfig-java", "android.app.smartspace.flags-aconfig-java", "android.app.supervision.flags-aconfig-java", "android.app.usage.flags-aconfig-java", Loading Loading @@ -1297,6 +1298,21 @@ aconfig_declarations { visibility: [":__subpackages__"], } // User Recovery aconfig_declarations { name: "android.app.userrecovery.flags-aconfig", exportable: true, package: "android.app.userrecovery.flags", container: "system", srcs: ["core/java/android/app/userrecovery/flags/flags.aconfig"], } java_aconfig_library { name: "android.app.userrecovery.flags-aconfig-java", aconfig_declarations: "android.app.userrecovery.flags-aconfig", defaults: ["framework-minus-apex-aconfig-java-defaults"], } // Thread network aconfig_declarations { name: "com.android.net.thread.platform.flags-aconfig", Loading
core/java/android/app/SystemServiceRegistry.java +19 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.app; import static android.app.appfunctions.flags.Flags.enableAppFunctionManager; import static android.app.userrecovery.flags.Flags.enableUserRecoveryManager; import static android.hardware.serial.flags.Flags.enableSerialApi; import static android.provider.flags.Flags.newStoragePublicApi; import static android.server.Flags.removeGameManagerServiceFromWear; Loading Loading @@ -64,6 +65,8 @@ import android.app.usage.IStorageStatsManager; import android.app.usage.IUsageStatsManager; import android.app.usage.StorageStatsManager; import android.app.usage.UsageStatsManager; import android.app.userrecovery.IUserRecoveryManager; import android.app.userrecovery.UserRecoveryManager; import android.app.wallpapereffectsgeneration.IWallpaperEffectsGenerationManager; import android.app.wallpapereffectsgeneration.WallpaperEffectsGenerationManager; import android.app.wearable.IWearableSensingManager; Loading Loading @@ -973,6 +976,22 @@ public final class SystemServiceRegistry { }); } if (enableUserRecoveryManager()) { registerService(Context.USER_RECOVERY_SERVICE, UserRecoveryManager.class, new CachedServiceFetcher<>() { @Override public UserRecoveryManager createService(ContextImpl ctx) throws ServiceNotFoundException { IUserRecoveryManager service; service = IUserRecoveryManager.Stub.asInterface( ServiceManager.getServiceOrThrow( Context.USER_RECOVERY_SERVICE)); return new UserRecoveryManager(service, ctx.getOuterContext()); } }); } registerService(Context.VIRTUAL_DEVICE_SERVICE, VirtualDeviceManager.class, new CachedServiceFetcher<VirtualDeviceManager>() { @Override Loading
core/java/android/app/userrecovery/IUserRecoveryManager.aidl 0 → 100644 +24 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.app.userrecovery; /** * Interface between an app and the server implementation service (UserRecoveryManagerService). * @hide */ oneway interface IUserRecoveryManager { }
core/java/android/app/userrecovery/OWNERS 0 → 100644 +3 −0 Original line number Diff line number Diff line behnoodm@google.com hardikgoyal@google.com jadmanski@google.com
core/java/android/app/userrecovery/UserRecoveryManager.java 0 → 100644 +47 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.app.userrecovery; import static android.app.userrecovery.flags.Flags.FLAG_ENABLE_USER_RECOVERY_MANAGER; import android.annotation.FlaggedApi; import android.annotation.SystemService; import android.content.Context; /** * Provides user recovery related functionalities. * * @hide */ @FlaggedApi(FLAG_ENABLE_USER_RECOVERY_MANAGER) @SystemService(Context.USER_RECOVERY_SERVICE) public final class UserRecoveryManager { @SuppressWarnings("unused") private final IUserRecoveryManager mService; @SuppressWarnings("unused") private final Context mContext; /** * TODO(b/415960504): add comments when implementing this class * * @hide */ public UserRecoveryManager(IUserRecoveryManager mService, Context context) { this.mService = mService; this.mContext = context; } }