Loading AconfigFlags.bp +16 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ aconfig_declarations_group { // !!! KEEP THIS LIST ALPHABETICAL !!! "aconfig_mediacodec_flags_java_lib", "android.adaptiveauth.flags-aconfig-java", "android.app.appfunctions.flags-aconfig-java", "android.app.contextualsearch.flags-aconfig-java", "android.app.flags-aconfig-java", "android.app.ondeviceintelligence-aconfig-java", Loading Loading @@ -1383,6 +1384,21 @@ java_aconfig_library { defaults: ["framework-minus-apex-aconfig-java-defaults"], } // AppFunctions aconfig_declarations { name: "android.app.appfunctions.flags-aconfig", exportable: true, package: "android.app.appfunctions.flags", container: "system", srcs: ["core/java/android/app/appfunctions/flags/flags.aconfig"], } java_aconfig_library { name: "android.app.appfunctions.flags-aconfig-java", aconfig_declarations: "android.app.appfunctions.flags-aconfig", defaults: ["framework-minus-apex-aconfig-java-defaults"], } // Adaptive Auth aconfig_declarations { name: "android.adaptiveauth.flags-aconfig", Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -10684,6 +10684,7 @@ package android.content { field public static final String ACTIVITY_SERVICE = "activity"; field public static final String ALARM_SERVICE = "alarm"; field public static final String APPWIDGET_SERVICE = "appwidget"; field @FlaggedApi("android.app.appfunctions.flags.enable_app_function_manager") public static final String APP_FUNCTION_SERVICE = "app_function"; field public static final String APP_OPS_SERVICE = "appops"; field public static final String APP_SEARCH_SERVICE = "app_search"; field public static final String AUDIO_SERVICE = "audio"; core/java/android/app/SystemServiceRegistry.java +19 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package android.app; import static android.app.appfunctions.flags.Flags.enableAppFunctionManager; import android.accounts.AccountManager; import android.accounts.IAccountManager; import android.adservices.AdServicesFrameworkInitializer; Loading @@ -28,6 +30,8 @@ import android.app.admin.DevicePolicyManager; import android.app.admin.IDevicePolicyManager; import android.app.ambientcontext.AmbientContextManager; import android.app.ambientcontext.IAmbientContextManager; import android.app.appfunctions.AppFunctionManager; import android.app.appfunctions.IAppFunctionManager; import android.app.appsearch.AppSearchManagerFrameworkInitializer; import android.app.blob.BlobStoreManagerFrameworkInitializer; import android.app.contentsuggestions.ContentSuggestionsManager; Loading Loading @@ -925,6 +929,21 @@ public final class SystemServiceRegistry { return new CompanionDeviceManager(service, ctx.getOuterContext()); }}); if (enableAppFunctionManager()) { registerService(Context.APP_FUNCTION_SERVICE, AppFunctionManager.class, new CachedServiceFetcher<>() { @Override public AppFunctionManager createService(ContextImpl ctx) throws ServiceNotFoundException { IAppFunctionManager service; //TODO(b/357551503): If the feature not present avoid look up every time service = IAppFunctionManager.Stub.asInterface( ServiceManager.getServiceOrThrow(Context.APP_FUNCTION_SERVICE)); return new AppFunctionManager(service, ctx.getOuterContext()); } }); } registerService(Context.VIRTUAL_DEVICE_SERVICE, VirtualDeviceManager.class, new CachedServiceFetcher<VirtualDeviceManager>() { @Override Loading core/java/android/app/appfunctions/AppFunctionManager.java 0 → 100644 +44 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 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.appfunctions; import android.annotation.SystemService; import android.content.Context; /** * Provides app functions related functionalities. * * <p>App function is a specific piece of functionality that an app offers to the system. These * functionalities can be integrated into various system features. * * @hide */ @SystemService(Context.APP_FUNCTION_SERVICE) public final class AppFunctionManager { private final IAppFunctionManager mService; private final Context mContext; /** * TODO(b/357551503): add comments when implement this class * * @hide */ public AppFunctionManager(IAppFunctionManager mService, Context context) { this.mService = mService; this.mContext = context; } } core/java/android/app/appfunctions/IAppFunctionManager.aidl 0 → 100644 +24 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 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.appfunctions; /** * Interface between an app and the server implementation service (AppFunctionManagerService). * @hide */ oneway interface IAppFunctionManager { } No newline at end of file Loading
AconfigFlags.bp +16 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ aconfig_declarations_group { // !!! KEEP THIS LIST ALPHABETICAL !!! "aconfig_mediacodec_flags_java_lib", "android.adaptiveauth.flags-aconfig-java", "android.app.appfunctions.flags-aconfig-java", "android.app.contextualsearch.flags-aconfig-java", "android.app.flags-aconfig-java", "android.app.ondeviceintelligence-aconfig-java", Loading Loading @@ -1383,6 +1384,21 @@ java_aconfig_library { defaults: ["framework-minus-apex-aconfig-java-defaults"], } // AppFunctions aconfig_declarations { name: "android.app.appfunctions.flags-aconfig", exportable: true, package: "android.app.appfunctions.flags", container: "system", srcs: ["core/java/android/app/appfunctions/flags/flags.aconfig"], } java_aconfig_library { name: "android.app.appfunctions.flags-aconfig-java", aconfig_declarations: "android.app.appfunctions.flags-aconfig", defaults: ["framework-minus-apex-aconfig-java-defaults"], } // Adaptive Auth aconfig_declarations { name: "android.adaptiveauth.flags-aconfig", Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -10684,6 +10684,7 @@ package android.content { field public static final String ACTIVITY_SERVICE = "activity"; field public static final String ALARM_SERVICE = "alarm"; field public static final String APPWIDGET_SERVICE = "appwidget"; field @FlaggedApi("android.app.appfunctions.flags.enable_app_function_manager") public static final String APP_FUNCTION_SERVICE = "app_function"; field public static final String APP_OPS_SERVICE = "appops"; field public static final String APP_SEARCH_SERVICE = "app_search"; field public static final String AUDIO_SERVICE = "audio";
core/java/android/app/SystemServiceRegistry.java +19 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package android.app; import static android.app.appfunctions.flags.Flags.enableAppFunctionManager; import android.accounts.AccountManager; import android.accounts.IAccountManager; import android.adservices.AdServicesFrameworkInitializer; Loading @@ -28,6 +30,8 @@ import android.app.admin.DevicePolicyManager; import android.app.admin.IDevicePolicyManager; import android.app.ambientcontext.AmbientContextManager; import android.app.ambientcontext.IAmbientContextManager; import android.app.appfunctions.AppFunctionManager; import android.app.appfunctions.IAppFunctionManager; import android.app.appsearch.AppSearchManagerFrameworkInitializer; import android.app.blob.BlobStoreManagerFrameworkInitializer; import android.app.contentsuggestions.ContentSuggestionsManager; Loading Loading @@ -925,6 +929,21 @@ public final class SystemServiceRegistry { return new CompanionDeviceManager(service, ctx.getOuterContext()); }}); if (enableAppFunctionManager()) { registerService(Context.APP_FUNCTION_SERVICE, AppFunctionManager.class, new CachedServiceFetcher<>() { @Override public AppFunctionManager createService(ContextImpl ctx) throws ServiceNotFoundException { IAppFunctionManager service; //TODO(b/357551503): If the feature not present avoid look up every time service = IAppFunctionManager.Stub.asInterface( ServiceManager.getServiceOrThrow(Context.APP_FUNCTION_SERVICE)); return new AppFunctionManager(service, ctx.getOuterContext()); } }); } registerService(Context.VIRTUAL_DEVICE_SERVICE, VirtualDeviceManager.class, new CachedServiceFetcher<VirtualDeviceManager>() { @Override Loading
core/java/android/app/appfunctions/AppFunctionManager.java 0 → 100644 +44 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 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.appfunctions; import android.annotation.SystemService; import android.content.Context; /** * Provides app functions related functionalities. * * <p>App function is a specific piece of functionality that an app offers to the system. These * functionalities can be integrated into various system features. * * @hide */ @SystemService(Context.APP_FUNCTION_SERVICE) public final class AppFunctionManager { private final IAppFunctionManager mService; private final Context mContext; /** * TODO(b/357551503): add comments when implement this class * * @hide */ public AppFunctionManager(IAppFunctionManager mService, Context context) { this.mService = mService; this.mContext = context; } }
core/java/android/app/appfunctions/IAppFunctionManager.aidl 0 → 100644 +24 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 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.appfunctions; /** * Interface between an app and the server implementation service (AppFunctionManagerService). * @hide */ oneway interface IAppFunctionManager { } No newline at end of file