Loading AconfigFlags.bp +13 −0 Original line number Diff line number Diff line Loading @@ -532,6 +532,7 @@ aconfig_declarations { name: "android.content.pm.flags-aconfig", package: "android.content.pm", container: "system", exportable: true, srcs: ["core/java/android/content/pm/flags.aconfig"], } Loading @@ -541,6 +542,18 @@ java_aconfig_library { defaults: ["framework-minus-apex-aconfig-java-defaults"], } java_aconfig_library { name: "android.content.pm.flags-aconfig-java-export", aconfig_declarations: "android.content.pm.flags-aconfig", defaults: ["framework-minus-apex-aconfig-java-defaults"], mode: "exported", min_sdk_version: "30", apex_available: [ "//apex_available:platform", "com.android.permission", ], } java_aconfig_library { name: "android.content.pm.flags-aconfig-java-host", aconfig_declarations: "android.content.pm.flags-aconfig", Loading api/StubLibraries.bp +107 −34 Original line number Diff line number Diff line Loading @@ -1144,31 +1144,47 @@ java_library { ], } droidstubs { name: "api_versions_public", srcs: [":android_stubs_current_with_test_libs{.jar}"], // Defaults for `droidstubs` modules that generate `api-versions.xml` files for // the various API surfaces. stubs_defaults { name: "api_versions_base_defaults", defaults_visibility: ["//visibility:private"], generate_stubs: false, api_levels_annotations_enabled: true, api_levels_annotations_dirs: [ "sdk-dir", "api-versions-jars-dir", ], api_levels_sdk_type: "public", } // Defaults for `droidstubs` modules that generate complete `api-versions.xml` // files, i.e. include SDK extensions. stubs_defaults { name: "api_versions_complete_defaults", defaults_visibility: ["//visibility:private"], defaults: ["api_versions_base_defaults"], extensions_info_file: ":sdk-extensions-info", } // Produces an `api-versions.xml` file that includes up-to-date information // about all the public APIs, both updatable and non-updatable and historic // information about all previous dessert and SDK extension releases. droidstubs { name: "api_versions_public", defaults: ["api_versions_complete_defaults"], srcs: [":android_stubs_current_with_test_libs{.jar}"], api_levels_sdk_type: "public", visibility: ["//frameworks/base"], } // Produces an `api-versions.xml` file that includes up-to-date information // about all the system APIs, both updatable and non-updatable and historic // information about all previous dessert and SDK extension releases. droidstubs { name: "api_versions_system", defaults: ["api_versions_complete_defaults"], srcs: [":android_system_stubs_current_with_test_libs{.jar}"], generate_stubs: false, api_levels_annotations_enabled: true, api_levels_annotations_dirs: [ "sdk-dir", "api-versions-jars-dir", ], api_levels_sdk_type: "system", extensions_info_file: ":sdk-extensions-info", dists: [ // Make the api-versions.xml file for the system API available in the // sdk build target. Loading @@ -1180,42 +1196,99 @@ droidstubs { ], } // This module can be built with: // m out/soong/.intermediates/frameworks/base/api/api_versions_module_lib/android_common/metalava/api-versions.xml droidstubs { name: "api_versions_module_lib", srcs: [":android_module_stubs_current_with_test_libs{.jar}"], generate_stubs: false, api_levels_annotations_enabled: true, // Defaults for `droidstubs` modules that generate `api-versions.xml` files that // only include non-updatable code, i.e. for platform API only, not SDK // extensions. stubs_defaults { name: "api_versions_non_updatable_defaults", defaults_visibility: ["//visibility:private"], defaults: ["api_versions_base_defaults"], // this only has the non-updatable portions of the module lib sdk, // which can reference classes from updatable apexes, so remove references to them // from this api_versions file. flags: ["--remove-missing-class-references-in-api-levels"], api_levels_annotations_dirs: [ "sdk-dir", "api-versions-jars-dir", ], api_levels_sdk_type: "module-lib", // extensions_info_file is purposefully omitted, because this module should just be // the non-updatable portions of the sdk, and extension sdks are updatable. } // Produces an `api-versions.xml` file that includes up-to-date information // about only the non-updatable module-lib APIs and historic information about // all previous dessert and SDK extension releases. That historic information // may include information about APIs that were previously not-updatable which // have since become updatable. droidstubs { name: "api_versions_module_lib", defaults: ["api_versions_non_updatable_defaults"], srcs: [":android_module_stubs_current_with_test_libs{.jar}"], api_levels_sdk_type: "module-lib", } // Create a single jar containing the whole module-lib API surface. // This is needed because Metalava only consumes the first jar file it is given // and ignores the rest. java_library { name: "android_module_stubs_complete_current_with_test_libs", static_libs: [ "android_module_stubs_current_with_test_libs", "framework-updatable-stubs-module_libs_api-exportable", ], defaults: ["android.jar_defaults"], visibility: [ "//visibility:override", "//visibility:private", ], } // Produces an `api-versions.xml` file that includes up-to-date information // about all the module-lib APIs, both updatable and non-updatable and historic // information about all previous dessert and SDK extension releases. droidstubs { name: "api_versions_module_lib_complete", defaults: ["api_versions_complete_defaults"], srcs: [":android_module_stubs_complete_current_with_test_libs{.jar}"], api_levels_sdk_type: "module-lib", } // Produces an `api-versions.xml` file that includes up-to-date information // about only the non-updatable system-server APIs and historic information // about all previous dessert and SDK extension releases. That historic // information may include information about APIs that were previously // not-updatable which have since become updatable. droidstubs { name: "api_versions_system_server", defaults: ["api_versions_non_updatable_defaults"], srcs: [":android_system_server_stubs_current_with_test_libs{.jar}"], generate_stubs: false, api_levels_annotations_enabled: true, // this only has the non-updatable portions of the system server sdk, // which can reference classes from updatable apexes, so remove references to them // from this api_versions file. flags: ["--remove-missing-class-references-in-api-levels"], api_levels_annotations_dirs: [ "sdk-dir", "api-versions-jars-dir", api_levels_sdk_type: "system-server", } // Create a single jar containing the whole system-server API surface. // This is needed because Metalava only consumes the first jar file it is given // and ignores the rest. java_library { name: "android_system_server_stubs_complete_current_with_test_libs", static_libs: [ "android_system_server_stubs_current_with_test_libs", // system-server extends module-lib but libraries which only service-* // libraries provided system-server APIs, so include module-lib APIs for // the others, e.g. framework-* libraries. "framework-updatable-stubs-module_libs_api-exportable", "framework-updatable-stubs-system_server_api-exportable", ], defaults: ["android.jar_defaults"], visibility: [ "//visibility:override", "//visibility:private", ], } // Produces an `api-versions.xml` file that includes up-to-date information // about all the system-server APIs, both updatable and non-updatable and // historic information about all previous dessert and SDK extension releases. droidstubs { name: "api_versions_system_server_complete", defaults: ["api_versions_complete_defaults"], srcs: [":android_system_server_stubs_complete_current_with_test_libs{.jar}"], api_levels_sdk_type: "system-server", // extensions_info_file is purposefully omitted, because this module should just be // the non-updatable portions of the sdk, and extension sdks are updatable. } ///////////////////////////////////////////////////////////////////// Loading api/api.go +21 −0 Original line number Diff line number Diff line Loading @@ -386,6 +386,26 @@ func createMergedFrameworkModuleLibStubs(ctx android.LoadHookContext, modules [] ctx.CreateModule(java.LibraryFactory, &props) } func createMergedFrameworkSystemServerExportableStubs(ctx android.LoadHookContext, bootclasspath, system_server_classpath []string) { // The user of this module compiles against the "core" SDK and against non-updatable bootclasspathModules, // so remove to avoid dupes. bootclasspathModules := removeAll(bootclasspath, core_libraries_modules) bootclasspathModules = removeAll(bootclasspath, non_updatable_modules) modules := append( // Include all the module-lib APIs from the bootclasspath libraries. transformArray(bootclasspathModules, "", ".stubs.exportable.module_lib"), // Then add all the system-server APIs from the service-* libraries. transformArray(system_server_classpath, "", ".stubs.exportable.system_server")..., ) props := libraryProps{} props.Name = proptools.StringPtr("framework-updatable-stubs-system_server_api-exportable") props.Static_libs = modules props.Sdk_version = proptools.StringPtr("system_server_current") props.Visibility = []string{"//frameworks/base"} props.Is_stubs_module = proptools.BoolPtr(true) ctx.CreateModule(java.LibraryFactory, &props) } func createPublicStubsSourceFilegroup(ctx android.LoadHookContext, modules []string) { props := fgProps{} props.Name = proptools.StringPtr("all-modules-public-stubs-source") Loading Loading @@ -531,6 +551,7 @@ func (a *CombinedApis) createInternalModules(ctx android.LoadHookContext) { createMergedSystemExportableStubs(ctx, bootclasspath) createMergedTestExportableStubsForNonUpdatableModules(ctx) createMergedFrameworkModuleLibExportableStubs(ctx, bootclasspath) createMergedFrameworkSystemServerExportableStubs(ctx, bootclasspath, system_server_classpath) createMergedAnnotationsFilegroups(ctx, bootclasspath, system_server_classpath) Loading core/api/test-current.txt +9 −5 Original line number Diff line number Diff line Loading @@ -1529,9 +1529,9 @@ package android.graphics.fonts { package android.hardware { @Deprecated public class Camera { method @Deprecated public static void getCameraInfo(int, @NonNull android.content.Context, boolean, android.hardware.Camera.CameraInfo); method @Deprecated public static void getCameraInfo(int, @NonNull android.content.Context, int, android.hardware.Camera.CameraInfo); method @Deprecated public static int getNumberOfCameras(@NonNull android.content.Context); method @Deprecated public static android.hardware.Camera open(int, @NonNull android.content.Context, boolean); method @Deprecated public static android.hardware.Camera open(int, @NonNull android.content.Context, int); method @Deprecated public final void setPreviewSurface(android.view.Surface) throws java.io.IOException; } Loading Loading @@ -1606,11 +1606,15 @@ package android.hardware.camera2 { public final class CameraManager { method @NonNull public android.hardware.camera2.CameraCharacteristics getCameraCharacteristics(@NonNull String, boolean) throws android.hardware.camera2.CameraAccessException; method public String[] getCameraIdListNoLazy() throws android.hardware.camera2.CameraAccessException; method @FlaggedApi("com.android.window.flags.camera_compat_for_freeform") public static int getRotationOverrideInternal(@Nullable android.content.Context, @Nullable android.content.pm.PackageManager, @Nullable String); method @RequiresPermission(android.Manifest.permission.CAMERA) public void openCamera(@NonNull String, boolean, @Nullable android.os.Handler, @NonNull android.hardware.camera2.CameraDevice.StateCallback) throws android.hardware.camera2.CameraAccessException; method @RequiresPermission(allOf={android.Manifest.permission.SYSTEM_CAMERA, android.Manifest.permission.CAMERA}) public void openCamera(@NonNull String, int, @NonNull java.util.concurrent.Executor, @NonNull android.hardware.camera2.CameraDevice.StateCallback) throws android.hardware.camera2.CameraAccessException; method public static boolean shouldOverrideToPortrait(@Nullable android.content.pm.PackageManager, @Nullable String); field public static final String LANDSCAPE_TO_PORTRAIT_PROP = "camera.enable_landscape_to_portrait"; field public static final long OVERRIDE_CAMERA_LANDSCAPE_TO_PORTRAIT = 250678880L; // 0xef10e60L field @FlaggedApi("com.android.window.flags.camera_compat_for_freeform") public static final int ROTATION_OVERRIDE_NONE = 0; // 0x0 field @FlaggedApi("com.android.window.flags.camera_compat_for_freeform") public static final int ROTATION_OVERRIDE_OVERRIDE_TO_PORTRAIT = 1; // 0x1 field @FlaggedApi("com.android.window.flags.camera_compat_for_freeform") public static final int ROTATION_OVERRIDE_ROTATION_ONLY = 2; // 0x2 } public abstract static class CameraManager.AvailabilityCallback { Loading Loading @@ -3989,15 +3993,15 @@ package android.view.inputmethod { method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public void addVirtualStylusIdForTestSession(); method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public void finishTrackingPendingImeVisibilityRequests(); method public int getDisplayId(); method @FlaggedApi("android.view.inputmethod.imm_userhandle_hostsidetests") @NonNull @RequiresPermission(value=android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional=true) public java.util.List<android.view.inputmethod.InputMethodInfo> getEnabledInputMethodListAsUser(@NonNull android.os.UserHandle); method @FlaggedApi("android.view.inputmethod.imm_userhandle_hostsidetests") @NonNull @RequiresPermission(value=android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional=true) public java.util.List<android.view.inputmethod.InputMethodSubtype> getEnabledInputMethodSubtypeListAsUser(@NonNull String, boolean, @NonNull android.os.UserHandle); method @NonNull @RequiresPermission(value=android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional=true) public java.util.List<android.view.inputmethod.InputMethodInfo> getEnabledInputMethodListAsUser(@NonNull android.os.UserHandle); method @NonNull @RequiresPermission(value=android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional=true) public java.util.List<android.view.inputmethod.InputMethodSubtype> getEnabledInputMethodSubtypeListAsUser(@NonNull String, boolean, @NonNull android.os.UserHandle); method @NonNull @RequiresPermission(value=android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional=true) public java.util.List<android.view.inputmethod.InputMethodInfo> getInputMethodListAsUser(int); method public boolean hasActiveInputConnection(@Nullable android.view.View); method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public boolean hasPendingImeVisibilityRequests(); method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public void hideSoftInputFromServerForTest(); method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public boolean isCurrentRootView(@NonNull android.view.View); method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public boolean isInputMethodPickerShown(); method @FlaggedApi("android.view.inputmethod.imm_userhandle_hostsidetests") @NonNull @RequiresPermission(value=android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional=true) public boolean isStylusHandwritingAvailableAsUser(@NonNull android.os.UserHandle); method @NonNull @RequiresPermission(value=android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional=true) public boolean isStylusHandwritingAvailableAsUser(@NonNull android.os.UserHandle); method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public void setStylusWindowIdleTimeoutForTest(long); field public static final long CLEAR_SHOW_FORCED_FLAG_WHEN_LEAVING = 214016041L; // 0xcc1a029L } Loading core/java/android/appwidget/AppWidgetHost.java +46 −2 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import android.os.Process; import android.os.RemoteException; import android.os.ServiceManager; import android.util.DisplayMetrics; import android.util.Log; import android.util.SparseArray; import android.widget.RemoteViews; import android.widget.RemoteViews.InteractionHandler; Loading @@ -52,12 +53,15 @@ import java.util.List; */ public class AppWidgetHost { private static final String TAG = "AppWidgetHost"; static final int HANDLE_UPDATE = 1; static final int HANDLE_PROVIDER_CHANGED = 2; static final int HANDLE_PROVIDERS_CHANGED = 3; @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) static final int HANDLE_VIEW_DATA_CHANGED = 4; static final int HANDLE_APP_WIDGET_REMOVED = 5; static final int HANDLE_VIEW_UPDATE_DEFERRED = 6; final static Object sServiceLock = new Object(); @UnsupportedAppUsage Loading Loading @@ -131,6 +135,15 @@ public class AppWidgetHost { msg.sendToTarget(); } public void updateAppWidgetDeferred(int appWidgetId) { Handler handler = mWeakHandler.get(); if (handler == null) { return; } Message msg = handler.obtainMessage(HANDLE_VIEW_UPDATE_DEFERRED, appWidgetId, 0, null); msg.sendToTarget(); } private static boolean isLocalBinder() { return Process.myPid() == Binder.getCallingPid(); } Loading Loading @@ -163,6 +176,10 @@ public class AppWidgetHost { viewDataChanged(msg.arg1, msg.arg2); break; } case HANDLE_VIEW_UPDATE_DEFERRED: { updateAppWidgetDeferred(msg.arg1); break; } } } } Loading Loading @@ -480,13 +497,31 @@ public class AppWidgetHost { void onUpdateProviderInfo(@Nullable AppWidgetProviderInfo appWidget); /** * This function is called when the RemoteViews of the app widget is updated * @param views The new RemoteViews to be set for the app widget * This function is called when the {@code RemoteViews} of the app widget is updated * @param views The new {@code RemoteViews} to be set for the app widget * * @hide */ void updateAppWidget(@Nullable RemoteViews views); /** * Called for the listener to handle deferred {@code RemoteViews} updates. Default * implementation is to update the widget directly. * @param packageName The package name used for uid verification on the service side * @param appWidgetId The widget id of the listener * * @hide */ default void updateAppWidgetDeferred(String packageName, int appWidgetId) { RemoteViews latestViews = null; try { latestViews = sService.getAppWidgetViews(packageName, appWidgetId); } catch (Exception e) { Log.e(TAG, "updateAppWidgetDeferred: ", e); } updateAppWidget(latestViews); } /** * This function is called when the view ID is changed for the app widget * @param viewId The new view ID to be be set for the widget Loading Loading @@ -563,6 +598,15 @@ public class AppWidgetHost { } } private void updateAppWidgetDeferred(int appWidgetId) { AppWidgetHostListener v = getListener(appWidgetId); if (v == null) { Log.e(TAG, "updateAppWidgetDeferred: null listener for id: " + appWidgetId); return; } v.updateAppWidgetDeferred(mContextOpPackageName, appWidgetId); } /** * Clear the list of Views that have been created by this AppWidgetHost. */ Loading Loading
AconfigFlags.bp +13 −0 Original line number Diff line number Diff line Loading @@ -532,6 +532,7 @@ aconfig_declarations { name: "android.content.pm.flags-aconfig", package: "android.content.pm", container: "system", exportable: true, srcs: ["core/java/android/content/pm/flags.aconfig"], } Loading @@ -541,6 +542,18 @@ java_aconfig_library { defaults: ["framework-minus-apex-aconfig-java-defaults"], } java_aconfig_library { name: "android.content.pm.flags-aconfig-java-export", aconfig_declarations: "android.content.pm.flags-aconfig", defaults: ["framework-minus-apex-aconfig-java-defaults"], mode: "exported", min_sdk_version: "30", apex_available: [ "//apex_available:platform", "com.android.permission", ], } java_aconfig_library { name: "android.content.pm.flags-aconfig-java-host", aconfig_declarations: "android.content.pm.flags-aconfig", Loading
api/StubLibraries.bp +107 −34 Original line number Diff line number Diff line Loading @@ -1144,31 +1144,47 @@ java_library { ], } droidstubs { name: "api_versions_public", srcs: [":android_stubs_current_with_test_libs{.jar}"], // Defaults for `droidstubs` modules that generate `api-versions.xml` files for // the various API surfaces. stubs_defaults { name: "api_versions_base_defaults", defaults_visibility: ["//visibility:private"], generate_stubs: false, api_levels_annotations_enabled: true, api_levels_annotations_dirs: [ "sdk-dir", "api-versions-jars-dir", ], api_levels_sdk_type: "public", } // Defaults for `droidstubs` modules that generate complete `api-versions.xml` // files, i.e. include SDK extensions. stubs_defaults { name: "api_versions_complete_defaults", defaults_visibility: ["//visibility:private"], defaults: ["api_versions_base_defaults"], extensions_info_file: ":sdk-extensions-info", } // Produces an `api-versions.xml` file that includes up-to-date information // about all the public APIs, both updatable and non-updatable and historic // information about all previous dessert and SDK extension releases. droidstubs { name: "api_versions_public", defaults: ["api_versions_complete_defaults"], srcs: [":android_stubs_current_with_test_libs{.jar}"], api_levels_sdk_type: "public", visibility: ["//frameworks/base"], } // Produces an `api-versions.xml` file that includes up-to-date information // about all the system APIs, both updatable and non-updatable and historic // information about all previous dessert and SDK extension releases. droidstubs { name: "api_versions_system", defaults: ["api_versions_complete_defaults"], srcs: [":android_system_stubs_current_with_test_libs{.jar}"], generate_stubs: false, api_levels_annotations_enabled: true, api_levels_annotations_dirs: [ "sdk-dir", "api-versions-jars-dir", ], api_levels_sdk_type: "system", extensions_info_file: ":sdk-extensions-info", dists: [ // Make the api-versions.xml file for the system API available in the // sdk build target. Loading @@ -1180,42 +1196,99 @@ droidstubs { ], } // This module can be built with: // m out/soong/.intermediates/frameworks/base/api/api_versions_module_lib/android_common/metalava/api-versions.xml droidstubs { name: "api_versions_module_lib", srcs: [":android_module_stubs_current_with_test_libs{.jar}"], generate_stubs: false, api_levels_annotations_enabled: true, // Defaults for `droidstubs` modules that generate `api-versions.xml` files that // only include non-updatable code, i.e. for platform API only, not SDK // extensions. stubs_defaults { name: "api_versions_non_updatable_defaults", defaults_visibility: ["//visibility:private"], defaults: ["api_versions_base_defaults"], // this only has the non-updatable portions of the module lib sdk, // which can reference classes from updatable apexes, so remove references to them // from this api_versions file. flags: ["--remove-missing-class-references-in-api-levels"], api_levels_annotations_dirs: [ "sdk-dir", "api-versions-jars-dir", ], api_levels_sdk_type: "module-lib", // extensions_info_file is purposefully omitted, because this module should just be // the non-updatable portions of the sdk, and extension sdks are updatable. } // Produces an `api-versions.xml` file that includes up-to-date information // about only the non-updatable module-lib APIs and historic information about // all previous dessert and SDK extension releases. That historic information // may include information about APIs that were previously not-updatable which // have since become updatable. droidstubs { name: "api_versions_module_lib", defaults: ["api_versions_non_updatable_defaults"], srcs: [":android_module_stubs_current_with_test_libs{.jar}"], api_levels_sdk_type: "module-lib", } // Create a single jar containing the whole module-lib API surface. // This is needed because Metalava only consumes the first jar file it is given // and ignores the rest. java_library { name: "android_module_stubs_complete_current_with_test_libs", static_libs: [ "android_module_stubs_current_with_test_libs", "framework-updatable-stubs-module_libs_api-exportable", ], defaults: ["android.jar_defaults"], visibility: [ "//visibility:override", "//visibility:private", ], } // Produces an `api-versions.xml` file that includes up-to-date information // about all the module-lib APIs, both updatable and non-updatable and historic // information about all previous dessert and SDK extension releases. droidstubs { name: "api_versions_module_lib_complete", defaults: ["api_versions_complete_defaults"], srcs: [":android_module_stubs_complete_current_with_test_libs{.jar}"], api_levels_sdk_type: "module-lib", } // Produces an `api-versions.xml` file that includes up-to-date information // about only the non-updatable system-server APIs and historic information // about all previous dessert and SDK extension releases. That historic // information may include information about APIs that were previously // not-updatable which have since become updatable. droidstubs { name: "api_versions_system_server", defaults: ["api_versions_non_updatable_defaults"], srcs: [":android_system_server_stubs_current_with_test_libs{.jar}"], generate_stubs: false, api_levels_annotations_enabled: true, // this only has the non-updatable portions of the system server sdk, // which can reference classes from updatable apexes, so remove references to them // from this api_versions file. flags: ["--remove-missing-class-references-in-api-levels"], api_levels_annotations_dirs: [ "sdk-dir", "api-versions-jars-dir", api_levels_sdk_type: "system-server", } // Create a single jar containing the whole system-server API surface. // This is needed because Metalava only consumes the first jar file it is given // and ignores the rest. java_library { name: "android_system_server_stubs_complete_current_with_test_libs", static_libs: [ "android_system_server_stubs_current_with_test_libs", // system-server extends module-lib but libraries which only service-* // libraries provided system-server APIs, so include module-lib APIs for // the others, e.g. framework-* libraries. "framework-updatable-stubs-module_libs_api-exportable", "framework-updatable-stubs-system_server_api-exportable", ], defaults: ["android.jar_defaults"], visibility: [ "//visibility:override", "//visibility:private", ], } // Produces an `api-versions.xml` file that includes up-to-date information // about all the system-server APIs, both updatable and non-updatable and // historic information about all previous dessert and SDK extension releases. droidstubs { name: "api_versions_system_server_complete", defaults: ["api_versions_complete_defaults"], srcs: [":android_system_server_stubs_complete_current_with_test_libs{.jar}"], api_levels_sdk_type: "system-server", // extensions_info_file is purposefully omitted, because this module should just be // the non-updatable portions of the sdk, and extension sdks are updatable. } ///////////////////////////////////////////////////////////////////// Loading
api/api.go +21 −0 Original line number Diff line number Diff line Loading @@ -386,6 +386,26 @@ func createMergedFrameworkModuleLibStubs(ctx android.LoadHookContext, modules [] ctx.CreateModule(java.LibraryFactory, &props) } func createMergedFrameworkSystemServerExportableStubs(ctx android.LoadHookContext, bootclasspath, system_server_classpath []string) { // The user of this module compiles against the "core" SDK and against non-updatable bootclasspathModules, // so remove to avoid dupes. bootclasspathModules := removeAll(bootclasspath, core_libraries_modules) bootclasspathModules = removeAll(bootclasspath, non_updatable_modules) modules := append( // Include all the module-lib APIs from the bootclasspath libraries. transformArray(bootclasspathModules, "", ".stubs.exportable.module_lib"), // Then add all the system-server APIs from the service-* libraries. transformArray(system_server_classpath, "", ".stubs.exportable.system_server")..., ) props := libraryProps{} props.Name = proptools.StringPtr("framework-updatable-stubs-system_server_api-exportable") props.Static_libs = modules props.Sdk_version = proptools.StringPtr("system_server_current") props.Visibility = []string{"//frameworks/base"} props.Is_stubs_module = proptools.BoolPtr(true) ctx.CreateModule(java.LibraryFactory, &props) } func createPublicStubsSourceFilegroup(ctx android.LoadHookContext, modules []string) { props := fgProps{} props.Name = proptools.StringPtr("all-modules-public-stubs-source") Loading Loading @@ -531,6 +551,7 @@ func (a *CombinedApis) createInternalModules(ctx android.LoadHookContext) { createMergedSystemExportableStubs(ctx, bootclasspath) createMergedTestExportableStubsForNonUpdatableModules(ctx) createMergedFrameworkModuleLibExportableStubs(ctx, bootclasspath) createMergedFrameworkSystemServerExportableStubs(ctx, bootclasspath, system_server_classpath) createMergedAnnotationsFilegroups(ctx, bootclasspath, system_server_classpath) Loading
core/api/test-current.txt +9 −5 Original line number Diff line number Diff line Loading @@ -1529,9 +1529,9 @@ package android.graphics.fonts { package android.hardware { @Deprecated public class Camera { method @Deprecated public static void getCameraInfo(int, @NonNull android.content.Context, boolean, android.hardware.Camera.CameraInfo); method @Deprecated public static void getCameraInfo(int, @NonNull android.content.Context, int, android.hardware.Camera.CameraInfo); method @Deprecated public static int getNumberOfCameras(@NonNull android.content.Context); method @Deprecated public static android.hardware.Camera open(int, @NonNull android.content.Context, boolean); method @Deprecated public static android.hardware.Camera open(int, @NonNull android.content.Context, int); method @Deprecated public final void setPreviewSurface(android.view.Surface) throws java.io.IOException; } Loading Loading @@ -1606,11 +1606,15 @@ package android.hardware.camera2 { public final class CameraManager { method @NonNull public android.hardware.camera2.CameraCharacteristics getCameraCharacteristics(@NonNull String, boolean) throws android.hardware.camera2.CameraAccessException; method public String[] getCameraIdListNoLazy() throws android.hardware.camera2.CameraAccessException; method @FlaggedApi("com.android.window.flags.camera_compat_for_freeform") public static int getRotationOverrideInternal(@Nullable android.content.Context, @Nullable android.content.pm.PackageManager, @Nullable String); method @RequiresPermission(android.Manifest.permission.CAMERA) public void openCamera(@NonNull String, boolean, @Nullable android.os.Handler, @NonNull android.hardware.camera2.CameraDevice.StateCallback) throws android.hardware.camera2.CameraAccessException; method @RequiresPermission(allOf={android.Manifest.permission.SYSTEM_CAMERA, android.Manifest.permission.CAMERA}) public void openCamera(@NonNull String, int, @NonNull java.util.concurrent.Executor, @NonNull android.hardware.camera2.CameraDevice.StateCallback) throws android.hardware.camera2.CameraAccessException; method public static boolean shouldOverrideToPortrait(@Nullable android.content.pm.PackageManager, @Nullable String); field public static final String LANDSCAPE_TO_PORTRAIT_PROP = "camera.enable_landscape_to_portrait"; field public static final long OVERRIDE_CAMERA_LANDSCAPE_TO_PORTRAIT = 250678880L; // 0xef10e60L field @FlaggedApi("com.android.window.flags.camera_compat_for_freeform") public static final int ROTATION_OVERRIDE_NONE = 0; // 0x0 field @FlaggedApi("com.android.window.flags.camera_compat_for_freeform") public static final int ROTATION_OVERRIDE_OVERRIDE_TO_PORTRAIT = 1; // 0x1 field @FlaggedApi("com.android.window.flags.camera_compat_for_freeform") public static final int ROTATION_OVERRIDE_ROTATION_ONLY = 2; // 0x2 } public abstract static class CameraManager.AvailabilityCallback { Loading Loading @@ -3989,15 +3993,15 @@ package android.view.inputmethod { method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public void addVirtualStylusIdForTestSession(); method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public void finishTrackingPendingImeVisibilityRequests(); method public int getDisplayId(); method @FlaggedApi("android.view.inputmethod.imm_userhandle_hostsidetests") @NonNull @RequiresPermission(value=android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional=true) public java.util.List<android.view.inputmethod.InputMethodInfo> getEnabledInputMethodListAsUser(@NonNull android.os.UserHandle); method @FlaggedApi("android.view.inputmethod.imm_userhandle_hostsidetests") @NonNull @RequiresPermission(value=android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional=true) public java.util.List<android.view.inputmethod.InputMethodSubtype> getEnabledInputMethodSubtypeListAsUser(@NonNull String, boolean, @NonNull android.os.UserHandle); method @NonNull @RequiresPermission(value=android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional=true) public java.util.List<android.view.inputmethod.InputMethodInfo> getEnabledInputMethodListAsUser(@NonNull android.os.UserHandle); method @NonNull @RequiresPermission(value=android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional=true) public java.util.List<android.view.inputmethod.InputMethodSubtype> getEnabledInputMethodSubtypeListAsUser(@NonNull String, boolean, @NonNull android.os.UserHandle); method @NonNull @RequiresPermission(value=android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional=true) public java.util.List<android.view.inputmethod.InputMethodInfo> getInputMethodListAsUser(int); method public boolean hasActiveInputConnection(@Nullable android.view.View); method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public boolean hasPendingImeVisibilityRequests(); method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public void hideSoftInputFromServerForTest(); method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public boolean isCurrentRootView(@NonNull android.view.View); method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public boolean isInputMethodPickerShown(); method @FlaggedApi("android.view.inputmethod.imm_userhandle_hostsidetests") @NonNull @RequiresPermission(value=android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional=true) public boolean isStylusHandwritingAvailableAsUser(@NonNull android.os.UserHandle); method @NonNull @RequiresPermission(value=android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional=true) public boolean isStylusHandwritingAvailableAsUser(@NonNull android.os.UserHandle); method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public void setStylusWindowIdleTimeoutForTest(long); field public static final long CLEAR_SHOW_FORCED_FLAG_WHEN_LEAVING = 214016041L; // 0xcc1a029L } Loading
core/java/android/appwidget/AppWidgetHost.java +46 −2 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import android.os.Process; import android.os.RemoteException; import android.os.ServiceManager; import android.util.DisplayMetrics; import android.util.Log; import android.util.SparseArray; import android.widget.RemoteViews; import android.widget.RemoteViews.InteractionHandler; Loading @@ -52,12 +53,15 @@ import java.util.List; */ public class AppWidgetHost { private static final String TAG = "AppWidgetHost"; static final int HANDLE_UPDATE = 1; static final int HANDLE_PROVIDER_CHANGED = 2; static final int HANDLE_PROVIDERS_CHANGED = 3; @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) static final int HANDLE_VIEW_DATA_CHANGED = 4; static final int HANDLE_APP_WIDGET_REMOVED = 5; static final int HANDLE_VIEW_UPDATE_DEFERRED = 6; final static Object sServiceLock = new Object(); @UnsupportedAppUsage Loading Loading @@ -131,6 +135,15 @@ public class AppWidgetHost { msg.sendToTarget(); } public void updateAppWidgetDeferred(int appWidgetId) { Handler handler = mWeakHandler.get(); if (handler == null) { return; } Message msg = handler.obtainMessage(HANDLE_VIEW_UPDATE_DEFERRED, appWidgetId, 0, null); msg.sendToTarget(); } private static boolean isLocalBinder() { return Process.myPid() == Binder.getCallingPid(); } Loading Loading @@ -163,6 +176,10 @@ public class AppWidgetHost { viewDataChanged(msg.arg1, msg.arg2); break; } case HANDLE_VIEW_UPDATE_DEFERRED: { updateAppWidgetDeferred(msg.arg1); break; } } } } Loading Loading @@ -480,13 +497,31 @@ public class AppWidgetHost { void onUpdateProviderInfo(@Nullable AppWidgetProviderInfo appWidget); /** * This function is called when the RemoteViews of the app widget is updated * @param views The new RemoteViews to be set for the app widget * This function is called when the {@code RemoteViews} of the app widget is updated * @param views The new {@code RemoteViews} to be set for the app widget * * @hide */ void updateAppWidget(@Nullable RemoteViews views); /** * Called for the listener to handle deferred {@code RemoteViews} updates. Default * implementation is to update the widget directly. * @param packageName The package name used for uid verification on the service side * @param appWidgetId The widget id of the listener * * @hide */ default void updateAppWidgetDeferred(String packageName, int appWidgetId) { RemoteViews latestViews = null; try { latestViews = sService.getAppWidgetViews(packageName, appWidgetId); } catch (Exception e) { Log.e(TAG, "updateAppWidgetDeferred: ", e); } updateAppWidget(latestViews); } /** * This function is called when the view ID is changed for the app widget * @param viewId The new view ID to be be set for the widget Loading Loading @@ -563,6 +598,15 @@ public class AppWidgetHost { } } private void updateAppWidgetDeferred(int appWidgetId) { AppWidgetHostListener v = getListener(appWidgetId); if (v == null) { Log.e(TAG, "updateAppWidgetDeferred: null listener for id: " + appWidgetId); return; } v.updateAppWidgetDeferred(mContextOpPackageName, appWidgetId); } /** * Clear the list of Views that have been created by this AppWidgetHost. */ Loading