summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AconfigFlags.bp7
-rw-r--r--apct-tests/perftests/healthconnect/OWNERS1
-rw-r--r--core/api/current.txt10
-rw-r--r--core/api/system-current.txt322
-rw-r--r--core/java/android/app/Activity.java26
-rw-r--r--core/java/android/content/BroadcastReceiver.java3
-rw-r--r--core/java/android/os/ConfigUpdate.java3
-rw-r--r--core/java/com/android/internal/util/LatencyTracker.java29
-rw-r--r--core/jni/android_util_AssetManager.cpp14
-rw-r--r--core/res/res/values/attrs_manifest.xml58
-rw-r--r--core/res/res/values/config.xml5
-rw-r--r--core/res/res/values/symbols.xml1
-rw-r--r--libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeCompatPolicy.kt20
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java7
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopDisplayEventHandler.kt2
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopRepository.kt1
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt93
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandler.java17
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/multidesks/DesksTransitionObserver.kt29
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java15
-rw-r--r--libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/functional/AltTabSwitchInDesktopModeTest.kt27
-rw-r--r--libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/AltTabSwitchInDesktopMode.kt80
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt77
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTestHelpers.kt7
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/compatui/SystemModalsTransitionHandlerTest.kt21
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/multidesks/DesksTransitionObserverTest.kt41
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/shared/desktopmode/DesktopModeCompatPolicyTest.kt28
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTests.kt1
-rw-r--r--libs/androidfw/AssetManager2.cpp68
-rw-r--r--libs/androidfw/include/androidfw/AssetManager2.h7
-rw-r--r--libs/hwui/renderthread/CanvasContext.h2
-rw-r--r--media/java/android/media/AudioSystem.java19
-rw-r--r--packages/SettingsLib/SelectorWithWidgetPreference/res/layout/settingslib_preference_widget_checkbox.xml (renamed from packages/SettingsLib/SelectorWithWidgetPreference/res/layout/preference_widget_checkbox.xml)0
-rw-r--r--packages/SettingsLib/SelectorWithWidgetPreference/res/layout/settingslib_preference_widget_radiobutton.xml (renamed from packages/SettingsLib/SelectorWithWidgetPreference/res/layout/preference_widget_radiobutton.xml)0
-rw-r--r--packages/SettingsLib/SelectorWithWidgetPreference/src/com/android/settingslib/widget/SelectorWithWidgetPreference.java4
-rw-r--r--packages/SettingsLib/res/layout-v33/preference_checkable_two_target.xml2
-rw-r--r--packages/SettingsLib/res/layout/preference_checkable_two_target.xml2
-rw-r--r--packages/SettingsLib/tests/robotests/src/com/android/settingslib/satellite/SatelliteDialogUtilsTest.kt11
-rw-r--r--packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/SelectorWithWidgetPreferenceTest.java4
-rw-r--r--packages/SystemUI/Android.bp12
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt6
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/BottomAreaSection.kt38
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/DefaultClockSection.kt24
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/SmartSpaceSection.kt103
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/WeatherClockSection.kt13
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/qs/footer/ui/compose/FooterActions.kt8
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt55
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MovableElement.kt15
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt50
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/content/Content.kt13
-rw-r--r--packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/AnimatedSharedAsStateTest.kt2
-rw-r--r--packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ElementTest.kt41
-rw-r--r--packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MovableElementTest.kt2
-rw-r--r--packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SceneTransitionLayoutTest.kt2
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/DozingToDreamingTransitionViewModelTest.kt54
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/data/repository/MediaFilterRepositoryTest.kt167
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/interactor/MediaCarouselInteractorTest.kt99
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/interactor/MediaControlInteractorTest.kt56
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/interactor/MediaRecommendationsInteractorTest.kt53
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataCombineLatestTest.java2
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/ui/view/MediaCarouselScrollHandlerTest.kt2
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/AirplaneModeTileTest.kt11
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt3
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModelTest.kt20
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/satellite/domain/interactor/DeviceBasedSatelliteInteractorTest.kt151
-rw-r--r--packages/SystemUI/pods/Android.bp11
-rw-r--r--packages/SystemUI/pods/com/android/systemui/dagger/Android.bp9
-rw-r--r--packages/SystemUI/pods/com/android/systemui/retail/Android.bp15
-rw-r--r--packages/SystemUI/pods/com/android/systemui/retail/data/Android.bp32
-rw-r--r--packages/SystemUI/pods/com/android/systemui/retail/domain/Android.bp24
-rw-r--r--packages/SystemUI/pods/com/android/systemui/util/settings/Android.bp12
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSettingsRepositoryModule.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/shared/model/CommunalBackgroundType.kt13
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalTransitionViewModel.kt22
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt8
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DozingToDreamingTransitionViewModel.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/data/repository/MediaFilterRepository.kt236
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/LegacyMediaDataManagerImpl.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImpl.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/MediaDataProcessor.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaCarouselInteractor.kt17
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaControlInteractor.kt20
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaRecommendationsInteractor.kt38
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/shared/model/MediaData.kt14
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/shared/model/SmartspaceMediaData.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt289
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaControlPanel.java54
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaHierarchyManager.kt18
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/ui/view/MediaCarouselScrollHandler.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModel.kt17
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaControlViewModel.kt23
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaRecommendationsViewModel.kt20
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/util/MediaSmartspaceLogger.kt219
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/util/SmallHash.java44
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/composefragment/QSFragmentCompose.kt32
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/composefragment/ui/GridAnchor.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/QuickQuickSettings.kt24
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/infinitegrid/InfiniteGridLayout.kt21
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java22
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java22
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDetailsContentManager.kt25
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegateLegacy.java25
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/pipeline/satellite/domain/interactor/DeviceBasedSatelliteInteractor.kt63
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/pipeline/satellite/ui/DeviceBasedSatelliteBindableIcon.kt8
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImplTest.kt31
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataProcessorTest.kt1
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/controller/MediaCarouselControllerTest.kt3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BluetoothTileTest.kt41
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/communal/ui/viewmodel/CommunalTransitionViewModelKosmos.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/data/repository/MediaFilterRepositoryKosmos.kt10
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterKosmos.kt4
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaCarouselInteractorKosmos.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModelKosmos.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelKosmos.kt2
-rw-r--r--ravenwood/texts/ravenwood-framework-policies.txt6
-rw-r--r--ravenwood/texts/ravenwood-standard-options.txt3
-rw-r--r--ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestPartiallyAllowlisted.java (renamed from packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/util/MediaSmartspaceLoggerKosmos.kt)16
-rw-r--r--ravenwood/tools/hoststubgen/hoststubgen-standard-options.txt3
-rw-r--r--ravenwood/tools/hoststubgen/hoststubgen-test-policy-override.txt82
-rwxr-xr-xravenwood/tools/hoststubgen/invoketest/hoststubgen-invoke-test.sh127
-rw-r--r--ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGen.kt9
-rw-r--r--ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenOptions.kt5
-rw-r--r--ravenwood/tools/hoststubgen/src/com/android/hoststubgen/asm/AsmUtils.kt9
-rw-r--r--ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/AnnotationBasedFilter.kt139
-rw-r--r--ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicy.kt47
-rw-r--r--ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/SanitizationFilter.kt21
-rw-r--r--ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/TextFileFilterPolicyParser.kt49
-rw-r--r--ravenwood/tools/hoststubgen/src/com/android/hoststubgen/utils/ClassPredicate.kt4
-rw-r--r--ravenwood/tools/hoststubgen/test-tiny-framework/annotation-allowed-classes-tiny-framework.txt27
-rw-r--r--ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/01-hoststubgen-test-tiny-framework-orig-dump.txt244
-rw-r--r--ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/03-hoststubgen-test-tiny-framework-host-dump.txt195
-rw-r--r--ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/13-hoststubgen-test-tiny-framework-host-ext-dump.txt192
-rw-r--r--ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/01-hoststubgen-test-tiny-framework-orig-dump.txt244
-rw-r--r--ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/03-hoststubgen-test-tiny-framework-host-dump.txt195
-rw-r--r--ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/13-hoststubgen-test-tiny-framework-host-ext-dump.txt82
-rw-r--r--ravenwood/tools/hoststubgen/test-tiny-framework/policy-override-tiny-framework.txt6
-rwxr-xr-xravenwood/tools/hoststubgen/test-tiny-framework/run-test-manually.sh17
-rw-r--r--ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted.java67
-rw-r--r--ravenwood/tools/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotationsTest.java17
-rw-r--r--ravenwood/tools/hoststubgen/test/com/android/hoststubgen/utils/ClassPredicateTest.kt2
-rw-r--r--ravenwood/tools/ravenhelper/src/com/android/platform/test/ravenwood/ravenhelper/policytoannot/Annotations.kt1
-rw-r--r--services/accessibility/java/com/android/server/accessibility/autoclick/AutoclickController.java5
-rw-r--r--services/core/java/com/android/server/audio/AudioService.java172
-rw-r--r--services/core/java/com/android/server/audio/HardeningEnforcer.java62
-rw-r--r--services/core/java/com/android/server/dreams/DreamManagerService.java3
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodManagerService.java4
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodMenuControllerNew.java23
-rw-r--r--services/core/java/com/android/server/policy/PhoneWindowManager.java44
-rw-r--r--services/core/java/com/android/server/security/advancedprotection/features/DisallowCellular2GAdvancedProtectionHook.java3
-rw-r--r--services/core/java/com/android/server/wm/InsetsPolicy.java112
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/pm/UserManagerServiceTest.java2
-rw-r--r--services/tests/servicestests/src/com/android/server/accessibility/autoclick/AutoclickControllerTest.java140
-rw-r--r--services/tests/servicestests/src/com/android/server/audio/AudioServiceTest.java12
-rw-r--r--services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTests.java18
-rw-r--r--telephony/java/android/telephony/DisconnectCause.java1
-rw-r--r--telephony/java/android/telephony/SubscriptionInfo.java1
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java3
-rw-r--r--telephony/java/android/telephony/satellite/AntennaDirection.java10
-rw-r--r--telephony/java/android/telephony/satellite/AntennaPosition.java9
-rw-r--r--telephony/java/android/telephony/satellite/EnableRequestAttributes.java12
-rw-r--r--telephony/java/android/telephony/satellite/NtnSignalStrength.java15
-rw-r--r--telephony/java/android/telephony/satellite/NtnSignalStrengthCallback.java5
-rw-r--r--telephony/java/android/telephony/satellite/PointingInfo.java9
-rw-r--r--telephony/java/android/telephony/satellite/SatelliteCapabilities.java11
-rw-r--r--telephony/java/android/telephony/satellite/SatelliteCapabilitiesCallback.java5
-rw-r--r--telephony/java/android/telephony/satellite/SatelliteDatagram.java8
-rw-r--r--telephony/java/android/telephony/satellite/SatelliteDatagramCallback.java5
-rw-r--r--telephony/java/android/telephony/satellite/SatelliteManager.java91
-rw-r--r--telephony/java/android/telephony/satellite/SatelliteModemStateCallback.java2
-rw-r--r--telephony/java/android/telephony/satellite/SatelliteProvisionStateCallback.java2
-rw-r--r--telephony/java/android/telephony/satellite/SatelliteTransmissionUpdateCallback.java4
-rw-r--r--tests/Input/src/com/android/test/input/AnrTest.kt11
-rw-r--r--tests/vcn/Android.bp5
-rw-r--r--tests/vcn/AndroidManifest.xml2
176 files changed, 3267 insertions, 2944 deletions
diff --git a/AconfigFlags.bp b/AconfigFlags.bp
index 8b95679f318f..8bfac03060b5 100644
--- a/AconfigFlags.bp
+++ b/AconfigFlags.bp
@@ -610,6 +610,13 @@ cc_aconfig_library {
vendor_available: true,
}
+java_aconfig_library {
+ name: "android.os.vibrator.flags-aconfig-java-host",
+ aconfig_declarations: "android.os.vibrator.flags-aconfig",
+ host_supported: true,
+ defaults: ["framework-minus-apex-aconfig-java-defaults"],
+}
+
// View
aconfig_declarations {
name: "android.view.flags-aconfig",
diff --git a/apct-tests/perftests/healthconnect/OWNERS b/apct-tests/perftests/healthconnect/OWNERS
index da0b46adeaef..acfe799314ec 100644
--- a/apct-tests/perftests/healthconnect/OWNERS
+++ b/apct-tests/perftests/healthconnect/OWNERS
@@ -2,5 +2,4 @@
arkivanov@google.com
jstembridge@google.com
-pratyushmore@google.com
itsleo@google.com
diff --git a/core/api/current.txt b/core/api/current.txt
index 4862236a35e3..3539ec181b52 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -46375,7 +46375,7 @@ package android.telephony {
field public static final int OUT_OF_NETWORK = 11; // 0xb
field public static final int OUT_OF_SERVICE = 18; // 0x12
field public static final int POWER_OFF = 17; // 0x11
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_ENABLED = 82; // 0x52
+ field public static final int SATELLITE_ENABLED = 82; // 0x52
field public static final int SERVER_ERROR = 12; // 0xc
field public static final int SERVER_UNREACHABLE = 9; // 0x9
field public static final int TIMED_OUT = 13; // 0xd
@@ -47077,7 +47077,7 @@ package android.telephony {
method public int getSubscriptionType();
method public int getUsageSetting();
method public boolean isEmbedded();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public boolean isOnlyNonTerrestrialNetwork();
+ method public boolean isOnlyNonTerrestrialNetwork();
method public boolean isOpportunistic();
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.SubscriptionInfo> CREATOR;
@@ -47528,7 +47528,7 @@ package android.telephony {
field @Deprecated @FlaggedApi("com.android.internal.telephony.flags.deprecate_cdma") public static final int ERI_FLASH = 2; // 0x2
field @Deprecated @FlaggedApi("com.android.internal.telephony.flags.deprecate_cdma") public static final int ERI_OFF = 1; // 0x1
field @Deprecated @FlaggedApi("com.android.internal.telephony.flags.deprecate_cdma") public static final int ERI_ON = 0; // 0x0
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final String EVENT_DISPLAY_EMERGENCY_MESSAGE = "android.telephony.event.DISPLAY_EMERGENCY_MESSAGE";
+ field public static final String EVENT_DISPLAY_EMERGENCY_MESSAGE = "android.telephony.event.DISPLAY_EMERGENCY_MESSAGE";
field public static final String EXTRA_ACTIVE_SIM_SUPPORTED_COUNT = "android.telephony.extra.ACTIVE_SIM_SUPPORTED_COUNT";
field public static final String EXTRA_APN_PROTOCOL = "android.telephony.extra.APN_PROTOCOL";
field public static final String EXTRA_APN_TYPE = "android.telephony.extra.APN_TYPE";
@@ -47537,8 +47537,8 @@ package android.telephony {
field public static final String EXTRA_CARRIER_NAME = "android.telephony.extra.CARRIER_NAME";
field public static final String EXTRA_DATA_FAIL_CAUSE = "android.telephony.extra.DATA_FAIL_CAUSE";
field public static final String EXTRA_DEFAULT_NETWORK_AVAILABLE = "android.telephony.extra.DEFAULT_NETWORK_AVAILABLE";
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final String EXTRA_EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE = "android.telephony.extra.EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE";
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final String EXTRA_EMERGENCY_CALL_TO_SATELLITE_LAUNCH_INTENT = "android.telephony.extra.EMERGENCY_CALL_TO_SATELLITE_LAUNCH_INTENT";
+ field public static final String EXTRA_EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE = "android.telephony.extra.EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE";
+ field public static final String EXTRA_EMERGENCY_CALL_TO_SATELLITE_LAUNCH_INTENT = "android.telephony.extra.EMERGENCY_CALL_TO_SATELLITE_LAUNCH_INTENT";
field public static final String EXTRA_HIDE_PUBLIC_SETTINGS = "android.telephony.extra.HIDE_PUBLIC_SETTINGS";
field @Deprecated public static final String EXTRA_INCOMING_NUMBER = "incoming_number";
field public static final String EXTRA_IS_REFRESH = "android.telephony.extra.IS_REFRESH";
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index 137c96714ae4..984bc680c685 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -11082,7 +11082,7 @@ package android.os {
public final class ConfigUpdate {
field public static final String ACTION_UPDATE_CARRIER_ID_DB = "android.os.action.UPDATE_CARRIER_ID_DB";
field public static final String ACTION_UPDATE_CARRIER_PROVISIONING_URLS = "android.intent.action.UPDATE_CARRIER_PROVISIONING_URLS";
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final String ACTION_UPDATE_CONFIG = "android.os.action.UPDATE_CONFIG";
+ field public static final String ACTION_UPDATE_CONFIG = "android.os.action.UPDATE_CONFIG";
field public static final String ACTION_UPDATE_CONVERSATION_ACTIONS = "android.intent.action.UPDATE_CONVERSATION_ACTIONS";
field public static final String ACTION_UPDATE_CT_LOGS = "android.intent.action.UPDATE_CT_LOGS";
field public static final String ACTION_UPDATE_EMERGENCY_NUMBER_DB = "android.os.action.UPDATE_EMERGENCY_NUMBER_DB";
@@ -11092,7 +11092,7 @@ package android.os {
field public static final String ACTION_UPDATE_PINS = "android.intent.action.UPDATE_PINS";
field public static final String ACTION_UPDATE_SMART_SELECTION = "android.intent.action.UPDATE_SMART_SELECTION";
field public static final String ACTION_UPDATE_SMS_SHORT_CODES = "android.intent.action.UPDATE_SMS_SHORT_CODES";
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final String EXTRA_DOMAIN = "android.os.extra.DOMAIN";
+ field public static final String EXTRA_DOMAIN = "android.os.extra.DOMAIN";
field public static final String EXTRA_REQUIRED_HASH = "android.os.extra.REQUIRED_HASH";
field public static final String EXTRA_VERSION = "android.os.extra.VERSION";
}
@@ -18473,21 +18473,21 @@ package android.telephony.mbms.vendor {
package android.telephony.satellite {
- @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public final class AntennaDirection implements android.os.Parcelable {
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public int describeContents();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public float getX();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public float getY();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public float getZ();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public void writeToParcel(@NonNull android.os.Parcel, int);
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @NonNull public static final android.os.Parcelable.Creator<android.telephony.satellite.AntennaDirection> CREATOR;
+ public final class AntennaDirection implements android.os.Parcelable {
+ method public int describeContents();
+ method public float getX();
+ method public float getY();
+ method public float getZ();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field @NonNull public static final android.os.Parcelable.Creator<android.telephony.satellite.AntennaDirection> CREATOR;
}
- @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public final class AntennaPosition implements android.os.Parcelable {
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public int describeContents();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @NonNull public android.telephony.satellite.AntennaDirection getAntennaDirection();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public int getSuggestedHoldPosition();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public void writeToParcel(@NonNull android.os.Parcel, int);
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @NonNull public static final android.os.Parcelable.Creator<android.telephony.satellite.AntennaPosition> CREATOR;
+ public final class AntennaPosition implements android.os.Parcelable {
+ method public int describeContents();
+ method @NonNull public android.telephony.satellite.AntennaDirection getAntennaDirection();
+ method public int getSuggestedHoldPosition();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field @NonNull public static final android.os.Parcelable.Creator<android.telephony.satellite.AntennaPosition> CREATOR;
}
@FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public final class EarfcnRange implements android.os.Parcelable {
@@ -18498,42 +18498,42 @@ package android.telephony.satellite {
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.satellite.EarfcnRange> CREATOR;
}
- @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public class EnableRequestAttributes {
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public boolean isDemoMode();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public boolean isEmergencyMode();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public boolean isEnabled();
+ public class EnableRequestAttributes {
+ method public boolean isDemoMode();
+ method public boolean isEmergencyMode();
+ method public boolean isEnabled();
}
- @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final class EnableRequestAttributes.Builder {
- ctor @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public EnableRequestAttributes.Builder(boolean);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @NonNull public android.telephony.satellite.EnableRequestAttributes build();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @NonNull public android.telephony.satellite.EnableRequestAttributes.Builder setDemoMode(boolean);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @NonNull public android.telephony.satellite.EnableRequestAttributes.Builder setEmergencyMode(boolean);
+ public static final class EnableRequestAttributes.Builder {
+ ctor public EnableRequestAttributes.Builder(boolean);
+ method @NonNull public android.telephony.satellite.EnableRequestAttributes build();
+ method @NonNull public android.telephony.satellite.EnableRequestAttributes.Builder setDemoMode(boolean);
+ method @NonNull public android.telephony.satellite.EnableRequestAttributes.Builder setEmergencyMode(boolean);
}
- @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public final class NtnSignalStrength implements android.os.Parcelable {
- ctor @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public NtnSignalStrength(@Nullable android.telephony.satellite.NtnSignalStrength);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public int describeContents();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public int getLevel();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public void writeToParcel(@NonNull android.os.Parcel, int);
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @NonNull public static final android.os.Parcelable.Creator<android.telephony.satellite.NtnSignalStrength> CREATOR;
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int NTN_SIGNAL_STRENGTH_GOOD = 3; // 0x3
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int NTN_SIGNAL_STRENGTH_GREAT = 4; // 0x4
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int NTN_SIGNAL_STRENGTH_MODERATE = 2; // 0x2
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int NTN_SIGNAL_STRENGTH_NONE = 0; // 0x0
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int NTN_SIGNAL_STRENGTH_POOR = 1; // 0x1
+ public final class NtnSignalStrength implements android.os.Parcelable {
+ ctor public NtnSignalStrength(@Nullable android.telephony.satellite.NtnSignalStrength);
+ method public int describeContents();
+ method public int getLevel();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field @NonNull public static final android.os.Parcelable.Creator<android.telephony.satellite.NtnSignalStrength> CREATOR;
+ field public static final int NTN_SIGNAL_STRENGTH_GOOD = 3; // 0x3
+ field public static final int NTN_SIGNAL_STRENGTH_GREAT = 4; // 0x4
+ field public static final int NTN_SIGNAL_STRENGTH_MODERATE = 2; // 0x2
+ field public static final int NTN_SIGNAL_STRENGTH_NONE = 0; // 0x0
+ field public static final int NTN_SIGNAL_STRENGTH_POOR = 1; // 0x1
}
- @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public interface NtnSignalStrengthCallback {
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public void onNtnSignalStrengthChanged(@NonNull android.telephony.satellite.NtnSignalStrength);
+ public interface NtnSignalStrengthCallback {
+ method public void onNtnSignalStrengthChanged(@NonNull android.telephony.satellite.NtnSignalStrength);
}
- @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public final class PointingInfo implements android.os.Parcelable {
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public int describeContents();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @FloatRange(from=0xffffff4c, to=180) public float getSatelliteAzimuthDegrees();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @FloatRange(from=0xffffffa6, to=90) public float getSatelliteElevationDegrees();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public void writeToParcel(@NonNull android.os.Parcel, int);
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @NonNull public static final android.os.Parcelable.Creator<android.telephony.satellite.PointingInfo> CREATOR;
+ public final class PointingInfo implements android.os.Parcelable {
+ method public int describeContents();
+ method @FloatRange(from=0xffffff4c, to=180) public float getSatelliteAzimuthDegrees();
+ method @FloatRange(from=0xffffffa6, to=90) public float getSatelliteElevationDegrees();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field @NonNull public static final android.os.Parcelable.Creator<android.telephony.satellite.PointingInfo> CREATOR;
}
@FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public final class SatelliteAccessConfiguration implements android.os.Parcelable {
@@ -18544,18 +18544,18 @@ package android.telephony.satellite {
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.satellite.SatelliteAccessConfiguration> CREATOR;
}
- @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public final class SatelliteCapabilities implements android.os.Parcelable {
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public int describeContents();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @NonNull public java.util.Map<java.lang.Integer,android.telephony.satellite.AntennaPosition> getAntennaPositionMap();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public int getMaxBytesPerOutgoingDatagram();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @NonNull public java.util.Set<java.lang.Integer> getSupportedRadioTechnologies();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public boolean isPointingRequired();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public void writeToParcel(@NonNull android.os.Parcel, int);
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @NonNull public static final android.os.Parcelable.Creator<android.telephony.satellite.SatelliteCapabilities> CREATOR;
+ public final class SatelliteCapabilities implements android.os.Parcelable {
+ method public int describeContents();
+ method @NonNull public java.util.Map<java.lang.Integer,android.telephony.satellite.AntennaPosition> getAntennaPositionMap();
+ method public int getMaxBytesPerOutgoingDatagram();
+ method @NonNull public java.util.Set<java.lang.Integer> getSupportedRadioTechnologies();
+ method public boolean isPointingRequired();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field @NonNull public static final android.os.Parcelable.Creator<android.telephony.satellite.SatelliteCapabilities> CREATOR;
}
- @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public interface SatelliteCapabilitiesCallback {
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public void onSatelliteCapabilitiesChanged(@NonNull android.telephony.satellite.SatelliteCapabilities);
+ public interface SatelliteCapabilitiesCallback {
+ method public void onSatelliteCapabilitiesChanged(@NonNull android.telephony.satellite.SatelliteCapabilities);
}
@FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public interface SatelliteCommunicationAccessStateCallback {
@@ -18563,15 +18563,15 @@ package android.telephony.satellite {
method public default void onAccessConfigurationChanged(@Nullable android.telephony.satellite.SatelliteAccessConfiguration);
}
- @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public final class SatelliteDatagram implements android.os.Parcelable {
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public int describeContents();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @NonNull public byte[] getSatelliteDatagram();
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public void writeToParcel(@NonNull android.os.Parcel, int);
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @NonNull public static final android.os.Parcelable.Creator<android.telephony.satellite.SatelliteDatagram> CREATOR;
+ public final class SatelliteDatagram implements android.os.Parcelable {
+ method public int describeContents();
+ method @NonNull public byte[] getSatelliteDatagram();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field @NonNull public static final android.os.Parcelable.Creator<android.telephony.satellite.SatelliteDatagram> CREATOR;
}
- @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public interface SatelliteDatagramCallback {
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public void onSatelliteDatagramReceived(long, @NonNull android.telephony.satellite.SatelliteDatagram, int, @NonNull java.util.function.Consumer<java.lang.Void>);
+ public interface SatelliteDatagramCallback {
+ method public void onSatelliteDatagramReceived(long, @NonNull android.telephony.satellite.SatelliteDatagram, int, @NonNull java.util.function.Consumer<java.lang.Void>);
}
@FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public interface SatelliteDisallowedReasonsCallback {
@@ -18591,49 +18591,49 @@ package android.telephony.satellite {
@FlaggedApi("com.android.internal.telephony.flags.satellite_state_change_listener") public final class SatelliteManager {
method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void addAttachRestrictionForCarrier(int, int, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void deprovisionSatellite(@NonNull java.util.List<android.telephony.satellite.SatelliteSubscriberInfo>, @NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.lang.Void,android.telephony.satellite.SatelliteManager.SatelliteException>);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void deprovisionService(@NonNull String, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void deprovisionService(@NonNull String, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
method @NonNull @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public java.util.Set<java.lang.Integer> getAttachRestrictionReasonsForCarrier(int);
method @FlaggedApi("com.android.internal.telephony.flags.satellite_25q4_apis") @NonNull @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public java.util.List<java.lang.String> getSatelliteDataOptimizedApps();
method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @NonNull @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public int[] getSatelliteDisallowedReasons();
method @NonNull @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public java.util.List<java.lang.String> getSatellitePlmnsForCarrier(int);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void pollPendingDatagrams(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void pollPendingDatagrams(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void provisionSatellite(@NonNull java.util.List<android.telephony.satellite.SatelliteSubscriberInfo>, @NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.lang.Void,android.telephony.satellite.SatelliteManager.SatelliteException>);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void provisionService(@NonNull String, @NonNull byte[], @Nullable android.os.CancellationSignal, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public int registerForCapabilitiesChanged(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.SatelliteCapabilitiesCallback);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void provisionService(@NonNull String, @NonNull byte[], @Nullable android.os.CancellationSignal, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public int registerForCapabilitiesChanged(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.SatelliteCapabilitiesCallback);
method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public int registerForCommunicationAccessStateChanged(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.SatelliteCommunicationAccessStateCallback);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public int registerForIncomingDatagram(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.SatelliteDatagramCallback);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public int registerForModemStateChanged(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.SatelliteModemStateCallback);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void registerForNtnSignalStrengthChanged(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.NtnSignalStrengthCallback);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public int registerForProvisionStateChanged(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.SatelliteProvisionStateCallback);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public int registerForIncomingDatagram(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.SatelliteDatagramCallback);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public int registerForModemStateChanged(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.SatelliteModemStateCallback);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void registerForNtnSignalStrengthChanged(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.NtnSignalStrengthCallback);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public int registerForProvisionStateChanged(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.SatelliteProvisionStateCallback);
method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void registerForSatelliteDisallowedReasonsChanged(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.SatelliteDisallowedReasonsCallback);
method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public int registerForSelectedNbIotSatelliteSubscriptionChanged(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.SelectedNbIotSatelliteSubscriptionCallback);
method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public int registerForSupportedStateChanged(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Boolean>);
method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void removeAttachRestrictionForCarrier(int, int, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestAttachEnabledForCarrier(int, boolean, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestCapabilities(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<android.telephony.satellite.SatelliteCapabilities,android.telephony.satellite.SatelliteManager.SatelliteException>);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestEnabled(@NonNull android.telephony.satellite.EnableRequestAttributes, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestCapabilities(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<android.telephony.satellite.SatelliteCapabilities,android.telephony.satellite.SatelliteManager.SatelliteException>);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestEnabled(@NonNull android.telephony.satellite.EnableRequestAttributes, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestIsAttachEnabledForCarrier(int, @NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestIsCommunicationAllowedForCurrentLocation(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestIsDemoModeEnabled(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestIsEmergencyModeEnabled(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestIsEnabled(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestIsProvisioned(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public void requestIsSupported(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestNtnSignalStrength(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<android.telephony.satellite.NtnSignalStrength,android.telephony.satellite.SatelliteManager.SatelliteException>);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestIsCommunicationAllowedForCurrentLocation(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestIsDemoModeEnabled(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestIsEmergencyModeEnabled(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestIsEnabled(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestIsProvisioned(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>);
+ method public void requestIsSupported(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestNtnSignalStrength(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<android.telephony.satellite.NtnSignalStrength,android.telephony.satellite.SatelliteManager.SatelliteException>);
method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestSatelliteAccessConfigurationForCurrentLocation(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<android.telephony.satellite.SatelliteAccessConfiguration,android.telephony.satellite.SatelliteManager.SatelliteException>);
method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestSatelliteSubscriberProvisionStatus(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.util.List<android.telephony.satellite.SatelliteSubscriberProvisionStatus>,android.telephony.satellite.SatelliteManager.SatelliteException>);
method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestSelectedNbIotSatelliteSubscriptionId(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.lang.Integer,android.telephony.satellite.SatelliteManager.SatelliteException>);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestTimeForNextSatelliteVisibility(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.time.Duration,android.telephony.satellite.SatelliteManager.SatelliteException>);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void sendDatagram(int, @NonNull android.telephony.satellite.SatelliteDatagram, boolean, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void setDeviceAlignedWithSatellite(boolean);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void startTransmissionUpdates(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>, @NonNull android.telephony.satellite.SatelliteTransmissionUpdateCallback);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void stopTransmissionUpdates(@NonNull android.telephony.satellite.SatelliteTransmissionUpdateCallback, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForCapabilitiesChanged(@NonNull android.telephony.satellite.SatelliteCapabilitiesCallback);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void requestTimeForNextSatelliteVisibility(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.time.Duration,android.telephony.satellite.SatelliteManager.SatelliteException>);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void sendDatagram(int, @NonNull android.telephony.satellite.SatelliteDatagram, boolean, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void setDeviceAlignedWithSatellite(boolean);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void startTransmissionUpdates(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>, @NonNull android.telephony.satellite.SatelliteTransmissionUpdateCallback);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void stopTransmissionUpdates(@NonNull android.telephony.satellite.SatelliteTransmissionUpdateCallback, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForCapabilitiesChanged(@NonNull android.telephony.satellite.SatelliteCapabilitiesCallback);
method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForCommunicationAccessStateChanged(@NonNull android.telephony.satellite.SatelliteCommunicationAccessStateCallback);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForIncomingDatagram(@NonNull android.telephony.satellite.SatelliteDatagramCallback);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForModemStateChanged(@NonNull android.telephony.satellite.SatelliteModemStateCallback);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForNtnSignalStrengthChanged(@NonNull android.telephony.satellite.NtnSignalStrengthCallback);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForProvisionStateChanged(@NonNull android.telephony.satellite.SatelliteProvisionStateCallback);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForIncomingDatagram(@NonNull android.telephony.satellite.SatelliteDatagramCallback);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForModemStateChanged(@NonNull android.telephony.satellite.SatelliteModemStateCallback);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForNtnSignalStrengthChanged(@NonNull android.telephony.satellite.NtnSignalStrengthCallback);
+ method @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForProvisionStateChanged(@NonNull android.telephony.satellite.SatelliteProvisionStateCallback);
method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForSatelliteDisallowedReasonsChanged(@NonNull android.telephony.satellite.SatelliteDisallowedReasonsCallback);
method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForSelectedNbIotSatelliteSubscriptionChanged(@NonNull android.telephony.satellite.SelectedNbIotSatelliteSubscriptionCallback);
method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForSupportedStateChanged(@NonNull java.util.function.Consumer<java.lang.Boolean>);
@@ -18643,86 +18643,86 @@ package android.telephony.satellite {
field @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public static final int DATAGRAM_TYPE_KEEP_ALIVE = 3; // 0x3
field @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public static final int DATAGRAM_TYPE_LAST_SOS_MESSAGE_NO_HELP_NEEDED = 5; // 0x5
field @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public static final int DATAGRAM_TYPE_LAST_SOS_MESSAGE_STILL_NEED_HELP = 4; // 0x4
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int DATAGRAM_TYPE_LOCATION_SHARING = 2; // 0x2
+ field public static final int DATAGRAM_TYPE_LOCATION_SHARING = 2; // 0x2
field @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public static final int DATAGRAM_TYPE_SMS = 6; // 0x6
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int DATAGRAM_TYPE_SOS_MESSAGE = 1; // 0x1
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int DATAGRAM_TYPE_UNKNOWN = 0; // 0x0
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int DEVICE_HOLD_POSITION_LANDSCAPE_LEFT = 2; // 0x2
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int DEVICE_HOLD_POSITION_LANDSCAPE_RIGHT = 3; // 0x3
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int DEVICE_HOLD_POSITION_PORTRAIT = 1; // 0x1
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int DEVICE_HOLD_POSITION_UNKNOWN = 0; // 0x0
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int DISPLAY_MODE_CLOSED = 3; // 0x3
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int DISPLAY_MODE_FIXED = 1; // 0x1
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int DISPLAY_MODE_OPENED = 2; // 0x2
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int DISPLAY_MODE_UNKNOWN = 0; // 0x0
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE_SOS = 1; // 0x1
+ field public static final int DATAGRAM_TYPE_SOS_MESSAGE = 1; // 0x1
+ field public static final int DATAGRAM_TYPE_UNKNOWN = 0; // 0x0
+ field public static final int DEVICE_HOLD_POSITION_LANDSCAPE_LEFT = 2; // 0x2
+ field public static final int DEVICE_HOLD_POSITION_LANDSCAPE_RIGHT = 3; // 0x3
+ field public static final int DEVICE_HOLD_POSITION_PORTRAIT = 1; // 0x1
+ field public static final int DEVICE_HOLD_POSITION_UNKNOWN = 0; // 0x0
+ field public static final int DISPLAY_MODE_CLOSED = 3; // 0x3
+ field public static final int DISPLAY_MODE_FIXED = 1; // 0x1
+ field public static final int DISPLAY_MODE_OPENED = 2; // 0x2
+ field public static final int DISPLAY_MODE_UNKNOWN = 0; // 0x0
+ field public static final int EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE_SOS = 1; // 0x1
field public static final int EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE_T911 = 2; // 0x2
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int NT_RADIO_TECHNOLOGY_EMTC_NTN = 3; // 0x3
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int NT_RADIO_TECHNOLOGY_NB_IOT_NTN = 1; // 0x1
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int NT_RADIO_TECHNOLOGY_NR_NTN = 2; // 0x2
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int NT_RADIO_TECHNOLOGY_PROPRIETARY = 4; // 0x4
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int NT_RADIO_TECHNOLOGY_UNKNOWN = 0; // 0x0
+ field public static final int NT_RADIO_TECHNOLOGY_EMTC_NTN = 3; // 0x3
+ field public static final int NT_RADIO_TECHNOLOGY_NB_IOT_NTN = 1; // 0x1
+ field public static final int NT_RADIO_TECHNOLOGY_NR_NTN = 2; // 0x2
+ field public static final int NT_RADIO_TECHNOLOGY_PROPRIETARY = 4; // 0x4
+ field public static final int NT_RADIO_TECHNOLOGY_UNKNOWN = 0; // 0x0
field @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public static final String PROPERTY_SATELLITE_MANUAL_CONNECT_P2P_SUPPORT = "android.telephony.satellite.PROPERTY_SATELLITE_MANUAL_CONNECT_P2P_SUPPORT";
field public static final int SATELLITE_COMMUNICATION_RESTRICTION_REASON_ENTITLEMENT = 2; // 0x2
field public static final int SATELLITE_COMMUNICATION_RESTRICTION_REASON_GEOLOCATION = 1; // 0x1
field @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public static final int SATELLITE_COMMUNICATION_RESTRICTION_REASON_USER = 0; // 0x0
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_IDLE = 0; // 0x0
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_FAILED = 7; // 0x7
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_NONE = 6; // 0x6
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_SUCCESS = 5; // 0x5
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVING = 4; // 0x4
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_SENDING = 1; // 0x1
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_SEND_FAILED = 3; // 0x3
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_SEND_SUCCESS = 2; // 0x2
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_UNKNOWN = -1; // 0xffffffff
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_WAITING_TO_CONNECT = 8; // 0x8
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_MODEM_STATE_CONNECTED = 7; // 0x7
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_MODEM_STATE_DATAGRAM_RETRYING = 3; // 0x3
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_MODEM_STATE_DATAGRAM_TRANSFERRING = 2; // 0x2
+ field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_IDLE = 0; // 0x0
+ field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_FAILED = 7; // 0x7
+ field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_NONE = 6; // 0x6
+ field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_SUCCESS = 5; // 0x5
+ field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVING = 4; // 0x4
+ field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_SENDING = 1; // 0x1
+ field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_SEND_FAILED = 3; // 0x3
+ field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_SEND_SUCCESS = 2; // 0x2
+ field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_UNKNOWN = -1; // 0xffffffff
+ field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_WAITING_TO_CONNECT = 8; // 0x8
+ field public static final int SATELLITE_MODEM_STATE_CONNECTED = 7; // 0x7
+ field public static final int SATELLITE_MODEM_STATE_DATAGRAM_RETRYING = 3; // 0x3
+ field public static final int SATELLITE_MODEM_STATE_DATAGRAM_TRANSFERRING = 2; // 0x2
field @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public static final int SATELLITE_MODEM_STATE_DISABLING_SATELLITE = 9; // 0x9
field @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public static final int SATELLITE_MODEM_STATE_ENABLING_SATELLITE = 8; // 0x8
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_MODEM_STATE_IDLE = 0; // 0x0
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_MODEM_STATE_LISTENING = 1; // 0x1
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_MODEM_STATE_NOT_CONNECTED = 6; // 0x6
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_MODEM_STATE_OFF = 4; // 0x4
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_MODEM_STATE_UNAVAILABLE = 5; // 0x5
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_MODEM_STATE_UNKNOWN = -1; // 0xffffffff
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_ACCESS_BARRED = 16; // 0x10
+ field public static final int SATELLITE_MODEM_STATE_IDLE = 0; // 0x0
+ field public static final int SATELLITE_MODEM_STATE_LISTENING = 1; // 0x1
+ field public static final int SATELLITE_MODEM_STATE_NOT_CONNECTED = 6; // 0x6
+ field public static final int SATELLITE_MODEM_STATE_OFF = 4; // 0x4
+ field public static final int SATELLITE_MODEM_STATE_UNAVAILABLE = 5; // 0x5
+ field public static final int SATELLITE_MODEM_STATE_UNKNOWN = -1; // 0xffffffff
+ field public static final int SATELLITE_RESULT_ACCESS_BARRED = 16; // 0x10
field @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public static final int SATELLITE_RESULT_DISABLE_IN_PROGRESS = 28; // 0x1c
field @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public static final int SATELLITE_RESULT_EMERGENCY_CALL_IN_PROGRESS = 27; // 0x1b
field @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public static final int SATELLITE_RESULT_ENABLE_IN_PROGRESS = 29; // 0x1d
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_ERROR = 1; // 0x1
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_ILLEGAL_STATE = 23; // 0x17
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_INVALID_ARGUMENTS = 8; // 0x8
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_INVALID_MODEM_STATE = 7; // 0x7
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_INVALID_TELEPHONY_STATE = 6; // 0x6
+ field public static final int SATELLITE_RESULT_ERROR = 1; // 0x1
+ field public static final int SATELLITE_RESULT_ILLEGAL_STATE = 23; // 0x17
+ field public static final int SATELLITE_RESULT_INVALID_ARGUMENTS = 8; // 0x8
+ field public static final int SATELLITE_RESULT_INVALID_MODEM_STATE = 7; // 0x7
+ field public static final int SATELLITE_RESULT_INVALID_TELEPHONY_STATE = 6; // 0x6
field @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public static final int SATELLITE_RESULT_LOCATION_DISABLED = 25; // 0x19
field @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public static final int SATELLITE_RESULT_LOCATION_NOT_AVAILABLE = 26; // 0x1a
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_MODEM_BUSY = 22; // 0x16
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_MODEM_ERROR = 4; // 0x4
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_MODEM_TIMEOUT = 24; // 0x18
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_NETWORK_ERROR = 5; // 0x5
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_NETWORK_TIMEOUT = 17; // 0x11
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_NOT_AUTHORIZED = 19; // 0x13
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_NOT_REACHABLE = 18; // 0x12
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_NOT_SUPPORTED = 20; // 0x14
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_NO_RESOURCES = 12; // 0xc
+ field public static final int SATELLITE_RESULT_MODEM_BUSY = 22; // 0x16
+ field public static final int SATELLITE_RESULT_MODEM_ERROR = 4; // 0x4
+ field public static final int SATELLITE_RESULT_MODEM_TIMEOUT = 24; // 0x18
+ field public static final int SATELLITE_RESULT_NETWORK_ERROR = 5; // 0x5
+ field public static final int SATELLITE_RESULT_NETWORK_TIMEOUT = 17; // 0x11
+ field public static final int SATELLITE_RESULT_NOT_AUTHORIZED = 19; // 0x13
+ field public static final int SATELLITE_RESULT_NOT_REACHABLE = 18; // 0x12
+ field public static final int SATELLITE_RESULT_NOT_SUPPORTED = 20; // 0x14
+ field public static final int SATELLITE_RESULT_NO_RESOURCES = 12; // 0xc
field @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public static final int SATELLITE_RESULT_NO_VALID_SATELLITE_SUBSCRIPTION = 30; // 0x1e
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_RADIO_NOT_AVAILABLE = 10; // 0xa
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_REQUEST_ABORTED = 15; // 0xf
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_REQUEST_FAILED = 9; // 0x9
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_REQUEST_IN_PROGRESS = 21; // 0x15
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_REQUEST_NOT_SUPPORTED = 11; // 0xb
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_SERVER_ERROR = 2; // 0x2
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_SERVICE_ERROR = 3; // 0x3
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_SERVICE_NOT_PROVISIONED = 13; // 0xd
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_SERVICE_PROVISION_IN_PROGRESS = 14; // 0xe
- field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_RESULT_SUCCESS = 0; // 0x0
- }
-
- @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static class SatelliteManager.SatelliteException extends java.lang.Exception {
- ctor @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public SatelliteManager.SatelliteException(int);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public int getErrorCode();
+ field public static final int SATELLITE_RESULT_RADIO_NOT_AVAILABLE = 10; // 0xa
+ field public static final int SATELLITE_RESULT_REQUEST_ABORTED = 15; // 0xf
+ field public static final int SATELLITE_RESULT_REQUEST_FAILED = 9; // 0x9
+ field public static final int SATELLITE_RESULT_REQUEST_IN_PROGRESS = 21; // 0x15
+ field public static final int SATELLITE_RESULT_REQUEST_NOT_SUPPORTED = 11; // 0xb
+ field public static final int SATELLITE_RESULT_SERVER_ERROR = 2; // 0x2
+ field public static final int SATELLITE_RESULT_SERVICE_ERROR = 3; // 0x3
+ field public static final int SATELLITE_RESULT_SERVICE_NOT_PROVISIONED = 13; // 0xd
+ field public static final int SATELLITE_RESULT_SERVICE_PROVISION_IN_PROGRESS = 14; // 0xe
+ field public static final int SATELLITE_RESULT_SUCCESS = 0; // 0x0
+ }
+
+ public static class SatelliteManager.SatelliteException extends java.lang.Exception {
+ ctor public SatelliteManager.SatelliteException(int);
+ method public int getErrorCode();
}
@FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public final class SatelliteModemEnableRequestAttributes implements android.os.Parcelable {
@@ -18736,8 +18736,8 @@ package android.telephony.satellite {
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.satellite.SatelliteModemEnableRequestAttributes> CREATOR;
}
- @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public interface SatelliteModemStateCallback {
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public void onSatelliteModemStateChanged(int);
+ public interface SatelliteModemStateCallback {
+ method public void onSatelliteModemStateChanged(int);
}
@FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public final class SatellitePosition implements android.os.Parcelable {
@@ -18749,8 +18749,8 @@ package android.telephony.satellite {
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.satellite.SatellitePosition> CREATOR;
}
- @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public interface SatelliteProvisionStateCallback {
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public void onSatelliteProvisionStateChanged(boolean);
+ public interface SatelliteProvisionStateCallback {
+ method public void onSatelliteProvisionStateChanged(boolean);
method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public default void onSatelliteSubscriptionProvisionStateChanged(@NonNull java.util.List<android.telephony.satellite.SatelliteSubscriberProvisionStatus>);
}
@@ -18800,11 +18800,11 @@ package android.telephony.satellite {
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.satellite.SatelliteSubscriptionInfo> CREATOR;
}
- @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public interface SatelliteTransmissionUpdateCallback {
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public void onReceiveDatagramStateChanged(int, int, int);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public void onSatellitePositionChanged(@NonNull android.telephony.satellite.PointingInfo);
+ public interface SatelliteTransmissionUpdateCallback {
+ method public void onReceiveDatagramStateChanged(int, int, int);
+ method public void onSatellitePositionChanged(@NonNull android.telephony.satellite.PointingInfo);
method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public default void onSendDatagramRequested(int);
- method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public void onSendDatagramStateChanged(int, int, int);
+ method public void onSendDatagramStateChanged(int, int, int);
method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public default void onSendDatagramStateChanged(int, int, int, int);
}
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index ee9c64f97382..b4f653354e07 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -7684,16 +7684,19 @@ public class Activity extends ContextThemeWrapper
/**
* Change the desired orientation of this activity. If the activity is currently in the
* foreground or otherwise impacting the screen orientation, the screen is immediately changed
- * (possibly causing the activity to be restarted). Otherwise, the requested orientation is used
- * the next time the activity is visible.
+ * (possibly causing the activity to be restarted). Otherwise, the new orientation is used the
+ * next time the activity is visible.
*
* <aside class="note"><b>Note:</b>
* <ul>
- * <li>Device manufacturers can configure devices to override (ignore) calls to this
- * method to improve the layout of orientation-restricted apps.</li>
+ * <li>To improve the layout of apps on form factors with smallest width >= 600dp, the
+ * system ignores calls to this method for apps that target Android 16 (API level
+ * 36) or higher.</li>
+ * <li>Device manufacturers can configure devices to ignore calls to this method to
+ * improve the layout of orientation-restricted apps.</li>
* <li>On devices with Android 16 (API level 36) or higher installed, virtual device
- * owners (limited to select trusted and privileged apps) can optimize app layout on
- * displays they manage by ignoring calls to this method. See also
+ * owners (select trusted and privileged apps) can optimize app layout on displays
+ * they manage by ignoring calls to this method. See also
* <a href="https://source.android.com/docs/core/permissions/app-streaming">
* Companion app streaming</a>.</li>
* </ul>
@@ -7717,17 +7720,20 @@ public class Activity extends ContextThemeWrapper
}
/**
- * Return the current requested orientation of the activity. This is either the orientation
- * requested in the app manifest, or the last requested orientation given to
+ * Returns the current requested orientation of the activity, which is either the orientation
+ * requested in the app manifest or the last orientation given to
* {@link #setRequestedOrientation(int)}.
*
* <aside class="note"><b>Note:</b>
* <ul>
+ * <li>To improve the layout of apps on form factors with smallest width >= 600dp, the
+ * system ignores calls to this method for apps that target Android 16 (API level
+ * 36) or higher.</li>
* <li>Device manufacturers can configure devices to ignore calls to this method to
* improve the layout of orientation-restricted apps.</li>
* <li>On devices with Android 16 (API level 36) or higher installed, virtual device
- * owners (limited to select trusted and privileged apps) can optimize app layout on
- * displays they manage by ignoring calls to this method. See also
+ * owners (select trusted and privileged apps) can optimize app layout on displays
+ * they manage by ignoring calls to this method. See also
* <a href="https://source.android.com/docs/core/permissions/app-streaming">
* Companion app streaming</a>.</li>
* </ul>
diff --git a/core/java/android/content/BroadcastReceiver.java b/core/java/android/content/BroadcastReceiver.java
index a81629445263..cf684876d33f 100644
--- a/core/java/android/content/BroadcastReceiver.java
+++ b/core/java/android/content/BroadcastReceiver.java
@@ -52,6 +52,8 @@ import com.android.internal.os.DebugStore;
* <a href="{@docRoot}guide/components/broadcasts.html">Broadcasts</a> developer guide.</p></div>
*
*/
+@android.ravenwood.annotation.RavenwoodPartiallyAllowlisted
+@android.ravenwood.annotation.RavenwoodKeepPartialClass
public abstract class BroadcastReceiver {
@UnsupportedAppUsage
private PendingResult mPendingResult;
@@ -360,6 +362,7 @@ public abstract class BroadcastReceiver {
}
}
+ @android.ravenwood.annotation.RavenwoodKeep
public BroadcastReceiver() {
}
diff --git a/core/java/android/os/ConfigUpdate.java b/core/java/android/os/ConfigUpdate.java
index 87cd4ee577af..38530d1a5e1d 100644
--- a/core/java/android/os/ConfigUpdate.java
+++ b/core/java/android/os/ConfigUpdate.java
@@ -16,7 +16,6 @@
package android.os;
-import android.annotation.FlaggedApi;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
@@ -144,7 +143,6 @@ public final class ConfigUpdate {
* @hide
*/
@SystemApi
- @FlaggedApi(com.android.internal.telephony.flags.Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_UPDATE_CONFIG = "android.os.action.UPDATE_CONFIG";
@@ -172,7 +170,6 @@ public final class ConfigUpdate {
* @hide
*/
@SystemApi
- @FlaggedApi(com.android.internal.telephony.flags.Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final String EXTRA_DOMAIN = "android.os.extra.DOMAIN";
private ConfigUpdate() {
diff --git a/core/java/com/android/internal/util/LatencyTracker.java b/core/java/com/android/internal/util/LatencyTracker.java
index c120e67dfb0d..33794a59fa21 100644
--- a/core/java/com/android/internal/util/LatencyTracker.java
+++ b/core/java/com/android/internal/util/LatencyTracker.java
@@ -23,6 +23,7 @@ import static com.android.internal.util.FrameworkStatsLog.UIACTION_LATENCY_REPOR
import static com.android.internal.util.FrameworkStatsLog.UIACTION_LATENCY_REPORTED__ACTION__ACTION_CHECK_CREDENTIAL;
import static com.android.internal.util.FrameworkStatsLog.UIACTION_LATENCY_REPORTED__ACTION__ACTION_CHECK_CREDENTIAL_UNLOCKED;
import static com.android.internal.util.FrameworkStatsLog.UIACTION_LATENCY_REPORTED__ACTION__ACTION_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG;
+import static com.android.internal.util.FrameworkStatsLog.UIACTION_LATENCY_REPORTED__ACTION__ACTION_DESKTOP_MODE_ENTER_APP_HANDLE_MENU;
import static com.android.internal.util.FrameworkStatsLog.UIACTION_LATENCY_REPORTED__ACTION__ACTION_EXPAND_PANEL;
import static com.android.internal.util.FrameworkStatsLog.UIACTION_LATENCY_REPORTED__ACTION__ACTION_FACE_WAKE_AND_UNLOCK;
import static com.android.internal.util.FrameworkStatsLog.UIACTION_LATENCY_REPORTED__ACTION__ACTION_FINGERPRINT_WAKE_AND_UNLOCK;
@@ -268,14 +269,27 @@ public class LatencyTracker {
public static final int ACTION_SHADE_WINDOW_DISPLAY_CHANGE = 29;
/**
- * Applicable when the user drags a full screen app's handle into the desktop drop zone to enter
- * desktop mode. This measure the time from when the user releases their finger in the drop zone
- * to when the animation for entering desktop mode visually begins. During this period, the
- * home task and app headers for each window are initialized. Both have historically been
- * expensive. See b/381396057 and b/360452034 respectively.
+ * Time it takes for the "enter desktop" mode animation to begin when initiated by dragging the
+ * app's handle into the desktop drop zone.
+ * <p>
+ * This measure the time from when the user releases their finger in the drop zone to when the
+ * animation for entering desktop mode visually begins. During this period, the home task and
+ * app headers for each window are initialized. Both have historically been expensive. See
+ * b/381396057 and b/360452034 respectively.
*/
public static final int ACTION_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG = 30;
+ /**
+ * Time it takes for the "enter desktop" mode animation to begin when initiated via the app
+ * handle's menu.
+ * <p>
+ * This measures the time from when the menu option is clicked/tapped to when the animation for
+ * entering desktop mode visually begins. During this period, the home task and app headers for
+ * each window are initialized. Both have historically been expensive. See b/381396057 and
+ * b/360452034 respectively.
+ */
+ public static final int ACTION_DESKTOP_MODE_ENTER_APP_HANDLE_MENU = 31;
+
private static final int[] ACTIONS_ALL = {
ACTION_EXPAND_PANEL,
ACTION_TOGGLE_RECENTS,
@@ -308,6 +322,7 @@ public class LatencyTracker {
ACTION_KEYGUARD_FACE_UNLOCK_TO_HOME,
ACTION_SHADE_WINDOW_DISPLAY_CHANGE,
ACTION_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG,
+ ACTION_DESKTOP_MODE_ENTER_APP_HANDLE_MENU,
};
/** @hide */
@@ -343,6 +358,7 @@ public class LatencyTracker {
ACTION_KEYGUARD_FACE_UNLOCK_TO_HOME,
ACTION_SHADE_WINDOW_DISPLAY_CHANGE,
ACTION_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG,
+ ACTION_DESKTOP_MODE_ENTER_APP_HANDLE_MENU,
})
@Retention(RetentionPolicy.SOURCE)
public @interface Action {}
@@ -380,6 +396,7 @@ public class LatencyTracker {
UIACTION_LATENCY_REPORTED__ACTION__ACTION_KEYGUARD_FACE_UNLOCK_TO_HOME,
UIACTION_LATENCY_REPORTED__ACTION__ACTION_SHADE_WINDOW_DISPLAY_CHANGE,
UIACTION_LATENCY_REPORTED__ACTION__ACTION_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG,
+ UIACTION_LATENCY_REPORTED__ACTION__ACTION_DESKTOP_MODE_ENTER_APP_HANDLE_MENU,
};
private final Object mLock = new Object();
@@ -582,6 +599,8 @@ public class LatencyTracker {
return "ACTION_SHADE_WINDOW_DISPLAY_CHANGE";
case UIACTION_LATENCY_REPORTED__ACTION__ACTION_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG:
return "ACTION_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG";
+ case UIACTION_LATENCY_REPORTED__ACTION__ACTION_DESKTOP_MODE_ENTER_APP_HANDLE_MENU:
+ return "ACTION_DESKTOP_MODE_ENTER_APP_HANDLE_MENU";
default:
throw new IllegalArgumentException("Invalid action");
}
diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp
index a73ff421acf7..1394b9f8781a 100644
--- a/core/jni/android_util_AssetManager.cpp
+++ b/core/jni/android_util_AssetManager.cpp
@@ -409,19 +409,17 @@ static void NativeSetConfiguration(JNIEnv* env, jclass /*clazz*/, jlong ptr, jin
configs.push_back(configuration);
}
- uint32_t default_locale_int = 0;
+ std::optional<ResTable_config> default_locale_opt;
if (default_locale != nullptr) {
- ResTable_config config;
- static_assert(std::is_same_v<decltype(config.locale), decltype(default_locale_int)>);
- ScopedUtfChars locale_utf8(env, default_locale);
- CHECK(locale_utf8.c_str() != nullptr);
- config.setBcp47Locale(locale_utf8.c_str());
- default_locale_int = config.locale;
+ ScopedUtfChars locale_utf8(env, default_locale);
+ CHECK(locale_utf8.c_str() != nullptr);
+ default_locale_opt.emplace();
+ default_locale_opt->setBcp47Locale(locale_utf8.c_str());
}
auto assetmanager = LockAndStartAssetManager(ptr);
assetmanager->SetConfigurations(std::move(configs), force_refresh != JNI_FALSE);
- assetmanager->SetDefaultLocale(default_locale_int);
+ assetmanager->SetDefaultLocale(default_locale_opt);
}
static void NativeSetOverlayConstraints(JNIEnv* /*env*/, jclass /*clazz*/, jlong ptr,
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 15230c299973..9983c459d71a 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -853,11 +853,14 @@
element.
<aside class="note"><b>Note:</b>
<ul>
+ <li>To improve the layout of apps on form factors with smallest width >= 600dp, the
+ system ignores this attribute for apps that target Android 16 (API level 36) or
+ higher.</li>
<li>Device manufacturers can configure devices to override (ignore) this attribute
to improve the layout of apps.</li>
<li>On devices with Android 16 (API level 36) or higher installed, virtual device
- owners (limited to select trusted and privileged apps) can configure devices
- they manage to override (ignore) this attribute to improve app layout. See also
+ owners (select trusted and privileged apps) can configure devices they manage to
+ override (ignore) this attribute to improve app layout. See also
<a href="https://source.android.com/docs/core/permissions/app-streaming">
Companion app streaming</a>.</li>
</ul>
@@ -1482,19 +1485,20 @@
<li>On Android 11 (API level 30) and lower, the value of
{@link android.R.attr#screenOrientation} is ignored for resizeable activities
in multi-window mode.</li>
+ <li>To improve the layout of apps on form factors with smallest width >= 600dp, the
+ system ignores this attribute for apps that target Android 16 (API level 36) or
+ higher.</li>
<li>Device manufacturers can configure devices to override (ignore) this attribute
to force apps to resize. The override does not affect the app's support for
- multi-window mode. See
- <a href="{@docRoot}guide/practices/device-compatibility-mode">Device
- compatibility mode</a>.</li>
+ multi-window mode.</li>
<li>On devices with Android 16 (API level 36) or higher installed, virtual device
- owners (limited to select trusted and privileged apps) can configure devices
- they manage to override (ignore) this attribute to force apps to resize. See
- <a href="{@docRoot}guide/practices/device-compatibility-mode">Device
- compatibility mode</a>. See also
- <a href="https://source.android.com/docs/core/permissions/app-streaming">
+ owners (select trusted and privileged apps) can configure devices they manage to
+ override (ignore) this attribute to force apps to resize. See
+ also <a href="https://source.android.com/docs/core/permissions/app-streaming">
Companion app streaming</a>.</li>
</ul>
+ <p>See <a href="{@docRoot}guide/practices/device-compatibility-mode"> Device
+ compatibility mode</a>.</p>
</aside> -->
<attr name="resizeableActivity" format="boolean" />
@@ -1519,18 +1523,19 @@
<ul>
<li>This attribute is ignored if the activity has
{@link android.R.attr#resizeableActivity} set to {@code true}.</li>
+ <li>To improve the layout of apps on form factors with smallest width >= 600dp, the
+ system ignores this attribute for apps that target Android 16 (API level 36) or
+ higher.</li>
<li>Device manufacturers can configure devices to override (ignore) this attribute
- to improve the layout of apps. See
- <a href="{@docRoot}guide/practices/device-compatibility-mode#override_any_orientation_to_user">
- Device compatibility mode</a>.</li>
+ to improve the layout of apps.</li>
<li>On devices with Android 16 (API level 36) or higher installed, virtual device
- owners (limited to select trusted and privileged apps) can configure devices
- they manage to override (ignore) this attribute to improve app layout. See
- <a href="{@docRoot}guide/practices/device-compatibility-mode#override_any_orientation_to_user">
- Device compatibility mode</a>. See also
+ owners (select trusted and privileged apps) can configure devices they manage to
+ override (ignore) this attribute to improve app layout. See
<a href="https://source.android.com/docs/core/permissions/app-streaming">
Companion app streaming</a>.</li>
</ul>
+ <p>See <a href="{@docRoot}guide/practices/device-compatibility-mode"> Device
+ compatibility mode</a>.</p>
</aside> -->
<attr name="maxAspectRatio" format="float" />
@@ -1540,24 +1545,25 @@
<p>Minimum aspect ratio, expressed as (longer dimension / shorter dimension) in decimal
form. For example, if the minimum aspect ratio is 4:3, set value to 1.33.
<p>Value needs to be greater or equal to 1.0, otherwise it is ignored.
- <aside class="note"><b>Note:</b>
+ <aside class="note"><b>Note:</b>
<ul>
<li>This attribute is ignored if the activity has
{@link android.R.attr#resizeableActivity} set to {@code true}.</li>
+ <li>To improve the layout of apps on form factors with smallest width >= 600dp, the
+ system ignores this attribute for apps that target Android 16 (API level 36) or
+ higher.</li>
<li>Device manufacturers can configure devices to override (ignore) this attribute
- to improve the layout of apps. See
- <a href="{@docRoot}guide/practices/device-compatibility-mode">Device
- compatibility mode</a>.</li>
+ to improve the layout of apps.</li>
<li>On devices with Android 16 (API level 36) or higher installed, virtual device
- owners (limited to select trusted and privileged apps) can configure devices
- they manage to override (ignore) this attribute to improve app layout. See
- <a href="{@docRoot}guide/practices/device-compatibility-mode">Device
- compatibility mode</a>. See also
+ owners (select trusted and privileged apps) can configure devices they manage to
+ override (ignore) this attribute to improve app layout. See
<a href="https://source.android.com/docs/core/permissions/app-streaming">
Companion app streaming</a>.</li>
</ul>
+ <p>See <a href="{@docRoot}guide/practices/device-compatibility-mode"> Device
+ compatibility mode</a>.</p>
</aside> -->
- <attr name="minAspectRatio" format="float" />
+ <attr name="minAspectRatio" format="float" />
<!-- This value indicates how tasks rooted at this activity will behave in lockTask mode.
While in lockTask mode the system will not launch non-permitted tasks until
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 2188469bdf03..1cb38bed1388 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -3165,11 +3165,6 @@
1 : boot to the first switchable full user for initial boot (unprovisioned device), else to the headless system user, i.e. user 0. -->
<integer name="config_hsumBootStrategy">0</integer>
- <!-- Whether to boot system with the headless system user, i.e. user 0. If set to true,
- system will be booted with the headless system user, or user 0. It has no effect if device
- is not in Headless System User Mode (HSUM). -->
- <bool name="config_bootToHeadlessSystemUser">false</bool>
-
<!-- Whether multiple admins are allowed on the device. If set to true, new users can be created
with admin privileges and admin privileges can be granted/revoked from existing users. -->
<bool name="config_enableMultipleAdmins">false</bool>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index ed553c00d652..c8c1e73bfba2 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -368,7 +368,6 @@
<java-symbol type="bool" name="config_enableMultipleAdmins"/>
<java-symbol type="bool" name="config_allowAlarmsOnStoppedUsers"/>
<java-symbol type="bool" name="config_showNotificationForBackgroundUserAlarms"/>
- <java-symbol type="bool" name="config_bootToHeadlessSystemUser"/>
<java-symbol type="bool" name="config_omnipresentCommunalUser"/>
<java-symbol type="bool" name="config_enableNewAutoSelectNetworkUI"/>
<java-symbol type="bool" name="config_disableUsbPermissionDialogs"/>
diff --git a/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeCompatPolicy.kt b/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeCompatPolicy.kt
index 0e4a6b9fb083..9ea0532f9450 100644
--- a/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeCompatPolicy.kt
+++ b/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeCompatPolicy.kt
@@ -38,6 +38,8 @@ class DesktopModeCompatPolicy(private val context: Context) {
get() = context.getPackageManager()
private val defaultHomePackage: String?
get() = pkgManager.getHomeActivities(ArrayList())?.packageName
+ private val packageInfoCache = mutableMapOf<String, Boolean>()
+
/**
* If the top activity should be exempt from desktop windowing and forced back to fullscreen.
@@ -94,14 +96,16 @@ class DesktopModeCompatPolicy(private val context: Context) {
if (packageName == null) {
return false
}
- return try {
- val packageInfo = pkgManager.getPackageInfo(
- packageName,
- PackageManager.GET_PERMISSIONS
- )
- packageInfo?.requestedPermissions?.contains(SYSTEM_ALERT_WINDOW) == true
- } catch (e: PackageManager.NameNotFoundException) {
- false // Package not found
+ return packageInfoCache.getOrPut(packageName) {
+ try {
+ val packageInfo = pkgManager.getPackageInfo(
+ packageName,
+ PackageManager.GET_PERMISSIONS
+ )
+ packageInfo?.requestedPermissions?.contains(SYSTEM_ALERT_WINDOW) == true
+ } catch (e: PackageManager.NameNotFoundException) {
+ false // Package not found
+ }
}
}
// If the flag is disabled we make this condition neutral.
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java
index 5d5e4d3ec758..59acdc574434 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java
@@ -44,6 +44,7 @@ import androidx.annotation.OptIn;
import com.android.internal.jank.InteractionJankMonitor;
import com.android.internal.logging.UiEventLogger;
import com.android.internal.statusbar.IStatusBarService;
+import com.android.internal.util.LatencyTracker;
import com.android.launcher3.icons.IconProvider;
import com.android.window.flags.Flags;
import com.android.wm.shell.RootTaskDisplayAreaOrganizer;
@@ -1074,8 +1075,10 @@ public abstract class WMShellModule {
static EnterDesktopTaskTransitionHandler provideEnterDesktopModeTaskTransitionHandler(
Transitions transitions,
Optional<DesktopTasksLimiter> desktopTasksLimiter,
- InteractionJankMonitor interactionJankMonitor) {
- return new EnterDesktopTaskTransitionHandler(transitions, interactionJankMonitor);
+ InteractionJankMonitor interactionJankMonitor,
+ LatencyTracker latencyTracker) {
+ return new EnterDesktopTaskTransitionHandler(
+ transitions, interactionJankMonitor, latencyTracker);
}
@WMSingleton
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopDisplayEventHandler.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopDisplayEventHandler.kt
index 946e7952dd50..afc48acad4f5 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopDisplayEventHandler.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopDisplayEventHandler.kt
@@ -68,6 +68,8 @@ class DesktopDisplayEventHandler(
// desk has been recreated here, which may result in a crash-loop if the repository is
// checking that the desk exists before adding a task to it. See b/391984373.
desktopTasksController.createDesk(displayId)
+ // TODO: b/393978539 - consider activating the desk on creation when applicable, such as
+ // for connected displays.
}
override fun onDisplayRemoved(displayId: Int) {
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopRepository.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopRepository.kt
index 926e0f287869..3c694ae93a6f 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopRepository.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopRepository.kt
@@ -238,7 +238,6 @@ class DesktopRepository(
}
/** Returns the id of the active desk in the given display, if any. */
- @VisibleForTesting
fun getActiveDeskId(displayId: Int): Int? = desktopData.getActiveDesk(displayId)?.deskId
/** Returns the id of the desk to which this task belongs. */
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt
index 87d967427d88..ea4d96ab56a6 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt
@@ -1251,36 +1251,77 @@ class DesktopTasksController(
return
}
+ val wct = WindowContainerTransaction()
val displayAreaInfo = rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(displayId)
if (displayAreaInfo == null) {
logW("moveToDisplay: display not found")
return
}
- val wct = WindowContainerTransaction()
-
// check if the task is part of splitscreen
if (
Flags.enableNonDefaultDisplaySplit() &&
Flags.enableMoveToNextDisplayShortcut() &&
splitScreenController.isTaskInSplitScreen(task.taskId)
) {
+ val activeDeskId = taskRepository.getActiveDeskId(displayId)
+ logV("moveToDisplay: moving split root to displayId=%d", displayId)
val stageCoordinatorRootTaskToken =
splitScreenController.multiDisplayProvider.getDisplayRootForDisplayId(
DEFAULT_DISPLAY
)
-
wct.reparent(stageCoordinatorRootTaskToken, displayAreaInfo.token, true /* onTop */)
- transitions.startTransition(TRANSIT_CHANGE, wct, /* handler= */ null)
+ val deactivationRunnable =
+ if (activeDeskId != null) {
+ // Split is being placed on top of an existing desk in the target display. Make
+ // sure it is cleaned up.
+ performDesktopExitCleanUp(
+ wct = wct,
+ deskId = activeDeskId,
+ displayId = displayId,
+ willExitDesktop = true,
+ shouldEndUpAtHome = false,
+ )
+ } else {
+ null
+ }
+ val transition = transitions.startTransition(TRANSIT_CHANGE, wct, /* handler= */ null)
+ deactivationRunnable?.invoke(transition)
+ return
+ }
+
+ val destinationDeskId = taskRepository.getDefaultDeskId(displayId)
+ if (destinationDeskId == null) {
+ logW("moveToDisplay: desk not found for display: $displayId")
return
}
+ // TODO: b/393977830 and b/397437641 - do not assume that freeform==desktop.
if (!task.isFreeform) {
addMoveToDesktopChanges(wct, task, displayId)
} else if (Flags.enableMoveToNextDisplayShortcut()) {
applyFreeformDisplayChange(wct, task, displayId)
}
- wct.reparent(task.token, displayAreaInfo.token, /* onTop= */ true)
+
+ val activationRunnable: RunOnTransitStart?
+ if (DesktopExperienceFlags.ENABLE_MULTIPLE_DESKTOPS_BACKEND.isTrue) {
+ desksOrganizer.moveTaskToDesk(wct, destinationDeskId, task)
+ prepareForDeskActivation(displayId, wct)
+ desksOrganizer.activateDesk(wct, destinationDeskId)
+ activationRunnable = { transition ->
+ desksTransitionObserver.addPendingTransition(
+ DeskTransition.ActiveDeskWithTask(
+ token = transition,
+ displayId = displayId,
+ deskId = destinationDeskId,
+ enterTaskId = task.taskId,
+ )
+ )
+ }
+ } else {
+ wct.reparent(task.token, displayAreaInfo.token, /* onTop= */ true)
+ activationRunnable = null
+ }
if (Flags.enableDisplayFocusInShellTransitions()) {
// Bring the destination display to top with includingParents=true, so that the
// destination display gains the display focus, which makes the top task in the display
@@ -1288,22 +1329,31 @@ class DesktopTasksController(
wct.reorder(task.token, /* onTop= */ true, /* includingParents= */ true)
}
- // TODO: b/394268248 - desk needs to be deactivated when moving the last task and going
- // home.
- if (Flags.enablePerDisplayDesktopWallpaperActivity()) {
- performDesktopExitCleanupIfNeeded(
- taskId = task.taskId,
- displayId = task.displayId,
- wct = wct,
- forceToFullscreen = false,
- // TODO: b/371096166 - Temporary turing home relaunch off to prevent home stealing
- // display focus. Remove shouldEndUpAtHome = false when home focus handling
- // with connected display is implemented in wm core.
- shouldEndUpAtHome = false,
- )
- }
-
- transitions.startTransition(TRANSIT_CHANGE, wct, /* handler= */ null)
+ val sourceDisplayId = task.displayId
+ val sourceDeskId = taskRepository.getDeskIdForTask(task.taskId)
+ val shouldExitDesktopIfNeeded =
+ Flags.enablePerDisplayDesktopWallpaperActivity() ||
+ DesktopExperienceFlags.ENABLE_MULTIPLE_DESKTOPS_BACKEND.isTrue
+ val deactivationRunnable =
+ if (shouldExitDesktopIfNeeded) {
+ performDesktopExitCleanupIfNeeded(
+ taskId = task.taskId,
+ deskId = sourceDeskId,
+ displayId = sourceDisplayId,
+ wct = wct,
+ forceToFullscreen = false,
+ // TODO: b/371096166 - Temporary turing home relaunch off to prevent home
+ // stealing
+ // display focus. Remove shouldEndUpAtHome = false when home focus handling
+ // with connected display is implemented in wm core.
+ shouldEndUpAtHome = false,
+ )
+ } else {
+ null
+ }
+ val transition = transitions.startTransition(TRANSIT_CHANGE, wct, /* handler= */ null)
+ deactivationRunnable?.invoke(transition)
+ activationRunnable?.invoke(transition)
}
/**
@@ -2484,6 +2534,7 @@ class DesktopTasksController(
val displayLayout = displayController.getDisplayLayout(displayId) ?: return
val tdaInfo = rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(displayId)!!
val tdaWindowingMode = tdaInfo.configuration.windowConfiguration.windowingMode
+ // TODO: b/397437641 - reconsider the windowing mode choice when multiple desks is enabled.
val targetWindowingMode =
if (tdaWindowingMode == WINDOWING_MODE_FREEFORM) {
// Display windowing is freeform, set to undefined and inherit it
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandler.java
index 80e106f3990b..4c1703095ca1 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandler.java
@@ -41,6 +41,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.android.internal.jank.InteractionJankMonitor;
+import com.android.internal.util.LatencyTracker;
import com.android.wm.shell.shared.desktopmode.DesktopModeTransitionSource;
import com.android.wm.shell.transition.Transitions;
import com.android.wm.shell.windowdecor.OnTaskResizeAnimationListener;
@@ -63,20 +64,25 @@ public class EnterDesktopTaskTransitionHandler implements Transitions.Transition
private final List<IBinder> mPendingTransitionTokens = new ArrayList<>();
private final InteractionJankMonitor mInteractionJankMonitor;
+ private final LatencyTracker mLatencyTracker;
private OnTaskResizeAnimationListener mOnTaskResizeAnimationListener;
public EnterDesktopTaskTransitionHandler(
- Transitions transitions, InteractionJankMonitor interactionJankMonitor) {
- this(transitions, interactionJankMonitor, SurfaceControl.Transaction::new);
+ Transitions transitions,
+ InteractionJankMonitor interactionJankMonitor,
+ LatencyTracker latencyTracker) {
+ this(transitions, interactionJankMonitor, latencyTracker, SurfaceControl.Transaction::new);
}
public EnterDesktopTaskTransitionHandler(
Transitions transitions,
InteractionJankMonitor interactionJankMonitor,
+ LatencyTracker latencyTracker,
Supplier<SurfaceControl.Transaction> supplier) {
mTransitions = transitions;
mInteractionJankMonitor = interactionJankMonitor;
+ mLatencyTracker = latencyTracker;
mTransactionSupplier = supplier;
}
@@ -122,6 +128,13 @@ public class EnterDesktopTaskTransitionHandler implements Transitions.Transition
}
}
+ if (transitionHandled
+ && info.getType()
+ == DesktopModeTransitionTypes
+ .TRANSIT_ENTER_DESKTOP_FROM_APP_HANDLE_MENU_BUTTON) {
+ mLatencyTracker.onActionEnd(LatencyTracker.ACTION_DESKTOP_MODE_ENTER_APP_HANDLE_MENU);
+ }
+
mPendingTransitionTokens.remove(transition);
return transitionHandled;
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/multidesks/DesksTransitionObserver.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/multidesks/DesksTransitionObserver.kt
index e57b56378fb3..b521b2e8c942 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/multidesks/DesksTransitionObserver.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/multidesks/DesksTransitionObserver.kt
@@ -31,12 +31,14 @@ class DesksTransitionObserver(
private val desktopUserRepositories: DesktopUserRepositories,
private val desksOrganizer: DesksOrganizer,
) {
- private val deskTransitions = mutableMapOf<IBinder, DeskTransition>()
+ private val deskTransitions = mutableMapOf<IBinder, MutableSet<DeskTransition>>()
/** Adds a pending desk transition to be tracked. */
fun addPendingTransition(transition: DeskTransition) {
if (!DesktopExperienceFlags.ENABLE_MULTIPLE_DESKTOPS_BACKEND.isTrue) return
- deskTransitions[transition.token] = transition
+ val transitions = deskTransitions[transition.token] ?: mutableSetOf()
+ transitions += transition
+ deskTransitions[transition.token] = transitions
}
/**
@@ -45,7 +47,11 @@ class DesksTransitionObserver(
*/
fun onTransitionReady(transition: IBinder, info: TransitionInfo) {
if (!DesktopExperienceFlags.ENABLE_MULTIPLE_DESKTOPS_BACKEND.isTrue) return
- val deskTransition = deskTransitions.remove(transition) ?: return
+ val deskTransitions = deskTransitions.remove(transition) ?: return
+ deskTransitions.forEach { deskTransition -> handleDeskTransition(info, deskTransition) }
+ }
+
+ private fun handleDeskTransition(info: TransitionInfo, deskTransition: DeskTransition) {
logD("Desk transition ready: %s", deskTransition)
val desktopRepository = desktopUserRepositories.current
when (deskTransition) {
@@ -60,16 +66,21 @@ class DesksTransitionObserver(
deskTransition.onDeskRemovedListener?.onDeskRemoved(displayId, deskId)
}
is DeskTransition.ActivateDesk -> {
- val activeDeskChange =
+ val activateDeskChange =
info.changes.find { change ->
desksOrganizer.isDeskActiveAtEnd(change, deskTransition.deskId)
}
- activeDeskChange?.let {
- desktopRepository.setActiveDesk(
- displayId = deskTransition.displayId,
- deskId = deskTransition.deskId,
- )
+ if (activateDeskChange == null) {
+ // Always activate even if there is no change in the transition for the
+ // activated desk. This is necessary because some activation requests, such as
+ // those involving empty desks, may not contain visibility changes that are
+ // reported in the transition change list.
+ logD("Activating desk without transition change")
}
+ desktopRepository.setActiveDesk(
+ displayId = deskTransition.displayId,
+ deskId = deskTransition.deskId,
+ )
}
is DeskTransition.ActiveDeskWithTask -> {
val withTask =
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java
index cf139a008164..d9afd1503db5 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java
@@ -92,6 +92,7 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.jank.Cuj;
import com.android.internal.jank.InteractionJankMonitor;
import com.android.internal.protolog.ProtoLog;
+import com.android.internal.util.LatencyTracker;
import com.android.window.flags.Flags;
import com.android.wm.shell.R;
import com.android.wm.shell.RootTaskDisplayAreaOrganizer;
@@ -260,6 +261,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
private final DesktopModeCompatPolicy mDesktopModeCompatPolicy;
private final DesktopTilingDecorViewModel mDesktopTilingDecorViewModel;
private final MultiDisplayDragMoveIndicatorController mMultiDisplayDragMoveIndicatorController;
+ private final LatencyTracker mLatencyTracker;
public DesktopModeWindowDecorViewModel(
Context context,
@@ -466,6 +468,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
mDesktopTilingDecorViewModel = desktopTilingDecorViewModel;
mDesktopTasksController.setSnapEventHandler(this);
mMultiDisplayDragMoveIndicatorController = multiDisplayDragMoveIndicatorController;
+ mLatencyTracker = LatencyTracker.getInstance(mContext);
shellInit.addInitCallback(this::onInit, this);
}
@@ -764,11 +767,19 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
final WindowContainerTransaction wct = new WindowContainerTransaction();
mInteractionJankMonitor.begin(decoration.mTaskSurface, mContext, mMainHandler,
CUJ_DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU);
+ mLatencyTracker.onActionStart(LatencyTracker.ACTION_DESKTOP_MODE_ENTER_APP_HANDLE_MENU);
// App sometimes draws before the insets from WindowDecoration#relayout have
// been added, so they must be added here
decoration.addCaptionInset(wct);
- mDesktopTasksController.moveTaskToDefaultDeskAndActivate(taskId, wct, source,
- /* remoteTransition= */ null, /* moveToDesktopCallback */ null);
+ if (!mDesktopTasksController.moveTaskToDefaultDeskAndActivate(
+ taskId,
+ wct,
+ source,
+ /* remoteTransition= */ null,
+ /* moveToDesktopCallback= */ null)) {
+ mLatencyTracker.onActionCancel(
+ LatencyTracker.ACTION_DESKTOP_MODE_ENTER_APP_HANDLE_MENU);
+ }
decoration.closeHandleMenu();
if (source == DesktopModeTransitionSource.APP_HANDLE_MENU_BUTTON) {
diff --git a/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/functional/AltTabSwitchInDesktopModeTest.kt b/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/functional/AltTabSwitchInDesktopModeTest.kt
new file mode 100644
index 000000000000..617b3c576444
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/functional/AltTabSwitchInDesktopModeTest.kt
@@ -0,0 +1,27 @@
+/*
+ * 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 com.android.wm.shell.functional
+
+import com.android.wm.shell.scenarios.AltTabSwitchInDesktopMode
+import org.junit.Ignore
+import org.junit.runner.RunWith
+import org.junit.runners.BlockJUnit4ClassRunner
+
+/* Functional test for [AltTabSwitchInDesktopMode]. */
+@RunWith(BlockJUnit4ClassRunner::class)
+@Ignore("Blocked by b/392820286, include in Postsubmit, when the issue is resolved")
+class AltTabSwitchInDesktopModeTest : AltTabSwitchInDesktopMode() \ No newline at end of file
diff --git a/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/AltTabSwitchInDesktopMode.kt b/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/AltTabSwitchInDesktopMode.kt
new file mode 100644
index 000000000000..cf6d5a871b13
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/AltTabSwitchInDesktopMode.kt
@@ -0,0 +1,80 @@
+/*
+ * 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 com.android.wm.shell.scenarios
+
+import android.app.Instrumentation
+import android.tools.flicker.rules.ChangeDisplayOrientationRule
+import android.tools.NavBar
+import android.tools.Rotation
+import android.tools.traces.parsers.WindowManagerStateHelper
+import androidx.test.platform.app.InstrumentationRegistry
+import androidx.test.uiautomator.UiDevice
+import com.android.launcher3.tapl.LauncherInstrumentation
+import com.android.server.wm.flicker.helpers.DesktopModeAppHelper
+import com.android.server.wm.flicker.helpers.MailAppHelper
+import com.android.server.wm.flicker.helpers.NewTasksAppHelper
+import com.android.server.wm.flicker.helpers.SimpleAppHelper
+import com.android.window.flags.Flags
+import com.android.wm.shell.Utils
+import org.junit.After
+import org.junit.Assume
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Rule
+import org.junit.Test
+
+@Ignore("Test Base Class")
+abstract class AltTabSwitchInDesktopMode(val rotation: Rotation = Rotation.ROTATION_0) {
+
+ private val instrumentation: Instrumentation = InstrumentationRegistry.getInstrumentation()
+ private val tapl = LauncherInstrumentation()
+ private val wmHelper = WindowManagerStateHelper(instrumentation)
+ private val device = UiDevice.getInstance(instrumentation)
+ private val firstApp = DesktopModeAppHelper(SimpleAppHelper(instrumentation))
+ private val secondApp = MailAppHelper(instrumentation)
+ private val thirdApp = NewTasksAppHelper(instrumentation)
+
+ @Rule
+ @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, rotation)
+
+ @Before
+ fun setup() {
+ Assume.assumeTrue(Flags.enableDesktopWindowingMode() && tapl.isTablet)
+ tapl.setEnableRotation(true)
+ tapl.setExpectedRotation(rotation.value)
+ tapl.enableTransientTaskbar(false)
+ ChangeDisplayOrientationRule.setRotation(rotation)
+ firstApp.enterDesktopMode(wmHelper, device)
+ secondApp.launchViaIntent(wmHelper)
+ thirdApp.launchViaIntent(wmHelper)
+ }
+
+ @Test
+ open fun switchApp() {
+ tapl.launchedAppState
+ .showQuickSwitchView()
+ .moveFocusForward()
+ .launchFocusedAppTask(firstApp.packageName)
+ }
+
+ @After
+ fun teardown() {
+ thirdApp.exit(wmHelper)
+ secondApp.exit(wmHelper)
+ firstApp.exit(wmHelper)
+ }
+} \ No newline at end of file
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt
index 9a73b022ebc3..93eb396742ab 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt
@@ -1675,6 +1675,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
@Test
@EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODALS_POLICY)
+ @DisableFlags(Flags.FLAG_ENABLE_MODALS_FULLSCREEN_WITH_PERMISSION)
fun moveRunningTaskToDesktop_topActivityTranslucentWithDisplay_doesNothing() {
val task =
setUpFullscreenTask().apply {
@@ -2779,6 +2780,79 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
}
@Test
+ @EnableFlags(Flags.FLAG_ENABLE_MULTIPLE_DESKTOPS_BACKEND)
+ fun moveToNextDisplay_toDeskInOtherDisplay_movesToDeskAndActivates() {
+ val transition = Binder()
+ val targetDeskId = 4
+ taskRepository.addDesk(displayId = SECOND_DISPLAY, deskId = targetDeskId)
+ taskRepository.setDeskInactive(deskId = targetDeskId)
+ // Set up two display ids
+ whenever(rootTaskDisplayAreaOrganizer.displayIds)
+ .thenReturn(intArrayOf(DEFAULT_DISPLAY, SECOND_DISPLAY))
+ // Create a mock for the target display area: second display
+ val secondDisplayArea = DisplayAreaInfo(MockToken().token(), SECOND_DISPLAY, 0)
+ whenever(rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(SECOND_DISPLAY))
+ .thenReturn(secondDisplayArea)
+ whenever(transitions.startTransition(eq(TRANSIT_CHANGE), any(), anyOrNull()))
+ .thenReturn(transition)
+
+ val task = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
+ taskRepository.addTaskToDesk(
+ displayId = DEFAULT_DISPLAY,
+ deskId = 0,
+ taskId = task.taskId,
+ isVisible = true,
+ )
+ controller.moveToNextDisplay(task.taskId)
+
+ verify(desksOrganizer).moveTaskToDesk(any(), eq(targetDeskId), eq(task))
+ verify(desksOrganizer).activateDesk(any(), eq(targetDeskId))
+ verify(desksTransitionsObserver)
+ .addPendingTransition(
+ DeskTransition.ActiveDeskWithTask(
+ token = transition,
+ displayId = SECOND_DISPLAY,
+ deskId = targetDeskId,
+ enterTaskId = task.taskId,
+ )
+ )
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_ENABLE_MULTIPLE_DESKTOPS_BACKEND)
+ fun moveToNextDisplay_wasLastTaskInSourceDesk_deactivates() {
+ val transition = Binder()
+ val sourceDeskId = 0
+ val targetDeskId = 4
+ taskRepository.addDesk(displayId = SECOND_DISPLAY, deskId = targetDeskId)
+ taskRepository.setDeskInactive(deskId = targetDeskId)
+ // Set up two display ids
+ whenever(rootTaskDisplayAreaOrganizer.displayIds)
+ .thenReturn(intArrayOf(DEFAULT_DISPLAY, SECOND_DISPLAY))
+ // Create a mock for the target display area: second display
+ val secondDisplayArea = DisplayAreaInfo(MockToken().token(), SECOND_DISPLAY, 0)
+ whenever(rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(SECOND_DISPLAY))
+ .thenReturn(secondDisplayArea)
+ whenever(transitions.startTransition(eq(TRANSIT_CHANGE), any(), anyOrNull()))
+ .thenReturn(transition)
+
+ val task = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
+ taskRepository.addTaskToDesk(
+ displayId = DEFAULT_DISPLAY,
+ deskId = sourceDeskId,
+ taskId = task.taskId,
+ isVisible = true,
+ )
+ controller.moveToNextDisplay(task.taskId)
+
+ verify(desksOrganizer).deactivateDesk(any(), eq(sourceDeskId))
+ verify(desksTransitionsObserver)
+ .addPendingTransition(
+ DeskTransition.DeactivateDesk(token = transition, deskId = sourceDeskId)
+ )
+ }
+
+ @Test
fun getTaskWindowingMode() {
val fullscreenTask = setUpFullscreenTask()
val freeformTask = setUpFreeformTask()
@@ -3733,6 +3807,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
@Test
@EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODALS_POLICY)
+ @DisableFlags(Flags.FLAG_ENABLE_MODALS_FULLSCREEN_WITH_PERMISSION)
fun handleRequest_topActivityTransparentWithDisplay_returnSwitchToFullscreenWCT() {
val freeformTask = setUpFreeformTask()
markTaskVisible(freeformTask)
@@ -3754,6 +3829,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODALS_POLICY,
Flags.FLAG_INCLUDE_TOP_TRANSPARENT_FULLSCREEN_TASK_IN_DESKTOP_HEURISTIC,
)
+ @DisableFlags(Flags.FLAG_ENABLE_MODALS_FULLSCREEN_WITH_PERMISSION)
fun handleRequest_topActivityTransparentWithDisplay_savedToDesktopRepository() {
val freeformTask = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
markTaskVisible(freeformTask)
@@ -3775,6 +3851,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODALS_POLICY,
Flags.FLAG_INCLUDE_TOP_TRANSPARENT_FULLSCREEN_TASK_IN_DESKTOP_HEURISTIC,
)
+ @DisableFlags(Flags.FLAG_ENABLE_MODALS_FULLSCREEN_WITH_PERMISSION)
fun handleRequest_desktopNotShowing_topTransparentFullscreenTask_notSavedToDesktopRepository() {
val task = setUpFullscreenTask(displayId = DEFAULT_DISPLAY)
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTestHelpers.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTestHelpers.kt
index 8b6cafb10df4..c00083b0607f 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTestHelpers.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTestHelpers.kt
@@ -22,6 +22,7 @@ import android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD
import android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM
import android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN
import android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW
+import android.content.ComponentName
import android.graphics.Rect
import android.view.Display.DEFAULT_DISPLAY
import com.android.wm.shell.MockToken
@@ -84,4 +85,10 @@ object DesktopTestHelpers {
/** Create a new System Modal task, i.e. a task with only transparent activities. */
fun createSystemModalTask(displayId: Int = DEFAULT_DISPLAY): RunningTaskInfo =
createSystemModalTaskBuilder(displayId).build()
+
+ /** Create a new System Modal task with a base Activity. */
+ fun createSystemModalTaskWithBaseActivity() =
+ createSystemModalTask().apply {
+ baseActivity = ComponentName("com.test.dummypackage", "TestClass")
+ }
}
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/compatui/SystemModalsTransitionHandlerTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/compatui/SystemModalsTransitionHandlerTest.kt
index 9cb2a055e45d..143d232013fc 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/compatui/SystemModalsTransitionHandlerTest.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/compatui/SystemModalsTransitionHandlerTest.kt
@@ -16,8 +16,10 @@
package com.android.wm.shell.desktopmode.compatui
+import android.Manifest.permission.SYSTEM_ALERT_WINDOW
import android.content.ComponentName
import android.content.Intent
+import android.content.pm.PackageInfo
import android.content.pm.PackageManager
import android.os.Binder
import android.testing.AndroidTestingRunner
@@ -34,6 +36,7 @@ import com.android.wm.shell.desktopmode.DesktopTestHelpers.createFullscreenTask
import com.android.wm.shell.desktopmode.DesktopTestHelpers.createFullscreenTaskBuilder
import com.android.wm.shell.desktopmode.DesktopTestHelpers.createSystemModalTask
import com.android.wm.shell.desktopmode.DesktopTestHelpers.createSystemModalTaskBuilder
+import com.android.wm.shell.desktopmode.DesktopTestHelpers.createSystemModalTaskWithBaseActivity
import com.android.wm.shell.desktopmode.DesktopUserRepositories
import com.android.wm.shell.desktopmode.DesktopWallpaperActivity
import com.android.wm.shell.shared.desktopmode.DesktopModeCompatPolicy
@@ -46,7 +49,9 @@ import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentMatchers.anyInt
+import org.mockito.ArgumentMatchers.anyString
import org.mockito.kotlin.any
+import org.mockito.kotlin.eq
import org.mockito.kotlin.mock
import org.mockito.kotlin.spy
import org.mockito.kotlin.verify
@@ -85,6 +90,7 @@ class SystemModalsTransitionHandlerTest : ShellTestCase() {
whenever(packageManager.getHomeActivities(ArrayList())).thenReturn(componentName)
desktopModeCompatPolicy = DesktopModeCompatPolicy(spyContext)
transitionHandler = createTransitionHandler()
+ allowOverlayPermission(arrayOf(SYSTEM_ALERT_WINDOW))
}
private fun createTransitionHandler() =
@@ -108,7 +114,7 @@ class SystemModalsTransitionHandlerTest : ShellTestCase() {
whenever(desktopUserRepositories.current.getVisibleTaskCount(anyInt())).thenReturn(1)
val info =
TransitionInfoBuilder(TRANSIT_OPEN)
- .addChange(TRANSIT_OPEN, createSystemModalTask())
+ .addChange(TRANSIT_OPEN, createSystemModalTaskWithBaseActivity())
.build()
assertThat(transitionHandler.startAnimation(Binder(), info, startT, finishT) {}).isTrue()
@@ -118,7 +124,7 @@ class SystemModalsTransitionHandlerTest : ShellTestCase() {
fun startAnimation_launchingSystemModal_animates() {
val info =
TransitionInfoBuilder(TRANSIT_OPEN)
- .addChange(TRANSIT_OPEN, createSystemModalTask())
+ .addChange(TRANSIT_OPEN, createSystemModalTaskWithBaseActivity())
.build()
assertThat(transitionHandler.startAnimation(Binder(), info, startT, finishT) {}).isTrue()
@@ -161,7 +167,7 @@ class SystemModalsTransitionHandlerTest : ShellTestCase() {
fun startAnimation_closingSystemModal_animates() {
val info =
TransitionInfoBuilder(TRANSIT_CLOSE)
- .addChange(TRANSIT_CLOSE, createSystemModalTask())
+ .addChange(TRANSIT_CLOSE, createSystemModalTaskWithBaseActivity())
.build()
assertThat(transitionHandler.startAnimation(Binder(), info, startT, finishT) {}).isTrue()
@@ -179,7 +185,7 @@ class SystemModalsTransitionHandlerTest : ShellTestCase() {
@Test
fun startAnimation_closingPreviouslyLaunchedSystemModal_animates() {
- val systemModalTask = createSystemModalTask()
+ val systemModalTask = createSystemModalTaskWithBaseActivity()
val nonModalSystemModalTask =
createFullscreenTaskBuilder().setTaskId(systemModalTask.taskId).build()
val launchInfo =
@@ -193,4 +199,11 @@ class SystemModalsTransitionHandlerTest : ShellTestCase() {
assertThat(transitionHandler.startAnimation(Binder(), closeInfo, startT, finishT) {})
.isTrue()
}
+
+ fun allowOverlayPermission(permissions: Array<String>) {
+ val packageInfo = mock<PackageInfo>()
+ packageInfo.requestedPermissions = permissions
+ whenever(packageManager.getPackageInfo(anyString(), eq(PackageManager.GET_PERMISSIONS)))
+ .thenReturn(packageInfo)
+ }
}
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/multidesks/DesksTransitionObserverTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/multidesks/DesksTransitionObserverTest.kt
index 4dcf669f4d25..409ca57715fc 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/multidesks/DesksTransitionObserverTest.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/multidesks/DesksTransitionObserverTest.kt
@@ -181,6 +181,23 @@ class DesksTransitionObserverTest : ShellTestCase() {
@Test
@EnableFlags(Flags.FLAG_ENABLE_MULTIPLE_DESKTOPS_BACKEND)
+ fun onTransitionReady_activateDesk_noTransitChange_updatesRepository() {
+ val transition = Binder()
+ val activateTransition =
+ DeskTransition.ActivateDesk(transition, displayId = DEFAULT_DISPLAY, deskId = 5)
+ repository.addDesk(DEFAULT_DISPLAY, deskId = 5)
+
+ observer.addPendingTransition(activateTransition)
+ observer.onTransitionReady(
+ transition = transition,
+ info = TransitionInfo(TRANSIT_TO_FRONT, /* flags= */ 0), // no changes.
+ )
+
+ assertThat(repository.getActiveDeskId(DEFAULT_DISPLAY)).isEqualTo(5)
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_ENABLE_MULTIPLE_DESKTOPS_BACKEND)
fun onTransitionReady_deactivateDesk_updatesRepository() {
val transition = Binder()
val deskChange = Change(mock(), mock())
@@ -244,4 +261,28 @@ class DesksTransitionObserverTest : ShellTestCase() {
assertThat(repository.getActiveDeskId(DEFAULT_DISPLAY)).isNull()
}
+
+ @Test
+ @EnableFlags(Flags.FLAG_ENABLE_MULTIPLE_DESKTOPS_BACKEND)
+ fun onTransitionReady_twoPendingTransitions_handlesBoth() {
+ val transition = Binder()
+ // Active one desk and deactivate another in different displays, such as in some
+ // move-to-next-display CUJs.
+ repository.addDesk(displayId = 0, deskId = 1)
+ repository.addDesk(displayId = 1, deskId = 2)
+ repository.setActiveDesk(displayId = 0, deskId = 1)
+ repository.setDeskInactive(2)
+ val activateTransition = DeskTransition.ActivateDesk(transition, displayId = 1, deskId = 2)
+ val deactivateTransition = DeskTransition.DeactivateDesk(transition, deskId = 1)
+
+ observer.addPendingTransition(activateTransition)
+ observer.addPendingTransition(deactivateTransition)
+ observer.onTransitionReady(
+ transition = transition,
+ info = TransitionInfo(TRANSIT_CHANGE, /* flags= */ 0),
+ )
+
+ assertThat(repository.getActiveDeskId(displayId = 0)).isNull()
+ assertThat(repository.getActiveDeskId(displayId = 1)).isEqualTo(2)
+ }
}
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/shared/desktopmode/DesktopModeCompatPolicyTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/shared/desktopmode/DesktopModeCompatPolicyTest.kt
index 88c6e499b869..5ac680048a7e 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/shared/desktopmode/DesktopModeCompatPolicyTest.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/shared/desktopmode/DesktopModeCompatPolicyTest.kt
@@ -46,6 +46,8 @@ import org.mockito.ArgumentMatchers.anyString
import org.mockito.kotlin.any
import org.mockito.kotlin.eq
import org.mockito.kotlin.mock
+import org.mockito.kotlin.times
+import org.mockito.kotlin.verify
import org.mockito.kotlin.whenever
/**
@@ -111,6 +113,32 @@ class DesktopModeCompatPolicyTest : ShellTestCase() {
}
@Test
+ @EnableFlags(Flags.FLAG_ENABLE_MODALS_FULLSCREEN_WITH_PERMISSION)
+ fun testIsTopActivityExemptCachedPermissionCheckIsUsed() {
+ allowOverlayPermission(arrayOf())
+ assertFalse(desktopModeCompatPolicy.isTopActivityExemptFromDesktopWindowing(
+ createFreeformTask(/* displayId */ 0)
+ .apply {
+ isActivityStackTransparent = true
+ isTopActivityNoDisplay = false
+ numActivities = 1
+ baseActivity = baseActivityTest
+ }))
+ assertFalse(desktopModeCompatPolicy.isTopActivityExemptFromDesktopWindowing(
+ createFreeformTask(/* displayId */ 0)
+ .apply {
+ isActivityStackTransparent = true
+ isTopActivityNoDisplay = false
+ numActivities = 1
+ baseActivity = baseActivityTest
+ }))
+ verify(packageManager, times(1)).getPackageInfo(
+ eq("com.test.dummypackage"),
+ eq(PackageManager.GET_PERMISSIONS)
+ )
+ }
+
+ @Test
fun testIsTopActivityExemptFromDesktopWindowing_noActivitiesInStack() {
assertFalse(desktopModeCompatPolicy.isTopActivityExemptFromDesktopWindowing(
createFreeformTask(/* displayId */ 0)
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTests.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTests.kt
index d8d45c02b364..16c793587ade 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTests.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTests.kt
@@ -278,6 +278,7 @@ class DesktopModeWindowDecorViewModelTests : DesktopModeWindowDecorViewModelTest
@Test
@EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODALS_POLICY)
+ @DisableFlags(Flags.FLAG_ENABLE_MODALS_FULLSCREEN_WITH_PERMISSION)
fun testDecorationIsNotCreatedForTopTranslucentActivities() {
val task = createTask(windowingMode = WINDOWING_MODE_FULLSCREEN).apply {
isActivityStackTransparent = true
diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp
index 7a51c20f7672..714f6e41ff05 100644
--- a/libs/androidfw/AssetManager2.cpp
+++ b/libs/androidfw/AssetManager2.cpp
@@ -23,6 +23,7 @@
#include <map>
#include <set>
#include <span>
+#include <sstream>
#include <utility>
#include "android-base/logging.h"
@@ -64,7 +65,7 @@ base::expected<EntryValue, IOError> GetEntryValue(
return table_entry->value();
}
-} // namespace
+} // namespace
struct FindEntryResult {
// The cookie representing the ApkAssets in which the value resides.
@@ -441,6 +442,24 @@ bool AssetManager2::ContainsAllocatedTable() const {
return false;
}
+static std::string ConfigVecToString(std::span<const ResTable_config> configurations) {
+ std::stringstream ss;
+ ss << "[";
+ bool first = true;
+ for (const auto& config : configurations) {
+ if (!first) {
+ ss << ",";
+ }
+ char out[RESTABLE_MAX_LOCALE_LEN] = {};
+ config.getBcp47Locale(out);
+ ss << out;
+ first = false;
+ }
+ ss << "]";
+ return ss.str();
+}
+
+
void AssetManager2::SetConfigurations(std::span<const ResTable_config> configurations,
bool force_refresh) {
int diff = 0;
@@ -455,6 +474,17 @@ void AssetManager2::SetConfigurations(std::span<const ResTable_config> configura
}
}
}
+
+ // Log the locale list change to investigate b/392255526
+ if (diff & ConfigDescription::CONFIG_LOCALE) {
+ auto oldstr = ConfigVecToString(configurations_);
+ auto newstr = ConfigVecToString(configurations);
+ if (oldstr != newstr) {
+ LOG(INFO) << "AssetManager2(" << this << ") locale list changing from "
+ << oldstr << " to " << newstr;
+ }
+ }
+
configurations_.clear();
for (auto&& config : configurations) {
configurations_.emplace_back(config);
@@ -465,6 +495,28 @@ void AssetManager2::SetConfigurations(std::span<const ResTable_config> configura
}
}
+void AssetManager2::SetDefaultLocale(std::optional<ResTable_config> default_locale) {
+ int diff = 0;
+ if (default_locale_ && default_locale) {
+ diff = default_locale_->diff(default_locale.value());
+ } else if (default_locale_ || default_locale) {
+ diff = -1;
+ }
+ if (diff & ConfigDescription::CONFIG_LOCALE) {
+ char old_loc[RESTABLE_MAX_LOCALE_LEN] = {};
+ char new_loc[RESTABLE_MAX_LOCALE_LEN] = {};
+ if (default_locale_) {
+ default_locale_->getBcp47Locale(old_loc);
+ }
+ if (default_locale) {
+ default_locale->getBcp47Locale(new_loc);
+ }
+ LOG(INFO) << "AssetManager2(" << this << ") default locale changing from '"
+ << old_loc << "' to '" << new_loc << "'";
+ }
+ default_locale_ = default_locale;
+}
+
void AssetManager2::SetOverlayConstraints(int32_t display_id, int32_t device_id) {
bool changed = false;
if (display_id_ != display_id) {
@@ -735,7 +787,7 @@ base::expected<FindEntryResult, NullOrIOError> AssetManager2::FindEntry(
ConfigDescription best_frro_config;
Res_value best_frro_value;
bool frro_found = false;
- for (const auto& [config, value] : overlay_entry.GetInlineValue()) {
+ for(const auto& [config, value] : overlay_entry.GetInlineValue()) {
if ((!frro_found || config.isBetterThan(best_frro_config, desired_config))
&& config.match(*desired_config)) {
frro_found = true;
@@ -814,11 +866,11 @@ base::expected<FindEntryResult, NullOrIOError> AssetManager2::FindEntry(
bool has_locale = false;
if (result->config.locale == 0) {
- if (default_locale_ != 0) {
- ResTable_config conf = {.locale = default_locale_};
- // Since we know conf has a locale and only a locale, match will tell us if that locale
- // matches
- has_locale = conf.match(config);
+ // The default_locale_ is the locale used for any resources with no locale in the config
+ if (default_locale_) {
+ // Since we know default_locale_ has a locale and only a locale, match will tell us if that
+ // locale matches
+ has_locale = default_locale_->match(config);
}
} else {
has_locale = true;
@@ -1505,7 +1557,7 @@ base::expected<uint32_t, NullOrIOError> AssetManager2::GetResourceId(
base::expected<uint32_t, NullOrIOError> resid = package->FindEntryByName(type16, entry16);
if (UNLIKELY(IsIOError(resid))) {
return base::unexpected(resid.error());
- }
+ }
if (!resid.has_value() && kAttr16 == type16) {
// Private attributes in libraries (such as the framework) are sometimes encoded
diff --git a/libs/androidfw/include/androidfw/AssetManager2.h b/libs/androidfw/include/androidfw/AssetManager2.h
index a47fe6a7f50d..b0179524f6cd 100644
--- a/libs/androidfw/include/androidfw/AssetManager2.h
+++ b/libs/androidfw/include/androidfw/AssetManager2.h
@@ -21,6 +21,7 @@
#include <array>
#include <limits>
+#include <optional>
#include <set>
#include <span>
#include <unordered_map>
@@ -167,9 +168,7 @@ class AssetManager2 {
return configurations_;
}
- inline void SetDefaultLocale(uint32_t default_locale) {
- default_locale_ = default_locale;
- }
+ void SetDefaultLocale(const std::optional<ResTable_config> default_locale);
void SetOverlayConstraints(int32_t display_id, int32_t device_id);
@@ -481,7 +480,7 @@ class AssetManager2 {
// without taking too much memory.
std::array<uint8_t, std::numeric_limits<uint8_t>::max() + 1> package_ids_ = {};
- uint32_t default_locale_ = 0;
+ std::optional<ResTable_config> default_locale_;
// The current configurations set for this AssetManager. When this changes, cached resources
// may need to be purged.
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h
index f119102dc2a2..3de8e0516070 100644
--- a/libs/hwui/renderthread/CanvasContext.h
+++ b/libs/hwui/renderthread/CanvasContext.h
@@ -312,7 +312,7 @@ private:
};
// Need at least 4 because we do quad buffer. Add a few more for good measure.
- RingBuffer<SwapHistory, 7> mSwapHistory;
+ RingBuffer<SwapHistory, 8> mSwapHistory;
// Frame numbers start at 1, 0 means uninitialized
uint64_t mFrameNumber = 0;
int64_t mDamageId = 0;
diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java
index e01cb928e369..ad6f2e52fd97 100644
--- a/media/java/android/media/AudioSystem.java
+++ b/media/java/android/media/AudioSystem.java
@@ -1134,6 +1134,9 @@ public class AudioSystem
public static final Set<Integer> DEVICE_ALL_HDMI_SYSTEM_AUDIO_AND_SPEAKER_SET;
/** @hide */
public static final Set<Integer> DEVICE_OUT_ALL_BLE_SET;
+ /** @hide */
+ public static final Set<Integer> DEVICE_OUT_PICK_FOR_VOLUME_SET;
+
static {
DEVICE_OUT_ALL_SET = new HashSet<>();
DEVICE_OUT_ALL_SET.add(DEVICE_OUT_EARPIECE);
@@ -1201,6 +1204,22 @@ public class AudioSystem
DEVICE_OUT_ALL_BLE_SET.add(DEVICE_OUT_BLE_HEADSET);
DEVICE_OUT_ALL_BLE_SET.add(DEVICE_OUT_BLE_SPEAKER);
DEVICE_OUT_ALL_BLE_SET.add(DEVICE_OUT_BLE_BROADCAST);
+
+ DEVICE_OUT_PICK_FOR_VOLUME_SET = new HashSet<>();
+ DEVICE_OUT_PICK_FOR_VOLUME_SET.add(DEVICE_OUT_WIRED_HEADSET);
+ DEVICE_OUT_PICK_FOR_VOLUME_SET.add(DEVICE_OUT_WIRED_HEADPHONE);
+ DEVICE_OUT_PICK_FOR_VOLUME_SET.add(DEVICE_OUT_USB_DEVICE);
+ DEVICE_OUT_PICK_FOR_VOLUME_SET.add(DEVICE_OUT_USB_HEADSET);
+ DEVICE_OUT_PICK_FOR_VOLUME_SET.add(DEVICE_OUT_BLUETOOTH_A2DP);
+ DEVICE_OUT_PICK_FOR_VOLUME_SET.add(DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES);
+ DEVICE_OUT_PICK_FOR_VOLUME_SET.add(DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER);
+ DEVICE_OUT_PICK_FOR_VOLUME_SET.add(DEVICE_OUT_BLUETOOTH_SCO);
+ DEVICE_OUT_PICK_FOR_VOLUME_SET.add(DEVICE_OUT_BLUETOOTH_SCO_HEADSET);
+ DEVICE_OUT_PICK_FOR_VOLUME_SET.add(DEVICE_OUT_BLUETOOTH_SCO_CARKIT);
+ DEVICE_OUT_PICK_FOR_VOLUME_SET.add(DEVICE_OUT_HEARING_AID);
+ DEVICE_OUT_PICK_FOR_VOLUME_SET.add(DEVICE_OUT_BLE_HEADSET);
+ DEVICE_OUT_PICK_FOR_VOLUME_SET.add(DEVICE_OUT_BLE_SPEAKER);
+ DEVICE_OUT_PICK_FOR_VOLUME_SET.add(DEVICE_OUT_BLE_BROADCAST);
}
// input devices
diff --git a/packages/SettingsLib/SelectorWithWidgetPreference/res/layout/preference_widget_checkbox.xml b/packages/SettingsLib/SelectorWithWidgetPreference/res/layout/settingslib_preference_widget_checkbox.xml
index 6dd16709b7b5..6dd16709b7b5 100644
--- a/packages/SettingsLib/SelectorWithWidgetPreference/res/layout/preference_widget_checkbox.xml
+++ b/packages/SettingsLib/SelectorWithWidgetPreference/res/layout/settingslib_preference_widget_checkbox.xml
diff --git a/packages/SettingsLib/SelectorWithWidgetPreference/res/layout/preference_widget_radiobutton.xml b/packages/SettingsLib/SelectorWithWidgetPreference/res/layout/settingslib_preference_widget_radiobutton.xml
index cf6371d04f78..cf6371d04f78 100644
--- a/packages/SettingsLib/SelectorWithWidgetPreference/res/layout/preference_widget_radiobutton.xml
+++ b/packages/SettingsLib/SelectorWithWidgetPreference/res/layout/settingslib_preference_widget_radiobutton.xml
diff --git a/packages/SettingsLib/SelectorWithWidgetPreference/src/com/android/settingslib/widget/SelectorWithWidgetPreference.java b/packages/SettingsLib/SelectorWithWidgetPreference/src/com/android/settingslib/widget/SelectorWithWidgetPreference.java
index 218983a55e1b..cde8b332f2e7 100644
--- a/packages/SettingsLib/SelectorWithWidgetPreference/src/com/android/settingslib/widget/SelectorWithWidgetPreference.java
+++ b/packages/SettingsLib/SelectorWithWidgetPreference/src/com/android/settingslib/widget/SelectorWithWidgetPreference.java
@@ -234,9 +234,9 @@ public class SelectorWithWidgetPreference extends CheckBoxPreference {
private void init(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr,
int defStyleRes) {
if (mIsCheckBox) {
- setWidgetLayoutResource(R.layout.preference_widget_checkbox);
+ setWidgetLayoutResource(R.layout.settingslib_preference_widget_checkbox);
} else {
- setWidgetLayoutResource(R.layout.preference_widget_radiobutton);
+ setWidgetLayoutResource(R.layout.settingslib_preference_widget_radiobutton);
}
setLayoutResource(R.layout.preference_selector_with_widget);
setIconSpaceReserved(false);
diff --git a/packages/SettingsLib/res/layout-v33/preference_checkable_two_target.xml b/packages/SettingsLib/res/layout-v33/preference_checkable_two_target.xml
index 7ad018cfbcf4..60d03e36b732 100644
--- a/packages/SettingsLib/res/layout-v33/preference_checkable_two_target.xml
+++ b/packages/SettingsLib/res/layout-v33/preference_checkable_two_target.xml
@@ -47,7 +47,7 @@
android:clipToPadding="false"
android:paddingTop="4dp"
android:paddingBottom="4dp">
- <include layout="@layout/preference_widget_checkbox" />
+ <include layout="@layout/settingslib_preference_widget_checkbox" />
</LinearLayout>
<RelativeLayout
diff --git a/packages/SettingsLib/res/layout/preference_checkable_two_target.xml b/packages/SettingsLib/res/layout/preference_checkable_two_target.xml
index f512f9b27131..ab7b04bf15c7 100644
--- a/packages/SettingsLib/res/layout/preference_checkable_two_target.xml
+++ b/packages/SettingsLib/res/layout/preference_checkable_two_target.xml
@@ -47,7 +47,7 @@
android:clipToPadding="false"
android:paddingTop="4dp"
android:paddingBottom="4dp">
- <include layout="@layout/preference_widget_checkbox" />
+ <include layout="@layout/settingslib_preference_widget_checkbox" />
</LinearLayout>
<RelativeLayout
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/satellite/SatelliteDialogUtilsTest.kt b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/satellite/SatelliteDialogUtilsTest.kt
index 1deb62510daf..71e72fef56bc 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/satellite/SatelliteDialogUtilsTest.kt
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/satellite/SatelliteDialogUtilsTest.kt
@@ -17,7 +17,6 @@
package com.android.settingslib.satellite
import android.content.Context
-import android.platform.test.annotations.RequiresFlagsEnabled
import android.telephony.satellite.SatelliteManager
import android.telephony.satellite.SatelliteManager.SATELLITE_MODEM_STATE_ENABLING_SATELLITE
import android.telephony.satellite.SatelliteManager.SATELLITE_MODEM_STATE_OFF
@@ -25,7 +24,6 @@ import android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_MODEM_ERROR
import android.telephony.satellite.SatelliteModemStateCallback
import android.util.AndroidRuntimeException
import androidx.test.core.app.ApplicationProvider
-import com.android.internal.telephony.flags.Flags
import com.android.settingslib.satellite.SatelliteDialogUtils.TYPE_IS_WIFI
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
@@ -38,12 +36,12 @@ import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mock
import org.mockito.Mockito.any
+import org.mockito.Mockito.verify
import org.mockito.Mockito.`when`
import org.mockito.Spy
+import org.mockito.internal.verification.Times
import org.mockito.junit.MockitoJUnit
import org.mockito.junit.MockitoRule
-import org.mockito.Mockito.verify
-import org.mockito.internal.verification.Times
import org.robolectric.RobolectricTestRunner
@RunWith(RobolectricTestRunner::class)
@@ -66,7 +64,6 @@ class SatelliteDialogUtilsTest {
}
@Test
- @RequiresFlagsEnabled(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun mayStartSatelliteWarningDialog_satelliteIsOn_showWarningDialog(): Unit = runBlocking {
`when`(satelliteManager.registerForModemStateChanged(any(), any()))
.thenAnswer { invocation ->
@@ -87,7 +84,6 @@ class SatelliteDialogUtilsTest {
}
@Test
- @RequiresFlagsEnabled(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun mayStartSatelliteWarningDialog_satelliteIsOff_notShowWarningDialog() = runBlocking {
`when`(satelliteManager.registerForModemStateChanged(any(), any()))
.thenAnswer { invocation ->
@@ -107,7 +103,6 @@ class SatelliteDialogUtilsTest {
}
@Test
- @RequiresFlagsEnabled(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun mayStartSatelliteWarningDialog_noSatelliteManager_notShowWarningDialog() = runBlocking {
`when`(context.getSystemService(SatelliteManager::class.java)).thenReturn(null)
@@ -120,7 +115,6 @@ class SatelliteDialogUtilsTest {
}
@Test
- @RequiresFlagsEnabled(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun mayStartSatelliteWarningDialog_satelliteErrorResult_notShowWarningDialog() = runBlocking {
`when`(satelliteManager.registerForModemStateChanged(any(), any()))
.thenReturn(SATELLITE_RESULT_MODEM_ERROR)
@@ -134,7 +128,6 @@ class SatelliteDialogUtilsTest {
}
@Test
- @RequiresFlagsEnabled(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun mayStartSatelliteWarningDialog_phoneCrash_notShowWarningDialog() = runBlocking {
`when`(satelliteManager.registerForModemStateChanged(any(), any()))
.thenThrow(IllegalStateException("Telephony is null!!!"))
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/SelectorWithWidgetPreferenceTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/SelectorWithWidgetPreferenceTest.java
index c939c770b63d..5076deaca9f4 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/SelectorWithWidgetPreferenceTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/SelectorWithWidgetPreferenceTest.java
@@ -78,14 +78,14 @@ public class SelectorWithWidgetPreferenceTest {
@Test
public void shouldHaveRadioButtonWidgetLayoutByDefault() {
assertThat(mPreference.getWidgetLayoutResource())
- .isEqualTo(R.layout.preference_widget_radiobutton);
+ .isEqualTo(R.layout.settingslib_preference_widget_radiobutton);
}
@Test
public void shouldHaveCheckBoxWidgetLayoutIfSet() {
mPreference = new SelectorWithWidgetPreference(mContext, true);
assertThat(mPreference.getWidgetLayoutResource())
- .isEqualTo(R.layout.preference_widget_checkbox);
+ .isEqualTo(R.layout.settingslib_preference_widget_checkbox);
}
@Test
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
index 49cdec11e104..b53cb27dd73b 100644
--- a/packages/SystemUI/Android.bp
+++ b/packages/SystemUI/Android.bp
@@ -461,9 +461,9 @@ android_library {
resource_dirs: [],
static_libs: [
"//frameworks/libs/systemui:compilelib",
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/dagger:api",
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/util/settings:api",
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail:impl",
+ "com.android.systemui.dagger-api",
+ "com.android.systemui.util.settings-api",
+ "com.android.systemui.retail-impl",
"SystemUI-res",
"WifiTrackerLib",
"WindowManager-Shell",
@@ -751,9 +751,9 @@ android_library {
],
static_libs: [
"//frameworks/libs/systemui:compilelib",
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/dagger:api",
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/util/settings:api",
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail:impl",
+ "com.android.systemui.dagger-api",
+ "com.android.systemui.util.settings-api",
+ "com.android.systemui.retail-impl",
"SystemUI-tests-base",
"androidx.test.uiautomator_uiautomator",
"androidx.core_core-animation-testing",
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt
index 9b76f15b3cd6..4e1aab58ac24 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt
@@ -282,6 +282,7 @@ fun ContentScope.CommunalScene(
CommunalBackgroundType.ANIMATED -> AnimatedLinearGradient()
CommunalBackgroundType.NONE -> BackgroundTopScrim()
CommunalBackgroundType.BLUR -> Background()
+ CommunalBackgroundType.SCRIM -> Scrimmed()
}
with(content) {
@@ -304,6 +305,11 @@ private fun BoxScope.DefaultBackground(colors: CommunalColors) {
Box(modifier = Modifier.matchParentSize().background(Color(backgroundColor.toArgb())))
}
+@Composable
+private fun BoxScope.Scrimmed() {
+ Box(modifier = Modifier.matchParentSize().alpha(0.34f).background(Color.Black))
+}
+
/** Experimental hub background, static linear gradient */
@Composable
private fun BoxScope.StaticLinearGradient() {
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/BottomAreaSection.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/BottomAreaSection.kt
index 52ccab3b4d1e..ec7e495ebe61 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/BottomAreaSection.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/BottomAreaSection.kt
@@ -70,33 +70,29 @@ constructor(
key = if (isStart) StartButtonElementKey else EndButtonElementKey,
modifier = modifier,
) {
- content {
- Shortcut(
- viewId = if (isStart) R.id.start_button else R.id.end_button,
- viewModel = if (isStart) viewModel.startButton else viewModel.endButton,
- transitionAlpha = viewModel.transitionAlpha,
- indicationController = indicationController,
- binder = keyguardQuickAffordanceViewBinder,
- modifier =
- if (applyPadding) {
- Modifier.shortcutPadding()
- } else {
- Modifier
- },
- )
- }
+ Shortcut(
+ viewId = if (isStart) R.id.start_button else R.id.end_button,
+ viewModel = if (isStart) viewModel.startButton else viewModel.endButton,
+ transitionAlpha = viewModel.transitionAlpha,
+ indicationController = indicationController,
+ binder = keyguardQuickAffordanceViewBinder,
+ modifier =
+ if (applyPadding) {
+ Modifier.shortcutPadding()
+ } else {
+ Modifier
+ },
+ )
}
}
@Composable
fun ContentScope.IndicationArea(modifier: Modifier = Modifier) {
Element(key = IndicationAreaElementKey, modifier = modifier.indicationAreaPadding()) {
- content {
- IndicationArea(
- indicationAreaViewModel = indicationAreaViewModel,
- indicationController = indicationController,
- )
- }
+ IndicationArea(
+ indicationAreaViewModel = indicationAreaViewModel,
+ indicationController = indicationController,
+ )
}
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/DefaultClockSection.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/DefaultClockSection.kt
index ae541dda6eeb..0583e8a0b1a2 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/DefaultClockSection.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/DefaultClockSection.kt
@@ -26,11 +26,9 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
-import androidx.compose.runtime.key
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.viewinterop.AndroidView
-import androidx.core.view.contains
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.android.compose.animation.scene.ContentScope
import com.android.compose.modifiers.padding
@@ -132,18 +130,16 @@ constructor(
}
Element(key = largeClockElementKey, modifier = modifier) {
- content {
- ClockView(
- checkNotNull(currentClock).largeClock.view,
- modifier =
- Modifier.fillMaxSize()
- .burnInAware(
- viewModel = aodBurnInViewModel,
- params = burnInParams,
- isClock = true,
- ),
- )
- }
+ ClockView(
+ checkNotNull(currentClock).largeClock.view,
+ modifier =
+ Modifier.fillMaxSize()
+ .burnInAware(
+ viewModel = aodBurnInViewModel,
+ params = burnInParams,
+ isClock = true,
+ ),
+ )
}
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/SmartSpaceSection.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/SmartSpaceSection.kt
index c3ba7ab2fd19..c7b797dfa0a2 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/SmartSpaceSection.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/SmartSpaceSection.kt
@@ -66,64 +66,61 @@ constructor(
val resources = LocalContext.current.resources
Element(key = ClockElementKeys.smartspaceElementKey, modifier = modifier) {
- content {
- Column(
- modifier =
- modifier
- .onTopPlacementChanged(onTopChanged)
- .padding(
- top = { smartSpacePaddingTop(resources) },
- bottom = {
- resources.getDimensionPixelSize(
- R.dimen.keyguard_status_view_bottom_margin
- )
- },
- )
- ) {
- if (!keyguardSmartspaceViewModel.isSmartspaceEnabled) {
- return@Column
- }
-
- val paddingBelowClockStart =
- dimensionResource(R.dimen.below_clock_padding_start)
- val paddingBelowClockEnd = dimensionResource(R.dimen.below_clock_padding_end)
- val paddingCardHorizontal = paddingBelowClockEnd
+ Column(
+ modifier =
+ modifier
+ .onTopPlacementChanged(onTopChanged)
+ .padding(
+ top = { smartSpacePaddingTop(resources) },
+ bottom = {
+ resources.getDimensionPixelSize(
+ R.dimen.keyguard_status_view_bottom_margin
+ )
+ },
+ )
+ ) {
+ if (!keyguardSmartspaceViewModel.isSmartspaceEnabled) {
+ return@Column
+ }
- if (keyguardSmartspaceViewModel.isDateWeatherDecoupled) {
- Row(
- verticalAlignment = Alignment.CenterVertically,
- modifier =
- Modifier.fillMaxWidth()
- // All items will be constrained to be as tall as the shortest
- // item.
- .height(IntrinsicSize.Min)
- .padding(start = paddingBelowClockStart),
- ) {
- Date(
- modifier =
- Modifier.burnInAware(
- viewModel = aodBurnInViewModel,
- params = burnInParams,
- )
- )
- Spacer(modifier = Modifier.width(4.dp))
- Weather(
- modifier =
- Modifier.burnInAware(
- viewModel = aodBurnInViewModel,
- params = burnInParams,
- )
- )
- }
- }
+ val paddingBelowClockStart = dimensionResource(R.dimen.below_clock_padding_start)
+ val paddingBelowClockEnd = dimensionResource(R.dimen.below_clock_padding_end)
+ val paddingCardHorizontal = paddingBelowClockEnd
- Card(
+ if (keyguardSmartspaceViewModel.isDateWeatherDecoupled) {
+ Row(
+ verticalAlignment = Alignment.CenterVertically,
modifier =
Modifier.fillMaxWidth()
- .padding(start = paddingCardHorizontal, end = paddingCardHorizontal)
- .burnInAware(viewModel = aodBurnInViewModel, params = burnInParams)
- )
+ // All items will be constrained to be as tall as the shortest
+ // item.
+ .height(IntrinsicSize.Min)
+ .padding(start = paddingBelowClockStart),
+ ) {
+ Date(
+ modifier =
+ Modifier.burnInAware(
+ viewModel = aodBurnInViewModel,
+ params = burnInParams,
+ )
+ )
+ Spacer(modifier = Modifier.width(4.dp))
+ Weather(
+ modifier =
+ Modifier.burnInAware(
+ viewModel = aodBurnInViewModel,
+ params = burnInParams,
+ )
+ )
+ }
}
+
+ Card(
+ modifier =
+ Modifier.fillMaxWidth()
+ .padding(start = paddingCardHorizontal, end = paddingCardHorizontal)
+ .burnInAware(viewModel = aodBurnInViewModel, params = burnInParams)
+ )
}
}
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/WeatherClockSection.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/WeatherClockSection.kt
index 4fcb5ca42df2..a8b2b13d53be 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/WeatherClockSection.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/WeatherClockSection.kt
@@ -24,7 +24,6 @@ import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.runtime.Composable
-import androidx.compose.runtime.key
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.dimensionResource
@@ -109,14 +108,10 @@ constructor(
modifier: Modifier = Modifier,
) {
Element(key = elementKey, modifier) {
- content {
- ClockView(
- clock.largeClock.layout.views.firstOrNull {
- it.id == weatherClockElementViewId
- },
- modifier,
- )
- }
+ ClockView(
+ clock.largeClock.layout.views.firstOrNull { it.id == weatherClockElementViewId },
+ modifier,
+ )
}
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/qs/footer/ui/compose/FooterActions.kt b/packages/SystemUI/compose/features/src/com/android/systemui/qs/footer/ui/compose/FooterActions.kt
index 9c85c96c4666..60c017227334 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/qs/footer/ui/compose/FooterActions.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/qs/footer/ui/compose/FooterActions.kt
@@ -116,11 +116,9 @@ fun ContentScope.FooterActionsWithAnimatedVisibility(
QuickSettingsTheme {
// This view has its own horizontal padding
// TODO(b/321716470) This should use a lifecycle tied to the scene.
- FooterActions(
- viewModel = viewModel,
- qsVisibilityLifecycleOwner = lifecycleOwner,
- modifier = Modifier.element(QuickSettings.Elements.FooterActions),
- )
+ Element(QuickSettings.Elements.FooterActions, Modifier) {
+ FooterActions(viewModel = viewModel, qsVisibilityLifecycleOwner = lifecycleOwner)
+ }
}
}
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt
index db9035b1635b..23baeacd76ec 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt
@@ -440,33 +440,36 @@ private fun CutoutAwareShadeHeader(
private fun ContentScope.Clock(scale: Float, onClick: () -> Unit, modifier: Modifier = Modifier) {
val layoutDirection = LocalLayoutDirection.current
- Element(key = ShadeHeader.Elements.Clock, modifier = modifier) {
+ ElementWithValues(key = ShadeHeader.Elements.Clock, modifier = modifier) {
val animatedScale by animateElementFloatAsState(scale, ClockScale, canOverflow = false)
- AndroidView(
- factory = { context ->
- Clock(
- ContextThemeWrapper(context, R.style.Theme_SystemUI_QuickSettings_Header),
- null,
- )
- },
- modifier =
- modifier
- // use graphicsLayer instead of Modifier.scale to anchor transform
- // to the (start, top) corner
- .graphicsLayer {
- scaleX = animatedScale
- scaleY = animatedScale
- transformOrigin =
- TransformOrigin(
- when (layoutDirection) {
- LayoutDirection.Ltr -> 0f
- LayoutDirection.Rtl -> 1f
- },
- 0.5f,
- )
- }
- .clickable { onClick() },
- )
+
+ content {
+ AndroidView(
+ factory = { context ->
+ Clock(
+ ContextThemeWrapper(context, R.style.Theme_SystemUI_QuickSettings_Header),
+ null,
+ )
+ },
+ modifier =
+ modifier
+ // use graphicsLayer instead of Modifier.scale to anchor transform to the
+ // (start, top) corner
+ .graphicsLayer {
+ scaleX = animatedScale
+ scaleY = animatedScale
+ transformOrigin =
+ TransformOrigin(
+ when (layoutDirection) {
+ LayoutDirection.Ltr -> 0f
+ LayoutDirection.Rtl -> 1f
+ },
+ 0.5f,
+ )
+ }
+ .clickable { onClick() },
+ )
+ }
}
}
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MovableElement.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MovableElement.kt
index f4af5f055935..eab5206d0ec5 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MovableElement.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MovableElement.kt
@@ -35,6 +35,21 @@ internal fun Element(
sceneOrOverlay: Content,
key: ElementKey,
modifier: Modifier,
+ content: @Composable BoxScope.() -> Unit,
+) {
+ Box(
+ modifier.element(layoutImpl, sceneOrOverlay, key),
+ propagateMinConstraints = true,
+ content = content,
+ )
+}
+
+@Composable
+internal fun ElementWithValues(
+ layoutImpl: SceneTransitionLayoutImpl,
+ sceneOrOverlay: Content,
+ key: ElementKey,
+ modifier: Modifier,
content: @Composable ElementScope<ElementContentScope>.() -> Unit,
) {
Box(modifier.element(layoutImpl, sceneOrOverlay, key), propagateMinConstraints = true) {
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt
index f423bab5381f..53d0ee1d2045 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt
@@ -22,6 +22,7 @@ import androidx.compose.foundation.LocalOverscrollFactory
import androidx.compose.foundation.OverscrollEffect
import androidx.compose.foundation.OverscrollFactory
import androidx.compose.foundation.gestures.Orientation
+import androidx.compose.foundation.layout.BoxScope
import androidx.compose.runtime.Composable
import androidx.compose.runtime.SideEffect
import androidx.compose.runtime.Stable
@@ -188,7 +189,7 @@ interface BaseContentScope : ElementStateScope {
* Additionally, this [key] will be used to detect elements that are shared between contents to
* automatically interpolate their size and offset. If you need to animate shared element values
* (i.e. values associated to this element that change depending on which content it is composed
- * in), use [Element] instead.
+ * in), use [ElementWithValues] instead.
*
* Note that shared elements tagged using this function will be duplicated in each content they
* are part of, so any **internal** state (e.g. state created using `remember {
@@ -196,9 +197,12 @@ interface BaseContentScope : ElementStateScope {
* [MovableElement] instead.
*
* @see Element
+ * @see ElementWithValues
* @see MovableElement
*/
- fun Modifier.element(key: ElementKey): Modifier
+ // TODO(b/389985793): Does replacing this by Element have a noticeable impact on performance and
+ // should we deprecate it?
+ @Stable fun Modifier.element(key: ElementKey): Modifier
/**
* Create an element identified by [key].
@@ -207,17 +211,29 @@ interface BaseContentScope : ElementStateScope {
* in multiple contents and that can be transformed during transitions, the same way that
* [element] does.
*
- * The only difference with [element] is that the provided [ElementScope] allows you to
- * [animate element values][ElementScope.animateElementValueAsState] or specify its
- * [movable content][Element.movableContent] that will be "moved" and composed only once during
- * transitions (as opposed to [element] that duplicates shared elements) so that any internal
- * state is preserved during and after the transition.
+ * The only difference with [element] is that [Element] introduces its own recomposition scope
+ * and layout node, which can be helpful to avoid expensive recompositions when a transition is
+ * started or finished (see b/389985793#comment103 for details).
*
* @see element
+ * @see ElementWithValues
* @see MovableElement
*/
@Composable
- fun Element(
+ fun Element(key: ElementKey, modifier: Modifier, content: @Composable BoxScope.() -> Unit)
+
+ /**
+ * Create an element identified by [key].
+ *
+ * The only difference with [Element] is that the provided [ElementScope] allows you to
+ * [animate element values][ElementScope.animateElementValueAsState].
+ *
+ * @see element
+ * @see Element
+ * @see MovableElement
+ */
+ @Composable
+ fun ElementWithValues(
key: ElementKey,
modifier: Modifier,
@@ -230,17 +246,19 @@ interface BaseContentScope : ElementStateScope {
/**
* Create a *movable* element identified by [key].
*
- * Similar to [Element], this creates an element that will be automatically shared when present
- * in multiple contents and that can be transformed during transitions, and you can also use the
- * provided [ElementScope] to [animate element values][ElementScope.animateElementValueAsState].
+ * Similar to [ElementWithValues], this creates an element that will be automatically shared
+ * when present in multiple contents and that can be transformed during transitions, and you can
+ * also use the provided [ElementScope] to
+ * [animate element values][ElementScope.animateElementValueAsState].
*
- * The important difference with [element] and [Element] is that this element
- * [content][ElementScope.content] will be "moved" and composed only once during transitions, as
- * opposed to [element] and [Element] that duplicates shared elements, so that any internal
- * state is preserved during and after the transition.
+ * The important difference with [element], [Element] and [ElementWithValues] is that this
+ * element [content][ElementScope.content] will be "moved" and composed only once during
+ * transitions, as opposed to [element], [Element] and [ElementWithValues] that duplicates
+ * shared elements, so that any internal state is preserved during and after the transition.
*
* @see element
* @see Element
+ * @see ElementWithValues
*/
@Composable
fun MovableElement(
@@ -415,7 +433,7 @@ interface ElementScope<ContentScope> {
*
* We can't reuse BoxScope directly because of the @LayoutScopeMarker annotation on it, which would
* prevent us from calling Modifier.element() and other methods of [ContentScope] inside any Box {}
- * in the [content][ElementScope.content] of a [ContentScope.Element] or a
+ * in the [content][ElementScope.content] of a [ContentScope.ElementWithValues] or a
* [ContentScope.MovableElement].
*/
@Stable
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/content/Content.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/content/Content.kt
index 95d6440d585e..9ca45fe92ad5 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/content/Content.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/content/Content.kt
@@ -21,6 +21,7 @@ import androidx.compose.foundation.LocalOverscrollFactory
import androidx.compose.foundation.OverscrollEffect
import androidx.compose.foundation.OverscrollFactory
import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.BoxScope
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.Stable
@@ -45,6 +46,7 @@ import com.android.compose.animation.scene.ElementContentScope
import com.android.compose.animation.scene.ElementKey
import com.android.compose.animation.scene.ElementScope
import com.android.compose.animation.scene.ElementStateScope
+import com.android.compose.animation.scene.ElementWithValues
import com.android.compose.animation.scene.InternalContentScope
import com.android.compose.animation.scene.MovableElement
import com.android.compose.animation.scene.MovableElementContentScope
@@ -222,12 +224,21 @@ internal class ContentScopeImpl(
override fun Element(
key: ElementKey,
modifier: Modifier,
- content: @Composable (ElementScope<ElementContentScope>.() -> Unit),
+ content: @Composable BoxScope.() -> Unit,
) {
Element(layoutImpl, this@ContentScopeImpl.content, key, modifier, content)
}
@Composable
+ override fun ElementWithValues(
+ key: ElementKey,
+ modifier: Modifier,
+ content: @Composable (ElementScope<ElementContentScope>.() -> Unit),
+ ) {
+ ElementWithValues(layoutImpl, this@ContentScopeImpl.content, key, modifier, content)
+ }
+
+ @Composable
override fun MovableElement(
key: MovableElementKey,
modifier: Modifier,
diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/AnimatedSharedAsStateTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/AnimatedSharedAsStateTest.kt
index d11e6da18ed0..d06e040f11e7 100644
--- a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/AnimatedSharedAsStateTest.kt
+++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/AnimatedSharedAsStateTest.kt
@@ -67,7 +67,7 @@ class AnimatedSharedAsStateTest {
@Composable
private fun ContentScope.Foo(targetValues: Values, onCurrentValueChanged: (Values) -> Unit) {
val key = TestElements.Foo
- Element(key, Modifier) {
+ ElementWithValues(key, Modifier) {
val int by animateElementIntAsState(targetValues.int, key = TestValues.Value1)
val float by animateElementFloatAsState(targetValues.float, key = TestValues.Value2)
val dp by animateElementDpAsState(targetValues.dp, key = TestValues.Value3)
diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ElementTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ElementTest.kt
index 698a80829284..338fb9b674a1 100644
--- a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ElementTest.kt
+++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ElementTest.kt
@@ -1163,7 +1163,7 @@ class ElementTest {
@Composable
fun ContentScope.Foo(size: Dp, value: Float, modifier: Modifier = Modifier) {
val contentKey = this.contentKey
- Element(TestElements.Foo, modifier.size(size)) {
+ ElementWithValues(TestElements.Foo, modifier.size(size)) {
val animatedValue = animateElementFloatAsState(value, TestValues.Value1)
LaunchedEffect(animatedValue) {
snapshotFlow { animatedValue.value }.collect { lastValues[contentKey] = it }
@@ -2090,11 +2090,9 @@ class ElementTest {
TestContentScope(currentScene = SceneA) {
Column {
Element(TestElements.Foo, Modifier.size(40.dp)) {
- content {
- // Modifier.size() sets a preferred size and this should be ignored
- // because of the previously set 40dp size.
- Box(Modifier.testTag(contentTestTag).size(20.dp))
- }
+ // Modifier.size() sets a preferred size and this should be ignored because
+ // of the previously set 40dp size.
+ Box(Modifier.testTag(contentTestTag).size(20.dp))
}
MovableElement(movable, Modifier.size(40.dp)) {
@@ -2283,4 +2281,35 @@ class ElementTest {
.assertSizeIsEqualTo(50.dp)
.assertPositionInRootIsEqualTo(100.dp, 100.dp)
}
+
+ @Test
+ fun elementContentIsNotRecomposedWhenATransitionStarts() {
+ var compositions = 0
+ val state = rule.runOnUiThread { MutableSceneTransitionLayoutStateForTests(SceneA) }
+ val scope =
+ rule.setContentAndCreateMainScope {
+ SceneTransitionLayoutForTesting(state) {
+ scene(SceneA) {
+ Box(Modifier.fillMaxSize()) {
+ Element(TestElements.Foo, Modifier) { SideEffect { compositions++ } }
+ }
+ }
+ scene(SceneB) { Box(Modifier.fillMaxSize()) }
+ scene(SceneC) { Box(Modifier.fillMaxSize()) }
+ }
+ }
+
+ assertThat(compositions).isEqualTo(1)
+
+ scope.launch { state.startTransition(transition(SceneA, SceneB)) }
+ rule.waitForIdle()
+
+ scope.launch { state.startTransition(transition(SceneA, SceneC)) }
+ rule.waitForIdle()
+
+ scope.launch { state.startTransition(transition(SceneA, SceneB)) }
+ rule.waitForIdle()
+
+ assertThat(compositions).isEqualTo(1)
+ }
}
diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MovableElementTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MovableElementTest.kt
index e023936eb448..ebbde702c604 100644
--- a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MovableElementTest.kt
+++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MovableElementTest.kt
@@ -313,7 +313,7 @@ class MovableElementTest {
fun elementScopeExtendsBoxScope() {
rule.setContent {
TestContentScope {
- Element(TestElements.Foo, Modifier.size(200.dp)) {
+ ElementWithValues(TestElements.Foo, Modifier.size(200.dp)) {
content {
Box {
Box(Modifier.testTag("bottomEnd").align(Alignment.BottomEnd))
diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SceneTransitionLayoutTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SceneTransitionLayoutTest.kt
index 3578be4b36a7..d7f7a514682c 100644
--- a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SceneTransitionLayoutTest.kt
+++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SceneTransitionLayoutTest.kt
@@ -129,7 +129,7 @@ class SceneTransitionLayoutTest {
@Composable
private fun ContentScope.SharedFoo(size: Dp, childOffset: Dp, modifier: Modifier = Modifier) {
- Element(TestElements.Foo, modifier.size(size).background(Color.Red)) {
+ ElementWithValues(TestElements.Foo, modifier.size(size).background(Color.Red)) {
// Offset the single child of Foo by some animated shared offset.
val offset by animateElementDpAsState(childOffset, TestValues.Value1)
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/DozingToDreamingTransitionViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/DozingToDreamingTransitionViewModelTest.kt
deleted file mode 100644
index 052dfd52887f..000000000000
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/DozingToDreamingTransitionViewModelTest.kt
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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 com.android.systemui.keyguard.ui.viewmodel
-
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import androidx.test.filters.SmallTest
-import com.android.systemui.SysuiTestCase
-import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository
-import com.android.systemui.keyguard.shared.model.KeyguardState
-import com.android.systemui.kosmos.collectValues
-import com.android.systemui.kosmos.runTest
-import com.android.systemui.kosmos.testScope
-import com.android.systemui.testKosmos
-import com.google.common.truth.Truth.assertThat
-import org.junit.Test
-import org.junit.runner.RunWith
-
-@SmallTest
-@RunWith(AndroidJUnit4::class)
-class DozingToDreamingTransitionViewModelTest : SysuiTestCase() {
- val kosmos = testKosmos()
-
- val underTest by lazy { kosmos.dozingToDreamingTransitionViewModel }
-
- @Test
- fun notificationShadeAlpha() =
- kosmos.runTest {
- val values by collectValues(underTest.notificationAlpha)
- assertThat(values).isEmpty()
-
- fakeKeyguardTransitionRepository.sendTransitionSteps(
- from = KeyguardState.DOZING,
- to = KeyguardState.DREAMING,
- testScope,
- )
-
- assertThat(values).isNotEmpty()
- values.forEach { assertThat(it).isEqualTo(0) }
- }
-}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/data/repository/MediaFilterRepositoryTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/data/repository/MediaFilterRepositoryTest.kt
index 24672ebe6134..8a11be0ab8fa 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/data/repository/MediaFilterRepositoryTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/data/repository/MediaFilterRepositoryTest.kt
@@ -30,21 +30,11 @@ import com.android.systemui.media.controls.shared.model.MediaData
import com.android.systemui.media.controls.shared.model.MediaDataLoadingModel
import com.android.systemui.media.controls.shared.model.SmartspaceMediaData
import com.android.systemui.media.controls.shared.model.SmartspaceMediaLoadingModel
-import com.android.systemui.media.controls.util.SmallHash
-import com.android.systemui.media.controls.util.mediaSmartspaceLogger
-import com.android.systemui.media.controls.util.mockMediaSmartspaceLogger
import com.android.systemui.testKosmos
-import com.android.systemui.util.time.systemClock
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.test.runTest
import org.junit.Test
import org.junit.runner.RunWith
-import org.mockito.ArgumentMatchers.anyBoolean
-import org.mockito.ArgumentMatchers.anyInt
-import org.mockito.ArgumentMatchers.eq
-import org.mockito.kotlin.never
-import org.mockito.kotlin.reset
-import org.mockito.kotlin.verify
@SmallTest
@RunWith(AndroidJUnit4::class)
@@ -52,7 +42,6 @@ class MediaFilterRepositoryTest : SysuiTestCase() {
private val kosmos = testKosmos()
private val testScope = kosmos.testScope
- private val smartspaceLogger = kosmos.mockMediaSmartspaceLogger
private val icon = Icon.createWithResource(context, R.drawable.ic_media_play)
private val mediaRecommendation =
SmartspaceMediaData(
@@ -61,11 +50,7 @@ class MediaFilterRepositoryTest : SysuiTestCase() {
recommendations = MediaTestHelper.getValidRecommendationList(icon),
)
- private val underTest: MediaFilterRepository =
- with(kosmos) {
- mediaSmartspaceLogger = mockMediaSmartspaceLogger
- mediaFilterRepository
- }
+ private val underTest: MediaFilterRepository = with(kosmos) { mediaFilterRepository }
@Test
fun addSelectedUserMediaEntry_activeThenInactivate() =
@@ -185,29 +170,15 @@ class MediaFilterRepositoryTest : SysuiTestCase() {
underTest.addSelectedUserMediaEntry(playingData)
underTest.addMediaDataLoadingState(
MediaDataLoadingModel.Loaded(playingInstanceId),
- false
+ false,
)
- verify(smartspaceLogger)
- .logSmartspaceCardReceived(
- playingData.smartspaceId,
- playingData.appUid,
- cardinality = 2
- )
-
underTest.addSelectedUserMediaEntry(remoteData)
underTest.addMediaDataLoadingState(
MediaDataLoadingModel.Loaded(remoteInstanceId),
- false
+ false,
)
- verify(smartspaceLogger)
- .logSmartspaceCardReceived(
- remoteData.smartspaceId,
- playingData.appUid,
- cardinality = 3,
- rank = 1
- )
assertThat(currentMedia?.size).isEqualTo(3)
assertThat(currentMedia)
.containsExactly(
@@ -215,7 +186,7 @@ class MediaFilterRepositoryTest : SysuiTestCase() {
MediaCommonModel.MediaControl(MediaDataLoadingModel.Loaded(remoteInstanceId)),
MediaCommonModel.MediaRecommendations(
SmartspaceMediaLoadingModel.Loaded(KEY_MEDIA_SMARTSPACE, true)
- )
+ ),
)
.inOrder()
}
@@ -238,7 +209,7 @@ class MediaFilterRepositoryTest : SysuiTestCase() {
assertThat(currentMedia)
.containsExactly(
MediaCommonModel.MediaControl(MediaDataLoadingModel.Loaded(playingInstanceId1)),
- MediaCommonModel.MediaControl(MediaDataLoadingModel.Loaded(playingInstanceId2))
+ MediaCommonModel.MediaControl(MediaDataLoadingModel.Loaded(playingInstanceId2)),
)
.inOrder()
@@ -258,29 +229,19 @@ class MediaFilterRepositoryTest : SysuiTestCase() {
MediaCommonModel.MediaControl(MediaDataLoadingModel.Loaded(playingInstanceId1)),
MediaCommonModel.MediaControl(
MediaDataLoadingModel.Loaded(playingInstanceId2, false)
- )
+ ),
)
.inOrder()
underTest.setOrderedMedia()
- verify(smartspaceLogger, never())
- .logSmartspaceCardReceived(
- anyInt(),
- anyInt(),
- anyInt(),
- anyBoolean(),
- anyBoolean(),
- anyInt(),
- anyInt()
- )
assertThat(currentMedia?.size).isEqualTo(2)
assertThat(currentMedia)
.containsExactly(
MediaCommonModel.MediaControl(
MediaDataLoadingModel.Loaded(playingInstanceId2, false)
),
- MediaCommonModel.MediaControl(MediaDataLoadingModel.Loaded(playingInstanceId1))
+ MediaCommonModel.MediaControl(MediaDataLoadingModel.Loaded(playingInstanceId1)),
)
.inOrder()
}
@@ -321,27 +282,6 @@ class MediaFilterRepositoryTest : SysuiTestCase() {
)
underTest.setOrderedMedia()
- val smartspaceId = SmallHash.hash(mediaRecommendation.targetId)
- verify(smartspaceLogger)
- .logSmartspaceCardReceived(
- eq(smartspaceId),
- anyInt(),
- eq(6),
- anyBoolean(),
- anyBoolean(),
- eq(2),
- anyInt()
- )
- verify(smartspaceLogger, never())
- .logSmartspaceCardReceived(
- eq(playingAndLocalData.smartspaceId),
- anyInt(),
- anyInt(),
- anyBoolean(),
- anyBoolean(),
- anyInt(),
- anyInt()
- )
assertThat(currentMedia?.size).isEqualTo(6)
assertThat(currentMedia)
.containsExactly(
@@ -376,7 +316,7 @@ class MediaFilterRepositoryTest : SysuiTestCase() {
active = true,
instanceId = instanceId2,
isPlaying = true,
- notificationKey = KEY_2
+ notificationKey = KEY_2,
)
underTest.setMediaFromRecPackageName(PACKAGE_NAME)
@@ -391,11 +331,11 @@ class MediaFilterRepositoryTest : SysuiTestCase() {
.containsExactly(
MediaCommonModel.MediaControl(
MediaDataLoadingModel.Loaded(instanceId1),
- isMediaFromRec = true
+ isMediaFromRec = true,
),
MediaCommonModel.MediaRecommendations(
SmartspaceMediaLoadingModel.Loaded(KEY_MEDIA_SMARTSPACE)
- )
+ ),
)
.inOrder()
@@ -410,7 +350,7 @@ class MediaFilterRepositoryTest : SysuiTestCase() {
MediaCommonModel.MediaControl(MediaDataLoadingModel.Loaded(instanceId1)),
MediaCommonModel.MediaRecommendations(
SmartspaceMediaLoadingModel.Loaded(KEY_MEDIA_SMARTSPACE)
- )
+ ),
)
.inOrder()
}
@@ -423,89 +363,6 @@ class MediaFilterRepositoryTest : SysuiTestCase() {
fun hasActiveMedia_noMediaSet_returnsFalse() =
testScope.runTest { assertThat(underTest.hasActiveMedia()).isFalse() }
- @Test
- fun updateMediaWithLatency_smartspaceIsLogged() =
- testScope.runTest {
- val instanceId = InstanceId.fakeInstanceId(123)
- val data = createMediaData("app", true, LOCAL, false, instanceId)
-
- underTest.setRecommendation(mediaRecommendation)
- underTest.setRecommendationsLoadingState(
- SmartspaceMediaLoadingModel.Loaded(KEY_MEDIA_SMARTSPACE, true)
- )
-
- val smartspaceId = SmallHash.hash(mediaRecommendation.targetId)
- verify(smartspaceLogger)
- .logSmartspaceCardReceived(
- eq(smartspaceId),
- anyInt(),
- eq(1),
- eq(true),
- anyBoolean(),
- eq(0),
- anyInt()
- )
- reset(smartspaceLogger)
-
- underTest.addSelectedUserMediaEntry(data)
- underTest.addMediaDataLoadingState(MediaDataLoadingModel.Loaded(instanceId), false)
-
- verify(smartspaceLogger)
- .logSmartspaceCardReceived(data.smartspaceId, data.appUid, cardinality = 2)
-
- reset(smartspaceLogger)
-
- underTest.addSelectedUserMediaEntry(data)
- underTest.addMediaDataLoadingState(
- MediaDataLoadingModel.Loaded(instanceId, receivedSmartspaceCardLatency = 123),
- true
- )
-
- verify(smartspaceLogger)
- .logSmartspaceCardReceived(
- SmallHash.hash(data.appUid + kosmos.systemClock.currentTimeMillis().toInt()),
- data.appUid,
- cardinality = 2,
- rank = 0,
- receivedLatencyMillis = 123
- )
- }
-
- @Test
- fun resumeMedia_loadSmartspace_allSmartspaceIsLogged() =
- testScope.runTest {
- val resumeInstanceId = InstanceId.fakeInstanceId(123)
- val data = createMediaData("app", false, LOCAL, true, resumeInstanceId)
-
- underTest.addSelectedUserMediaEntry(data.copy(active = false))
- underTest.addMediaDataLoadingState(MediaDataLoadingModel.Loaded(resumeInstanceId))
- underTest.setRecommendation(mediaRecommendation)
- underTest.setRecommendationsLoadingState(
- SmartspaceMediaLoadingModel.Loaded(KEY_MEDIA_SMARTSPACE, true)
- )
-
- assertThat(underTest.hasActiveMedia()).isFalse()
- assertThat(underTest.hasAnyMedia()).isTrue()
- val smartspaceId = SmallHash.hash(mediaRecommendation.targetId)
- verify(smartspaceLogger)
- .logSmartspaceCardReceived(
- eq(smartspaceId),
- anyInt(),
- eq(2),
- eq(true),
- anyBoolean(),
- eq(0),
- anyInt()
- )
- verify(smartspaceLogger)
- .logSmartspaceCardReceived(
- SmallHash.hash(data.appUid + kosmos.systemClock.currentTimeMillis().toInt()),
- data.appUid,
- cardinality = 2,
- rank = 1
- )
- }
-
private fun createMediaData(
app: String,
playing: Boolean,
@@ -518,7 +375,7 @@ class MediaFilterRepositoryTest : SysuiTestCase() {
resumption = isResume,
notificationKey = "key: $app",
isPlaying = playing,
- instanceId = instanceId
+ instanceId = instanceId,
)
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/interactor/MediaCarouselInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/interactor/MediaCarouselInteractorTest.kt
index 0a44e7b5b1ed..0197a1e61801 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/interactor/MediaCarouselInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/interactor/MediaCarouselInteractorTest.kt
@@ -18,7 +18,6 @@ package com.android.systemui.media.controls.domain.interactor
import android.R
import android.graphics.drawable.Icon
-import android.os.Process
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.internal.logging.InstanceId
@@ -37,19 +36,12 @@ import com.android.systemui.media.controls.shared.model.MediaData
import com.android.systemui.media.controls.shared.model.MediaDataLoadingModel
import com.android.systemui.media.controls.shared.model.SmartspaceMediaData
import com.android.systemui.media.controls.shared.model.SmartspaceMediaLoadingModel
-import com.android.systemui.media.controls.util.MediaSmartspaceLogger
-import com.android.systemui.media.controls.util.SmallHash
-import com.android.systemui.media.controls.util.mediaSmartspaceLogger
-import com.android.systemui.media.controls.util.mockMediaSmartspaceLogger
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
-import org.mockito.Mockito.reset
-import org.mockito.kotlin.never
-import org.mockito.kotlin.verify
@SmallTest
@RunWith(AndroidJUnit4::class)
@@ -59,10 +51,7 @@ class MediaCarouselInteractorTest : SysuiTestCase() {
private val testScope = kosmos.testScope
private val mediaFilterRepository: MediaFilterRepository =
- with(kosmos) {
- mediaSmartspaceLogger = mockMediaSmartspaceLogger
- mediaFilterRepository
- }
+ with(kosmos) { mediaFilterRepository }
private val mediaRecommendationsInteractor: MediaRecommendationsInteractor =
kosmos.mediaRecommendationsInteractor
val icon = Icon.createWithResource(context, R.drawable.ic_media_play)
@@ -73,7 +62,6 @@ class MediaCarouselInteractorTest : SysuiTestCase() {
packageName = PACKAGE_NAME,
recommendations = MediaTestHelper.getValidRecommendationList(icon),
)
- private val smartspaceLogger = kosmos.mockMediaSmartspaceLogger
private val underTest: MediaCarouselInteractor = kosmos.mediaCarouselInteractor
@@ -163,18 +151,6 @@ class MediaCarouselInteractorTest : SysuiTestCase() {
MediaCommonModel.MediaControl(mediaLoadingModel, true),
)
.inOrder()
-
- underTest.logSmartspaceSeenCard(0, 1, false)
-
- verify(smartspaceLogger)
- .logSmartspaceCardUIEvent(
- MediaSmartspaceLogger.SMARTSPACE_CARD_SEEN_EVENT,
- SmallHash.hash(mediaRecommendation.targetId),
- Process.INVALID_UID,
- surface = SURFACE,
- 2,
- true,
- )
}
@Test
@@ -269,79 +245,6 @@ class MediaCarouselInteractorTest : SysuiTestCase() {
.inOrder()
}
- @Test
- fun loadMediaAndRecommendation_logSmartspaceSeenCard() {
- val instanceId = InstanceId.fakeInstanceId(123)
- val data =
- MediaData(
- active = true,
- instanceId = instanceId,
- packageName = PACKAGE_NAME,
- notificationKey = KEY,
- )
- val smartspaceLoadingModel = SmartspaceMediaLoadingModel.Loaded(KEY_MEDIA_SMARTSPACE)
- val mediaLoadingModel = MediaDataLoadingModel.Loaded(instanceId)
-
- mediaFilterRepository.addSelectedUserMediaEntry(data)
- mediaFilterRepository.addMediaDataLoadingState(mediaLoadingModel)
- underTest.logSmartspaceSeenCard(0, 1, false)
-
- verify(smartspaceLogger)
- .logSmartspaceCardUIEvent(
- MediaSmartspaceLogger.SMARTSPACE_CARD_SEEN_EVENT,
- data.smartspaceId,
- data.appUid,
- surface = SURFACE,
- 1,
- )
-
- reset(smartspaceLogger)
- mediaFilterRepository.addSelectedUserMediaEntry(data)
- mediaFilterRepository.addMediaDataLoadingState(mediaLoadingModel)
- underTest.logSmartspaceSeenCard(0, 1, true)
-
- verify(smartspaceLogger, never())
- .logSmartspaceCardUIEvent(
- MediaSmartspaceLogger.SMARTSPACE_CARD_SEEN_EVENT,
- data.smartspaceId,
- data.appUid,
- surface = SURFACE,
- 2,
- )
-
- reset(smartspaceLogger)
- mediaFilterRepository.setRecommendation(mediaRecommendation)
- mediaFilterRepository.setRecommendationsLoadingState(smartspaceLoadingModel)
- underTest.logSmartspaceSeenCard(1, 1, true)
-
- verify(smartspaceLogger)
- .logSmartspaceCardUIEvent(
- MediaSmartspaceLogger.SMARTSPACE_CARD_SEEN_EVENT,
- SmallHash.hash(mediaRecommendation.targetId),
- Process.INVALID_UID,
- surface = SURFACE,
- 2,
- true,
- rank = 1,
- )
-
- reset(smartspaceLogger)
- mediaFilterRepository.addSelectedUserMediaEntry(data)
- mediaFilterRepository.addMediaDataLoadingState(
- mediaLoadingModel.copy(receivedSmartspaceCardLatency = 1)
- )
- underTest.logSmartspaceSeenCard(0, 1, true)
-
- verify(smartspaceLogger)
- .logSmartspaceCardUIEvent(
- MediaSmartspaceLogger.SMARTSPACE_CARD_SEEN_EVENT,
- data.smartspaceId,
- data.appUid,
- surface = SURFACE,
- 2,
- )
- }
-
companion object {
private const val KEY_MEDIA_SMARTSPACE = "MEDIA_SMARTSPACE_ID"
private const val PACKAGE_NAME = "com.android.example"
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/interactor/MediaControlInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/interactor/MediaControlInteractorTest.kt
index 62d06254e541..ba987c11f3e0 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/interactor/MediaControlInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/interactor/MediaControlInteractorTest.kt
@@ -42,11 +42,7 @@ import com.android.systemui.media.controls.domain.pipeline.mediaDataFilter
import com.android.systemui.media.controls.domain.pipeline.mediaDataProcessor
import com.android.systemui.media.controls.shared.model.MediaData
import com.android.systemui.media.controls.shared.model.SmartspaceMediaData
-import com.android.systemui.media.controls.util.MediaSmartspaceLogger.Companion.SMARTSPACE_CARD_CLICK_EVENT
-import com.android.systemui.media.controls.util.MediaSmartspaceLogger.Companion.SMARTSPACE_CARD_DISMISS_EVENT
import com.android.systemui.media.controls.util.mediaInstanceId
-import com.android.systemui.media.controls.util.mediaSmartspaceLogger
-import com.android.systemui.media.controls.util.mockMediaSmartspaceLogger
import com.android.systemui.media.mediaOutputDialogManager
import com.android.systemui.mockActivityIntentHelper
import com.android.systemui.plugins.activityStarter
@@ -57,8 +53,6 @@ import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.test.runTest
import org.junit.Test
import org.junit.runner.RunWith
-import org.mockito.Mockito.anyBoolean
-import org.mockito.Mockito.anyInt
import org.mockito.Mockito.never
import org.mockito.Mockito.verify
import org.mockito.kotlin.any
@@ -73,16 +67,11 @@ class MediaControlInteractorTest : SysuiTestCase() {
private val kosmos = testKosmos()
private val testScope = kosmos.testScope
- private val mediaDataFilter: MediaDataFilterImpl =
- with(kosmos) {
- mediaSmartspaceLogger = mockMediaSmartspaceLogger
- mediaDataFilter
- }
+ private val mediaDataFilter: MediaDataFilterImpl = with(kosmos) { mediaDataFilter }
private val activityStarter = kosmos.activityStarter
private val keyguardStateController = kosmos.keyguardStateController
private val instanceId: InstanceId = kosmos.mediaInstanceId
private val notificationLockscreenUserManager = kosmos.notificationLockscreenUserManager
- private val smartspaceLogger = kosmos.mockMediaSmartspaceLogger
private val icon = Icon.createWithResource(context, R.drawable.ic_media_play)
private val mediaRecommendation =
SmartspaceMediaData(
@@ -148,7 +137,7 @@ class MediaControlInteractorTest : SysuiTestCase() {
val activityController = mock<ActivityTransitionAnimator.Controller>()
whenever(expandable.activityTransitionController(any())).thenReturn(activityController)
- underTest.startClickIntent(expandable, clickIntent, SMARTSPACE_CARD_CLICK_EVENT, 1)
+ underTest.startClickIntent(expandable, clickIntent)
verify(activityStarter)
.startPendingIntentMaybeDismissingKeyguard(
@@ -172,17 +161,8 @@ class MediaControlInteractorTest : SysuiTestCase() {
val mediaData = MediaData(userId = USER_ID, instanceId = instanceId, artist = ARTIST)
mediaDataFilter.onSmartspaceMediaDataLoaded(KEY_MEDIA_SMARTSPACE, mediaRecommendation, true)
mediaDataFilter.onMediaDataLoaded(KEY, null, mediaData)
- underTest.startClickIntent(expandable, clickIntent, SMARTSPACE_CARD_CLICK_EVENT, 1)
-
- verify(smartspaceLogger)
- .logSmartspaceCardUIEvent(
- SMARTSPACE_CARD_CLICK_EVENT,
- mediaData.smartspaceId,
- mediaData.appUid,
- surface = SURFACE,
- cardinality = 2,
- rank = 1,
- )
+ underTest.startClickIntent(expandable, clickIntent)
+
verify(activityStarter)
.postStartActivityDismissingKeyguard(eq(clickIntent), eq(activityController))
}
@@ -270,24 +250,10 @@ class MediaControlInteractorTest : SysuiTestCase() {
kosmos.mediaDataRepository.addMediaEntry(KEY, mediaData)
kosmos.mediaDataFilter.onMediaDataLoaded(KEY, null, mediaData)
- underTest.removeMediaControl(null, instanceId, 0L, SMARTSPACE_CARD_DISMISS_EVENT, 1)
+ underTest.removeMediaControl(null, instanceId, 0L)
kosmos.fakeExecutor.advanceClockToNext()
kosmos.fakeExecutor.runAllReady()
- verify(smartspaceLogger, never())
- .logSmartspaceCardUIEvent(
- anyInt(),
- anyInt(),
- anyInt(),
- anyInt(),
- anyInt(),
- anyBoolean(),
- anyBoolean(),
- anyInt(),
- anyInt(),
- anyInt(),
- anyBoolean(),
- )
verify(listener).onMediaDataRemoved(eq(KEY), eq(true))
}
@@ -303,19 +269,10 @@ class MediaControlInteractorTest : SysuiTestCase() {
mediaDataFilter.onSmartspaceMediaDataLoaded(KEY_MEDIA_SMARTSPACE, mediaRecommendation, true)
mediaDataFilter.onMediaDataLoaded(KEY, null, mediaData)
- underTest.removeMediaControl(null, instanceId, 0L, SMARTSPACE_CARD_DISMISS_EVENT, 1)
+ underTest.removeMediaControl(null, instanceId, 0L)
kosmos.fakeExecutor.advanceClockToNext()
kosmos.fakeExecutor.runAllReady()
- verify(smartspaceLogger)
- .logSmartspaceCardUIEvent(
- SMARTSPACE_CARD_DISMISS_EVENT,
- mediaData.smartspaceId,
- mediaData.appUid,
- surface = SURFACE,
- cardinality = 2,
- rank = 1,
- )
verify(listener).onMediaDataRemoved(eq(KEY), eq(true))
}
@@ -327,6 +284,5 @@ class MediaControlInteractorTest : SysuiTestCase() {
private const val ARTIST = "artist"
private const val ARTIST_2 = "artist2"
private const val KEY_MEDIA_SMARTSPACE = "MEDIA_SMARTSPACE_ID"
- private const val SURFACE = 4
}
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/interactor/MediaRecommendationsInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/interactor/MediaRecommendationsInteractorTest.kt
index 11397d99bc03..2265c0149cc3 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/interactor/MediaRecommendationsInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/interactor/MediaRecommendationsInteractorTest.kt
@@ -21,7 +21,6 @@ import android.content.ComponentName
import android.content.Intent
import android.content.applicationContext
import android.graphics.drawable.Icon
-import android.os.Process
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
@@ -39,11 +38,6 @@ import com.android.systemui.media.controls.domain.pipeline.mediaDataFilter
import com.android.systemui.media.controls.shared.model.MediaRecModel
import com.android.systemui.media.controls.shared.model.MediaRecommendationsModel
import com.android.systemui.media.controls.shared.model.SmartspaceMediaData
-import com.android.systemui.media.controls.util.MediaSmartspaceLogger.Companion.SMARTSPACE_CARD_CLICK_EVENT
-import com.android.systemui.media.controls.util.MediaSmartspaceLogger.Companion.SMARTSPACE_CARD_DISMISS_EVENT
-import com.android.systemui.media.controls.util.SmallHash
-import com.android.systemui.media.controls.util.mediaSmartspaceLogger
-import com.android.systemui.media.controls.util.mockMediaSmartspaceLogger
import com.android.systemui.plugins.activityStarter
import com.android.systemui.testKosmos
import com.android.systemui.util.mockito.any
@@ -66,11 +60,7 @@ class MediaRecommendationsInteractorTest : SysuiTestCase() {
private val kosmos = testKosmos().apply { applicationContext = spyContext }
private val testScope = kosmos.testScope
- private val mediaDataFilter: MediaDataFilterImpl =
- with(kosmos) {
- mediaSmartspaceLogger = mockMediaSmartspaceLogger
- mediaDataFilter
- }
+ private val mediaDataFilter: MediaDataFilterImpl = with(kosmos) { mediaDataFilter }
private val activityStarter = kosmos.activityStarter
private val icon: Icon = Icon.createWithResource(context, R.drawable.ic_media_play)
private val smartspaceMediaData: SmartspaceMediaData =
@@ -80,7 +70,6 @@ class MediaRecommendationsInteractorTest : SysuiTestCase() {
packageName = PACKAGE_NAME,
recommendations = MediaTestHelper.getValidRecommendationList(icon),
)
- private val smartspaceLogger = kosmos.mockMediaSmartspaceLogger
private val underTest: MediaRecommendationsInteractor =
with(kosmos) {
@@ -132,23 +121,8 @@ class MediaRecommendationsInteractorTest : SysuiTestCase() {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
mediaDataFilter.onSmartspaceMediaDataLoaded(KEY_MEDIA_SMARTSPACE, smartspaceMediaData)
- underTest.removeMediaRecommendations(
- KEY_MEDIA_SMARTSPACE,
- intent,
- 0,
- SMARTSPACE_CARD_DISMISS_EVENT,
- 1,
- )
+ underTest.removeMediaRecommendations(KEY_MEDIA_SMARTSPACE, intent, 0)
- verify(smartspaceLogger)
- .logSmartspaceCardUIEvent(
- SMARTSPACE_CARD_DISMISS_EVENT,
- SmallHash.hash(smartspaceMediaData.targetId),
- Process.INVALID_UID,
- surface = SURFACE,
- cardinality = 1,
- isRecommendationCard = true,
- )
verify(kosmos.mockBroadcastSender).sendBroadcast(eq(intent))
}
@@ -160,13 +134,7 @@ class MediaRecommendationsInteractorTest : SysuiTestCase() {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
intent.component = ComponentName(PACKAGE_NAME, EXPORTED_SMARTSPACE_TRAMPOLINE_ACTIVITY_NAME)
- underTest.removeMediaRecommendations(
- KEY_MEDIA_SMARTSPACE,
- intent,
- 0,
- SMARTSPACE_CARD_DISMISS_EVENT,
- 1,
- )
+ underTest.removeMediaRecommendations(KEY_MEDIA_SMARTSPACE, intent, 0)
verify(spyContext).startActivity(eq(intent))
}
@@ -187,19 +155,8 @@ class MediaRecommendationsInteractorTest : SysuiTestCase() {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
mediaDataFilter.onSmartspaceMediaDataLoaded(KEY_MEDIA_SMARTSPACE, smartspaceMediaData)
- underTest.startClickIntent(expandable, intent, SMARTSPACE_CARD_CLICK_EVENT, 1, 2, 3)
-
- verify(smartspaceLogger)
- .logSmartspaceCardUIEvent(
- SMARTSPACE_CARD_CLICK_EVENT,
- SmallHash.hash(smartspaceMediaData.targetId),
- Process.INVALID_UID,
- surface = SURFACE,
- cardinality = 1,
- isRecommendationCard = true,
- interactedSubcardRank = 2,
- interactedSubcardCardinality = 3,
- )
+ underTest.startClickIntent(expandable, intent)
+
verify(spyContext).startActivity(eq(intent))
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataCombineLatestTest.java b/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataCombineLatestTest.java
index 1d4b0903b579..544350c7e24d 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataCombineLatestTest.java
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataCombineLatestTest.java
@@ -79,7 +79,7 @@ public class MediaDataCombineLatestTest extends SysuiTestCase {
USER_ID, true, APP, null, ARTIST, TITLE, null,
new ArrayList<>(), new ArrayList<>(), null, PACKAGE, null, null, null, true, null,
MediaData.PLAYBACK_LOCAL, false, KEY, false, false, false, 0L, 0L,
- InstanceId.fakeInstanceId(-1), -1, false, null, -1, false);
+ InstanceId.fakeInstanceId(-1), -1, false, null);
mDeviceData = new MediaDeviceData(true, null, DEVICE_NAME, null, false);
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/ui/view/MediaCarouselScrollHandlerTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/ui/view/MediaCarouselScrollHandlerTest.kt
index c2f0ab92b32b..61119cce7bc8 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/ui/view/MediaCarouselScrollHandlerTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/ui/view/MediaCarouselScrollHandlerTest.kt
@@ -61,7 +61,6 @@ class MediaCarouselScrollHandlerTest : SysuiTestCase() {
@Mock lateinit var seekBarUpdateListener: (visibleToUser: Boolean) -> Unit
@Mock lateinit var closeGuts: (immediate: Boolean) -> Unit
@Mock lateinit var falsingManager: FalsingManager
- @Mock lateinit var logSmartspaceImpression: (Boolean) -> Unit
@Mock lateinit var logger: MediaUiEventLogger
@Mock lateinit var contentContainer: ViewGroup
@Mock lateinit var settingsButton: View
@@ -91,7 +90,6 @@ class MediaCarouselScrollHandlerTest : SysuiTestCase() {
seekBarUpdateListener,
closeGuts,
falsingManager,
- logSmartspaceImpression,
logger,
)
mediaCarouselScrollHandler.playerWidthPlusPadding = carouselWidth
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/AirplaneModeTileTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/AirplaneModeTileTest.kt
index b921ff7063a5..3914bd7a0453 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/AirplaneModeTileTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/AirplaneModeTileTest.kt
@@ -23,7 +23,6 @@ import android.platform.test.flag.junit.FlagsParameterization.allCombinationsOf
import android.testing.TestableLooper
import androidx.test.filters.SmallTest
import com.android.internal.logging.MetricsLogger
-import com.android.internal.telephony.flags.Flags
import com.android.systemui.SysuiTestCase
import com.android.systemui.broadcast.BroadcastDispatcher
import com.android.systemui.classifier.FalsingManagerFake
@@ -131,17 +130,7 @@ class AirplaneModeTileTest(flags: FlagsParameterization) : SysuiTestCase() {
}
@Test
- fun handleClick_noSatelliteFeature_directSetAirplaneMode() {
- mSetFlagsRule.disableFlags(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
-
- mTile.handleClick(null)
-
- verify(mConnectivityManager).setAirplaneMode(any())
- }
-
- @Test
fun handleClick_hasSatelliteFeatureButClickIsProcessing_doNothing() {
- mSetFlagsRule.enableFlags(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
Mockito.`when`(mClickJob.isCompleted).thenReturn(false)
mTile.mClickJob = mClickJob
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt
index c10fd5e18fc5..326d8ffd3c7c 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt
@@ -19,7 +19,6 @@ package com.android.systemui.statusbar
import android.os.IBinder
import android.platform.test.annotations.DisableFlags
import android.platform.test.annotations.EnableFlags
-import android.platform.test.annotations.RequiresFlagsDisabled
import android.testing.TestableLooper.RunWithLooper
import android.view.Choreographer
import android.view.View
@@ -360,7 +359,7 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() {
}
@Test
- @RequiresFlagsDisabled(Flags.FLAG_NOTIFICATION_SHADE_BLUR)
+ @DisableFlags(Flags.FLAG_NOTIFICATION_SHADE_BLUR)
fun updateBlurCallback_setsOpaque_whenScrim() {
scrimVisibilityCaptor.value.accept(ScrimController.OPAQUE)
notificationShadeDepthController.updateBlurCallback.doFrame(0)
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModelTest.kt
index 1c530f1eab7e..804e7d635107 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModelTest.kt
@@ -35,6 +35,8 @@ import com.android.systemui.flags.Flags.NEW_NETWORK_SLICE_UI
import com.android.systemui.log.table.logcatTableLogBuffer
import com.android.systemui.res.R
import com.android.systemui.statusbar.connectivity.MobileIconCarrierIdOverridesFake
+import com.android.systemui.statusbar.core.NewStatusBarIcons
+import com.android.systemui.statusbar.core.StatusBarRootModernization
import com.android.systemui.statusbar.pipeline.airplane.data.repository.FakeAirplaneModeRepository
import com.android.systemui.statusbar.pipeline.airplane.domain.interactor.AirplaneModeInteractor
import com.android.systemui.statusbar.pipeline.mobile.data.model.DataConnectionState
@@ -858,7 +860,23 @@ class MobileIconViewModelTest : SysuiTestCase() {
}
@Test
- fun netTypeBackground_flagOn_notNullWhenPrioritizedCapabilities() =
+ @EnableFlags(NewStatusBarIcons.FLAG_NAME, StatusBarRootModernization.FLAG_NAME)
+ fun netTypeBackground_sliceUiEnabled_notNullWhenPrioritizedCapabilities_newIcons() =
+ testScope.runTest {
+ flags.set(NEW_NETWORK_SLICE_UI, true)
+ createAndSetViewModel()
+
+ val latest by collectLastValue(underTest.networkTypeBackground)
+
+ repository.hasPrioritizedNetworkCapabilities.value = true
+
+ assertThat(latest)
+ .isEqualTo(Icon.Resource(R.drawable.mobile_network_type_background_updated, null))
+ }
+
+ @Test
+ @DisableFlags(NewStatusBarIcons.FLAG_NAME, StatusBarRootModernization.FLAG_NAME)
+ fun netTypeBackground_sliceUiDisabled_notNullWhenPrioritizedCapabilities_oldIcons() =
testScope.runTest {
flags.set(NEW_NETWORK_SLICE_UI, true)
createAndSetViewModel()
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/satellite/domain/interactor/DeviceBasedSatelliteInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/satellite/domain/interactor/DeviceBasedSatelliteInteractorTest.kt
index 9ad23154c334..29c6260d0553 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/satellite/domain/interactor/DeviceBasedSatelliteInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/satellite/domain/interactor/DeviceBasedSatelliteInteractorTest.kt
@@ -16,11 +16,8 @@
package com.android.systemui.statusbar.pipeline.satellite.domain.interactor
-import android.platform.test.annotations.DisableFlags
-import android.platform.test.annotations.EnableFlags
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
-import com.android.internal.telephony.flags.Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.log.core.FakeLogBuffer
@@ -71,7 +68,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun isSatelliteAllowed_falseWhenNotAllowed() =
testScope.runTest {
val latest by collectLastValue(underTest.isSatelliteAllowed)
@@ -84,7 +80,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun isSatelliteAllowed_trueWhenAllowed() =
testScope.runTest {
val latest by collectLastValue(underTest.isSatelliteAllowed)
@@ -97,33 +92,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @DisableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
- fun isSatelliteAllowed_offWhenFlagIsOff() =
- testScope.runTest {
- // GIVEN feature is disabled
-
- // Remake the interactor so the flag is read
- underTest =
- DeviceBasedSatelliteInteractor(
- repo,
- iconsInteractor,
- wifiInteractor,
- testScope.backgroundScope,
- FakeLogBuffer.Factory.create(),
- mock(),
- )
-
- val latest by collectLastValue(underTest.isSatelliteAllowed)
-
- // WHEN satellite is allowed
- repo.isSatelliteAllowedForCurrentLocation.value = true
-
- // THEN the interactor returns false due to the flag value
- assertThat(latest).isFalse()
- }
-
- @Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun connectionState_matchesRepositoryValue() =
testScope.runTest {
val latest by collectLastValue(underTest.connectionState)
@@ -146,45 +114,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @DisableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
- fun connectionState_offWhenFeatureIsDisabled() =
- testScope.runTest {
- // GIVEN the flag is disabled
-
- // Remake the interactor so the flag is read
- underTest =
- DeviceBasedSatelliteInteractor(
- repo,
- iconsInteractor,
- wifiInteractor,
- testScope.backgroundScope,
- FakeLogBuffer.Factory.create(),
- mock(),
- )
-
- val latest by collectLastValue(underTest.connectionState)
-
- // THEN the state is always Off, regardless of status in system_server
-
- // Off
- repo.connectionState.value = SatelliteConnectionState.Off
- assertThat(latest).isEqualTo(SatelliteConnectionState.Off)
-
- // On
- repo.connectionState.value = SatelliteConnectionState.On
- assertThat(latest).isEqualTo(SatelliteConnectionState.Off)
-
- // Connected
- repo.connectionState.value = SatelliteConnectionState.Connected
- assertThat(latest).isEqualTo(SatelliteConnectionState.Off)
-
- // Unknown
- repo.connectionState.value = SatelliteConnectionState.Unknown
- assertThat(latest).isEqualTo(SatelliteConnectionState.Off)
- }
-
- @Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun signalStrength_matchesRepo() =
testScope.runTest {
val latest by collectLastValue(underTest.signalStrength)
@@ -203,40 +132,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @DisableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
- fun signalStrength_zeroWhenDisabled() =
- testScope.runTest {
- // GIVEN the flag is enabled
-
- // Remake the interactor so the flag is read
- underTest =
- DeviceBasedSatelliteInteractor(
- repo,
- iconsInteractor,
- wifiInteractor,
- testScope.backgroundScope,
- FakeLogBuffer.Factory.create(),
- mock(),
- )
-
- val latest by collectLastValue(underTest.signalStrength)
-
- // THEN the value is always 0, regardless of what the system says
- repo.signalStrength.value = 1
- assertThat(latest).isEqualTo(0)
-
- repo.signalStrength.value = 2
- assertThat(latest).isEqualTo(0)
-
- repo.signalStrength.value = 3
- assertThat(latest).isEqualTo(0)
-
- repo.signalStrength.value = 4
- assertThat(latest).isEqualTo(0)
- }
-
- @Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun areAllConnectionsOutOfService_noConnections_noDeviceEmergencyCalls_yes() =
testScope.runTest {
val latest by collectLastValue(underTest.areAllConnectionsOutOfService)
@@ -251,7 +146,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun areAllConnectionsOutOfService_noConnections_deviceEmergencyCalls_yes() =
testScope.runTest {
val latest by collectLastValue(underTest.areAllConnectionsOutOfService)
@@ -266,7 +160,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun areAllConnectionsOutOfService_oneConnectionInService_thenLost_noDeviceEmergencyCalls_yes() =
testScope.runTest {
val latest by collectLastValue(underTest.areAllConnectionsOutOfService)
@@ -292,7 +185,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun areAllConnectionsOutOfService_oneConnectionInService_thenLost_deviceEmergencyCalls_no() =
testScope.runTest {
val latest by collectLastValue(underTest.areAllConnectionsOutOfService)
@@ -318,7 +210,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun areAllConnectionsOutOfService_twoConnectionsOos_nonNtn_noDeviceEmergencyCalls_yes() =
testScope.runTest {
val latest by collectLastValue(underTest.areAllConnectionsOutOfService)
@@ -342,7 +233,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun areAllConnectionsOutOfService_twoConnectionsOos_nonNtn_deviceEmergencyCalls_no() =
testScope.runTest {
val latest by collectLastValue(underTest.areAllConnectionsOutOfService)
@@ -366,7 +256,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun areAllConnectionsOutOfService_twoConnectionsOos_noDeviceEmergencyCalls_oneNtn_no() =
testScope.runTest {
val latest by collectLastValue(underTest.areAllConnectionsOutOfService)
@@ -392,7 +281,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun areAllConnectionsOutOfService_oneConnectionOos_noDeviceEmergencyCalls_nonNtn_yes() =
testScope.runTest {
val latest by collectLastValue(underTest.areAllConnectionsOutOfService)
@@ -412,7 +300,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun areAllConnectionsOutOfService_oneConnectionOos_nonNtn_no() =
testScope.runTest {
val latest by collectLastValue(underTest.areAllConnectionsOutOfService)
@@ -432,7 +319,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun areAllConnectionsOutOfService_oneConnectionOos_ntn_no() =
testScope.runTest {
val latest by collectLastValue(underTest.areAllConnectionsOutOfService)
@@ -450,7 +336,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun areAllConnectionsOutOfService_oneConnectionInService_nonNtn_no() =
testScope.runTest {
val latest by collectLastValue(underTest.areAllConnectionsOutOfService)
@@ -467,7 +352,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun areAllConnectionsOutOfService_oneConnectionInService_ntn_no() =
testScope.runTest {
val latest by collectLastValue(underTest.areAllConnectionsOutOfService)
@@ -484,7 +368,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun areAllConnectionsOutOfService_twoConnectionsOneInService_nonNtn_no() =
testScope.runTest {
val latest by collectLastValue(underTest.areAllConnectionsOutOfService)
@@ -504,7 +387,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun areAllConnectionsOutOfService_twoConnectionsInService_nonNtn_no() =
testScope.runTest {
val latest by collectLastValue(underTest.areAllConnectionsOutOfService)
@@ -522,37 +404,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @DisableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
- fun areAllConnectionsOutOfService_falseWhenFlagIsOff() =
- testScope.runTest {
- // GIVEN the flag is disabled
-
- // Remake the interactor so the flag is read
- underTest =
- DeviceBasedSatelliteInteractor(
- repo,
- iconsInteractor,
- wifiInteractor,
- testScope.backgroundScope,
- FakeLogBuffer.Factory.create(),
- mock(),
- )
-
- val latest by collectLastValue(underTest.areAllConnectionsOutOfService)
-
- // GIVEN a condition that should return true (all conections OOS)
-
- val i1 = iconsInteractor.getMobileConnectionInteractorForSubId(1)
- val i2 = iconsInteractor.getMobileConnectionInteractorForSubId(2)
-
- i1.isInService.value = true
- i2.isInService.value = true
-
- // THEN the value is still false, because the flag is off
- assertThat(latest).isFalse()
- }
-
- @Test
fun isWifiActive_falseWhenWifiNotActive() =
testScope.runTest {
val latest by collectLastValue(underTest.isWifiActive)
@@ -577,7 +428,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun isAnyConnectionNtn_trueWhenAnyNtn() =
testScope.runTest {
val latest by collectLastValue(underTest.isAnyConnectionNtn)
@@ -595,7 +445,6 @@ class DeviceBasedSatelliteInteractorTest : SysuiTestCase() {
}
@Test
- @EnableFlags(FLAG_OEM_ENABLED_SATELLITE_FLAG)
fun isAnyConnectionNtn_falseWhenNoNtn() =
testScope.runTest {
val latest by collectLastValue(underTest.isAnyConnectionNtn)
diff --git a/packages/SystemUI/pods/Android.bp b/packages/SystemUI/pods/Android.bp
index e45f3170d9ad..588a074ef80c 100644
--- a/packages/SystemUI/pods/Android.bp
+++ b/packages/SystemUI/pods/Android.bp
@@ -20,3 +20,14 @@ package {
// specify default_visibility:
default_visibility: ["//visibility:private"],
}
+
+java_defaults {
+ name: "SystemUI_pod_defaults",
+ libs: [
+ "jsr330",
+ ],
+ kotlincflags: [
+ "-Xjvm-default=all",
+ ],
+ defaults_visibility: [":__subpackages__"],
+}
diff --git a/packages/SystemUI/pods/com/android/systemui/dagger/Android.bp b/packages/SystemUI/pods/com/android/systemui/dagger/Android.bp
index df90be8ecb97..72c41bb65240 100644
--- a/packages/SystemUI/pods/com/android/systemui/dagger/Android.bp
+++ b/packages/SystemUI/pods/com/android/systemui/dagger/Android.bp
@@ -14,21 +14,18 @@
// limitations under the License.
//
-soong_namespace {
-}
-
package {
default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"],
}
java_library {
- name: "api",
+ name: "com.android.systemui.dagger-api",
srcs: [
"**/*.java",
"**/*.kt",
],
- libs: [
- "jsr330",
+ defaults: [
+ "SystemUI_pod_defaults",
],
visibility: ["//frameworks/base/packages/SystemUI:__subpackages__"],
}
diff --git a/packages/SystemUI/pods/com/android/systemui/retail/Android.bp b/packages/SystemUI/pods/com/android/systemui/retail/Android.bp
index f04784885c10..639eae9003cd 100644
--- a/packages/SystemUI/pods/com/android/systemui/retail/Android.bp
+++ b/packages/SystemUI/pods/com/android/systemui/retail/Android.bp
@@ -14,25 +14,24 @@
// limitations under the License.
//
-soong_namespace {
-}
-
package {
default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"],
}
java_library {
- name: "impl",
+ name: "com.android.systemui.retail-impl",
srcs: ["*.kt"],
libs: [
- "jsr330",
"dagger2",
"SystemUICommon",
"kotlinx_coroutines",
],
+ defaults: [
+ "SystemUI_pod_defaults",
+ ],
static_libs: [
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail/data:impl",
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail/domain:impl",
+ "com.android.systemui.retail.data-impl",
+ "com.android.systemui.retail.domain-impl",
],
- visibility: ["//frameworks/base/packages/SystemUI"],
+ visibility: ["//frameworks/base/packages/SystemUI:__pkg__"],
}
diff --git a/packages/SystemUI/pods/com/android/systemui/retail/data/Android.bp b/packages/SystemUI/pods/com/android/systemui/retail/data/Android.bp
index f148a7c69ecc..1aa41e4867bb 100644
--- a/packages/SystemUI/pods/com/android/systemui/retail/data/Android.bp
+++ b/packages/SystemUI/pods/com/android/systemui/retail/data/Android.bp
@@ -14,42 +14,44 @@
// limitations under the License.
//
-soong_namespace {
-}
-
package {
default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"],
}
java_library {
- name: "api",
+ name: "com.android.systemui.retail.data-api",
srcs: ["repository/*.kt"],
libs: [
"kotlinx_coroutines",
],
+ defaults: [
+ "SystemUI_pod_defaults",
+ ],
visibility: [
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail",
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail/dagger",
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail/domain",
+ "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail:__pkg__",
+ "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail/dagger:__pkg__",
+ "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail/domain:__pkg__",
],
}
java_library {
- name: "impl",
+ name: "com.android.systemui.retail.data-impl",
srcs: ["repository/impl/*.kt"],
libs: [
- "jsr330",
"kotlinx_coroutines",
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/dagger:api",
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/util/settings:api",
+ "com.android.systemui.dagger-api",
+ "com.android.systemui.util.settings-api",
"SystemUICommon",
],
static_libs: [
- "api",
+ "com.android.systemui.retail.data-api",
+ ],
+ defaults: [
+ "SystemUI_pod_defaults",
],
visibility: [
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail",
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail/dagger",
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail/domain",
+ "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail:__pkg__",
+ "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail/dagger:__pkg__",
+ "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail/domain:__pkg__",
],
}
diff --git a/packages/SystemUI/pods/com/android/systemui/retail/domain/Android.bp b/packages/SystemUI/pods/com/android/systemui/retail/domain/Android.bp
index 787861ce5eb8..64b0e2254c52 100644
--- a/packages/SystemUI/pods/com/android/systemui/retail/domain/Android.bp
+++ b/packages/SystemUI/pods/com/android/systemui/retail/domain/Android.bp
@@ -14,33 +14,35 @@
// limitations under the License.
//
-soong_namespace {
-}
-
package {
default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"],
}
java_library {
- name: "api",
+ name: "com.android.systemui.retail.domain-api",
srcs: ["interactor/*.kt"],
+ defaults: [
+ "SystemUI_pod_defaults",
+ ],
visibility: [
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail",
+ "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail:__pkg__",
],
}
java_library {
- name: "impl",
+ name: "com.android.systemui.retail.domain-impl",
srcs: ["interactor/impl/*.kt"],
libs: [
- "jsr330",
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/dagger:api",
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail/data:api",
+ "com.android.systemui.dagger-api",
+ "com.android.systemui.retail.data-api",
],
static_libs: [
- "api",
+ "com.android.systemui.retail.domain-api",
+ ],
+ defaults: [
+ "SystemUI_pod_defaults",
],
visibility: [
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail",
+ "//frameworks/base/packages/SystemUI/pods/com/android/systemui/retail:__pkg__",
],
}
diff --git a/packages/SystemUI/pods/com/android/systemui/util/settings/Android.bp b/packages/SystemUI/pods/com/android/systemui/util/settings/Android.bp
index 1aa772961408..d97ff1371f4e 100644
--- a/packages/SystemUI/pods/com/android/systemui/util/settings/Android.bp
+++ b/packages/SystemUI/pods/com/android/systemui/util/settings/Android.bp
@@ -14,27 +14,25 @@
// limitations under the License.
//
-soong_namespace {
-}
-
package {
default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"],
}
java_library {
- name: "api",
+ name: "com.android.systemui.util.settings-api",
srcs: [
"*.java",
"*.kt",
],
libs: [
"//frameworks/libs/systemui:tracinglib-platform",
- "//frameworks/base/packages/SystemUI/pods/com/android/systemui/dagger:api",
+ "com.android.systemui.dagger-api",
"SystemUICommon",
"androidx.annotation_annotation",
"kotlinx_coroutines_android",
- "jsr330",
],
- kotlincflags: ["-Xjvm-default=all"],
+ defaults: [
+ "SystemUI_pod_defaults",
+ ],
visibility: ["//frameworks/base/packages/SystemUI:__subpackages__"],
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSettingsRepositoryModule.kt b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSettingsRepositoryModule.kt
index 0f25225b9489..c6708d421a93 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSettingsRepositoryModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSettingsRepositoryModule.kt
@@ -17,6 +17,7 @@
package com.android.systemui.communal.data.repository
import com.android.systemui.Flags.glanceableHubBlurredBackground
+import com.android.systemui.Flags.glanceableHubV2
import com.android.systemui.communal.shared.model.CommunalBackgroundType
import dagger.Binds
import dagger.Module
@@ -35,6 +36,10 @@ interface CommunalSettingsRepositoryModule {
return CommunalBackgroundType.BLUR
}
+ if (glanceableHubV2()) {
+ return CommunalBackgroundType.SCRIM
+ }
+
return CommunalBackgroundType.ANIMATED
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/shared/model/CommunalBackgroundType.kt b/packages/SystemUI/src/com/android/systemui/communal/shared/model/CommunalBackgroundType.kt
index e1128ed3a801..a84fa79100a0 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/shared/model/CommunalBackgroundType.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/shared/model/CommunalBackgroundType.kt
@@ -17,10 +17,11 @@
package com.android.systemui.communal.shared.model
/** Models the types of background that can be shown on the hub. */
-enum class CommunalBackgroundType(val value: Int) {
- STATIC(0),
- STATIC_GRADIENT(1),
- ANIMATED(2),
- NONE(3),
- BLUR(4),
+enum class CommunalBackgroundType(val value: Int, val opaque: Boolean) {
+ STATIC(value = 0, opaque = true),
+ STATIC_GRADIENT(value = 1, opaque = true),
+ ANIMATED(value = 2, opaque = true),
+ NONE(value = 3, opaque = false),
+ BLUR(value = 4, opaque = false),
+ SCRIM(value = 5, opaque = false),
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalTransitionViewModel.kt b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalTransitionViewModel.kt
index 0cbbfd4e2cd7..db5c7ebdc7ba 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalTransitionViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalTransitionViewModel.kt
@@ -19,6 +19,7 @@ package com.android.systemui.communal.ui.viewmodel
import android.graphics.Color
import com.android.systemui.communal.domain.interactor.CommunalInteractor
import com.android.systemui.communal.domain.interactor.CommunalSceneInteractor
+import com.android.systemui.communal.domain.interactor.CommunalSettingsInteractor
import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.communal.util.CommunalColors
import com.android.systemui.dagger.SysUISingleton
@@ -40,6 +41,7 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.combine
+import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.map
@@ -60,6 +62,7 @@ constructor(
glanceableHubToDreamTransitionViewModel: GlanceableHubToDreamingTransitionViewModel,
communalInteractor: CommunalInteractor,
private val communalSceneInteractor: CommunalSceneInteractor,
+ communalSettingsInteractor: CommunalSettingsInteractor,
keyguardTransitionInteractor: KeyguardTransitionInteractor,
) {
/**
@@ -146,13 +149,16 @@ constructor(
}
val recentsBackgroundColor: Flow<Color?> =
- combine(showCommunalFromOccluded, communalColors.backgroundColor) {
- showCommunalFromOccluded,
- backgroundColor ->
- if (showCommunalFromOccluded) {
- backgroundColor
- } else {
- null
+ combine(
+ showCommunalFromOccluded,
+ communalColors.backgroundColor,
+ communalSettingsInteractor.communalBackground,
+ ) { showCommunalFromOccluded, backgroundColor, backgroundType ->
+ if (showCommunalFromOccluded && backgroundType.opaque) {
+ backgroundColor
+ } else {
+ null
+ }
}
- }
+ .distinctUntilChanged()
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt
index 0700ec639153..6f5f662d6fa3 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt
@@ -159,7 +159,6 @@ constructor(
val isKeyguardOccludedLegacy = keyguardInteractor.isKeyguardOccluded.value
val primaryBouncerShowing = keyguardInteractor.primaryBouncerShowing.value
val isKeyguardGoingAway = keyguardInteractor.isKeyguardGoingAway.value
- val canStartDreaming = dreamManager.canStartDreaming(false)
if (!deviceEntryInteractor.isLockscreenEnabled()) {
if (!SceneContainerFlag.isEnabled) {
@@ -192,13 +191,6 @@ constructor(
if (!SceneContainerFlag.isEnabled) {
transitionToGlanceableHub()
}
- } else if (canStartDreaming) {
- // If we're waking up to dream, transition directly to dreaming without
- // showing the lockscreen.
- startTransitionTo(
- KeyguardState.DREAMING,
- ownerReason = "moving from doze to dream",
- )
} else {
startTransitionTo(KeyguardState.LOCKSCREEN)
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DozingToDreamingTransitionViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DozingToDreamingTransitionViewModel.kt
index 9018c58a7e36..e6a85c6860c5 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DozingToDreamingTransitionViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DozingToDreamingTransitionViewModel.kt
@@ -39,6 +39,4 @@ constructor(animationFlow: KeyguardTransitionAnimationFlow) {
)
val lockscreenAlpha: Flow<Float> = transitionAnimation.immediatelyTransitionTo(0f)
- // Notifications should not be shown while transitioning to dream.
- val notificationAlpha = transitionAnimation.immediatelyTransitionTo(0f)
}
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/data/repository/MediaFilterRepository.kt b/packages/SystemUI/src/com/android/systemui/media/controls/data/repository/MediaFilterRepository.kt
index 1b39d55d1f0f..8ce901aa32d8 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/data/repository/MediaFilterRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/data/repository/MediaFilterRepository.kt
@@ -16,22 +16,15 @@
package com.android.systemui.media.controls.data.repository
-import android.content.Context
import com.android.internal.logging.InstanceId
import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.media.controls.data.model.MediaSortKeyModel
import com.android.systemui.media.controls.shared.model.MediaCommonModel
import com.android.systemui.media.controls.shared.model.MediaData
import com.android.systemui.media.controls.shared.model.MediaDataLoadingModel
import com.android.systemui.media.controls.shared.model.SmartspaceMediaData
import com.android.systemui.media.controls.shared.model.SmartspaceMediaLoadingModel
-import com.android.systemui.media.controls.util.MediaSmartspaceLogger
-import com.android.systemui.media.controls.util.MediaSmartspaceLogger.Companion.SMARTSPACE_CARD_DISMISS_EVENT
-import com.android.systemui.media.controls.util.MediaSmartspaceLogger.Companion.SMARTSPACE_CARD_SEEN_EVENT
-import com.android.systemui.media.controls.util.SmallHash
import com.android.systemui.util.time.SystemClock
-import java.util.Locale
import java.util.TreeMap
import javax.inject.Inject
import kotlinx.coroutines.flow.MutableStateFlow
@@ -40,13 +33,7 @@ import kotlinx.coroutines.flow.asStateFlow
/** A repository that holds the state of filtered media data on the device. */
@SysUISingleton
-class MediaFilterRepository
-@Inject
-constructor(
- @Application private val applicationContext: Context,
- private val systemClock: SystemClock,
- private val smartspaceLogger: MediaSmartspaceLogger,
-) {
+class MediaFilterRepository @Inject constructor(private val systemClock: SystemClock) {
/** Instance id of media control that recommendations card reactivated. */
private val _reactivatedId: MutableStateFlow<InstanceId?> = MutableStateFlow(null)
@@ -86,7 +73,6 @@ constructor(
private var sortedMedia = TreeMap<MediaSortKeyModel, MediaCommonModel>(comparator)
private var mediaFromRecPackageName: String? = null
- private var locale: Locale = applicationContext.resources.configuration.locales.get(0)
fun addMediaEntry(key: String, data: MediaData) {
val entries = LinkedHashMap<String, MediaData>(_allUserEntries.value)
@@ -224,21 +210,6 @@ constructor(
}
sortedMedia = sortedMap
-
- if (!isUpdate) {
- val rank = sortedMedia.values.indexOf(newCommonModel)
- if (isSmartspaceLoggingEnabled(newCommonModel, rank)) {
- smartspaceLogger.logSmartspaceCardReceived(
- it.smartspaceId,
- it.appUid,
- cardinality = _currentMedia.value.size,
- isSsReactivated = mediaDataLoadingModel.isSsReactivated,
- rank = rank,
- )
- }
- } else if (mediaDataLoadingModel.receivedSmartspaceCardLatency != 0) {
- logSmartspaceAllMediaCards(mediaDataLoadingModel.receivedSmartspaceCardLatency)
- }
}
}
@@ -278,30 +249,6 @@ constructor(
sortedMap[sortKey] = newCommonModel
_currentMedia.value = sortedMap.values.toList()
sortedMedia = sortedMap
-
- if (isRecommendationActive()) {
- val hasActivatedExistedResumeMedia =
- !hasActiveMedia() &&
- hasAnyMedia() &&
- smartspaceMediaLoadingModel.isPrioritized
- if (hasActivatedExistedResumeMedia) {
- // Log resume card received if resumable media card is reactivated and
- // recommendation card is valid and ranked first
- logSmartspaceAllMediaCards(
- (systemClock.currentTimeMillis() -
- _smartspaceMediaData.value.headphoneConnectionTimeMillis)
- .toInt()
- )
- }
-
- smartspaceLogger.logSmartspaceCardReceived(
- SmallHash.hash(_smartspaceMediaData.value.targetId),
- _smartspaceMediaData.value.getUid(applicationContext),
- cardinality = _currentMedia.value.size,
- isRecommendationCard = true,
- rank = _currentMedia.value.indexOf(newCommonModel),
- )
- }
}
is SmartspaceMediaLoadingModel.Removed -> {
_currentMedia.value =
@@ -339,108 +286,6 @@ constructor(
return _smartspaceMediaData.value.isActive
}
- /** Log visible card given [visibleIndex]. */
- fun logSmartspaceCardSeen(surface: Int, visibleIndex: Int, isMediaCardUpdate: Boolean) {
- if (_currentMedia.value.size <= visibleIndex) return
-
- when (val mediaCommonModel = _currentMedia.value[visibleIndex]) {
- is MediaCommonModel.MediaControl -> {
- if (
- !isMediaCardUpdate ||
- mediaCommonModel.mediaLoadedModel.receivedSmartspaceCardLatency != 0
- ) {
- logSmartspaceMediaCardUserEvent(
- mediaCommonModel.mediaLoadedModel.instanceId,
- visibleIndex,
- SMARTSPACE_CARD_SEEN_EVENT,
- surface,
- mediaCommonModel.mediaLoadedModel.isSsReactivated,
- )
- }
- }
- is MediaCommonModel.MediaRecommendations -> {
- if (isRecommendationActive()) {
- logSmarspaceRecommendationCardUserEvent(
- SMARTSPACE_CARD_SEEN_EVENT,
- surface,
- visibleIndex,
- )
- }
- }
- }
- }
-
- /** Log user event on media card if smartspace logging is enabled. */
- fun logSmartspaceCardUserEvent(
- eventId: Int,
- surface: Int,
- interactedSubCardRank: Int = 0,
- interactedSubCardCardinality: Int = 0,
- instanceId: InstanceId? = null,
- isRec: Boolean = false,
- ) {
- _currentMedia.value.forEachIndexed { index, mediaCommonModel ->
- when (mediaCommonModel) {
- is MediaCommonModel.MediaControl -> {
- if (mediaCommonModel.mediaLoadedModel.instanceId == instanceId) {
- if (isSmartspaceLoggingEnabled(mediaCommonModel, index)) {
- logSmartspaceMediaCardUserEvent(
- instanceId,
- index,
- eventId,
- surface,
- mediaCommonModel.mediaLoadedModel.isSsReactivated,
- interactedSubCardRank,
- interactedSubCardCardinality,
- )
- }
- return
- }
- }
- is MediaCommonModel.MediaRecommendations -> {
- if (isRec) {
- if (isSmartspaceLoggingEnabled(mediaCommonModel, index)) {
- logSmarspaceRecommendationCardUserEvent(
- eventId,
- surface,
- index,
- interactedSubCardRank,
- interactedSubCardCardinality,
- )
- }
- return
- }
- }
- }
- }
- }
-
- /** Log media and recommendation cards dismissal if smartspace logging is enabled for each. */
- fun logSmartspaceCardsOnSwipeToDismiss(surface: Int) {
- _currentMedia.value.forEachIndexed { index, mediaCommonModel ->
- if (isSmartspaceLoggingEnabled(mediaCommonModel, index)) {
- when (mediaCommonModel) {
- is MediaCommonModel.MediaControl ->
- logSmartspaceMediaCardUserEvent(
- mediaCommonModel.mediaLoadedModel.instanceId,
- index,
- SMARTSPACE_CARD_DISMISS_EVENT,
- surface,
- mediaCommonModel.mediaLoadedModel.isSsReactivated,
- isSwipeToDismiss = true,
- )
- is MediaCommonModel.MediaRecommendations ->
- logSmarspaceRecommendationCardUserEvent(
- SMARTSPACE_CARD_DISMISS_EVENT,
- surface,
- index,
- isSwipeToDismiss = true,
- )
- }
- }
- }
- }
-
private fun canBeRemoved(data: MediaData): Boolean {
return data.isPlaying?.let { !it } ?: data.isClearable && !data.active
}
@@ -448,83 +293,4 @@ constructor(
private fun isMediaFromRec(data: MediaData): Boolean {
return data.isPlaying == true && mediaFromRecPackageName == data.packageName
}
-
- /** Log all media cards if smartspace logging is enabled for each. */
- private fun logSmartspaceAllMediaCards(receivedSmartspaceCardLatency: Int) {
- sortedMedia.values.forEachIndexed { index, mediaCommonModel ->
- if (mediaCommonModel is MediaCommonModel.MediaControl) {
- _selectedUserEntries.value[mediaCommonModel.mediaLoadedModel.instanceId]?.let {
- it.smartspaceId =
- SmallHash.hash(it.appUid + systemClock.currentTimeMillis().toInt())
- it.isImpressed = false
-
- if (isSmartspaceLoggingEnabled(mediaCommonModel, index)) {
- smartspaceLogger.logSmartspaceCardReceived(
- it.smartspaceId,
- it.appUid,
- cardinality = _currentMedia.value.size,
- isSsReactivated = mediaCommonModel.mediaLoadedModel.isSsReactivated,
- rank = index,
- receivedLatencyMillis = receivedSmartspaceCardLatency,
- )
- }
- }
- }
- }
- }
-
- private fun logSmartspaceMediaCardUserEvent(
- instanceId: InstanceId,
- index: Int,
- eventId: Int,
- surface: Int,
- isReactivated: Boolean,
- interactedSubCardRank: Int = 0,
- interactedSubCardCardinality: Int = 0,
- isSwipeToDismiss: Boolean = false,
- ) {
- _selectedUserEntries.value[instanceId]?.let {
- smartspaceLogger.logSmartspaceCardUIEvent(
- eventId,
- it.smartspaceId,
- it.appUid,
- surface,
- _currentMedia.value.size,
- isSsReactivated = isReactivated,
- interactedSubcardRank = interactedSubCardRank,
- interactedSubcardCardinality = interactedSubCardCardinality,
- rank = index,
- isSwipeToDismiss = isSwipeToDismiss,
- )
- }
- }
-
- private fun logSmarspaceRecommendationCardUserEvent(
- eventId: Int,
- surface: Int,
- index: Int,
- interactedSubCardRank: Int = 0,
- interactedSubCardCardinality: Int = 0,
- isSwipeToDismiss: Boolean = false,
- ) {
- smartspaceLogger.logSmartspaceCardUIEvent(
- eventId,
- SmallHash.hash(_smartspaceMediaData.value.targetId),
- _smartspaceMediaData.value.getUid(applicationContext),
- surface,
- _currentMedia.value.size,
- isRecommendationCard = true,
- interactedSubcardRank = interactedSubCardRank,
- interactedSubcardCardinality = interactedSubCardCardinality,
- rank = index,
- isSwipeToDismiss = isSwipeToDismiss,
- )
- }
-
- private fun isSmartspaceLoggingEnabled(commonModel: MediaCommonModel, index: Int): Boolean {
- return sortedMedia.size > index &&
- (_smartspaceMediaData.value.expiryTimeMs != 0L ||
- isRecommendationActive() ||
- commonModel is MediaCommonModel.MediaRecommendations)
- }
}
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/LegacyMediaDataManagerImpl.kt b/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/LegacyMediaDataManagerImpl.kt
index ea5f81c75405..46cf0a63e93d 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/LegacyMediaDataManagerImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/LegacyMediaDataManagerImpl.kt
@@ -82,7 +82,6 @@ import com.android.systemui.media.controls.util.MediaControllerFactory
import com.android.systemui.media.controls.util.MediaDataUtils
import com.android.systemui.media.controls.util.MediaFlags
import com.android.systemui.media.controls.util.MediaUiEventLogger
-import com.android.systemui.media.controls.util.SmallHash
import com.android.systemui.res.R
import com.android.systemui.statusbar.NotificationMediaManager.isPlayingState
import com.android.systemui.statusbar.notification.row.HybridGroupManager
@@ -1085,7 +1084,6 @@ class LegacyMediaDataManagerImpl(
instanceId = instanceId,
appUid = appUid,
isExplicit = isExplicit,
- smartspaceId = SmallHash.hash(appUid + systemClock.currentTimeMillis().toInt()),
)
if (isSameMediaData(context, mediaController, mediaData, currentEntry)) {
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImpl.kt b/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImpl.kt
index 4c0312fb4fa3..2cd5016cb206 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImpl.kt
@@ -33,7 +33,6 @@ import com.android.systemui.media.controls.shared.model.MediaData
import com.android.systemui.media.controls.shared.model.MediaDataLoadingModel
import com.android.systemui.media.controls.shared.model.SmartspaceMediaData
import com.android.systemui.media.controls.shared.model.SmartspaceMediaLoadingModel
-import com.android.systemui.media.controls.util.MediaFlags
import com.android.systemui.media.controls.util.MediaUiEventLogger
import com.android.systemui.settings.UserTracker
import com.android.systemui.statusbar.NotificationLockscreenUserManager
@@ -69,7 +68,6 @@ constructor(
@Main private val executor: Executor,
private val systemClock: SystemClock,
private val logger: MediaUiEventLogger,
- private val mediaFlags: MediaFlags,
private val mediaFilterRepository: MediaFilterRepository,
private val mediaLogger: MediaLogger,
) : MediaDataManager.Listener {
@@ -328,9 +326,8 @@ constructor(
}
/** Invoked when the user has dismissed the media carousel */
- fun onSwipeToDismiss(surface: Int) {
+ fun onSwipeToDismiss() {
if (DEBUG) Log.d(TAG, "Media carousel swiped away")
- mediaFilterRepository.logSmartspaceCardsOnSwipeToDismiss(surface)
val mediaEntries = mediaFilterRepository.allUserEntries.value.entries
mediaEntries.forEach { (key, data) ->
if (mediaFilterRepository.selectedUserEntries.value.containsKey(data.instanceId)) {
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/MediaDataProcessor.kt b/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/MediaDataProcessor.kt
index 59f98d83e149..fe852ce7979f 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/MediaDataProcessor.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/MediaDataProcessor.kt
@@ -83,7 +83,6 @@ import com.android.systemui.media.controls.util.MediaControllerFactory
import com.android.systemui.media.controls.util.MediaDataUtils
import com.android.systemui.media.controls.util.MediaFlags
import com.android.systemui.media.controls.util.MediaUiEventLogger
-import com.android.systemui.media.controls.util.SmallHash
import com.android.systemui.res.R
import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.statusbar.NotificationMediaManager.isPlayingState
@@ -758,7 +757,6 @@ class MediaDataProcessor(
appUid = appUid,
isExplicit = isExplicit,
resumeProgress = progress,
- smartspaceId = SmallHash.hash(appUid + systemClock.currentTimeMillis().toInt()),
),
)
}
@@ -1010,7 +1008,6 @@ class MediaDataProcessor(
instanceId = instanceId,
appUid = appUid,
isExplicit = isExplicit,
- smartspaceId = SmallHash.hash(appUid + systemClock.currentTimeMillis().toInt()),
)
if (isSameMediaData(context, mediaController, mediaData, oldEntry)) {
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaCarouselInteractor.kt b/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaCarouselInteractor.kt
index 891b85225577..cd51a4bf0df9 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaCarouselInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaCarouselInteractor.kt
@@ -35,8 +35,6 @@ import com.android.systemui.media.controls.domain.pipeline.MediaSessionBasedFilt
import com.android.systemui.media.controls.domain.pipeline.MediaTimeoutListener
import com.android.systemui.media.controls.domain.resume.MediaResumeListener
import com.android.systemui.media.controls.shared.model.MediaCommonModel
-import com.android.systemui.media.controls.util.MediaFlags
-import com.android.systemui.media.controls.util.MediaSmartspaceLogger
import com.android.systemui.scene.shared.flag.SceneContainerFlag
import java.io.PrintWriter
import javax.inject.Inject
@@ -60,7 +58,6 @@ constructor(
private val mediaDataCombineLatest: MediaDataCombineLatest,
private val mediaDataFilter: MediaDataFilterImpl,
private val mediaFilterRepository: MediaFilterRepository,
- private val mediaFlags: MediaFlags,
) : MediaDataManager, CoreStartable {
/** Are there any media notifications active, including the recommendations? */
@@ -197,10 +194,8 @@ constructor(
mediaDataProcessor.setMediaResumptionEnabled(isEnabled)
}
- override fun onSwipeToDismiss() = unsupported
-
- fun onSwipeToDismiss(location: Int) {
- mediaDataFilter.onSwipeToDismiss(MediaSmartspaceLogger.getSurface(location))
+ override fun onSwipeToDismiss() {
+ mediaDataFilter.onSwipeToDismiss()
}
override fun hasActiveMediaOrRecommendation() =
@@ -218,14 +213,6 @@ constructor(
mediaFilterRepository.setOrderedMedia()
}
- fun logSmartspaceSeenCard(visibleIndex: Int, location: Int, isMediaCardUpdate: Boolean) {
- mediaFilterRepository.logSmartspaceCardSeen(
- MediaSmartspaceLogger.getSurface(location),
- visibleIndex,
- isMediaCardUpdate,
- )
- }
-
/** Add a listener for internal events. */
private fun addInternalListener(listener: MediaDataManager.Listener) =
mediaDataProcessor.addInternalListener(listener)
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaControlInteractor.kt b/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaControlInteractor.kt
index 09aa85b74d2a..f830a5601bae 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaControlInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaControlInteractor.kt
@@ -36,7 +36,6 @@ import com.android.systemui.media.controls.domain.pipeline.getNotificationAction
import com.android.systemui.media.controls.shared.MediaLogger
import com.android.systemui.media.controls.shared.model.MediaControlModel
import com.android.systemui.media.controls.shared.model.MediaData
-import com.android.systemui.media.controls.util.MediaSmartspaceLogger
import com.android.systemui.media.dialog.MediaOutputDialogManager
import com.android.systemui.plugins.ActivityStarter
import com.android.systemui.statusbar.NotificationLockscreenUserManager
@@ -72,10 +71,7 @@ constructor(
token: MediaSession.Token?,
instanceId: InstanceId,
delayMs: Long,
- eventId: Int,
- location: Int,
): Boolean {
- logSmartspaceUserEvent(eventId, location)
val dismissed =
mediaDataProcessor.dismissMediaData(instanceId, delayMs, userInitiated = true)
if (!dismissed) {
@@ -116,13 +112,7 @@ constructor(
activityStarter.startActivity(SETTINGS_INTENT, /* dismissShade= */ true)
}
- fun startClickIntent(
- expandable: Expandable,
- clickIntent: PendingIntent,
- eventId: Int,
- location: Int,
- ) {
- logSmartspaceUserEvent(eventId, location)
+ fun startClickIntent(expandable: Expandable, clickIntent: PendingIntent) {
if (!launchOverLockscreen(expandable, clickIntent)) {
activityStarter.postStartActivityDismissingKeyguard(
clickIntent,
@@ -197,14 +187,6 @@ constructor(
)
}
- fun logSmartspaceUserEvent(eventId: Int, location: Int) {
- repository.logSmartspaceCardUserEvent(
- eventId,
- MediaSmartspaceLogger.getSurface(location),
- instanceId = instanceId,
- )
- }
-
fun logMediaControlIsBound(artistName: CharSequence, songName: CharSequence) {
mediaLogger.logMediaControlIsBound(instanceId, artistName, songName)
}
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaRecommendationsInteractor.kt b/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaRecommendationsInteractor.kt
index 48ed3915dedd..0cb36edfd382 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaRecommendationsInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaRecommendationsInteractor.kt
@@ -31,7 +31,6 @@ import com.android.systemui.media.controls.domain.pipeline.MediaDataProcessor
import com.android.systemui.media.controls.shared.model.MediaRecModel
import com.android.systemui.media.controls.shared.model.MediaRecommendationsModel
import com.android.systemui.media.controls.shared.model.SmartspaceMediaData
-import com.android.systemui.media.controls.util.MediaSmartspaceLogger
import com.android.systemui.plugins.ActivityStarter
import java.net.URISyntaxException
import javax.inject.Inject
@@ -66,14 +65,7 @@ constructor(
.distinctUntilChanged()
.stateIn(applicationScope, SharingStarted.WhileSubscribed(), false)
- fun removeMediaRecommendations(
- key: String,
- dismissIntent: Intent?,
- delayMs: Long,
- eventId: Int,
- location: Int,
- ) {
- logSmartspaceCardUserEvent(eventId, location)
+ fun removeMediaRecommendations(key: String, dismissIntent: Intent?, delayMs: Long) {
mediaDataProcessor.dismissSmartspaceRecommendation(key, delayMs)
if (dismissIntent == null) {
Log.w(TAG, "Cannot create dismiss action click action: extras missing dismiss_intent.")
@@ -93,25 +85,7 @@ constructor(
activityStarter.startActivity(SETTINGS_INTENT, /* dismissShade= */ true)
}
- fun startClickIntent(
- expandable: Expandable,
- intent: Intent,
- eventId: Int,
- location: Int,
- interactedSubCardRank: Int,
- interactedSubCardCardinality: Int,
- ) {
- if (interactedSubCardRank == -1) {
- logSmartspaceCardUserEvent(eventId, MediaSmartspaceLogger.getSurface(location))
- } else {
- repository.logSmartspaceCardUserEvent(
- eventId,
- MediaSmartspaceLogger.getSurface(location),
- interactedSubCardRank = interactedSubCardRank,
- interactedSubCardCardinality = interactedSubCardCardinality,
- isRec = true,
- )
- }
+ fun startClickIntent(expandable: Expandable, intent: Intent) {
if (shouldActivityOpenInForeground(intent)) {
// Request to unlock the device if the activity needs to be opened in foreground.
activityStarter.postStartActivityDismissingKeyguard(
@@ -127,14 +101,6 @@ constructor(
}
}
- private fun logSmartspaceCardUserEvent(eventId: Int, location: Int) {
- repository.logSmartspaceCardUserEvent(
- eventId,
- MediaSmartspaceLogger.getSurface(location),
- isRec = true,
- )
- }
-
/** Returns if the action will open the activity in foreground. */
private fun shouldActivityOpenInForeground(intent: Intent): Boolean {
val intentString = intent.extras?.getString(EXTRAS_SMARTSPACE_INTENT) ?: return false
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/shared/model/MediaData.kt b/packages/SystemUI/src/com/android/systemui/media/controls/shared/model/MediaData.kt
index aed86090ef01..90fa6fd44dfa 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/shared/model/MediaData.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/shared/model/MediaData.kt
@@ -99,12 +99,6 @@ data class MediaData(
/** Track progress (0 - 1) to display for players where [resumption] is true */
val resumeProgress: Double? = null,
-
- /** Smartspace Id, used for logging. */
- var smartspaceId: Int = -1,
-
- /** If media card was visible to user, used for logging. */
- var isImpressed: Boolean = false,
) {
companion object {
/** Media is playing on the local device */
@@ -135,7 +129,7 @@ data class MediaButton(
/** Whether to reserve the empty space when the nextOrCustom is null */
val reserveNext: Boolean = false,
/** Whether to reserve the empty space when the prevOrCustom is null */
- val reservePrev: Boolean = false
+ val reservePrev: Boolean = false,
) {
fun getActionById(id: Int): MediaAction? {
return when (id) {
@@ -159,7 +153,7 @@ data class MediaAction(
// Rebind Id is used to detect identical rebinds and ignore them. It is intended
// to prevent continuously looping animations from restarting due to the arrival
// of repeated media notifications that are visually identical.
- val rebindId: Int? = null
+ val rebindId: Int? = null,
)
/** State of a media action from notification. */
@@ -167,7 +161,7 @@ data class MediaNotificationAction(
val isAuthenticationRequired: Boolean,
val actionIntent: PendingIntent?,
val icon: Drawable?,
- val contentDescription: CharSequence?
+ val contentDescription: CharSequence?,
)
/** State of the media device. */
@@ -190,7 +184,7 @@ constructor(
val id: String? = null,
/** Whether or not to show the broadcast button */
- val showBroadcastButton: Boolean
+ val showBroadcastButton: Boolean,
) {
/**
* Check whether [MediaDeviceData] objects are equal in all fields except the icon. The icon is
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/shared/model/SmartspaceMediaData.kt b/packages/SystemUI/src/com/android/systemui/media/controls/shared/model/SmartspaceMediaData.kt
index 96c3fa8fbc89..c0e1d95a1b2c 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/shared/model/SmartspaceMediaData.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/shared/model/SmartspaceMediaData.kt
@@ -48,8 +48,6 @@ data class SmartspaceMediaData(
val instanceId: InstanceId? = null,
/** The timestamp in milliseconds indicating when the card should be removed */
val expiryTimeMs: Long = 0L,
- /** If recommendation card was visible to user, used for logging. */
- var isImpressed: Boolean = false,
) {
/**
* Indicates if all the data is valid.
@@ -81,7 +79,7 @@ data class SmartspaceMediaData(
Log.w(
TAG,
"Package $packageName does not have a main launcher activity. " +
- "Fallback to full app name"
+ "Fallback to full app name",
)
return try {
val applicationInfo = packageManager.getApplicationInfo(packageName, /* flags= */ 0)
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt
index bfd48c825424..7b1ae57ed421 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt
@@ -62,7 +62,6 @@ import com.android.systemui.media.controls.shared.model.MediaData
import com.android.systemui.media.controls.shared.model.SmartspaceMediaData
import com.android.systemui.media.controls.ui.binder.MediaControlViewBinder
import com.android.systemui.media.controls.ui.binder.MediaRecommendationsViewBinder
-import com.android.systemui.media.controls.ui.controller.MediaControlPanel.SMARTSPACE_CARD_DISMISS_EVENT
import com.android.systemui.media.controls.ui.util.MediaViewModelCallback
import com.android.systemui.media.controls.ui.util.MediaViewModelListUpdateCallback
import com.android.systemui.media.controls.ui.view.MediaCarouselScrollHandler
@@ -72,21 +71,13 @@ import com.android.systemui.media.controls.ui.view.MediaViewHolder
import com.android.systemui.media.controls.ui.view.RecommendationViewHolder
import com.android.systemui.media.controls.ui.viewmodel.MediaCarouselViewModel
import com.android.systemui.media.controls.ui.viewmodel.MediaCommonViewModel
-import com.android.systemui.media.controls.util.MediaFlags
import com.android.systemui.media.controls.util.MediaUiEventLogger
-import com.android.systemui.media.controls.util.SmallHash
import com.android.systemui.plugins.ActivityStarter
import com.android.systemui.plugins.FalsingManager
import com.android.systemui.qs.PageIndicator
import com.android.systemui.res.R
import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.scene.shared.model.Scenes
-import com.android.systemui.shared.system.SysUiStatsLog
-import com.android.systemui.shared.system.SysUiStatsLog.SMARTSPACE_CARD_REPORTED
-import com.android.systemui.shared.system.SysUiStatsLog.SMART_SPACE_CARD_REPORTED__CARD_TYPE__UNKNOWN_CARD
-import com.android.systemui.shared.system.SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__DREAM_OVERLAY as SSPACE_CARD_REPORTED__DREAM_OVERLAY
-import com.android.systemui.shared.system.SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__LOCKSCREEN as SSPACE_CARD_REPORTED__LOCKSCREEN
-import com.android.systemui.shared.system.SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__SHADE
import com.android.systemui.statusbar.featurepods.media.domain.interactor.MediaControlChipInteractor
import com.android.systemui.statusbar.notification.collection.provider.OnReorderingAllowedListener
import com.android.systemui.statusbar.notification.collection.provider.VisualStabilityProvider
@@ -148,7 +139,6 @@ constructor(
dumpManager: DumpManager,
private val logger: MediaUiEventLogger,
private val debugLogger: MediaCarouselControllerLogger,
- private val mediaFlags: MediaFlags,
private val keyguardUpdateMonitor: KeyguardUpdateMonitor,
private val keyguardTransitionInteractor: KeyguardTransitionInteractor,
private val globalSettings: GlobalSettings,
@@ -359,7 +349,6 @@ constructor(
this::updateSeekbarListening,
this::closeGuts,
falsingManager,
- this::logSmartspaceImpression,
logger,
)
carouselLocale = context.resources.configuration.locales.get(0)
@@ -471,64 +460,7 @@ constructor(
} else {
null
}
- if (addOrUpdatePlayer(key, oldKey, data, isSsReactivated, onUiExecutionEnd)) {
- // Log card received if a new resumable media card is added
- MediaPlayerData.getMediaPlayer(key)?.let {
- logSmartspaceCardReported(
- 759, // SMARTSPACE_CARD_RECEIVED
- it.mSmartspaceId,
- it.mUid,
- surfaces =
- intArrayOf(
- SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__SHADE,
- SSPACE_CARD_REPORTED__LOCKSCREEN,
- SSPACE_CARD_REPORTED__DREAM_OVERLAY,
- ),
- rank = MediaPlayerData.getMediaPlayerIndex(key),
- )
- }
- if (
- mediaCarouselScrollHandler.visibleToUser &&
- mediaCarouselScrollHandler.visibleMediaIndex ==
- MediaPlayerData.getMediaPlayerIndex(key)
- ) {
- logSmartspaceImpression(mediaCarouselScrollHandler.qsExpanded)
- }
- } else if (receivedSmartspaceCardLatency != 0) {
- // Log resume card received if resumable media card is reactivated and
- // resume card is ranked first
- MediaPlayerData.players().forEachIndexed { index, it ->
- if (it.recommendationViewHolder == null) {
- it.mSmartspaceId =
- SmallHash.hash(
- it.mUid + systemClock.currentTimeMillis().toInt()
- )
- it.mIsImpressed = false
-
- logSmartspaceCardReported(
- 759, // SMARTSPACE_CARD_RECEIVED
- it.mSmartspaceId,
- it.mUid,
- surfaces =
- intArrayOf(
- SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__SHADE,
- SSPACE_CARD_REPORTED__LOCKSCREEN,
- SSPACE_CARD_REPORTED__DREAM_OVERLAY,
- ),
- rank = index,
- receivedLatencyMillis = receivedSmartspaceCardLatency,
- )
- }
- }
- // If media container area already visible to the user, log impression for
- // reactivated card.
- if (
- mediaCarouselScrollHandler.visibleToUser &&
- !mediaCarouselScrollHandler.qsExpanded
- ) {
- logSmartspaceImpression(mediaCarouselScrollHandler.qsExpanded)
- }
- }
+ addOrUpdatePlayer(key, oldKey, data, isSsReactivated, onUiExecutionEnd)
val canRemove = data.isPlaying?.let { !it } ?: data.isClearable && !data.active
if (canRemove && !Utils.useMediaResumption(context)) {
@@ -555,66 +487,7 @@ constructor(
// Log the case where the hidden media carousel with the existed inactive resume
// media is shown by the Smartspace signal.
if (data.isActive) {
- val hasActivatedExistedResumeMedia =
- !mediaManager.hasActiveMedia() &&
- mediaManager.hasAnyMedia() &&
- shouldPrioritize
- if (hasActivatedExistedResumeMedia) {
- // Log resume card received if resumable media card is reactivated and
- // recommendation card is valid and ranked first
- MediaPlayerData.players().forEachIndexed { index, it ->
- if (it.recommendationViewHolder == null) {
- it.mSmartspaceId =
- SmallHash.hash(
- it.mUid + systemClock.currentTimeMillis().toInt()
- )
- it.mIsImpressed = false
-
- logSmartspaceCardReported(
- 759, // SMARTSPACE_CARD_RECEIVED
- it.mSmartspaceId,
- it.mUid,
- surfaces =
- intArrayOf(
- SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__SHADE,
- SSPACE_CARD_REPORTED__LOCKSCREEN,
- SSPACE_CARD_REPORTED__DREAM_OVERLAY,
- ),
- rank = index,
- receivedLatencyMillis =
- (systemClock.currentTimeMillis() -
- data.headphoneConnectionTimeMillis)
- .toInt(),
- )
- }
- }
- }
addSmartspaceMediaRecommendations(key, data, shouldPrioritize)
- MediaPlayerData.getMediaPlayer(key)?.let {
- logSmartspaceCardReported(
- 759, // SMARTSPACE_CARD_RECEIVED
- it.mSmartspaceId,
- it.mUid,
- surfaces =
- intArrayOf(
- SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__SHADE,
- SSPACE_CARD_REPORTED__LOCKSCREEN,
- SSPACE_CARD_REPORTED__DREAM_OVERLAY,
- ),
- rank = MediaPlayerData.getMediaPlayerIndex(key),
- receivedLatencyMillis =
- (systemClock.currentTimeMillis() -
- data.headphoneConnectionTimeMillis)
- .toInt(),
- )
- }
- if (
- mediaCarouselScrollHandler.visibleToUser &&
- mediaCarouselScrollHandler.visibleMediaIndex ==
- MediaPlayerData.getMediaPlayerIndex(key)
- ) {
- logSmartspaceImpression(mediaCarouselScrollHandler.qsExpanded)
- }
} else {
// Handle update to inactive as a removal
onSmartspaceMediaDataRemoved(data.targetId, immediately = true)
@@ -799,7 +672,6 @@ constructor(
controllerById[commonViewModel.key] = viewController
}
}
- onAddOrUpdateVisibleToUserCard(position, isMediaCardUpdate = false)
viewController.setListening(mediaCarouselScrollHandler.visibleToUser && currentlyExpanded)
updateViewControllerToState(viewController, noAnimation = true)
updatePageIndicator()
@@ -820,10 +692,6 @@ constructor(
commonViewModel.onUpdated(commonViewModel)
updatePageIndicator()
mediaCarouselScrollHandler.onPlayersChanged()
- onAddOrUpdateVisibleToUserCard(
- position,
- commonViewModel is MediaCommonViewModel.MediaControl,
- )
}
private fun onRemoved(commonViewModel: MediaCommonViewModel) {
@@ -870,20 +738,6 @@ constructor(
mediaCarouselScrollHandler.onPlayersChanged()
}
- private fun onAddOrUpdateVisibleToUserCard(position: Int, isMediaCardUpdate: Boolean) {
- if (
- mediaCarouselScrollHandler.visibleToUser &&
- mediaCarouselScrollHandler.visibleMediaIndex == position
- ) {
- mediaCarouselViewModel.onCardVisibleToUser(
- mediaCarouselScrollHandler.qsExpanded,
- mediaCarouselScrollHandler.visibleMediaIndex,
- currentEndLocation,
- isMediaCardUpdate,
- )
- }
- }
-
private fun setNewViewModelsList(viewModels: List<MediaCommonViewModel>) {
commonViewModels.clear()
commonViewModels.addAll(viewModels)
@@ -978,8 +832,7 @@ constructor(
// In RTL, Scroll to the first player as it is the rightmost player in media carousel.
mediaCarouselScrollHandler.scrollToPlayer(destIndex = 0)
}
- // Check postcondition: mediaContent should have the same number of children as there
- // are
+ // Check postcondition: mediaContent should have the same number of children as there are
// elements in mediaPlayers.
if (MediaPlayerData.players().size != mediaContent.childCount) {
Log.e(
@@ -1177,8 +1030,7 @@ constructor(
updatePageIndicator()
mediaFrame.requiresRemeasuring = true
// Check postcondition: mediaContent should have the same number of children as there
- // are
- // elements in mediaPlayers.
+ // are elements in mediaPlayers.
if (MediaPlayerData.players().size != mediaContent.childCount) {
Log.e(
TAG,
@@ -1588,145 +1440,12 @@ constructor(
}
}
- /** Log the user impression for media card at visibleMediaIndex. */
- fun logSmartspaceImpression(qsExpanded: Boolean) {
- if (SceneContainerFlag.isEnabled) {
- mediaCarouselViewModel.onCardVisibleToUser(
- qsExpanded,
- mediaCarouselScrollHandler.visibleMediaIndex,
- currentEndLocation,
- )
- return
- }
- val visibleMediaIndex = mediaCarouselScrollHandler.visibleMediaIndex
- if (MediaPlayerData.players().size > visibleMediaIndex) {
- val mediaControlPanel = MediaPlayerData.getMediaControlPanel(visibleMediaIndex)
- val hasActiveMediaOrRecommendationCard =
- MediaPlayerData.hasActiveMediaOrRecommendationCard()
- if (!hasActiveMediaOrRecommendationCard && !qsExpanded) {
- // Skip logging if on LS or QQS, and there is no active media card
- return
- }
- mediaControlPanel?.let {
- logSmartspaceCardReported(
- 800, // SMARTSPACE_CARD_SEEN
- it.mSmartspaceId,
- it.mUid,
- intArrayOf(it.surfaceForSmartspaceLogging),
- )
- it.mIsImpressed = true
- }
- }
- }
-
- /**
- * Log Smartspace events
- *
- * @param eventId UI event id (e.g. 800 for SMARTSPACE_CARD_SEEN)
- * @param instanceId id to uniquely identify a card, e.g. each headphone generates a new
- * instanceId
- * @param uid uid for the application that media comes from
- * @param surfaces list of display surfaces the media card is on (e.g. lockscreen, shade) when
- * the event happened
- * @param interactedSubcardRank the rank for interacted media item for recommendation card, -1
- * for tapping on card but not on any media item, 0 for first media item, 1 for second, etc.
- * @param interactedSubcardCardinality how many media items were shown to the user when there is
- * user interaction
- * @param rank the rank for media card in the media carousel, starting from 0
- * @param receivedLatencyMillis latency in milliseconds for card received events. E.g. latency
- * between headphone connection to sysUI displays media recommendation card
- * @param isSwipeToDismiss whether is to log swipe-to-dismiss event
- */
- @JvmOverloads
- fun logSmartspaceCardReported(
- eventId: Int,
- instanceId: Int,
- uid: Int,
- surfaces: IntArray,
- interactedSubcardRank: Int = 0,
- interactedSubcardCardinality: Int = 0,
- rank: Int = mediaCarouselScrollHandler.visibleMediaIndex,
- receivedLatencyMillis: Int = 0,
- isSwipeToDismiss: Boolean = false,
- ) {
- if (MediaPlayerData.players().size <= rank) {
- return
- }
-
- val mediaControlKey = MediaPlayerData.visiblePlayerKeys().elementAt(rank)
- // Only log media resume card when Smartspace data is available
- if (
- !mediaControlKey.isSsMediaRec &&
- !mediaManager.isRecommendationActive() &&
- MediaPlayerData.smartspaceMediaData == null
- ) {
- return
- }
-
- val cardinality = mediaContent.getChildCount()
- surfaces.forEach { surface ->
- SysUiStatsLog.write(
- SMARTSPACE_CARD_REPORTED,
- eventId,
- instanceId,
- // Deprecated, replaced with AiAi feature type so we don't need to create logging
- // card type for each new feature.
- SMART_SPACE_CARD_REPORTED__CARD_TYPE__UNKNOWN_CARD,
- surface,
- // Use -1 as rank value to indicate user swipe to dismiss the card
- if (isSwipeToDismiss) -1 else rank,
- cardinality,
- if (mediaControlKey.isSsMediaRec) {
- 15 // MEDIA_RECOMMENDATION
- } else if (mediaControlKey.isSsReactivated) {
- 43 // MEDIA_RESUME_SS_ACTIVATED
- } else {
- 31
- }, // MEDIA_RESUME
- uid,
- interactedSubcardRank,
- interactedSubcardCardinality,
- receivedLatencyMillis,
- null, // Media cards cannot have subcards.
- null, // Media cards don't have dimensions today.
- )
-
- if (DEBUG) {
- Log.d(
- TAG,
- "Log Smartspace card event id: $eventId instance id: $instanceId" +
- " surface: $surface rank: $rank cardinality: $cardinality " +
- "isRecommendationCard: ${mediaControlKey.isSsMediaRec} " +
- "isSsReactivated: ${mediaControlKey.isSsReactivated}" +
- "uid: $uid " +
- "interactedSubcardRank: $interactedSubcardRank " +
- "interactedSubcardCardinality: $interactedSubcardCardinality " +
- "received_latency_millis: $receivedLatencyMillis",
- )
- }
- }
- }
-
@VisibleForTesting
fun onSwipeToDismiss() {
if (SceneContainerFlag.isEnabled) {
- mediaCarouselViewModel.onSwipeToDismiss(currentEndLocation)
+ mediaCarouselViewModel.onSwipeToDismiss()
return
}
- MediaPlayerData.players().forEachIndexed { index, it ->
- if (it.mIsImpressed) {
- logSmartspaceCardReported(
- SMARTSPACE_CARD_DISMISS_EVENT,
- it.mSmartspaceId,
- it.mUid,
- intArrayOf(it.surfaceForSmartspaceLogging),
- rank = index,
- isSwipeToDismiss = true,
- )
- // Reset card impressed state when swipe to dismissed
- it.mIsImpressed = false
- }
- }
MediaPlayerData.isSwipedAway = true
logger.logSwipeDismiss()
mediaManager.onSwipeToDismiss()
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaControlPanel.java b/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaControlPanel.java
index 694a4c7e493d..a6bf5f43698b 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaControlPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaControlPanel.java
@@ -117,7 +117,6 @@ import com.android.systemui.media.controls.ui.view.RecommendationViewHolder;
import com.android.systemui.media.controls.ui.viewmodel.SeekBarViewModel;
import com.android.systemui.media.controls.util.MediaDataUtils;
import com.android.systemui.media.controls.util.MediaUiEventLogger;
-import com.android.systemui.media.controls.util.SmallHash;
import com.android.systemui.media.dialog.MediaOutputDialogManager;
import com.android.systemui.monet.ColorScheme;
import com.android.systemui.monet.Style;
@@ -125,7 +124,6 @@ import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.res.R;
import com.android.systemui.scene.shared.flag.SceneContainerFlag;
-import com.android.systemui.shared.system.SysUiStatsLog;
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.surfaceeffects.PaintDrawCallback;
@@ -174,10 +172,6 @@ public class MediaControlPanel {
private static final String KEY_SMARTSPACE_ARTIST_NAME = "artist_name";
private static final String KEY_SMARTSPACE_OPEN_IN_FOREGROUND = "KEY_OPEN_IN_FOREGROUND";
- // Event types logged by smartspace
- private static final int SMARTSPACE_CARD_CLICK_EVENT = 760;
- protected static final int SMARTSPACE_CARD_DISMISS_EVENT = 761;
-
private static final float REC_MEDIA_COVER_SCALE_FACTOR = 1.25f;
private static final float MEDIA_REC_SCRIM_START_ALPHA = 0.15f;
private static final float MEDIA_REC_SCRIM_END_ALPHA = 1.0f;
@@ -247,11 +241,9 @@ public class MediaControlPanel {
private final NotificationLockscreenUserManager mLockscreenUserManager;
// Used for logging.
- protected boolean mIsImpressed = false;
private SystemClock mSystemClock;
private MediaUiEventLogger mLogger;
private InstanceId mInstanceId;
- protected int mSmartspaceId = -1;
private String mPackageName;
private boolean mIsScrubbing = false;
@@ -350,7 +342,6 @@ public class MediaControlPanel {
if (mPackageName != null && mInstanceId != null) {
mLogger.logSeek(mUid, mPackageName, mInstanceId);
}
- logSmartspaceCardReported(SMARTSPACE_CARD_CLICK_EVENT);
return Unit.INSTANCE;
});
@@ -565,10 +556,6 @@ public class MediaControlPanel {
MediaSession.Token token = data.getToken();
mPackageName = data.getPackageName();
mUid = data.getAppUid();
- // Only assigns instance id if it's unassigned.
- if (mSmartspaceId == -1) {
- mSmartspaceId = SmallHash.hash(mUid + (int) mSystemClock.currentTimeMillis());
- }
mInstanceId = data.getInstanceId();
if (mToken == null || !mToken.equals(token)) {
@@ -588,7 +575,6 @@ public class MediaControlPanel {
if (mFalsingManager.isFalseTap(FalsingManager.LOW_PENALTY)) return;
if (mMediaViewController.isGutsVisible()) return;
mLogger.logTapContentView(mUid, mPackageName, mInstanceId);
- logSmartspaceCardReported(SMARTSPACE_CARD_CLICK_EVENT);
boolean showOverLockscreen = mKeyguardStateController.isShowing()
&& mActivityIntentHelper.wouldPendingShowOverLockscreen(clickIntent,
@@ -1289,7 +1275,6 @@ public class MediaControlPanel {
button.setOnClickListener(v -> {
if (!mFalsingManager.isFalseTap(FalsingManager.MODERATE_PENALTY)) {
mLogger.logTapAction(button.getId(), mUid, mPackageName, mInstanceId);
- logSmartspaceCardReported(SMARTSPACE_CARD_CLICK_EVENT);
// Used to determine whether to play turbulence noise.
mWasPlaying = isPlaying();
mButtonClicked = true;
@@ -1497,7 +1482,6 @@ public class MediaControlPanel {
}
mRecommendationData = data;
- mSmartspaceId = SmallHash.hash(data.getTargetId());
mPackageName = data.getPackageName();
mInstanceId = data.getInstanceId();
@@ -1752,7 +1736,6 @@ public class MediaControlPanel {
gutsViewHolder.getDismiss().setEnabled(isDismissible);
gutsViewHolder.getDismiss().setOnClickListener(v -> {
if (mFalsingManager.isFalseTap(FalsingManager.LOW_PENALTY)) return;
- logSmartspaceCardReported(SMARTSPACE_CARD_DISMISS_EVENT);
mLogger.logLongPressDismiss(mUid, mPackageName, mInstanceId);
onDismissClickedRunnable.run();
@@ -1932,9 +1915,6 @@ public class MediaControlPanel {
} else {
mLogger.logRecommendationItemTap(mPackageName, mInstanceId, interactedSubcardRank);
}
- logSmartspaceCardReported(SMARTSPACE_CARD_CLICK_EVENT,
- interactedSubcardRank,
- mSmartspaceMediaItemsCount);
if (shouldSmartspaceRecItemOpenInForeground(action)) {
// Request to unlock the device if the activity needs to be opened in foreground.
@@ -1975,39 +1955,5 @@ public class MediaControlPanel {
return false;
}
-
- /**
- * Get the surface given the current end location for MediaViewController
- *
- * @return surface used for Smartspace logging
- */
- protected int getSurfaceForSmartspaceLogging() {
- int currentEndLocation = mMediaViewController.getCurrentEndLocation();
- if (currentEndLocation == MediaHierarchyManager.LOCATION_QQS
- || currentEndLocation == MediaHierarchyManager.LOCATION_QS) {
- return SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__SHADE;
- } else if (currentEndLocation == MediaHierarchyManager.LOCATION_LOCKSCREEN) {
- return SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__LOCKSCREEN;
- } else if (currentEndLocation == MediaHierarchyManager.LOCATION_DREAM_OVERLAY) {
- return SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__DREAM_OVERLAY;
- }
- return SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__DEFAULT_SURFACE;
- }
-
- private void logSmartspaceCardReported(int eventId) {
- logSmartspaceCardReported(eventId,
- /* interactedSubcardRank */ 0,
- /* interactedSubcardCardinality */ 0);
- }
-
- private void logSmartspaceCardReported(int eventId,
- int interactedSubcardRank, int interactedSubcardCardinality) {
- mMediaCarouselController.logSmartspaceCardReported(eventId,
- mSmartspaceId,
- mUid,
- new int[]{getSurfaceForSmartspaceLogging()},
- interactedSubcardRank,
- interactedSubcardCardinality);
- }
}
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaHierarchyManager.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaHierarchyManager.kt
index f06c4cce0daa..c6894082f1c8 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaHierarchyManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaHierarchyManager.kt
@@ -286,10 +286,6 @@ constructor(
field = value
mediaCarouselController.mediaCarouselScrollHandler.qsExpanded = value
}
- // qs is expanded on LS shade and HS shade
- if (value && (isLockScreenShadeVisibleToUser() || isHomeScreenShadeVisibleToUser())) {
- mediaCarouselController.logSmartspaceImpression(value)
- }
updateUserVisibility()
}
@@ -520,12 +516,6 @@ constructor(
override fun onStateChanged(newState: Int) {
updateTargetState()
- // Enters shade from lock screen
- if (
- newState == StatusBarState.SHADE_LOCKED && isLockScreenShadeVisibleToUser()
- ) {
- mediaCarouselController.logSmartspaceImpression(qsExpanded)
- }
updateUserVisibility()
}
@@ -536,10 +526,6 @@ constructor(
override fun onDozingChanged(isDozing: Boolean) {
if (!isDozing) {
dozeAnimationRunning = false
- // Enters lock screen from screen off
- if (isLockScreenVisibleToUser()) {
- mediaCarouselController.logSmartspaceImpression(qsExpanded)
- }
} else {
updateDesiredLocation()
qsExpanded = false
@@ -549,10 +535,6 @@ constructor(
}
override fun onExpandedChanged(isExpanded: Boolean) {
- // Enters shade from home screen
- if (isHomeScreenShadeVisibleToUser()) {
- mediaCarouselController.logSmartspaceImpression(qsExpanded)
- }
updateUserVisibility()
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/view/MediaCarouselScrollHandler.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/view/MediaCarouselScrollHandler.kt
index 0107a5278e3e..9cf4a7b3a007 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/view/MediaCarouselScrollHandler.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/view/MediaCarouselScrollHandler.kt
@@ -64,7 +64,6 @@ class MediaCarouselScrollHandler(
private var seekBarUpdateListener: (visibleToUser: Boolean) -> Unit,
private val closeGuts: (immediate: Boolean) -> Unit,
private val falsingManager: FalsingManager,
- private val logSmartspaceImpression: (Boolean) -> Unit,
private val logger: MediaUiEventLogger,
) {
/** Trace state logger for media carousel visibility */
@@ -480,7 +479,6 @@ class MediaCarouselScrollHandler(
val oldIndex = visibleMediaIndex
visibleMediaIndex = newIndex
if (oldIndex != visibleMediaIndex && visibleToUser) {
- logSmartspaceImpression(qsExpanded)
logger.logMediaCarouselPage(newIndex)
}
closeGuts(false)
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModel.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModel.kt
index 4bdcfea6485e..e5f1766fbb28 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModel.kt
@@ -25,7 +25,6 @@ import com.android.systemui.media.controls.domain.pipeline.interactor.MediaCarou
import com.android.systemui.media.controls.domain.pipeline.interactor.factory.MediaControlInteractorFactory
import com.android.systemui.media.controls.shared.MediaLogger
import com.android.systemui.media.controls.shared.model.MediaCommonModel
-import com.android.systemui.media.controls.util.MediaFlags
import com.android.systemui.media.controls.util.MediaUiEventLogger
import com.android.systemui.statusbar.notification.collection.provider.VisualStabilityProvider
import com.android.systemui.util.Utils
@@ -52,7 +51,6 @@ constructor(
private val controlInteractorFactory: MediaControlInteractorFactory,
private val recommendationsViewModel: MediaRecommendationsViewModel,
private val logger: MediaUiEventLogger,
- private val mediaFlags: MediaFlags,
private val mediaLogger: MediaLogger,
) {
@@ -103,9 +101,9 @@ constructor(
private var allowReorder = false
- fun onSwipeToDismiss(location: Int) {
+ fun onSwipeToDismiss() {
logger.logSwipeDismiss()
- interactor.onSwipeToDismiss(location)
+ interactor.onSwipeToDismiss()
}
fun onReorderingAllowed() {
@@ -113,17 +111,6 @@ constructor(
interactor.reorderMedia()
}
- fun onCardVisibleToUser(
- qsExpanded: Boolean,
- visibleIndex: Int,
- location: Int,
- isUpdate: Boolean = false,
- ) {
- // Skip logging if on LS or QQS, and there is no active media card
- if (!qsExpanded && !interactor.hasActiveMediaOrRecommendation()) return
- interactor.logSmartspaceSeenCard(visibleIndex, location, isUpdate)
- }
-
private fun toViewModel(
commonModel: MediaCommonModel.MediaControl
): MediaCommonViewModel.MediaControl {
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaControlViewModel.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaControlViewModel.kt
index bcda485272c2..015274a10330 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaControlViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaControlViewModel.kt
@@ -35,8 +35,6 @@ import com.android.systemui.media.controls.shared.model.MediaButton
import com.android.systemui.media.controls.shared.model.MediaControlModel
import com.android.systemui.media.controls.ui.controller.MediaHierarchyManager
import com.android.systemui.media.controls.ui.controller.MediaLocation
-import com.android.systemui.media.controls.util.MediaSmartspaceLogger.Companion.SMARTSPACE_CARD_CLICK_EVENT
-import com.android.systemui.media.controls.util.MediaSmartspaceLogger.Companion.SMARTSPACE_CARD_DISMISS_EVENT
import com.android.systemui.media.controls.util.MediaUiEventLogger
import com.android.systemui.res.R
import java.util.concurrent.Executor
@@ -90,13 +88,7 @@ class MediaControlViewModel(
instanceId: InstanceId,
) {
logger.logLongPressDismiss(uid, packageName, instanceId)
- interactor.removeMediaControl(
- token,
- instanceId,
- MEDIA_PLAYER_ANIMATION_DELAY,
- SMARTSPACE_CARD_DISMISS_EVENT,
- location,
- )
+ interactor.removeMediaControl(token, instanceId, MEDIA_PLAYER_ANIMATION_DELAY)
}
private fun toViewModel(model: MediaControlModel): MediaPlayerViewModel {
@@ -141,21 +133,13 @@ class MediaControlViewModel(
onClicked = { expandable ->
model.clickIntent?.let { clickIntent ->
logger.logTapContentView(model.uid, model.packageName, model.instanceId)
- interactor.startClickIntent(
- expandable,
- clickIntent,
- SMARTSPACE_CARD_CLICK_EVENT,
- location,
- )
+ interactor.startClickIntent(expandable, clickIntent)
}
},
onLongClicked = {
logger.logLongPressOpen(model.uid, model.packageName, model.instanceId)
},
- onSeek = {
- logger.logSeek(model.uid, model.packageName, model.instanceId)
- interactor.logSmartspaceUserEvent(SMARTSPACE_CARD_CLICK_EVENT, location)
- },
+ onSeek = { logger.logSeek(model.uid, model.packageName, model.instanceId) },
onBindSeekbar = { seekBarViewModel ->
if (model.isResume && model.resumeProgress != null) {
seekBarViewModel.updateStaticProgress(model.resumeProgress)
@@ -366,7 +350,6 @@ class MediaControlViewModel(
action: Runnable,
) {
logger.logTapAction(id, uid, packageName, instanceId)
- interactor.logSmartspaceUserEvent(SMARTSPACE_CARD_CLICK_EVENT, location)
isAnyButtonClicked = true
action.run()
}
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaRecommendationsViewModel.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaRecommendationsViewModel.kt
index 88cfbaf00987..90313ddc736e 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaRecommendationsViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaRecommendationsViewModel.kt
@@ -30,13 +30,10 @@ import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.media.controls.domain.pipeline.interactor.MediaRecommendationsInteractor
import com.android.systemui.media.controls.shared.model.MediaRecModel
import com.android.systemui.media.controls.shared.model.MediaRecommendationsModel
-import com.android.systemui.media.controls.shared.model.NUM_REQUIRED_RECOMMENDATIONS
import com.android.systemui.media.controls.ui.controller.MediaHierarchyManager
import com.android.systemui.media.controls.ui.controller.MediaLocation
import com.android.systemui.media.controls.ui.controller.MediaViewController.Companion.GUTS_ANIMATION_DURATION
import com.android.systemui.media.controls.util.MediaDataUtils
-import com.android.systemui.media.controls.util.MediaSmartspaceLogger.Companion.SMARTSPACE_CARD_CLICK_EVENT
-import com.android.systemui.media.controls.util.MediaSmartspaceLogger.Companion.SMARTSPACE_CARD_DISMISS_EVENT
import com.android.systemui.media.controls.util.MediaUiEventLogger
import com.android.systemui.res.R
import javax.inject.Inject
@@ -77,13 +74,7 @@ constructor(
instanceId: InstanceId?,
) {
logger.logLongPressDismiss(uid, packageName, instanceId)
- interactor.removeMediaRecommendations(
- key,
- dismissIntent,
- GUTS_DISMISS_DELAY_MS_DURATION,
- SMARTSPACE_CARD_DISMISS_EVENT,
- location,
- )
+ interactor.removeMediaRecommendations(key, dismissIntent, GUTS_DISMISS_DELAY_MS_DURATION)
}
private fun onClicked(
@@ -107,14 +98,7 @@ constructor(
// set the package name of the player added by recommendation once the media is loaded.
interactor.switchToMediaControl(packageName)
- interactor.startClickIntent(
- expandable,
- intent,
- SMARTSPACE_CARD_CLICK_EVENT,
- location,
- index,
- NUM_REQUIRED_RECOMMENDATIONS,
- )
+ interactor.startClickIntent(expandable, intent)
}
private suspend fun toRecsViewModel(model: MediaRecommendationsModel): MediaRecsCardViewModel? {
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/util/MediaSmartspaceLogger.kt b/packages/SystemUI/src/com/android/systemui/media/controls/util/MediaSmartspaceLogger.kt
deleted file mode 100644
index 9c59aa2729b1..000000000000
--- a/packages/SystemUI/src/com/android/systemui/media/controls/util/MediaSmartspaceLogger.kt
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * 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 com.android.systemui.media.controls.util
-
-import android.util.Log
-import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.media.controls.ui.controller.MediaHierarchyManager
-import com.android.systemui.scene.shared.flag.SceneContainerFlag
-import com.android.systemui.shared.system.SysUiStatsLog
-import javax.inject.Inject
-
-/** Logger class for Smartspace logging events. */
-@SysUISingleton
-class MediaSmartspaceLogger @Inject constructor() {
- /**
- * Log Smartspace card received event
- *
- * @param instanceId id to uniquely identify a card.
- * @param uid uid for the application that media comes from.
- * @param cardinality number of card in carousel.
- * @param isRecommendationCard whether media card being logged is a recommendations card.
- * @param isSsReactivated indicates resume media card is reactivated by Smartspace
- * recommendation signal
- * @param rank the rank for media card in the media carousel, starting from 0
- * @param receivedLatencyMillis latency in milliseconds for card received events.
- */
- fun logSmartspaceCardReceived(
- instanceId: Int,
- uid: Int,
- cardinality: Int,
- isRecommendationCard: Boolean = false,
- isSsReactivated: Boolean = false,
- rank: Int = 0,
- receivedLatencyMillis: Int = 0,
- ) {
- logSmartspaceCardReported(
- SMARTSPACE_CARD_RECEIVED_EVENT,
- instanceId,
- uid,
- surfaces =
- intArrayOf(
- SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__SHADE,
- SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__LOCKSCREEN,
- SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__DREAM_OVERLAY,
- ),
- cardinality,
- isRecommendationCard,
- isSsReactivated,
- rank = rank,
- receivedLatencyMillis = receivedLatencyMillis,
- )
- }
-
- /**
- * Log Smartspace card UI event
- *
- * @param eventId id of the event. eg: dismiss, click, or seen.
- * @param instanceId id to uniquely identify a card.
- * @param uid uid for the application that media comes from.
- * @param surface location of media carousel holding media card.
- * @param cardinality number of card in carousel.
- * @param isRecommendationCard whether media card being logged is a recommendations card.
- * @param isSsReactivated indicates resume media card is reactivated by Smartspace
- * recommendation signal
- * @param rank the rank for media card in the media carousel, starting from 0
- * @param isSwipeToDismiss whether is to log swipe-to-dismiss event
- */
- fun logSmartspaceCardUIEvent(
- eventId: Int,
- instanceId: Int,
- uid: Int,
- surface: Int,
- cardinality: Int,
- isRecommendationCard: Boolean = false,
- isSsReactivated: Boolean = false,
- interactedSubcardRank: Int = 0,
- interactedSubcardCardinality: Int = 0,
- rank: Int = 0,
- isSwipeToDismiss: Boolean = false,
- ) {
- logSmartspaceCardReported(
- eventId,
- instanceId,
- uid,
- surfaces = intArrayOf(surface),
- cardinality,
- isRecommendationCard,
- isSsReactivated,
- interactedSubcardRank,
- interactedSubcardCardinality,
- rank = rank,
- isSwipeToDismiss = isSwipeToDismiss,
- )
- }
-
- /**
- * Log Smartspace events
- *
- * @param eventId UI event id (e.g. 800 for SMARTSPACE_CARD_SEEN)
- * @param instanceId id to uniquely identify a card, e.g. each headphone generates a new
- * instanceId
- * @param uid uid for the application that media comes from
- * @param surfaces list of display surfaces the media card is on (e.g. lockscreen, shade) when
- * the event happened
- * @param cardinality number of card in carousel.
- * @param isRecommendationCard whether media card being logged is a recommendations card.
- * @param isSsReactivated indicates resume media card is reactivated by Smartspace
- * recommendation signal
- * @param interactedSubcardRank the rank for interacted media item for recommendation card, -1
- * for tapping on card but not on any media item, 0 for first media item, 1 for second, etc.
- * @param interactedSubcardCardinality how many media items were shown to the user when there is
- * user interaction
- * @param rank the rank for media card in the media carousel, starting from 0
- * @param receivedLatencyMillis latency in milliseconds for card received events. E.g. latency
- * between headphone connection to sysUI displays media recommendation card
- * @param isSwipeToDismiss whether is to log swipe-to-dismiss event
- */
- private fun logSmartspaceCardReported(
- eventId: Int,
- instanceId: Int,
- uid: Int,
- surfaces: IntArray,
- cardinality: Int,
- isRecommendationCard: Boolean,
- isSsReactivated: Boolean,
- interactedSubcardRank: Int = 0,
- interactedSubcardCardinality: Int = 0,
- rank: Int = 0,
- receivedLatencyMillis: Int = 0,
- isSwipeToDismiss: Boolean = false,
- ) {
- surfaces.forEach { surface ->
- SysUiStatsLog.write(
- SysUiStatsLog.SMARTSPACE_CARD_REPORTED,
- eventId,
- instanceId,
- // Deprecated, replaced with AiAi feature type so we don't need to create logging
- // card type for each new feature.
- SysUiStatsLog.SMART_SPACE_CARD_REPORTED__CARD_TYPE__UNKNOWN_CARD,
- surface,
- // Use -1 as rank value to indicate user swipe to dismiss the card
- if (isSwipeToDismiss) -1 else rank,
- cardinality,
- if (isRecommendationCard) {
- 15 // MEDIA_RECOMMENDATION
- } else if (isSsReactivated) {
- 43 // MEDIA_RESUME_SS_ACTIVATED
- } else {
- 31 // MEDIA_RESUME
- },
- uid,
- interactedSubcardRank,
- interactedSubcardCardinality,
- receivedLatencyMillis,
- null, // Media cards cannot have subcards.
- null // Media cards don't have dimensions today.
- )
-
- if (DEBUG) {
- Log.d(
- TAG,
- "Log Smartspace card event id: $eventId instance id: $instanceId" +
- " surface: $surface rank: $rank cardinality: $cardinality " +
- "isRecommendationCard: $isRecommendationCard " +
- "isSsReactivated: $isSsReactivated" +
- "uid: $uid " +
- "interactedSubcardRank: $interactedSubcardRank " +
- "interactedSubcardCardinality: $interactedSubcardCardinality " +
- "received_latency_millis: $receivedLatencyMillis"
- )
- }
- }
- }
-
- companion object {
- private const val TAG = "MediaSmartspaceLogger"
- private val DEBUG = Log.isLoggable(TAG, Log.DEBUG)
- private const val SMARTSPACE_CARD_RECEIVED_EVENT = 759
- const val SMARTSPACE_CARD_CLICK_EVENT = 760
- const val SMARTSPACE_CARD_DISMISS_EVENT = 761
- const val SMARTSPACE_CARD_SEEN_EVENT = 800
-
- /**
- * Get the location of media view given [currentEndLocation]
- *
- * @return location used for Smartspace logging
- */
- fun getSurface(location: Int): Int {
- SceneContainerFlag.isUnexpectedlyInLegacyMode()
- return when (location) {
- MediaHierarchyManager.LOCATION_QQS,
- MediaHierarchyManager.LOCATION_QS -> {
- SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__SHADE
- }
- MediaHierarchyManager.LOCATION_LOCKSCREEN -> {
- SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__LOCKSCREEN
- }
- MediaHierarchyManager.LOCATION_DREAM_OVERLAY -> {
- SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__DREAM_OVERLAY
- }
- else -> SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__DEFAULT_SURFACE
- }
- }
- }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/util/SmallHash.java b/packages/SystemUI/src/com/android/systemui/media/controls/util/SmallHash.java
deleted file mode 100644
index 97483a61baa4..000000000000
--- a/packages/SystemUI/src/com/android/systemui/media/controls/util/SmallHash.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2021 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 com.android.systemui.media.controls.util;
-
-import java.util.Objects;
-
-/**
- * A simple hash function for use in privacy-sensitive logging.
- */
-public final class SmallHash {
- // Hashes will be in the range [0, MAX_HASH).
- public static final int MAX_HASH = (1 << 13);
-
- /** Return Small hash of the string, if non-null, or 0 otherwise. */
- public static int hash(String in) {
- return hash(Objects.hashCode(in));
- }
-
- /**
- * Maps in to the range [0, MAX_HASH), keeping similar values distinct.
- *
- * @param in An arbitrary integer.
- * @return in mod MAX_HASH, signs chosen to stay in the range [0, MAX_HASH).
- */
- public static int hash(int in) {
- return Math.abs(Math.floorMod(in, MAX_HASH));
- }
-
- private SmallHash() {}
-}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/composefragment/QSFragmentCompose.kt b/packages/SystemUI/src/com/android/systemui/qs/composefragment/QSFragmentCompose.kt
index 6ad8bae05d7a..71eacdf05cfd 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/composefragment/QSFragmentCompose.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/composefragment/QSFragmentCompose.kt
@@ -312,20 +312,18 @@ constructor(
SceneTransitionLayout(state = sceneState, modifier = Modifier.fillMaxSize()) {
scene(QuickSettings) {
LaunchedEffect(Unit) { viewModel.onQSOpen() }
- QuickSettingsElement(Modifier.element(QuickSettings.rootElementKey))
+ Element(QuickSettings.rootElementKey, Modifier) { QuickSettingsElement() }
}
scene(QuickQuickSettings) {
LaunchedEffect(Unit) { viewModel.onQQSOpen() }
// Cannot pass the element modifier in because the top element has a `testTag`
// and this would overwrite it.
- Box(Modifier.element(QuickQuickSettings.rootElementKey)) {
- QuickQuickSettingsElement()
- }
+ Element(QuickQuickSettings.rootElementKey, Modifier) { QuickQuickSettingsElement() }
}
scene(SceneKeys.EditMode) {
- EditModeElement(Modifier.element(SceneKeys.EditMode.rootElementKey))
+ Element(SceneKeys.EditMode.rootElementKey, Modifier) { EditModeElement() }
}
}
}
@@ -656,10 +654,7 @@ constructor(
)
) {
if (viewModel.isQsEnabled) {
- Box(
- modifier =
- Modifier.element(ElementKeys.QuickSettingsContent).fillMaxSize().weight(1f)
- ) {
+ Element(ElementKeys.QuickSettingsContent, modifier = Modifier.weight(1f)) {
DisposableEffect(Unit) {
lifecycleScope.launch { scrollState.scrollTo(0) }
onDispose { lifecycleScope.launch { scrollState.scrollTo(0) } }
@@ -667,7 +662,8 @@ constructor(
Column(
modifier =
- Modifier.onPlaced { coordinates ->
+ Modifier.fillMaxSize()
+ .onPlaced { coordinates ->
val positionOnScreen = coordinates.positionOnScreen()
val left = positionOnScreen.x
val right = left + coordinates.size.width
@@ -744,13 +740,15 @@ constructor(
}
}
QuickSettingsTheme {
- FooterActions(
- viewModel = viewModel.footerActionsViewModel,
- qsVisibilityLifecycleOwner = this@QSFragmentCompose,
- modifier =
- Modifier.sysuiResTag(ResIdTags.qsFooterActions)
- .element(ElementKeys.FooterActions),
- )
+ Element(
+ ElementKeys.FooterActions,
+ Modifier.sysuiResTag(ResIdTags.qsFooterActions),
+ ) {
+ FooterActions(
+ viewModel = viewModel.footerActionsViewModel,
+ qsVisibilityLifecycleOwner = this@QSFragmentCompose,
+ )
+ }
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/composefragment/ui/GridAnchor.kt b/packages/SystemUI/src/com/android/systemui/qs/composefragment/ui/GridAnchor.kt
index 266e875df85a..19ad9fcd4495 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/composefragment/ui/GridAnchor.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/composefragment/ui/GridAnchor.kt
@@ -16,7 +16,6 @@
package com.android.systemui.qs.composefragment.ui
-import androidx.compose.foundation.layout.Spacer
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import com.android.compose.animation.scene.ContentScope
@@ -29,5 +28,5 @@ import com.android.systemui.qs.shared.ui.ElementKeys
@Composable
fun ContentScope.GridAnchor(modifier: Modifier = Modifier) {
// The size of this anchor does not matter, as the tiles don't change size on expansion.
- Spacer(modifier.element(ElementKeys.GridAnchor))
+ Element(ElementKeys.GridAnchor, modifier) {}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/QuickQuickSettings.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/QuickQuickSettings.kt
index b084f79a5bba..495870f0a978 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/QuickQuickSettings.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/QuickQuickSettings.kt
@@ -71,17 +71,19 @@ fun ContentScope.QuickQuickSettings(
val it = sizedTiles[spanIndex]
val column = cellIndex % columns
cellIndex += it.width
- Tile(
- tile = it.tile,
- iconOnly = it.isIcon,
- modifier = Modifier.element(it.tile.spec.toElementKey(spanIndex)),
- squishiness = { squishiness },
- coroutineScope = scope,
- bounceableInfo = bounceables.bounceableInfo(it, spanIndex, column, columns),
- tileHapticsViewModelFactoryProvider = viewModel.tileHapticsViewModelFactoryProvider,
- // There should be no QuickQuickSettings when the details view is enabled.
- detailsViewModel = null,
- )
+ Element(it.tile.spec.toElementKey(spanIndex), Modifier) {
+ Tile(
+ tile = it.tile,
+ iconOnly = it.isIcon,
+ squishiness = { squishiness },
+ coroutineScope = scope,
+ bounceableInfo = bounceables.bounceableInfo(it, spanIndex, column, columns),
+ tileHapticsViewModelFactoryProvider =
+ viewModel.tileHapticsViewModelFactoryProvider,
+ // There should be no QuickQuickSettings when the details view is enabled.
+ detailsViewModel = null,
+ )
+ }
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/infinitegrid/InfiniteGridLayout.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/infinitegrid/InfiniteGridLayout.kt
index 1c540eed8aa0..dfee497655d1 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/infinitegrid/InfiniteGridLayout.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/infinitegrid/InfiniteGridLayout.kt
@@ -99,16 +99,17 @@ constructor(
val it = sizedTiles[spanIndex]
val column = cellIndex % columns
cellIndex += it.width
- Tile(
- tile = it.tile,
- iconOnly = iconTilesViewModel.isIconTile(it.tile.spec),
- modifier = Modifier.element(it.tile.spec.toElementKey(spanIndex)),
- squishiness = { squishiness },
- tileHapticsViewModelFactoryProvider = tileHapticsViewModelFactoryProvider,
- coroutineScope = scope,
- bounceableInfo = bounceables.bounceableInfo(it, spanIndex, column, columns),
- detailsViewModel = detailsViewModel,
- )
+ Element(it.tile.spec.toElementKey(spanIndex), Modifier) {
+ Tile(
+ tile = it.tile,
+ iconOnly = iconTilesViewModel.isIconTile(it.tile.spec),
+ squishiness = { squishiness },
+ tileHapticsViewModelFactoryProvider = tileHapticsViewModelFactoryProvider,
+ coroutineScope = scope,
+ bounceableInfo = bounceables.bounceableInfo(it, spanIndex, column, columns),
+ detailsViewModel = detailsViewModel,
+ )
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java
index bb818fa5e164..88e7d80c6a3e 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java
@@ -38,7 +38,6 @@ import androidx.annotation.VisibleForTesting;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
-import com.android.internal.telephony.flags.Flags;
import com.android.settingslib.satellite.SatelliteDialogUtils;
import com.android.systemui.animation.Expandable;
import com.android.systemui.broadcast.BroadcastDispatcher;
@@ -122,21 +121,16 @@ public class AirplaneModeTile extends QSTileImpl<BooleanState> {
return;
}
- if (Flags.oemEnabledSatelliteFlag()) {
- if (mClickJob != null && !mClickJob.isCompleted()) {
- return;
- }
- mClickJob = SatelliteDialogUtils.mayStartSatelliteWarningDialog(
- mContext, this, TYPE_IS_AIRPLANE_MODE, isAllowClick -> {
- if (isAllowClick) {
- setEnabled(!airplaneModeEnabled);
- }
- return null;
- });
+ if (mClickJob != null && !mClickJob.isCompleted()) {
return;
}
-
- setEnabled(!airplaneModeEnabled);
+ mClickJob = SatelliteDialogUtils.mayStartSatelliteWarningDialog(
+ mContext, this, TYPE_IS_AIRPLANE_MODE, isAllowClick -> {
+ if (isAllowClick) {
+ setEnabled(!airplaneModeEnabled);
+ }
+ return null;
+ });
}
private void setEnabled(boolean enabled) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
index 7daac45ddb15..2ac5bd3b1425 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
@@ -141,21 +141,17 @@ public class BluetoothTile extends QSTileImpl<BooleanState> {
}
private void handleClickWithSatelliteCheck(Runnable clickCallback) {
- if (com.android.internal.telephony.flags.Flags.oemEnabledSatelliteFlag()) {
- if (mClickJob != null && !mClickJob.isCompleted()) {
- return;
- }
- mClickJob = SatelliteDialogUtils.mayStartSatelliteWarningDialog(
- mContext, this, TYPE_IS_BLUETOOTH, isAllowClick -> {
- if (!isAllowClick) {
- return null;
- }
- clickCallback.run();
- return null;
- });
+ if (mClickJob != null && !mClickJob.isCompleted()) {
return;
}
- clickCallback.run();
+ mClickJob = SatelliteDialogUtils.mayStartSatelliteWarningDialog(
+ mContext, this, TYPE_IS_BLUETOOTH, isAllowClick -> {
+ if (!isAllowClick) {
+ return null;
+ }
+ clickCallback.run();
+ return null;
+ });
}
private void handleClickEvent(@Nullable Expandable expandable) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java
index fed8b60a653f..0d937cba8021 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java
@@ -146,6 +146,7 @@ public class UserDetailView extends PseudoGridView {
v.bind(name, drawable, item.info.id);
}
v.setActivated(item.isCurrent);
+ v.setSelected(item.isCurrent);
v.setDisabledByAdmin(item.isDisabledByAdmin());
v.setEnabled(item.isSwitchToEnabled);
UserSwitcherController.setSelectableAlpha(v);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDetailsContentManager.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDetailsContentManager.kt
index 733159e285e8..659488bdd0d3 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDetailsContentManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDetailsContentManager.kt
@@ -51,7 +51,6 @@ import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.android.internal.logging.UiEvent
import com.android.internal.logging.UiEventLogger
-import com.android.internal.telephony.flags.Flags
import com.android.settingslib.satellite.SatelliteDialogUtils.TYPE_IS_WIFI
import com.android.settingslib.satellite.SatelliteDialogUtils.mayStartSatelliteWarningDialog
import com.android.settingslib.wifi.WifiEnterpriseRestrictionUtils
@@ -456,22 +455,18 @@ constructor(
}
private fun handleWifiToggleClicked(isChecked: Boolean) {
- if (Flags.oemEnabledSatelliteFlag()) {
- if (clickJob != null && !clickJob!!.isCompleted) {
- return
- }
- clickJob =
- mayStartSatelliteWarningDialog(contentView.context, coroutineScope, TYPE_IS_WIFI) {
- isAllowClick: Boolean ->
- if (isAllowClick) {
- setWifiEnabled(isChecked)
- } else {
- wifiToggle.isChecked = !isChecked
- }
- }
+ if (clickJob != null && !clickJob!!.isCompleted) {
return
}
- setWifiEnabled(isChecked)
+ clickJob =
+ mayStartSatelliteWarningDialog(contentView.context, coroutineScope, TYPE_IS_WIFI) {
+ isAllowClick: Boolean ->
+ if (isAllowClick) {
+ setWifiEnabled(isChecked)
+ } else {
+ wifiToggle.isChecked = !isChecked
+ }
+ }
}
private fun setWifiEnabled(isEnabled: Boolean) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegateLegacy.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegateLegacy.java
index 75cb8ddca484..0adc41313bae 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegateLegacy.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegateLegacy.java
@@ -62,7 +62,6 @@ import androidx.recyclerview.widget.RecyclerView;
import com.android.internal.logging.UiEvent;
import com.android.internal.logging.UiEventLogger;
-import com.android.internal.telephony.flags.Flags;
import com.android.settingslib.satellite.SatelliteDialogUtils;
import com.android.settingslib.wifi.WifiEnterpriseRestrictionUtils;
import com.android.systemui.Prefs;
@@ -489,22 +488,18 @@ public class InternetDialogDelegateLegacy implements
}
private void handleWifiToggleClicked(boolean isChecked) {
- if (Flags.oemEnabledSatelliteFlag()) {
- if (mClickJob != null && !mClickJob.isCompleted()) {
- return;
- }
- mClickJob = SatelliteDialogUtils.mayStartSatelliteWarningDialog(
- mDialog.getContext(), mCoroutineScope, TYPE_IS_WIFI, isAllowClick -> {
- if (isAllowClick) {
- setWifiEnable(isChecked);
- } else {
- mWiFiToggle.setChecked(!isChecked);
- }
- return null;
- });
+ if (mClickJob != null && !mClickJob.isCompleted()) {
return;
}
- setWifiEnable(isChecked);
+ mClickJob = SatelliteDialogUtils.mayStartSatelliteWarningDialog(
+ mDialog.getContext(), mCoroutineScope, TYPE_IS_WIFI, isAllowClick -> {
+ if (isAllowClick) {
+ setWifiEnable(isChecked);
+ } else {
+ mWiFiToggle.setChecked(!isChecked);
+ }
+ return null;
+ });
}
private void setWifiEnable(boolean isChecked) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt
index 877aa76590e9..33cc62c9a75a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt
@@ -50,7 +50,6 @@ import com.android.systemui.keyguard.ui.viewmodel.AodToGoneTransitionViewModel
import com.android.systemui.keyguard.ui.viewmodel.AodToLockscreenTransitionViewModel
import com.android.systemui.keyguard.ui.viewmodel.AodToOccludedTransitionViewModel
import com.android.systemui.keyguard.ui.viewmodel.AodToPrimaryBouncerTransitionViewModel
-import com.android.systemui.keyguard.ui.viewmodel.DozingToDreamingTransitionViewModel
import com.android.systemui.keyguard.ui.viewmodel.DozingToGlanceableHubTransitionViewModel
import com.android.systemui.keyguard.ui.viewmodel.DozingToLockscreenTransitionViewModel
import com.android.systemui.keyguard.ui.viewmodel.DozingToOccludedTransitionViewModel
@@ -144,7 +143,6 @@ constructor(
private val aodToOccludedTransitionViewModel: AodToOccludedTransitionViewModel,
private val aodToGlanceableHubTransitionViewModel: AodToGlanceableHubTransitionViewModel,
private val aodToPrimaryBouncerTransitionViewModel: AodToPrimaryBouncerTransitionViewModel,
- private val dozingToDreamingTransitionViewModel: DozingToDreamingTransitionViewModel,
dozingToGlanceableHubTransitionViewModel: DozingToGlanceableHubTransitionViewModel,
private val dozingToLockscreenTransitionViewModel: DozingToLockscreenTransitionViewModel,
private val dozingToOccludedTransitionViewModel: DozingToOccludedTransitionViewModel,
@@ -603,7 +601,6 @@ constructor(
aodToOccludedTransitionViewModel.lockscreenAlpha(viewState),
aodToGlanceableHubTransitionViewModel.lockscreenAlpha(viewState),
aodToPrimaryBouncerTransitionViewModel.notificationAlpha,
- dozingToDreamingTransitionViewModel.notificationAlpha,
dozingToLockscreenTransitionViewModel.lockscreenAlpha,
dozingToOccludedTransitionViewModel.lockscreenAlpha(viewState),
dozingToPrimaryBouncerTransitionViewModel.notificationAlpha,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/satellite/domain/interactor/DeviceBasedSatelliteInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/satellite/domain/interactor/DeviceBasedSatelliteInteractor.kt
index 569e02cc67bd..4041f3fd637e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/satellite/domain/interactor/DeviceBasedSatelliteInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/satellite/domain/interactor/DeviceBasedSatelliteInteractor.kt
@@ -16,7 +16,6 @@
package com.android.systemui.statusbar.pipeline.satellite.domain.interactor
-import com.android.internal.telephony.flags.Flags
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.log.LogBuffer
@@ -57,35 +56,19 @@ constructor(
/** Must be observed by any UI showing Satellite iconography */
val isSatelliteAllowed =
- if (Flags.oemEnabledSatelliteFlag()) {
- repo.isSatelliteAllowedForCurrentLocation
- } else {
- flowOf(false)
- }
- .distinctUntilChanged()
+ repo.isSatelliteAllowedForCurrentLocation
.logDiffsForTable(tableLog, columnName = COL_ALLOWED, initialValue = false)
.stateIn(scope, SharingStarted.WhileSubscribed(), false)
/** See [SatelliteConnectionState] for relevant states */
val connectionState =
- if (Flags.oemEnabledSatelliteFlag()) {
- repo.connectionState
- } else {
-
- flowOf(SatelliteConnectionState.Off)
- }
- .distinctUntilChanged()
+ repo.connectionState
.logDiffsForTable(tableLog, initialValue = SatelliteConnectionState.Off)
.stateIn(scope, SharingStarted.WhileSubscribed(), SatelliteConnectionState.Off)
/** 0-4 description of the connection strength */
val signalStrength =
- if (Flags.oemEnabledSatelliteFlag()) {
- repo.signalStrength
- } else {
- flowOf(0)
- }
- .distinctUntilChanged()
+ repo.signalStrength
.logDiffsForTable(tableLog, columnName = COL_LEVEL, initialValue = 0)
.stateIn(scope, SharingStarted.WhileSubscribed(), 0)
@@ -114,28 +97,24 @@ constructor(
/** When all connections are considered OOS, satellite connectivity is potentially valid */
val areAllConnectionsOutOfService =
- if (Flags.oemEnabledSatelliteFlag()) {
- combine(allConnectionsOos, iconsInteractor.isDeviceInEmergencyCallsOnlyMode) {
- connectionsOos,
- deviceEmergencyOnly ->
- logBuffer.log(
- TAG,
- LogLevel.INFO,
- {
- bool1 = connectionsOos
- bool2 = deviceEmergencyOnly
- },
- {
- "Updating OOS status. allConnectionsOOs=$bool1 " +
- "deviceEmergencyOnly=$bool2"
- },
- )
- // If no connections exist, or all are OOS, then we look to the device-based
- // service state to detect if any calls are possible
- connectionsOos && !deviceEmergencyOnly
- }
- } else {
- flowOf(false)
+ combine(allConnectionsOos, iconsInteractor.isDeviceInEmergencyCallsOnlyMode) {
+ connectionsOos,
+ deviceEmergencyOnly ->
+ logBuffer.log(
+ TAG,
+ LogLevel.INFO,
+ {
+ bool1 = connectionsOos
+ bool2 = deviceEmergencyOnly
+ },
+ {
+ "Updating OOS status. allConnectionsOOs=$bool1 " +
+ "deviceEmergencyOnly=$bool2"
+ },
+ )
+ // If no connections exist, or all are OOS, then we look to the device-based
+ // service state to detect if any calls are possible
+ connectionsOos && !deviceEmergencyOnly
}
.distinctUntilChanged()
.logDiffsForTable(tableLog, columnName = COL_FULL_OOS, initialValue = true)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/satellite/ui/DeviceBasedSatelliteBindableIcon.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/satellite/ui/DeviceBasedSatelliteBindableIcon.kt
index f5d0f6b8f07c..d51d8dace030 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/satellite/ui/DeviceBasedSatelliteBindableIcon.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/satellite/ui/DeviceBasedSatelliteBindableIcon.kt
@@ -17,7 +17,6 @@
package com.android.systemui.statusbar.pipeline.satellite.ui
import android.content.Context
-import com.android.internal.telephony.flags.Flags.oemEnabledSatelliteFlag
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.statusbar.pipeline.icons.shared.model.BindableIcon
import com.android.systemui.statusbar.pipeline.icons.shared.model.ModernStatusBarViewCreator
@@ -29,10 +28,7 @@ import javax.inject.Inject
@SysUISingleton
class DeviceBasedSatelliteBindableIcon
@Inject
-constructor(
- context: Context,
- viewModel: DeviceBasedSatelliteViewModel,
-) : BindableIcon {
+constructor(context: Context, viewModel: DeviceBasedSatelliteViewModel) : BindableIcon {
override val slot: String =
context.getString(com.android.internal.R.string.status_bar_oem_satellite)
@@ -42,5 +38,5 @@ constructor(
}
}
- override val shouldBindIcon: Boolean = oemEnabledSatelliteFlag()
+ override val shouldBindIcon: Boolean = true
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImplTest.kt
index b731c4f18c7f..0a8325de343d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImplTest.kt
@@ -38,11 +38,7 @@ import com.android.systemui.media.controls.shared.model.MediaDataLoadingModel
import com.android.systemui.media.controls.shared.model.SmartspaceMediaData
import com.android.systemui.media.controls.shared.model.SmartspaceMediaLoadingModel
import com.android.systemui.media.controls.ui.controller.MediaPlayerData
-import com.android.systemui.media.controls.util.MediaFlags
-import com.android.systemui.media.controls.util.MediaSmartspaceLogger
import com.android.systemui.media.controls.util.MediaUiEventLogger
-import com.android.systemui.media.controls.util.mediaSmartspaceLogger
-import com.android.systemui.media.controls.util.mockMediaSmartspaceLogger
import com.android.systemui.settings.UserTracker
import com.android.systemui.statusbar.NotificationLockscreenUserManager
import com.android.systemui.testKosmos
@@ -95,7 +91,6 @@ class MediaDataFilterImplTest : SysuiTestCase() {
@Mock private lateinit var smartspaceData: SmartspaceMediaData
@Mock private lateinit var smartspaceMediaRecommendationItem: SmartspaceAction
@Mock private lateinit var logger: MediaUiEventLogger
- @Mock private lateinit var mediaFlags: MediaFlags
@Mock private lateinit var cardAction: SmartspaceAction
private lateinit var mediaDataFilter: MediaDataFilterImpl
@@ -104,12 +99,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
private lateinit var dataGuest: MediaData
private lateinit var dataPrivateProfile: MediaData
private val clock = FakeSystemClock()
- private val smartspaceLogger = kosmos.mockMediaSmartspaceLogger
- private val repository: MediaFilterRepository =
- with(kosmos) {
- mediaSmartspaceLogger = mockMediaSmartspaceLogger
- mediaFilterRepository
- }
+ private val repository: MediaFilterRepository = with(kosmos) { mediaFilterRepository }
private val mediaLogger = kosmos.mockMediaLogger
@Before
@@ -126,7 +116,6 @@ class MediaDataFilterImplTest : SysuiTestCase() {
executor,
clock,
logger,
- mediaFlags,
repository,
mediaLogger,
)
@@ -541,22 +530,8 @@ class MediaDataFilterImplTest : SysuiTestCase() {
@Test
fun onSwipeToDismiss_setsTimedOut() {
mediaDataFilter.onMediaDataLoaded(KEY, null, dataMain)
- mediaDataFilter.onSwipeToDismiss(1)
-
- verify(smartspaceLogger, never())
- .logSmartspaceCardUIEvent(
- eq(MediaSmartspaceLogger.SMARTSPACE_CARD_DISMISS_EVENT),
- anyInt(),
- anyInt(),
- anyInt(),
- anyInt(),
- anyBoolean(),
- anyBoolean(),
- anyInt(),
- anyInt(),
- anyInt(),
- eq(true),
- )
+ mediaDataFilter.onSwipeToDismiss()
+
verify(mediaDataProcessor).setInactive(eq(KEY), eq(true), eq(true))
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataProcessorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataProcessorTest.kt
index f9e8cbfc491c..93c27f01b5ff 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataProcessorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataProcessorTest.kt
@@ -243,7 +243,6 @@ class MediaDataProcessorTest(flags: FlagsParameterization) : SysuiTestCase() {
mediaDataCombineLatest = mediaDataCombineLatest,
mediaDataFilter = mediaDataFilter,
mediaFilterRepository = mediaFilterRepository,
- mediaFlags = kosmos.mediaFlags,
)
mediaCarouselInteractor.start()
verify(mediaTimeoutListener).stateCallback = capture(stateCallbackCaptor)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/controller/MediaCarouselControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/controller/MediaCarouselControllerTest.kt
index 58bae308bcdf..2001a3ea7ca0 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/controller/MediaCarouselControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/controller/MediaCarouselControllerTest.kt
@@ -56,7 +56,6 @@ import com.android.systemui.media.controls.ui.controller.MediaHierarchyManager.C
import com.android.systemui.media.controls.ui.view.MediaHostState
import com.android.systemui.media.controls.ui.view.MediaScrollView
import com.android.systemui.media.controls.ui.viewmodel.mediaCarouselViewModel
-import com.android.systemui.media.controls.util.MediaFlags
import com.android.systemui.media.controls.util.MediaUiEventLogger
import com.android.systemui.plugins.ActivityStarter
import com.android.systemui.plugins.FalsingManager
@@ -136,7 +135,6 @@ class MediaCarouselControllerTest(flags: FlagsParameterization) : SysuiTestCase(
@Mock lateinit var mediaViewController: MediaViewController
@Mock lateinit var mediaCarousel: MediaScrollView
@Mock lateinit var pageIndicator: PageIndicator
- @Mock lateinit var mediaFlags: MediaFlags
@Mock lateinit var keyguardUpdateMonitor: KeyguardUpdateMonitor
@Mock lateinit var globalSettings: GlobalSettings
private val transitionRepository = kosmos.fakeKeyguardTransitionRepository
@@ -196,7 +194,6 @@ class MediaCarouselControllerTest(flags: FlagsParameterization) : SysuiTestCase(
dumpManager = dumpManager,
logger = logger,
debugLogger = debugLogger,
- mediaFlags = mediaFlags,
keyguardUpdateMonitor = keyguardUpdateMonitor,
keyguardTransitionInteractor = kosmos.keyguardTransitionInteractor,
globalSettings = globalSettings,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BluetoothTileTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BluetoothTileTest.kt
index a7464e646410..e8649df7b409 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BluetoothTileTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BluetoothTileTest.kt
@@ -40,7 +40,6 @@ import com.android.systemui.util.mockito.mock
import com.android.systemui.util.mockito.whenever
import com.google.common.truth.Truth.assertThat
import dagger.Lazy
-import kotlin.test.assertTrue
import kotlinx.coroutines.Job
import org.junit.After
import org.junit.Before
@@ -206,7 +205,6 @@ class BluetoothTileTest(flags: FlagsParameterization) : SysuiTestCase() {
@Test
@DisableFlags(QsDetailedView.FLAG_NAME)
fun handleClick_hasSatelliteFeatureButNoQsTileDialogAndClickIsProcessing_doNothing() {
- mSetFlagsRule.enableFlags(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
`when`(featureFlags.isEnabled(com.android.systemui.flags.Flags.BLUETOOTH_QS_TILE_DIALOG))
.thenReturn(false)
`when`(clickJob.isCompleted).thenReturn(false)
@@ -218,34 +216,8 @@ class BluetoothTileTest(flags: FlagsParameterization) : SysuiTestCase() {
}
@Test
- @DisableFlags(QsDetailedView.FLAG_NAME)
- fun handleClick_noSatelliteFeatureAndNoQsTileDialog_directSetBtEnable() {
- mSetFlagsRule.disableFlags(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
- `when`(featureFlags.isEnabled(com.android.systemui.flags.Flags.BLUETOOTH_QS_TILE_DIALOG))
- .thenReturn(false)
-
- tile.handleClick(null)
-
- verify(bluetoothController).setBluetoothEnabled(any())
- }
-
- @Test
- @DisableFlags(QsDetailedView.FLAG_NAME)
- fun handleClick_noSatelliteFeatureButHasQsTileDialog_showDialog() {
- mSetFlagsRule.disableFlags(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
- `when`(featureFlags.isEnabled(com.android.systemui.flags.Flags.BLUETOOTH_QS_TILE_DIALOG))
- .thenReturn(true)
-
- tile.handleClick(null)
-
- verify(bluetoothDetailsContentViewModel)
- .showDetailsContent(/* expandable= */ null, /* view= */ null)
- }
-
- @Test
@EnableFlags(QsDetailedView.FLAG_NAME)
fun handleClick_hasSatelliteFeatureAndQsDetailedViewIsEnabledAndClickIsProcessing_doNothing() {
- mSetFlagsRule.enableFlags(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
`when`(featureFlags.isEnabled(com.android.systemui.flags.Flags.BLUETOOTH_QS_TILE_DIALOG))
.thenReturn(false)
`when`(clickJob.isCompleted).thenReturn(false)
@@ -259,19 +231,6 @@ class BluetoothTileTest(flags: FlagsParameterization) : SysuiTestCase() {
}
@Test
- @EnableFlags(QsDetailedView.FLAG_NAME)
- fun handleClick_noSatelliteFeatureAndQsDetailedViewIsEnabled_returnDetailsViewModel() {
- mSetFlagsRule.disableFlags(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
- `when`(featureFlags.isEnabled(com.android.systemui.flags.Flags.BLUETOOTH_QS_TILE_DIALOG))
- .thenReturn(false)
- var currentModel: TileDetailsViewModel? = null
-
- tile.getDetailsViewModel { model: TileDetailsViewModel? -> currentModel = model }
-
- assertTrue(currentModel != null)
- }
-
- @Test
fun testMetadataListener_whenDisconnected_isUnregistered() {
val state = QSTile.BooleanState()
val cachedDevice = mock<CachedBluetoothDevice>()
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/ui/viewmodel/CommunalTransitionViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/ui/viewmodel/CommunalTransitionViewModelKosmos.kt
index 7b0c09cd80a6..9109b36605a7 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/ui/viewmodel/CommunalTransitionViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/ui/viewmodel/CommunalTransitionViewModelKosmos.kt
@@ -18,6 +18,7 @@ package com.android.systemui.communal.ui.viewmodel
import com.android.systemui.communal.domain.interactor.communalInteractor
import com.android.systemui.communal.domain.interactor.communalSceneInteractor
+import com.android.systemui.communal.domain.interactor.communalSettingsInteractor
import com.android.systemui.communal.util.communalColors
import com.android.systemui.keyguard.domain.interactor.keyguardTransitionInteractor
import com.android.systemui.keyguard.ui.viewmodel.dreamingToGlanceableHubTransitionViewModel
@@ -41,5 +42,6 @@ val Kosmos.communalTransitionViewModel by
communalSceneInteractor = communalSceneInteractor,
keyguardTransitionInteractor = keyguardTransitionInteractor,
communalColors = communalColors,
+ communalSettingsInteractor = communalSettingsInteractor,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/data/repository/MediaFilterRepositoryKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/data/repository/MediaFilterRepositoryKosmos.kt
index 7964c1114be5..e11534e8112d 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/data/repository/MediaFilterRepositoryKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/data/repository/MediaFilterRepositoryKosmos.kt
@@ -16,16 +16,8 @@
package com.android.systemui.media.controls.data.repository
-import android.content.applicationContext
import com.android.systemui.kosmos.Kosmos
-import com.android.systemui.media.controls.util.mediaSmartspaceLogger
import com.android.systemui.util.time.systemClock
val Kosmos.mediaFilterRepository by
- Kosmos.Fixture {
- MediaFilterRepository(
- applicationContext = applicationContext,
- systemClock = systemClock,
- smartspaceLogger = mediaSmartspaceLogger,
- )
- }
+ Kosmos.Fixture { MediaFilterRepository(systemClock = systemClock) }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterKosmos.kt
index 61d5f1e3af53..dae51190c136 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterKosmos.kt
@@ -22,7 +22,6 @@ import com.android.systemui.concurrency.fakeExecutor
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.media.controls.data.repository.mediaFilterRepository
import com.android.systemui.media.controls.shared.mediaLogger
-import com.android.systemui.media.controls.util.mediaFlags
import com.android.systemui.media.controls.util.mediaUiEventLogger
import com.android.systemui.settings.userTracker
import com.android.systemui.statusbar.notificationLockscreenUserManager
@@ -38,13 +37,12 @@ val Kosmos.mediaDataFilter by
BroadcastSender(
applicationContext,
WakeLockFake.Builder(applicationContext),
- fakeExecutor
+ fakeExecutor,
),
lockscreenUserManager = notificationLockscreenUserManager,
executor = fakeExecutor,
systemClock = fakeSystemClock,
logger = mediaUiEventLogger,
- mediaFlags = mediaFlags,
mediaFilterRepository = mediaFilterRepository,
mediaLogger = mediaLogger,
)
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaCarouselInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaCarouselInteractorKosmos.kt
index ca1b3f571a90..e6b732a2add0 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaCarouselInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/domain/pipeline/interactor/MediaCarouselInteractorKosmos.kt
@@ -26,7 +26,6 @@ import com.android.systemui.media.controls.domain.pipeline.mediaDeviceManager
import com.android.systemui.media.controls.domain.pipeline.mediaResumeListener
import com.android.systemui.media.controls.domain.pipeline.mediaSessionBasedFilter
import com.android.systemui.media.controls.domain.pipeline.mediaTimeoutListener
-import com.android.systemui.media.controls.util.mediaFlags
val Kosmos.mediaCarouselInteractor by
Kosmos.Fixture {
@@ -40,6 +39,5 @@ val Kosmos.mediaCarouselInteractor by
mediaDataCombineLatest = mediaDataCombineLatest,
mediaDataFilter = mediaDataFilter,
mediaFilterRepository = mediaFilterRepository,
- mediaFlags = mediaFlags,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModelKosmos.kt
index 054ac2e39993..5e6434d84538 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModelKosmos.kt
@@ -24,7 +24,6 @@ import com.android.systemui.kosmos.testDispatcher
import com.android.systemui.media.controls.domain.pipeline.interactor.factory.mediaControlInteractorFactory
import com.android.systemui.media.controls.domain.pipeline.interactor.mediaCarouselInteractor
import com.android.systemui.media.controls.shared.mediaLogger
-import com.android.systemui.media.controls.util.mediaFlags
import com.android.systemui.media.controls.util.mediaUiEventLogger
import com.android.systemui.statusbar.notification.collection.provider.visualStabilityProvider
@@ -40,7 +39,6 @@ val Kosmos.mediaCarouselViewModel by
controlInteractorFactory = mediaControlInteractorFactory,
recommendationsViewModel = mediaRecommendationsViewModel,
logger = mediaUiEventLogger,
- mediaFlags = mediaFlags,
mediaLogger = mediaLogger,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelKosmos.kt
index 51bb94fd2ab9..17ef208fe12e 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelKosmos.kt
@@ -30,7 +30,6 @@ import com.android.systemui.keyguard.ui.viewmodel.aodToGoneTransitionViewModel
import com.android.systemui.keyguard.ui.viewmodel.aodToLockscreenTransitionViewModel
import com.android.systemui.keyguard.ui.viewmodel.aodToOccludedTransitionViewModel
import com.android.systemui.keyguard.ui.viewmodel.aodToPrimaryBouncerTransitionViewModel
-import com.android.systemui.keyguard.ui.viewmodel.dozingToDreamingTransitionViewModel
import com.android.systemui.keyguard.ui.viewmodel.dozingToGlanceableHubTransitionViewModel
import com.android.systemui.keyguard.ui.viewmodel.dozingToLockscreenTransitionViewModel
import com.android.systemui.keyguard.ui.viewmodel.dozingToOccludedTransitionViewModel
@@ -84,7 +83,6 @@ val Kosmos.sharedNotificationContainerViewModel by Fixture {
aodToLockscreenTransitionViewModel = aodToLockscreenTransitionViewModel,
aodToOccludedTransitionViewModel = aodToOccludedTransitionViewModel,
aodToPrimaryBouncerTransitionViewModel = aodToPrimaryBouncerTransitionViewModel,
- dozingToDreamingTransitionViewModel = dozingToDreamingTransitionViewModel,
dozingToGlanceableHubTransitionViewModel = dozingToGlanceableHubTransitionViewModel,
dozingToLockscreenTransitionViewModel = dozingToLockscreenTransitionViewModel,
dozingToOccludedTransitionViewModel = dozingToOccludedTransitionViewModel,
diff --git a/ravenwood/texts/ravenwood-framework-policies.txt b/ravenwood/texts/ravenwood-framework-policies.txt
index 0695316543ae..5c1766241698 100644
--- a/ravenwood/texts/ravenwood-framework-policies.txt
+++ b/ravenwood/texts/ravenwood-framework-policies.txt
@@ -50,8 +50,10 @@ class android.net.UriCodec keepclass # no-pta
class android.telephony.PinResult keepclass # no-pta
# Just enough to support mocking, no further functionality
-class android.content.BroadcastReceiver keep # no-pta
- method <init> ()V keep
+class android.content.BroadcastReceiver allow-annotation
+ method <init> ()V allow-annotation
+
+# TODO: Convert the following policies to "allow-annotation".
class android.content.Context keep # no-pta
method <init> ()V keep
method getSystemService (Ljava/lang/Class;)Ljava/lang/Object; keep # no-pta
diff --git a/ravenwood/texts/ravenwood-standard-options.txt b/ravenwood/texts/ravenwood-standard-options.txt
index 0edc348fc7f2..233657557747 100644
--- a/ravenwood/texts/ravenwood-standard-options.txt
+++ b/ravenwood/texts/ravenwood-standard-options.txt
@@ -36,6 +36,9 @@
--ignore-annotation
android.ravenwood.annotation.RavenwoodIgnore
+--partially-allowed-annotation
+ android.ravenwood.annotation.RavenwoodPartiallyAllowlisted
+
--substitute-annotation
android.ravenwood.annotation.RavenwoodReplace
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/util/MediaSmartspaceLoggerKosmos.kt b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestPartiallyAllowlisted.java
index c63dec523228..49b5938941fb 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/util/MediaSmartspaceLoggerKosmos.kt
+++ b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestPartiallyAllowlisted.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2023 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.
@@ -13,11 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+package android.hosttest.annotation;
-package com.android.systemui.media.controls.util
+import static java.lang.annotation.ElementType.TYPE;
-import com.android.systemui.kosmos.Kosmos
-import org.mockito.Mockito.mock
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
-var Kosmos.mediaSmartspaceLogger by Kosmos.Fixture { MediaSmartspaceLogger() }
-val Kosmos.mockMediaSmartspaceLogger by Kosmos.Fixture { mock(MediaSmartspaceLogger::class.java) }
+@Target({TYPE})
+@Retention(RetentionPolicy.CLASS)
+public @interface HostSideTestPartiallyAllowlisted {
+}
diff --git a/ravenwood/tools/hoststubgen/hoststubgen-standard-options.txt b/ravenwood/tools/hoststubgen/hoststubgen-standard-options.txt
index 9c46a1646560..062541241d2c 100644
--- a/ravenwood/tools/hoststubgen/hoststubgen-standard-options.txt
+++ b/ravenwood/tools/hoststubgen/hoststubgen-standard-options.txt
@@ -20,6 +20,9 @@
--keep-class-annotation
android.hosttest.annotation.HostSideTestWholeClassKeep
+--partially-allowed-annotation
+ android.hosttest.annotation.HostSideTestPartiallyAllowlisted
+
--throw-annotation
android.hosttest.annotation.HostSideTestThrow
diff --git a/ravenwood/tools/hoststubgen/hoststubgen-test-policy-override.txt b/ravenwood/tools/hoststubgen/hoststubgen-test-policy-override.txt
deleted file mode 100644
index 000771a7022e..000000000000
--- a/ravenwood/tools/hoststubgen/hoststubgen-test-policy-override.txt
+++ /dev/null
@@ -1,82 +0,0 @@
-# *************************************************************************************************
-# This file contains "policies" for HostStubGen used by its automated tests.
-# For the "real" Ravenwood policies, see the frameworks/base/ravenwood/texts/ directory.
-# *************************************************************************************************
-
-# --------------------------------------------------------------------------------------------------
-# Directions on auto-generated classes, where we can't use Java annotations (yet).
-# --------------------------------------------------------------------------------------------------
-class android.Manifest stubclass
-class android.R stubclass
-class android.os.PersistableBundleProto keepclass
-
-# This is in module-utils, where using a HostStubGen annotation would be complicated, so we
-# add a direction here rather than using a java annotation.
-# The build file says it's deprecated, anyway...? Figure out what to do with it.
-class com.android.internal.util.Preconditions keepclass
-
-# --------------------------------------------------------------------------------------------------
-# Actual framework classes
-# --------------------------------------------------------------------------------------------------
-
-# Put basic exception classes in the "impl" jar.
-# We don't put them in stub yet (until something actually needs them).
-class android.os.DeadObjectException keepclass
-class android.os.DeadSystemRuntimeException keepclass
-class android.os.NetworkOnMainThreadException keepclass
-class android.os.RemoteException keepclass
-class android.os.ServiceSpecificException keepclass
-class android.util.AndroidException keepclass
-class android.util.AndroidRuntimeException keepclass
-class android.os.DeadSystemException keepclass
-
-
-# For now, we only want to expose ArrayMap and Log, but they and their tests depend on
-# more classes.
-
-class android.util.ArrayMap stubclass
-
-# Used by ArrayMap. No need to put them in the stub, but we need them in impl.
-class android.util.MapCollections keepclass
-class android.util.ContainerHelpers keepclass
-class android.util.EmptyArray stubclass
-class com.android.internal.util.XmlUtils keepclass
-class com.android.internal.util.FastMath keepclass
-class android.util.MathUtils keepclass
-
-
-class android.util.Log stubclass
-class android.util.Slog stubclass
-# We don't use Log's native code, yet. Instead, the following line enables the Java substitution.
-# Comment it out to disable Java substitution of Log's native methods.
-class android.util.Log !com.android.hoststubgen.nativesubstitution.Log_host
-
-# Used by log
-class com.android.internal.util.FastPrintWriter keepclass
-class com.android.internal.util.LineBreakBufferedWriter keepclass
-
-class android.util.EventLog stubclass
-class android.util.EventLog !com.android.hoststubgen.nativesubstitution.EventLog_host
-class android.util.EventLog$Event stubclass
-
-# Expose Context because it's referred to by AndroidTestCase, but don't need to expose any of
-# its members.
-class android.content.Context keep
-
-# Expose Parcel, Parcel and there relevant classes, which are used by ArrayMapTets.
-class android.os.Parcelable StubClass
-class android.os.Parcel StubClass
-class android.os.Parcel !com.android.hoststubgen.nativesubstitution.Parcel_host
-
-class android.os.IBinder stubClass
-class android.os.IInterface stubclass
-
-class android.os.BadParcelableException stubclass
-class android.os.BadTypeParcelableException stubclass
-
-class android.os.BaseBundle stubclass
-class android.os.Bundle stubclass
-class android.os.PersistableBundle stubclass
-
-class android.os.MessageQueue stubclass
-class android.os.MessageQueue !com.android.hoststubgen.nativesubstitution.MessageQueue_host
diff --git a/ravenwood/tools/hoststubgen/invoketest/hoststubgen-invoke-test.sh b/ravenwood/tools/hoststubgen/invoketest/hoststubgen-invoke-test.sh
index 084448d0a797..da1e40a27944 100755
--- a/ravenwood/tools/hoststubgen/invoketest/hoststubgen-invoke-test.sh
+++ b/ravenwood/tools/hoststubgen/invoketest/hoststubgen-invoke-test.sh
@@ -47,6 +47,7 @@ INJAR=hoststubgen-test-tiny-framework.jar
OUTJAR=$TEMP/host.jar
ANNOTATION_FILTER=$TEMP/annotation-filter.txt
+POLICY_FILE=$TEMP/policy-file.txt
HOSTSTUBGEN_OUT=$TEMP/output.txt
@@ -66,12 +67,14 @@ hoststubgen() {
run_hoststubgen() {
local test_name="$1"
local annotation_filter="$2"
+ local policy="$3"
echo "# Test: $test_name"
cleanup_temp
local filter_arg=""
+ local policy_arg=""
if [[ "$annotation_filter" != "" ]] ; then
echo "$annotation_filter" > $ANNOTATION_FILTER
@@ -80,6 +83,13 @@ run_hoststubgen() {
cat $ANNOTATION_FILTER
fi
+ if [[ "$policy" != "" ]] ; then
+ echo "$policy" > $POLICY_FILE
+ policy_arg="--policy-override-file $POLICY_FILE"
+ echo "=== policy ==="
+ cat $POLICY_FILE
+ fi
+
local out_arg=""
if [[ "$OUTJAR" != "" ]] ; then
@@ -108,7 +118,10 @@ run_hoststubgen() {
android.hosttest.annotation.HostSideTestClassLoadHook \
--keep-static-initializer-annotation \
android.hosttest.annotation.HostSideTestStaticInitializerKeep \
+ --partially-allowed-annotation \
+ android.hosttest.annotation.HostSideTestPartiallyAllowlisted \
$filter_arg \
+ $policy_arg \
$EXTRA_ARGS \
|& tee $HOSTSTUBGEN_OUT
HOSTSTUBGEN_RC=${PIPESTATUS[0]}
@@ -132,10 +145,11 @@ assert_file_generated() {
}
run_hoststubgen_for_success() {
+ local test_name="$1"
run_hoststubgen "$@"
if (( $HOSTSTUBGEN_RC != 0 )) ; then
- echo "HostStubGen expected to finish successfully, but failed with $rc"
+ echo "HostStubGen expected to finish successfully, but failed with $HOSTSTUBGEN_RC: Test=$test_name"
return 1
fi
@@ -151,7 +165,7 @@ run_hoststubgen_for_failure() {
run_hoststubgen "$test_name" "$@"
if (( $HOSTSTUBGEN_RC == 0 )) ; then
- echo "HostStubGen expected to fail, but it didn't fail"
+ echo "HostStubGen expected to fail, but it didn't fail. Test=$test_name"
return 1
fi
@@ -161,24 +175,31 @@ run_hoststubgen_for_failure() {
# Start the tests...
+# These classes require special care, so let's delete them in most tests...
+DELETE_PARTIAL_ANNOTATION_CLASSESS='
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted remove
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad remove
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad remove
+'
+
# Pass "" as a filter to _not_ add `--annotation-allowed-classes-file`.
-run_hoststubgen_for_success "No annotation filter" ""
+run_hoststubgen_for_success "No annotation filter" "" "$DELETE_PARTIAL_ANNOTATION_CLASSESS"
# Now, we use " ", so we do add `--annotation-allowed-classes-file`.
run_hoststubgen_for_failure "No classes are allowed to have annotations" \
"not allowed to have Ravenwood annotations" \
- " "
+ " " "$DELETE_PARTIAL_ANNOTATION_CLASSESS"
run_hoststubgen_for_success "All classes allowed (wildcard)" \
"
* # Allow all classes
-"
+" "$DELETE_PARTIAL_ANNOTATION_CLASSESS"
run_hoststubgen_for_failure "All classes disallowed (wildcard)" \
"not allowed to have Ravenwood annotations" \
"
!* # Disallow all classes
-"
+" "$DELETE_PARTIAL_ANNOTATION_CLASSESS"
run_hoststubgen_for_failure "Some classes not allowed (1)" \
"not allowed to have Ravenwood annotations" \
@@ -186,7 +207,7 @@ run_hoststubgen_for_failure "Some classes not allowed (1)" \
android.hosttest.*
com.android.hoststubgen.*
com.supported.*
-"
+" "$DELETE_PARTIAL_ANNOTATION_CLASSESS"
run_hoststubgen_for_failure "Some classes not allowed (2)" \
"not allowed to have Ravenwood annotations" \
@@ -194,7 +215,7 @@ run_hoststubgen_for_failure "Some classes not allowed (2)" \
android.hosttest.*
com.android.hoststubgen.*
com.unsupported.*
-"
+" "$DELETE_PARTIAL_ANNOTATION_CLASSESS"
run_hoststubgen_for_success "All classes allowed (package wildcard)" \
"
@@ -202,27 +223,109 @@ android.hosttest.*
com.android.hoststubgen.*
com.supported.*
com.unsupported.*
-"
+" "$DELETE_PARTIAL_ANNOTATION_CLASSESS"
run_hoststubgen_for_failure "One specific class disallowed" \
"TinyFrameworkAnnotations is not allowed to have Ravenwood annotations" \
"
!com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations
* # All other classes allowed
-"
+" "$DELETE_PARTIAL_ANNOTATION_CLASSESS"
run_hoststubgen_for_success "One specific class disallowed, but it doesn't use annotations" \
"
!com.android.hoststubgen.test.tinyframework.TinyFrameworkForTextPolicy
* # All other classes allowed
-"
+" "$DELETE_PARTIAL_ANNOTATION_CLASSESS"
-OUTJAR="" run_hoststubgen_for_success "No output generation" ""
+OUTJAR="" run_hoststubgen_for_success "No output generation" "" "$DELETE_PARTIAL_ANNOTATION_CLASSESS"
EXTRA_ARGS="--in-jar abc" run_hoststubgen_for_failure "Duplicate arg" \
"Duplicate or conflicting argument found: --in-jar" \
""
+# ---------------------------------------------------------------------------------------------
+# Tests for "partially-allowlisted".
+# ---------------------------------------------------------------------------------------------
+
+# Allowlist used by hoststubgen-test-tiny-test.
+ALLOWLIST='
+com.android.hoststubgen.test.tinyframework.*
+com.supported.*
+com.unsupported.*
+!*
+'
+
+run_hoststubgen_for_success 'The settings used by hoststubgen-test-tiny-test' \
+ "$ALLOWLIST" \
+ '
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted allow-annotation
+ method foo2 allow-annotation
+
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad remove
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad remove
+'
+
+run_hoststubgen_for_failure 'PartiallyAllowlisted does not have allow-annotation' \
+ "PartiallyAllowlisted has annotation android.hosttest.annotation.HostSideTestPartiallyAllowlisted, but" \
+ "$ALLOWLIST" \
+ '
+#class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted allow-annotation
+# method foo2 allow-annotation
+
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad remove
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad remove
+'
+
+
+run_hoststubgen_for_failure 'PartiallyAllowlisted.foo2 does not have allow-annotation' \
+ "foo2(I)I is not allowed to have Ravenwood annotations. (Class is partially allowlisted.)" \
+ "$ALLOWLIST" \
+ '
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted allow-annotation
+# method foo2 allow-annotation
+
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad remove
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad remove
+'
+
+run_hoststubgen_for_failure 'Partially-allowlisted classes cannot have class-wide policies' \
+ "PartialWithWholeClass_bad has class wide annotation android.hosttest.annotation.HostSideTestWholeClassKeep" \
+ "$ALLOWLIST" \
+ '
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted allow-annotation
+ method foo2 allow-annotation
+
+# Now with allow-annotation
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad allow-annotation
+
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad remove
+'
+
+run_hoststubgen_for_failure 'Partially-allowlisted classes cannot have class-wide policies' \
+ "PartiallyAllowlistedWithoutAnnot_bad must have android.hosttest.annotation.HostSideTestPartiallyAllowlisted" \
+ "$ALLOWLIST" \
+ '
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted allow-annotation
+ method foo2 allow-annotation
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad remove
+
+# Now with allow-annotation
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad allow-annotation
+'
+
+run_hoststubgen_for_success 'The settings used by hoststubgen-test-tiny-test' \
+ "$ALLOWLIST" \
+ '
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted allow-annotation
+ method foo2 allow-annotation
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad remove
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad remove
+
+# NoAnnotations has no annotations at all. Setting "allow-annotation" to it is okay even though
+# it does not have an @HostSideTestPartiallyAllowlisted, because it does nott have any other annotations anyway.
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$NoAnnotations allow-annotation
+'
echo "All tests passed"
exit 0
diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGen.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGen.kt
index 83a7069bb308..7e294ed652d3 100644
--- a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGen.kt
+++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGen.kt
@@ -151,7 +151,7 @@ class HostStubGen(val options: HostStubGenOptions) {
filter
)
- val annotationAllowedClassesFilter = options.annotationAllowedClassesFile.get.let { file ->
+ val annotationAllowedPredicate = options.annotationAllowedClassesFile.get.let { file ->
if (file == null) {
ClassPredicate.newConstantPredicate(true) // Allow all classes
} else {
@@ -160,7 +160,7 @@ class HostStubGen(val options: HostStubGenOptions) {
}
// Next, Java annotation based filter.
- filter = AnnotationBasedFilter(
+ val annotFilter = AnnotationBasedFilter(
errors,
allClasses,
options.keepAnnotations,
@@ -172,10 +172,12 @@ class HostStubGen(val options: HostStubGenOptions) {
options.redirectAnnotations,
options.redirectionClassAnnotations,
options.classLoadHookAnnotations,
+ options.partiallyAllowedAnnotations,
options.keepStaticInitializerAnnotations,
- annotationAllowedClassesFilter,
+ annotationAllowedPredicate,
filter
)
+ filter = annotFilter
// Next, "text based" filter, which allows to override polices without touching
// the target code.
@@ -183,6 +185,7 @@ class HostStubGen(val options: HostStubGenOptions) {
val builder = TextFileFilterPolicyBuilder(allClasses, filter)
options.policyOverrideFiles.forEach(builder::parse)
filter = builder.createOutputFilter()
+ annotFilter.annotationAllowedMembers = builder.annotationAllowedMembersFilter
}
// Apply the implicit filter.
diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenOptions.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenOptions.kt
index 297420d08ac1..1ab88d24ab28 100644
--- a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenOptions.kt
+++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenOptions.kt
@@ -86,6 +86,7 @@ class HostStubGenOptions(
var removeAnnotations: MutableSet<String> = mutableSetOf(),
var ignoreAnnotations: MutableSet<String> = mutableSetOf(),
var keepClassAnnotations: MutableSet<String> = mutableSetOf(),
+ var partiallyAllowedAnnotations: MutableSet<String> = mutableSetOf(),
var redirectAnnotations: MutableSet<String> = mutableSetOf(),
var substituteAnnotations: MutableSet<String> = mutableSetOf(),
@@ -181,6 +182,9 @@ class HostStubGenOptions(
"--keep-class-annotation" ->
ret.keepClassAnnotations.addUniqueAnnotationArg()
+ "--partially-allowed-annotation" ->
+ ret.partiallyAllowedAnnotations.addUniqueAnnotationArg()
+
"--throw-annotation" ->
ret.throwAnnotations.addUniqueAnnotationArg()
@@ -287,6 +291,7 @@ class HostStubGenOptions(
removeAnnotations=$removeAnnotations,
ignoreAnnotations=$ignoreAnnotations,
keepClassAnnotations=$keepClassAnnotations,
+ partiallyAllowedAnnotations=$partiallyAllowedAnnotations,
substituteAnnotations=$substituteAnnotations,
nativeSubstituteAnnotations=$redirectionClassAnnotations,
classLoadHookAnnotations=$classLoadHookAnnotations,
diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/asm/AsmUtils.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/asm/AsmUtils.kt
index f47aaba8ef22..735635cc309a 100644
--- a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/asm/AsmUtils.kt
+++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/asm/AsmUtils.kt
@@ -191,7 +191,14 @@ fun String.toJvmClassName(): String {
}
fun String.toHumanReadableClassName(): String {
- return this.replace('/', '.')
+ var ret = this
+ if (ret.startsWith("L")) {
+ ret = ret.substring(1)
+ }
+ if (ret.endsWith(";")) {
+ ret = ret.substring(0, ret.length - 1)
+ }
+ return ret.replace('/', '.')
}
fun String.toHumanReadableMethodName(): String {
diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/AnnotationBasedFilter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/AnnotationBasedFilter.kt
index 9b5d60237db0..73c72a21ef7b 100644
--- a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/AnnotationBasedFilter.kt
+++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/AnnotationBasedFilter.kt
@@ -53,10 +53,19 @@ class AnnotationBasedFilter(
redirectAnnotations_: Set<String>,
redirectionClassAnnotations_: Set<String>,
classLoadHookAnnotations_: Set<String>,
+ partiallyAllowlistedClassAnnotations_: Set<String>,
keepStaticInitializerAnnotations_: Set<String>,
private val annotationAllowedClassesFilter: ClassPredicate,
fallback: OutputFilter,
) : DelegatingFilter(fallback) {
+
+ /**
+ * This is a filter chain to check if an entity (class/member) has a "allow-annotation"
+ * policy.
+ */
+ var annotationAllowedMembers: OutputFilter =
+ ConstantFilter(FilterPolicy.Remove, "default disallowed")
+
private val keepAnnotations = convertToInternalNames(keepAnnotations_)
private val keepClassAnnotations = convertToInternalNames(keepClassAnnotations_)
private val throwAnnotations = convertToInternalNames(throwAnnotations_)
@@ -67,6 +76,9 @@ class AnnotationBasedFilter(
private val redirectionClassAnnotations =
convertToInternalNames(redirectionClassAnnotations_)
private val classLoadHookAnnotations = convertToInternalNames(classLoadHookAnnotations_)
+ private val partiallyAllowlistedClassAnnotations =
+ convertToInternalNames(partiallyAllowlistedClassAnnotations_)
+
private val keepStaticInitializerAnnotations =
convertToInternalNames(keepStaticInitializerAnnotations_)
@@ -79,17 +91,22 @@ class AnnotationBasedFilter(
redirectAnnotations +
substituteAnnotations
- /** All the annotations we use. */
- private val allAnnotations = visibilityAnnotations +
+ /**
+ * Annotations that require "fully" allowlisting.
+ */
+ private val allowlistRequiringAnnotations = visibilityAnnotations +
redirectionClassAnnotations +
classLoadHookAnnotations +
keepStaticInitializerAnnotations
+ // partiallyAllowlistedClassAnnotations // This is excluded.
/**
- * All the annotations we use. Note, this one is in a [convertToJvmNames] format unlike
- * other ones, because of how it's used.
+ * We always keep these types.
+ *
+ * Note, this one is in a [convertToJvmNames] format unlike other ones, because of how it's
+ * used.
*/
- private val allAnnotationClasses: Set<String> = convertToJvmNames(
+ private val alwaysKeepClasses: Set<String> = convertToJvmNames(
keepAnnotations_ +
keepClassAnnotations_ +
throwAnnotations_ +
@@ -98,6 +115,7 @@ class AnnotationBasedFilter(
substituteAnnotations_ +
redirectionClassAnnotations_ +
classLoadHookAnnotations_ +
+ partiallyAllowlistedClassAnnotations_ +
keepStaticInitializerAnnotations_
)
@@ -122,7 +140,7 @@ class AnnotationBasedFilter(
override fun getPolicyForClass(className: String): FilterPolicyWithReason {
// If it's any of the annotations, then always keep it.
- if (allAnnotationClasses.contains(className)) {
+ if (alwaysKeepClasses.contains(className)) {
return FilterPolicy.KeepClass.withReason("HostStubGen Annotation")
}
@@ -197,13 +215,34 @@ class AnnotationBasedFilter(
val classLoadHooks: List<String>
init {
- val allowAnnotation = annotationAllowedClassesFilter.matches(cn.name)
- detectInvalidAnnotations(
- cn.name, allowAnnotation,
+ // First, check if the class has "partially-allowed" policy.
+ // This filter chain contains
+ val annotationPartiallyAllowedClass =
+ annotationAllowedMembers.getPolicyForClass(cn.name).policy ==
+ FilterPolicy.AnnotationAllowed
+
+ // If a class is partially-allowlisted, then it's not fully-allowlisted.
+ // Otherwise, just use annotationAllowedClassesFilter.
+ val fullyAllowAnnotation = !annotationPartiallyAllowedClass &&
+ annotationAllowedClassesFilter.matches(cn.name)
+ detectInvalidAnnotations(isClass = true,
+ cn.name, fullyAllowAnnotation, annotationPartiallyAllowedClass,
+ annotationPartiallyAllowedClass,
cn.visibleAnnotations, cn.invisibleAnnotations,
"class", cn.name
)
- classPolicy = cn.findAnyAnnotation(visibilityAnnotations)?.policy
+
+ val classAnnot = cn.findAnyAnnotation(visibilityAnnotations)
+ classPolicy = classAnnot?.policy
+
+ classPolicy?.let { policy ->
+ if (policy.policy.isClassWide && annotationPartiallyAllowedClass) {
+ errors.onErrorFound("Class ${cn.name.toHumanReadableClassName()}" +
+ " has class wide annotation" +
+ " ${classAnnot?.desc?.toHumanReadableClassName()}" +
+ ", which can't be used in a partially-allowlisted class")
+ }
+ }
redirectionClass = cn.findAnyAnnotation(redirectionClassAnnotations)?.let { an ->
getAnnotationField(an, "value")?.let { resolveRelativeClass(cn, it) }
}
@@ -216,8 +255,10 @@ class AnnotationBasedFilter(
}
for (fn in cn.fields ?: emptyList()) {
- detectInvalidAnnotations(
- cn.name, allowAnnotation,
+ val partiallyAllowAnnotation = false // No partial allowlisting on fields (yet)
+ detectInvalidAnnotations(isClass = false,
+ cn.name, fullyAllowAnnotation, partiallyAllowAnnotation,
+ annotationPartiallyAllowedClass,
fn.visibleAnnotations, fn.invisibleAnnotations,
"field", cn.name, fn.name
)
@@ -227,8 +268,12 @@ class AnnotationBasedFilter(
}
for (mn in cn.methods ?: emptyList()) {
- detectInvalidAnnotations(
- cn.name, allowAnnotation,
+ val partiallyAllowAnnotation =
+ annotationAllowedMembers.getPolicyForMethod(cn.name, mn.name, mn.desc).policy ==
+ FilterPolicy.AnnotationAllowed
+ detectInvalidAnnotations(isClass = false,
+ cn.name, fullyAllowAnnotation, partiallyAllowAnnotation,
+ annotationPartiallyAllowedClass,
mn.visibleAnnotations, mn.invisibleAnnotations,
"method", cn.name, mn.name, mn.desc
)
@@ -263,8 +308,11 @@ class AnnotationBasedFilter(
* to avoid unnecessary string concatenations.
*/
private fun detectInvalidAnnotations(
+ isClass: Boolean,
className: String,
- allowAnnotation: Boolean,
+ fullyAllowAnnotation: Boolean,
+ partiallyAllowAnnotation: Boolean,
+ classPartiallyAllowAnnotation: Boolean,
visibles: List<AnnotationNode>?,
invisibles: List<AnnotationNode>?,
type: String,
@@ -272,13 +320,26 @@ class AnnotationBasedFilter(
name2: String = "",
name3: String = "",
) {
+ // Lazily create the description.
+ val desc = { getItemDescription(type, name1, name2, name3) }
+
+ val partiallyAllowlistAnnotation =
+ findAnyAnnotation(partiallyAllowlistedClassAnnotations, visibles, invisibles)
+ partiallyAllowlistAnnotation?.let { anot ->
+ if (!partiallyAllowAnnotation) {
+ errors.onErrorFound(desc() +
+ " has annotation ${anot.desc?.toHumanReadableClassName()}, but" +
+ " doesn't have" +
+ " '${FilterPolicy.AnnotationAllowed.policyStringOrPrefix}' policy.'")
+ }
+ }
var count = 0
var visibleCount = 0
for (an in visibles ?: emptyList()) {
if (visibilityAnnotations.contains(an.desc)) {
visibleCount++
}
- if (allAnnotations.contains(an.desc)) {
+ if (allowlistRequiringAnnotations.contains(an.desc)) {
count++
}
}
@@ -286,28 +347,54 @@ class AnnotationBasedFilter(
if (visibilityAnnotations.contains(an.desc)) {
visibleCount++
}
- if (allAnnotations.contains(an.desc)) {
+ if (allowlistRequiringAnnotations.contains(an.desc)) {
count++
}
}
- if (count > 0 && !allowAnnotation) {
+ // Special case -- if it's a class, and has an "allow-annotation" policy
+ // *and* if it actually has an annotation, then it must have the
+ // "PartiallyAllowlisted" annotation.
+ // Conversely, even if it has an "allow-annotation" policy, it's okay
+ // if it doesn't have the annotation, as long as it doesn't have any
+ // annotations.
+ if (isClass && count > 0 && partiallyAllowAnnotation) {
+ if (partiallyAllowlistAnnotation == null) {
+ val requiredAnnot = partiallyAllowlistedClassAnnotations.firstOrNull()
+ throw InvalidAnnotationException(
+ "${desc()} must have ${requiredAnnot?.toHumanReadableClassName()} to use" +
+ " annotations")
+ }
+ }
+
+ if (count > 0 && !(fullyAllowAnnotation || partiallyAllowAnnotation)) {
+ val extInfo = if (classPartiallyAllowAnnotation) {
+ " (Class is partially allowlisted.)"
+ } else {""}
throw InvalidAnnotationException(
- "Class ${className.toHumanReadableClassName()} is not allowed to have " +
- "Ravenwood annotations. Contact g/ravenwood for more details."
+ "${desc()} is not allowed to have " +
+ "Ravenwood annotations.$extInfo Contact g/ravenwood for more details."
)
}
if (visibleCount > 1) {
- val description = if (name2 == "" && name3 == "") {
- "$type $name1"
- } else {
- "$type $name1.$name2$name3"
- }
throw InvalidAnnotationException(
- "Found more than one visibility annotations on $description"
+ "Found more than one visibility annotations on ${desc()}"
)
}
}
+ private fun getItemDescription(
+ type: String,
+ name1: String,
+ name2: String,
+ name3: String,
+ ): String {
+ return if (name2 == "" && name3 == "") {
+ "$type $name1"
+ } else {
+ "$type $name1.$name2$name3"
+ }
+ }
+
/**
* Return the (String) value of 'value' parameter from an annotation.
*/
diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicy.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicy.kt
index 2f2f81b05ad1..81c26ffdf1f4 100644
--- a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicy.kt
+++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicy.kt
@@ -15,44 +15,51 @@
*/
package com.android.hoststubgen.filters
-enum class FilterPolicy {
+enum class FilterPolicy(val policyStringOrPrefix: String) {
/**
* Keep the item in the jar file.
*/
- Keep,
+ Keep("keep"),
/**
* Only usable with classes. Keep the class in the jar, and also all its members.
* Each member can have another policy to override it.
*/
- KeepClass,
+ KeepClass("keepclass"),
/**
* Only usable with methods. Replace a method with a "substitution" method.
*/
- Substitute,
+ Substitute("@"), // @ is a prefix
/**
* Only usable with methods. Redirect a method to a method in the substitution class.
*/
- Redirect,
+ Redirect("redirect"),
/**
* Only usable with methods. The item will be kept in the impl jar file, but when called,
* it'll throw.
*/
- Throw,
+ Throw("throw"),
/**
* Only usable with methods. The item will be kept in the impl jar file, but when called,
* it'll no-op.
*/
- Ignore,
+ Ignore("ignore"),
/**
* Remove the item completely.
*/
- Remove;
+ Remove("remove"),
+
+ /**
+ * Special policy used for "partial annotation allowlisting". This policy must not be
+ * used in the "main" filter chain. (which would be detected by [SanitizationFilter].)
+ * It's used in a separate filter chain used by [AnnotationBasedFilter].
+ */
+ AnnotationAllowed("allow-annotation");
val needsInOutput: Boolean
get() {
@@ -66,7 +73,7 @@ enum class FilterPolicy {
val isUsableWithClasses: Boolean
get() {
return when (this) {
- Keep, KeepClass, Remove -> true
+ Keep, KeepClass, Remove, AnnotationAllowed -> true
else -> false
}
}
@@ -75,6 +82,7 @@ enum class FilterPolicy {
val isUsableWithFields: Boolean
get() {
return when (this) {
+ // AnnotationAllowed isn't supported on fields (yet). We could support it if needed.
Keep, Remove -> true
else -> false
}
@@ -102,7 +110,7 @@ enum class FilterPolicy {
val isSupported: Boolean
get() {
return when (this) {
- Keep, KeepClass, Substitute, Redirect -> true
+ Keep, KeepClass, Substitute, Redirect, AnnotationAllowed -> true
else -> false
}
}
@@ -115,6 +123,25 @@ enum class FilterPolicy {
}
}
+ val isClassWide: Boolean
+ get() {
+ return when (this) {
+ Remove, KeepClass -> true
+ else -> false
+ }
+ }
+
+ /**
+ * Internal policies must not be used in the main filter chain.
+ */
+ val isInternalPolicy: Boolean
+ get() {
+ return when (this) {
+ AnnotationAllowed -> true
+ else -> false
+ }
+ }
+
/**
* Convert KeepClass to Keep, or return itself.
*/
diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/SanitizationFilter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/SanitizationFilter.kt
index 18a1e16bcf3a..4375c6500b62 100644
--- a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/SanitizationFilter.kt
+++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/SanitizationFilter.kt
@@ -16,6 +16,7 @@
package com.android.hoststubgen.filters
import com.android.hoststubgen.HostStubGenErrors
+import com.android.hoststubgen.HostStubGenInternalException
import com.android.hoststubgen.asm.ClassNodes
import com.android.hoststubgen.asm.toHumanReadableClassName
import com.android.hoststubgen.log
@@ -28,12 +29,30 @@ class SanitizationFilter(
private val classes: ClassNodes,
fallback: OutputFilter
) : DelegatingFilter(fallback) {
+ private fun validate(policy: FilterPolicyWithReason): FilterPolicyWithReason {
+ // "Internal" policies shouldn't be used in the "main" filter chain.
+ // They're for filter chains for other purposes.
+ if (policy.policy.isInternalPolicy) {
+ throw HostStubGenInternalException(
+ "Policy $policy must not be used in the \"real\" filter chain.")
+ }
+ return policy
+ }
+
+ override fun getPolicyForClass(className: String): FilterPolicyWithReason {
+ return validate(super.getPolicyForClass(className))
+ }
+
+ override fun getPolicyForField(className: String, fieldName: String): FilterPolicyWithReason {
+ return validate(super.getPolicyForField(className, fieldName))
+ }
+
override fun getPolicyForMethod(
className: String,
methodName: String,
descriptor: String
): FilterPolicyWithReason {
- val policy = super.getPolicyForMethod(className, methodName, descriptor)
+ val policy = validate(super.getPolicyForMethod(className, methodName, descriptor))
if (policy.policy == FilterPolicy.Redirect) {
// Check whether the hosting class has a redirection class
if (getRedirectionClass(className) == null) {
diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/TextFileFilterPolicyParser.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/TextFileFilterPolicyParser.kt
index 9782f3d0f591..d0c97c006647 100644
--- a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/TextFileFilterPolicyParser.kt
+++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/TextFileFilterPolicyParser.kt
@@ -122,6 +122,25 @@ class TextFileFilterPolicyBuilder(
mutableListOf<TextFilePolicyMethodReplaceFilter.MethodCallReplaceSpec>()
/**
+ * Fields for a filter chain used for "partial allowlisting", which are used by
+ * [AnnotationBasedFilter].
+ */
+ private val annotationAllowedInMemoryFilter: InMemoryOutputFilter
+ val annotationAllowedMembersFilter: OutputFilter
+
+ private val annotationAllowedPolicy = FilterPolicy.AnnotationAllowed.withReason(FILTER_REASON)
+
+ init {
+ // Create a filter that checks "partial allowlisting".
+ var aaf: OutputFilter = ConstantFilter(FilterPolicy.Remove, "default disallowed")
+
+ aaf = InMemoryOutputFilter(classes, aaf)
+ annotationAllowedInMemoryFilter = aaf
+
+ annotationAllowedMembersFilter = annotationAllowedInMemoryFilter
+ }
+
+ /**
* Parse a given policy file. This method can be called multiple times to read from
* multiple files. To get the resulting filter, use [createOutputFilter]
*/
@@ -153,6 +172,11 @@ class TextFileFilterPolicyBuilder(
private inner class Processor : PolicyFileProcessor {
override fun onPackage(name: String, policy: FilterPolicyWithReason) {
+ if (policy.policy == FilterPolicy.AnnotationAllowed) {
+ throw ParseException("${FilterPolicy.AnnotationAllowed.policyStringOrPrefix}" +
+ " on `package` isn't supported yet.")
+ return
+ }
packageFilter.addPolicy(name, policy)
}
@@ -169,6 +193,11 @@ class TextFileFilterPolicyBuilder(
}
override fun onSimpleClassPolicy(className: String, policy: FilterPolicyWithReason) {
+ if (policy.policy == FilterPolicy.AnnotationAllowed) {
+ annotationAllowedInMemoryFilter.setPolicyForClass(
+ className, annotationAllowedPolicy)
+ return
+ }
imf.setPolicyForClass(className, policy)
}
@@ -224,6 +253,11 @@ class TextFileFilterPolicyBuilder(
methodDesc: String,
policy: FilterPolicyWithReason,
) {
+ if (policy.policy == FilterPolicy.AnnotationAllowed) {
+ annotationAllowedInMemoryFilter.setPolicyForMethod(
+ className, methodName, methodDesc, annotationAllowedPolicy)
+ return
+ }
imf.setPolicyForMethod(className, methodName, methodDesc, policy)
}
@@ -375,14 +409,15 @@ class TextFileFilterPolicyParser {
private fun parsePolicy(s: String): FilterPolicy {
return when (s.lowercase()) {
- "k", "keep" -> FilterPolicy.Keep
- "t", "throw" -> FilterPolicy.Throw
- "r", "remove" -> FilterPolicy.Remove
- "kc", "keepclass" -> FilterPolicy.KeepClass
- "i", "ignore" -> FilterPolicy.Ignore
- "rdr", "redirect" -> FilterPolicy.Redirect
+ "k", FilterPolicy.Keep.policyStringOrPrefix -> FilterPolicy.Keep
+ "t", FilterPolicy.Throw.policyStringOrPrefix -> FilterPolicy.Throw
+ "r", FilterPolicy.Remove.policyStringOrPrefix -> FilterPolicy.Remove
+ "kc", FilterPolicy.KeepClass.policyStringOrPrefix -> FilterPolicy.KeepClass
+ "i", FilterPolicy.Ignore.policyStringOrPrefix -> FilterPolicy.Ignore
+ "rdr", FilterPolicy.Redirect.policyStringOrPrefix -> FilterPolicy.Redirect
+ FilterPolicy.AnnotationAllowed.policyStringOrPrefix -> FilterPolicy.AnnotationAllowed
else -> {
- if (s.startsWith("@")) {
+ if (s.startsWith(FilterPolicy.Substitute.policyStringOrPrefix)) {
FilterPolicy.Substitute
} else {
throw ParseException("Invalid policy \"$s\"")
diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/utils/ClassPredicate.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/utils/ClassPredicate.kt
index 810dd71732c8..4c53bc8fba97 100644
--- a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/utils/ClassPredicate.kt
+++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/utils/ClassPredicate.kt
@@ -22,7 +22,9 @@ import com.android.hoststubgen.normalizeTextLine
import java.io.File
/**
- * General purpose filter for class names.
+ * General purpose class "selector", which returns a boolean for a given class name.
+ *
+ * (It's used to check if a class is in the "annotations allowed classes" allowlist.)
*/
class ClassPredicate private constructor(
private val defaultResult: Boolean,
diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/annotation-allowed-classes-tiny-framework.txt b/ravenwood/tools/hoststubgen/test-tiny-framework/annotation-allowed-classes-tiny-framework.txt
index de4cb0c536c1..8e41a87d349d 100644
--- a/ravenwood/tools/hoststubgen/test-tiny-framework/annotation-allowed-classes-tiny-framework.txt
+++ b/ravenwood/tools/hoststubgen/test-tiny-framework/annotation-allowed-classes-tiny-framework.txt
@@ -1,29 +1,8 @@
-# Only classes listed here can use the hoststubgen annotations.
-
-# For each class, we check each item in this file, and when a match is found, we
-# either allow it if the line doesn't have a !, or disallow if the line has a !.
-# All the lines after the matching line will be ignored.
-
-
-# To allow a specific class to use annotations:
-# com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations
-
-# To disallow a specific class to use annotations:
-# !com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations
-
-# To allow a specific package to use annotations:
-# com.android.hoststubgen.test.*
-
-# To disallow a specific package to use annotations:
-# !com.android.hoststubgen.test.*
-
+# Policy file for "tiny-framework" used by hoststubgen's own tests.
com.android.hoststubgen.test.tinyframework.*
com.supported.*
com.unsupported.*
-# Use this to allow all packages
-# *
-
-# Use this to allow all packages
-# !* \ No newline at end of file
+# Disallow all other classes
+!* \ No newline at end of file
diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/01-hoststubgen-test-tiny-framework-orig-dump.txt b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/01-hoststubgen-test-tiny-framework-orig-dump.txt
index b009b0957919..635f66d8e90c 100644
--- a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/01-hoststubgen-test-tiny-framework-orig-dump.txt
+++ b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/01-hoststubgen-test-tiny-framework-orig-dump.txt
@@ -67,6 +67,28 @@ RuntimeVisibleAnnotations:
java.lang.annotation.Retention(
value=Ljava/lang/annotation/RetentionPolicy;.CLASS
)
+## Class: android/hosttest/annotation/HostSideTestPartiallyAllowlisted.class
+ Compiled from "HostSideTestPartiallyAllowlisted.java"
+public interface android.hosttest.annotation.HostSideTestPartiallyAllowlisted extends java.lang.annotation.Annotation
+ minor version: 0
+ major version: 65
+ flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION
+ this_class: #x // android/hosttest/annotation/HostSideTestPartiallyAllowlisted
+ super_class: #x // java/lang/Object
+ interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
+}
+SourceFile: "HostSideTestPartiallyAllowlisted.java"
+RuntimeVisibleAnnotations:
+ x: #x(#x=[e#x.#x])
+ java.lang.annotation.Target(
+ value=[Ljava/lang/annotation/ElementType;.TYPE]
+ )
+ x: #x(#x=e#x.#x)
+ java.lang.annotation.Retention(
+ value=Ljava/lang/annotation/RetentionPolicy;.CLASS
+ )
## Class: android/hosttest/annotation/HostSideTestRedirect.class
Compiled from "HostSideTestRedirect.java"
public interface android.hosttest.annotation.HostSideTestRedirect extends java.lang.annotation.Annotation
@@ -2946,6 +2968,228 @@ SourceFile: "TinyFrameworkPackageRedirect.java"
RuntimeInvisibleAnnotations:
x: #x()
android.hosttest.annotation.HostSideTestWholeClassKeep
+## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$NoAnnotations.class
+ Compiled from "TinyFrameworkPartiallyAllowlisted.java"
+public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$NoAnnotations
+ minor version: 0
+ major version: 65
+ flags: (0x0021) ACC_PUBLIC, ACC_SUPER
+ this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$NoAnnotations
+ super_class: #x // java/lang/Object
+ interfaces: 0, fields: 0, methods: 1, attributes: 3
+Constant pool:
+{
+ public com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$NoAnnotations();
+ descriptor: ()V
+ flags: (0x0001) ACC_PUBLIC
+ Code:
+ stack=1, locals=1, args_size=1
+ x: aload_0
+ x: invokespecial #x // Method java/lang/Object."<init>":()V
+ x: return
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$NoAnnotations;
+}
+SourceFile: "TinyFrameworkPartiallyAllowlisted.java"
+NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+InnerClasses:
+ public static #x= #x of #x; // NoAnnotations=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$NoAnnotations of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad.class
+ Compiled from "TinyFrameworkPartiallyAllowlisted.java"
+public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad
+ minor version: 0
+ major version: 65
+ flags: (0x0021) ACC_PUBLIC, ACC_SUPER
+ this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad
+ super_class: #x // java/lang/Object
+ interfaces: 0, fields: 0, methods: 1, attributes: 4
+Constant pool:
+{
+ public com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad();
+ descriptor: ()V
+ flags: (0x0001) ACC_PUBLIC
+ Code:
+ stack=1, locals=1, args_size=1
+ x: aload_0
+ x: invokespecial #x // Method java/lang/Object."<init>":()V
+ x: return
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad;
+}
+SourceFile: "TinyFrameworkPartiallyAllowlisted.java"
+RuntimeInvisibleAnnotations:
+ x: #x()
+ android.hosttest.annotation.HostSideTestPartiallyAllowlisted
+ x: #x()
+ android.hosttest.annotation.HostSideTestWholeClassKeep
+NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+InnerClasses:
+ public static #x= #x of #x; // PartialWithWholeClass_bad=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted.class
+ Compiled from "TinyFrameworkPartiallyAllowlisted.java"
+public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted
+ minor version: 0
+ major version: 65
+ flags: (0x0021) ACC_PUBLIC, ACC_SUPER
+ this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted
+ super_class: #x // java/lang/Object
+ interfaces: 0, fields: 0, methods: 3, attributes: 4
+Constant pool:
+{
+ public com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted();
+ descriptor: ()V
+ flags: (0x0001) ACC_PUBLIC
+ Code:
+ stack=1, locals=1, args_size=1
+ x: aload_0
+ x: invokespecial #x // Method java/lang/Object."<init>":()V
+ x: return
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted;
+
+ public static int foo1(int);
+ descriptor: (I)I
+ flags: (0x0009) ACC_PUBLIC, ACC_STATIC
+ Code:
+ stack=2, locals=1, args_size=1
+ x: iload_0
+ x: iconst_1
+ x: iadd
+ x: ireturn
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 4 0 value I
+
+ public static int foo2(int);
+ descriptor: (I)I
+ flags: (0x0009) ACC_PUBLIC, ACC_STATIC
+ Code:
+ stack=2, locals=1, args_size=1
+ x: iload_0
+ x: iconst_2
+ x: iadd
+ x: ireturn
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 4 0 value I
+ RuntimeInvisibleAnnotations:
+ x: #x()
+ android.hosttest.annotation.HostSideTestKeep
+}
+SourceFile: "TinyFrameworkPartiallyAllowlisted.java"
+RuntimeInvisibleAnnotations:
+ x: #x()
+ android.hosttest.annotation.HostSideTestPartiallyAllowlisted
+ x: #x()
+ android.hosttest.annotation.HostSideTestKeep
+NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+InnerClasses:
+ public static #x= #x of #x; // PartiallyAllowlisted=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad.class
+ Compiled from "TinyFrameworkPartiallyAllowlisted.java"
+public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad
+ minor version: 0
+ major version: 65
+ flags: (0x0021) ACC_PUBLIC, ACC_SUPER
+ this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad
+ super_class: #x // java/lang/Object
+ interfaces: 0, fields: 0, methods: 3, attributes: 4
+Constant pool:
+{
+ public com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad();
+ descriptor: ()V
+ flags: (0x0001) ACC_PUBLIC
+ Code:
+ stack=1, locals=1, args_size=1
+ x: aload_0
+ x: invokespecial #x // Method java/lang/Object."<init>":()V
+ x: return
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad;
+
+ public static int foo1(int);
+ descriptor: (I)I
+ flags: (0x0009) ACC_PUBLIC, ACC_STATIC
+ Code:
+ stack=2, locals=1, args_size=1
+ x: iload_0
+ x: iconst_1
+ x: iadd
+ x: ireturn
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 4 0 value I
+
+ public static int foo2(int);
+ descriptor: (I)I
+ flags: (0x0009) ACC_PUBLIC, ACC_STATIC
+ Code:
+ stack=2, locals=1, args_size=1
+ x: iload_0
+ x: iconst_2
+ x: iadd
+ x: ireturn
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 4 0 value I
+ RuntimeInvisibleAnnotations:
+ x: #x()
+ android.hosttest.annotation.HostSideTestKeep
+}
+SourceFile: "TinyFrameworkPartiallyAllowlisted.java"
+RuntimeInvisibleAnnotations:
+ x: #x()
+ android.hosttest.annotation.HostSideTestKeep
+NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+InnerClasses:
+ public static #x= #x of #x; // PartiallyAllowlistedWithoutAnnot_bad=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted.class
+ Compiled from "TinyFrameworkPartiallyAllowlisted.java"
+public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted
+ minor version: 0
+ major version: 65
+ flags: (0x0021) ACC_PUBLIC, ACC_SUPER
+ this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+ super_class: #x // java/lang/Object
+ interfaces: 0, fields: 0, methods: 1, attributes: 3
+Constant pool:
+{
+ public com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted();
+ descriptor: ()V
+ flags: (0x0001) ACC_PUBLIC
+ Code:
+ stack=1, locals=1, args_size=1
+ x: aload_0
+ x: invokespecial #x // Method java/lang/Object."<init>":()V
+ x: return
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted;
+}
+SourceFile: "TinyFrameworkPartiallyAllowlisted.java"
+NestMembers:
+ com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$NoAnnotations
+ com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad
+ com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad
+ com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted
+InnerClasses:
+ public static #x= #x of #x; // NoAnnotations=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$NoAnnotations of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+ public static #x= #x of #x; // PartiallyAllowlistedWithoutAnnot_bad=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+ public static #x= #x of #x; // PartialWithWholeClass_bad=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+ public static #x= #x of #x; // PartiallyAllowlisted=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.class
Compiled from "TinyFrameworkRenamedClassCaller.java"
public class com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller
diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/03-hoststubgen-test-tiny-framework-host-dump.txt b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/03-hoststubgen-test-tiny-framework-host-dump.txt
index 84a8373008d7..51a33554afa9 100644
--- a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/03-hoststubgen-test-tiny-framework-host-dump.txt
+++ b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/03-hoststubgen-test-tiny-framework-host-dump.txt
@@ -7,6 +7,8 @@ public interface android.hosttest.annotation.HostSideTestClassLoadHook extends j
this_class: #x // android/hosttest/annotation/HostSideTestClassLoadHook
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
public abstract java.lang.String value();
descriptor: ()Ljava/lang/String;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
@@ -35,6 +37,8 @@ public interface android.hosttest.annotation.HostSideTestKeep extends java.lang.
this_class: #x // android/hosttest/annotation/HostSideTestKeep
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "HostSideTestKeep.java"
RuntimeVisibleAnnotations:
@@ -48,6 +52,30 @@ RuntimeVisibleAnnotations:
java.lang.annotation.Retention(
value=Ljava/lang/annotation/RetentionPolicy;.CLASS
)
+## Class: android/hosttest/annotation/HostSideTestPartiallyAllowlisted.class
+ Compiled from "HostSideTestPartiallyAllowlisted.java"
+public interface android.hosttest.annotation.HostSideTestPartiallyAllowlisted extends java.lang.annotation.Annotation
+ minor version: 0
+ major version: 65
+ flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION
+ this_class: #x // android/hosttest/annotation/HostSideTestPartiallyAllowlisted
+ super_class: #x // java/lang/Object
+ interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
+}
+SourceFile: "HostSideTestPartiallyAllowlisted.java"
+RuntimeVisibleAnnotations:
+ x: #x()
+ com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep
+ x: #x(#x=[e#x.#x])
+ java.lang.annotation.Target(
+ value=[Ljava/lang/annotation/ElementType;.TYPE]
+ )
+ x: #x(#x=e#x.#x)
+ java.lang.annotation.Retention(
+ value=Ljava/lang/annotation/RetentionPolicy;.CLASS
+ )
## Class: android/hosttest/annotation/HostSideTestRedirect.class
Compiled from "HostSideTestRedirect.java"
public interface android.hosttest.annotation.HostSideTestRedirect extends java.lang.annotation.Annotation
@@ -57,6 +85,8 @@ public interface android.hosttest.annotation.HostSideTestRedirect extends java.l
this_class: #x // android/hosttest/annotation/HostSideTestRedirect
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "HostSideTestRedirect.java"
RuntimeVisibleAnnotations:
@@ -79,6 +109,8 @@ public interface android.hosttest.annotation.HostSideTestRedirectionClass extend
this_class: #x // android/hosttest/annotation/HostSideTestRedirectionClass
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
public abstract java.lang.String value();
descriptor: ()Ljava/lang/String;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
@@ -107,6 +139,8 @@ public interface android.hosttest.annotation.HostSideTestRemove extends java.lan
this_class: #x // android/hosttest/annotation/HostSideTestRemove
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "HostSideTestRemove.java"
RuntimeVisibleAnnotations:
@@ -129,6 +163,8 @@ public interface android.hosttest.annotation.HostSideTestStaticInitializerKeep e
this_class: #x // android/hosttest/annotation/HostSideTestStaticInitializerKeep
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "HostSideTestStaticInitializerKeep.java"
RuntimeVisibleAnnotations:
@@ -151,6 +187,8 @@ public interface android.hosttest.annotation.HostSideTestSubstitute extends java
this_class: #x // android/hosttest/annotation/HostSideTestSubstitute
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
public abstract java.lang.String suffix();
descriptor: ()Ljava/lang/String;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
@@ -179,6 +217,8 @@ public interface android.hosttest.annotation.HostSideTestThrow extends java.lang
this_class: #x // android/hosttest/annotation/HostSideTestThrow
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "HostSideTestThrow.java"
RuntimeVisibleAnnotations:
@@ -201,6 +241,8 @@ public interface android.hosttest.annotation.HostSideTestWholeClassKeep extends
this_class: #x // android/hosttest/annotation/HostSideTestWholeClassKeep
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "HostSideTestWholeClassKeep.java"
RuntimeVisibleAnnotations:
@@ -223,6 +265,8 @@ public class com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Pro
this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 2, attributes: 4
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Proxy();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
@@ -273,6 +317,8 @@ public class com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub
this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 2, attributes: 4
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
@@ -323,6 +369,8 @@ public interface com.android.hoststubgen.test.tinyframework.IPretendingAidl
this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 0, attributes: 4
+Constant pool:
+{
}
InnerClasses:
public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl
@@ -343,6 +391,8 @@ public class com.android.hoststubgen.test.tinyframework.R$Nested
this_class: #x // com/android/hoststubgen/test/tinyframework/R$Nested
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 2, attributes: 4
+Constant pool:
+{
public static int[] ARRAY;
descriptor: [I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
@@ -400,6 +450,8 @@ public class com.android.hoststubgen.test.tinyframework.R
this_class: #x // com/android/hoststubgen/test/tinyframework/R
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 1, attributes: 4
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.R();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
@@ -433,6 +485,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 7, attributes: 3
+Constant pool:
+{
public int keep;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -591,6 +645,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHo
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 3, attributes: 3
+Constant pool:
+{
public static final java.util.Set<java.lang.Class<?>> sLoadedClasses;
descriptor: Ljava/util/Set;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
@@ -668,6 +724,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWideAn
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 4, attributes: 3
+Constant pool:
+{
public int keep;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -768,6 +826,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithIn
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault
super_class: #x // java/lang/Object
interfaces: 0, fields: 2, methods: 0, attributes: 3
+Constant pool:
+{
public static boolean sInitialized;
descriptor: Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
@@ -805,6 +865,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithIn
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub
super_class: #x // java/lang/Object
interfaces: 0, fields: 2, methods: 1, attributes: 3
+Constant pool:
+{
public static boolean sInitialized;
descriptor: Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
@@ -867,6 +929,8 @@ public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumC
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex
super_class: #x // java/lang/Enum
interfaces: 0, fields: 6, methods: 7, attributes: 4
+Constant pool:
+{
public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex RED;
descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM
@@ -1112,6 +1176,8 @@ public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumS
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple
super_class: #x // java/lang/Enum
interfaces: 0, fields: 3, methods: 5, attributes: 4
+Constant pool:
+{
public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple CAT;
descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;
flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM
@@ -1260,6 +1326,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTe
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 2, attributes: 3
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTester();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
@@ -1323,6 +1391,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkForTextPoli
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 15, attributes: 2
+Constant pool:
+{
public int stub;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -1562,6 +1632,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas$Nes
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested
super_class: #x // java/lang/Object
interfaces: 0, fields: 2, methods: 8, attributes: 6
+Constant pool:
+{
public final java.util.function.Supplier<java.lang.Integer> mSupplier;
descriptor: Ljava/util/function/Supplier;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
@@ -1749,6 +1821,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas
super_class: #x // java/lang/Object
interfaces: 0, fields: 2, methods: 8, attributes: 6
+Constant pool:
+{
public final java.util.function.Supplier<java.lang.Integer> mSupplier;
descriptor: Ljava/util/function/Supplier;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
@@ -1937,6 +2011,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallR
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 3, attributes: 4
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
@@ -2006,6 +2082,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallR
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 4, attributes: 6
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
@@ -2115,6 +2193,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNative
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 14, attributes: 3
+Constant pool:
+{
int value;
descriptor: I
flags: (0x0000)
@@ -2373,6 +2453,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 7, attributes: 3
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
@@ -2503,6 +2585,8 @@ class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$1 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 3, attributes: 6
+Constant pool:
+{
com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$1(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses);
descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V
flags: (0x0000)
@@ -2573,6 +2657,8 @@ class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 3, attributes: 6
+Constant pool:
+{
com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2();
descriptor: ()V
flags: (0x0000)
@@ -2639,6 +2725,8 @@ class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$3 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 3, attributes: 6
+Constant pool:
+{
com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$3(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses);
descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V
flags: (0x0000)
@@ -2709,6 +2797,8 @@ class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 3, attributes: 6
+Constant pool:
+{
com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4();
descriptor: ()V
flags: (0x0000)
@@ -2775,6 +2865,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClass
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 1, attributes: 4
+Constant pool:
+{
public int value;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -2818,6 +2910,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClass
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 1, attributes: 4
+Constant pool:
+{
public int value;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -2864,6 +2958,8 @@ class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$Stat
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 3, attributes: 6
+Constant pool:
+{
com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$1();
descriptor: ()V
flags: (0x0000)
@@ -2931,6 +3027,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClass
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 1, attributes: 4
+Constant pool:
+{
public int value;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -2974,6 +3072,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClass
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 2, attributes: 4
+Constant pool:
+{
public int value;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -3033,6 +3133,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClass
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass
super_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass
interfaces: 0, fields: 0, methods: 1, attributes: 4
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$SubClass(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
@@ -3068,6 +3170,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClass
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses
super_class: #x // java/lang/Object
interfaces: 0, fields: 2, methods: 4, attributes: 5
+Constant pool:
+{
public final java.util.function.Supplier<java.lang.Integer> mSupplier;
descriptor: Ljava/util/function/Supplier;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
@@ -3193,6 +3297,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedi
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 2, attributes: 3
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedirect();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
@@ -3235,6 +3341,49 @@ RuntimeVisibleAnnotations:
RuntimeInvisibleAnnotations:
x: #x()
android.hosttest.annotation.HostSideTestWholeClassKeep
+## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted.class
+ Compiled from "TinyFrameworkPartiallyAllowlisted.java"
+public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted
+ minor version: 0
+ major version: 65
+ flags: (0x0021) ACC_PUBLIC, ACC_SUPER
+ this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted
+ super_class: #x // java/lang/Object
+ interfaces: 0, fields: 0, methods: 1, attributes: 5
+Constant pool:
+{
+ public static int foo2(int);
+ descriptor: (I)I
+ flags: (0x0009) ACC_PUBLIC, ACC_STATIC
+ Code:
+ stack=2, locals=1, args_size=1
+ x: iload_0
+ x: iconst_2
+ x: iadd
+ x: ireturn
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 4 0 value I
+ RuntimeVisibleAnnotations:
+ x: #x()
+ com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep
+ RuntimeInvisibleAnnotations:
+ x: #x()
+ android.hosttest.annotation.HostSideTestKeep
+}
+InnerClasses:
+ public static #x= #x of #x; // PartiallyAllowlisted=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+SourceFile: "TinyFrameworkPartiallyAllowlisted.java"
+RuntimeVisibleAnnotations:
+ x: #x()
+ com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep
+RuntimeInvisibleAnnotations:
+ x: #x()
+ android.hosttest.annotation.HostSideTestPartiallyAllowlisted
+ x: #x()
+ android.hosttest.annotation.HostSideTestKeep
+NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.class
Compiled from "TinyFrameworkRenamedClassCaller.java"
public class com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller
@@ -3244,6 +3393,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClas
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 2, attributes: 3
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
@@ -3295,6 +3446,8 @@ public class com.android.hoststubgen.test.tinyframework.packagetest.A
this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/A
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "A.java"
RuntimeVisibleAnnotations:
@@ -3309,6 +3462,8 @@ public class com.android.hoststubgen.test.tinyframework.packagetest.sub.A
this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/sub/A
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "A.java"
RuntimeVisibleAnnotations:
@@ -3323,6 +3478,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.C1
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "C1.java"
RuntimeVisibleAnnotations:
@@ -3337,6 +3494,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.C2 extends
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2
super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "C2.java"
RuntimeVisibleAnnotations:
@@ -3351,6 +3510,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.C3 extends
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C3
super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "C3.java"
RuntimeVisibleAnnotations:
@@ -3365,6 +3526,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.CA
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CA
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "CA.java"
RuntimeVisibleAnnotations:
@@ -3379,6 +3542,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.CB
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CB
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "CB.java"
RuntimeVisibleAnnotations:
@@ -3393,6 +3558,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C1 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1
super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "Class_C1.java"
RuntimeVisibleAnnotations:
@@ -3407,6 +3574,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C2 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2
super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "Class_C2.java"
RuntimeVisibleAnnotations:
@@ -3421,6 +3590,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C3 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3
super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C3
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "Class_C3.java"
RuntimeVisibleAnnotations:
@@ -3435,6 +3606,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1 im
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "Class_I1.java"
RuntimeVisibleAnnotations:
@@ -3449,6 +3622,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1_IA
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA
super_class: #x // java/lang/Object
interfaces: 2, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "Class_I1_IA.java"
RuntimeVisibleAnnotations:
@@ -3463,6 +3638,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I2 im
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "Class_I2.java"
RuntimeVisibleAnnotations:
@@ -3477,6 +3654,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3 im
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "Class_I3.java"
RuntimeVisibleAnnotations:
@@ -3491,6 +3670,8 @@ public interface com.android.hoststubgen.test.tinyframework.subclasstest.I1
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I1
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "I1.java"
RuntimeVisibleAnnotations:
@@ -3505,6 +3686,8 @@ public interface com.android.hoststubgen.test.tinyframework.subclasstest.I2 exte
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I2
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "I2.java"
RuntimeVisibleAnnotations:
@@ -3519,6 +3702,8 @@ public interface com.android.hoststubgen.test.tinyframework.subclasstest.I3 exte
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I3
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "I3.java"
RuntimeVisibleAnnotations:
@@ -3533,6 +3718,8 @@ public interface com.android.hoststubgen.test.tinyframework.subclasstest.IA
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/IA
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "IA.java"
RuntimeVisibleAnnotations:
@@ -3547,6 +3734,8 @@ public interface com.android.hoststubgen.test.tinyframework.subclasstest.IB
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/IB
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "IB.java"
RuntimeVisibleAnnotations:
@@ -3561,6 +3750,8 @@ public class com.supported.UnsupportedClass
this_class: #x // com/supported/UnsupportedClass
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 2, attributes: 3
+Constant pool:
+{
private final int mValue;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
@@ -3620,6 +3811,8 @@ public class com.unsupported.UnsupportedClass
this_class: #x // com/unsupported/UnsupportedClass
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 2, attributes: 3
+Constant pool:
+{
public com.unsupported.UnsupportedClass(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
@@ -3675,6 +3868,8 @@ public class rename_prefix.com.android.hoststubgen.test.tinyframework.TinyFramew
this_class: #x // rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 2, attributes: 3
+Constant pool:
+{
private final int mValue;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/13-hoststubgen-test-tiny-framework-host-ext-dump.txt b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/13-hoststubgen-test-tiny-framework-host-ext-dump.txt
index fb225ff1aa21..a466a2e2c3a7 100644
--- a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/13-hoststubgen-test-tiny-framework-host-ext-dump.txt
+++ b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/13-hoststubgen-test-tiny-framework-host-ext-dump.txt
@@ -52,6 +52,30 @@ RuntimeVisibleAnnotations:
java.lang.annotation.Retention(
value=Ljava/lang/annotation/RetentionPolicy;.CLASS
)
+## Class: android/hosttest/annotation/HostSideTestPartiallyAllowlisted.class
+ Compiled from "HostSideTestPartiallyAllowlisted.java"
+public interface android.hosttest.annotation.HostSideTestPartiallyAllowlisted extends java.lang.annotation.Annotation
+ minor version: 0
+ major version: 65
+ flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION
+ this_class: #x // android/hosttest/annotation/HostSideTestPartiallyAllowlisted
+ super_class: #x // java/lang/Object
+ interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
+}
+SourceFile: "HostSideTestPartiallyAllowlisted.java"
+RuntimeVisibleAnnotations:
+ x: #x()
+ com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep
+ x: #x(#x=[e#x.#x])
+ java.lang.annotation.Target(
+ value=[Ljava/lang/annotation/ElementType;.TYPE]
+ )
+ x: #x(#x=e#x.#x)
+ java.lang.annotation.Retention(
+ value=Ljava/lang/annotation/RetentionPolicy;.CLASS
+ )
## Class: android/hosttest/annotation/HostSideTestRedirect.class
Compiled from "HostSideTestRedirect.java"
public interface android.hosttest.annotation.HostSideTestRedirect extends java.lang.annotation.Annotation
@@ -241,6 +265,8 @@ public class com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Pro
this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 3, attributes: 4
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -311,6 +337,8 @@ public class com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub
this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 3, attributes: 4
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -381,6 +409,8 @@ public interface com.android.hoststubgen.test.tinyframework.IPretendingAidl
this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 1, attributes: 4
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -410,6 +440,8 @@ public class com.android.hoststubgen.test.tinyframework.R$Nested
this_class: #x // com/android/hoststubgen/test/tinyframework/R$Nested
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 2, attributes: 4
+Constant pool:
+{
public static int[] ARRAY;
descriptor: [I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
@@ -480,6 +512,8 @@ public class com.android.hoststubgen.test.tinyframework.R
this_class: #x // com/android/hoststubgen/test/tinyframework/R
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 2, attributes: 4
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -528,6 +562,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 7, attributes: 3
+Constant pool:
+{
public int keep;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -719,6 +755,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHo
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 3, attributes: 3
+Constant pool:
+{
public static final java.util.Set<java.lang.Class<?>> sLoadedClasses;
descriptor: Ljava/util/Set;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
@@ -814,6 +852,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWideAn
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 5, attributes: 3
+Constant pool:
+{
public int keep;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -944,6 +984,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithIn
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault
super_class: #x // java/lang/Object
interfaces: 0, fields: 2, methods: 0, attributes: 3
+Constant pool:
+{
public static boolean sInitialized;
descriptor: Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
@@ -981,6 +1023,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithIn
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub
super_class: #x // java/lang/Object
interfaces: 0, fields: 2, methods: 1, attributes: 3
+Constant pool:
+{
public static boolean sInitialized;
descriptor: Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
@@ -1051,6 +1095,8 @@ public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumC
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex
super_class: #x // java/lang/Enum
interfaces: 0, fields: 6, methods: 7, attributes: 4
+Constant pool:
+{
public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex RED;
descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM
@@ -1334,6 +1380,8 @@ public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumS
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple
super_class: #x // java/lang/Enum
interfaces: 0, fields: 3, methods: 5, attributes: 4
+Constant pool:
+{
public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple CAT;
descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;
flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM
@@ -1510,6 +1558,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTe
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 3, attributes: 3
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -1593,6 +1643,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkForTextPoli
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 15, attributes: 2
+Constant pool:
+{
public int stub;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -1905,6 +1957,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas$Nes
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested
super_class: #x // java/lang/Object
interfaces: 0, fields: 2, methods: 8, attributes: 6
+Constant pool:
+{
public final java.util.function.Supplier<java.lang.Integer> mSupplier;
descriptor: Ljava/util/function/Supplier;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
@@ -2135,6 +2189,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas
super_class: #x // java/lang/Object
interfaces: 0, fields: 2, methods: 8, attributes: 6
+Constant pool:
+{
public final java.util.function.Supplier<java.lang.Integer> mSupplier;
descriptor: Ljava/util/function/Supplier;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
@@ -2366,6 +2422,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallR
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 4, attributes: 4
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -2460,6 +2518,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallR
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 5, attributes: 6
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -2599,6 +2659,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNative
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 15, attributes: 3
+Constant pool:
+{
int value;
descriptor: I
flags: (0x0000)
@@ -2932,6 +2994,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 8, attributes: 3
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -3107,6 +3171,8 @@ class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$1 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 4, attributes: 6
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -3202,6 +3268,8 @@ class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 4, attributes: 6
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -3293,6 +3361,8 @@ class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$3 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 4, attributes: 6
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -3388,6 +3458,8 @@ class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 4, attributes: 6
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -3479,6 +3551,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClass
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 2, attributes: 4
+Constant pool:
+{
public int value;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -3537,6 +3611,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClass
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 2, attributes: 4
+Constant pool:
+{
public int value;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -3598,6 +3674,8 @@ class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$Stat
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 4, attributes: 6
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -3690,6 +3768,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClass
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 2, attributes: 4
+Constant pool:
+{
public int value;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -3748,6 +3828,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClass
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 3, attributes: 4
+Constant pool:
+{
public int value;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -3827,6 +3909,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClass
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass
super_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass
interfaces: 0, fields: 0, methods: 2, attributes: 4
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -3877,6 +3961,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClass
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses
super_class: #x // java/lang/Object
interfaces: 0, fields: 2, methods: 4, attributes: 5
+Constant pool:
+{
public final java.util.function.Supplier<java.lang.Integer> mSupplier;
descriptor: Ljava/util/function/Supplier;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
@@ -4025,6 +4111,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedi
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 3, attributes: 3
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4087,6 +4175,64 @@ RuntimeVisibleAnnotations:
RuntimeInvisibleAnnotations:
x: #x()
android.hosttest.annotation.HostSideTestWholeClassKeep
+## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted.class
+ Compiled from "TinyFrameworkPartiallyAllowlisted.java"
+public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted
+ minor version: 0
+ major version: 65
+ flags: (0x0021) ACC_PUBLIC, ACC_SUPER
+ this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted
+ super_class: #x // java/lang/Object
+ interfaces: 0, fields: 0, methods: 2, attributes: 5
+Constant pool:
+{
+ private static {};
+ descriptor: ()V
+ flags: (0x000a) ACC_PRIVATE, ACC_STATIC
+ Code:
+ stack=2, locals=0, args_size=0
+ x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted
+ x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded
+ x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V
+ x: return
+
+ public static int foo2(int);
+ descriptor: (I)I
+ flags: (0x0009) ACC_PUBLIC, ACC_STATIC
+ Code:
+ stack=4, locals=1, args_size=1
+ x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted
+ x: ldc #x // String foo2
+ x: ldc #x // String (I)I
+ x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall
+ x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
+ x: iload_0
+ x: iconst_2
+ x: iadd
+ x: ireturn
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 11 4 0 value I
+ RuntimeVisibleAnnotations:
+ x: #x()
+ com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep
+ RuntimeInvisibleAnnotations:
+ x: #x()
+ android.hosttest.annotation.HostSideTestKeep
+}
+InnerClasses:
+ public static #x= #x of #x; // PartiallyAllowlisted=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+SourceFile: "TinyFrameworkPartiallyAllowlisted.java"
+RuntimeVisibleAnnotations:
+ x: #x()
+ com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep
+RuntimeInvisibleAnnotations:
+ x: #x()
+ android.hosttest.annotation.HostSideTestPartiallyAllowlisted
+ x: #x()
+ android.hosttest.annotation.HostSideTestKeep
+NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.class
Compiled from "TinyFrameworkRenamedClassCaller.java"
public class com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller
@@ -4096,6 +4242,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClas
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 3, attributes: 3
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4167,6 +4315,8 @@ public class com.android.hoststubgen.test.tinyframework.packagetest.A
this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/A
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4190,6 +4340,8 @@ public class com.android.hoststubgen.test.tinyframework.packagetest.sub.A
this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/sub/A
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4213,6 +4365,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.C1
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4236,6 +4390,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.C2 extends
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2
super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1
interfaces: 0, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4259,6 +4415,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.C3 extends
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C3
super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2
interfaces: 0, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4282,6 +4440,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.CA
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CA
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4305,6 +4465,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.CB
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CB
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4328,6 +4490,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C1 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1
super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1
interfaces: 0, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4351,6 +4515,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C2 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2
super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2
interfaces: 0, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4374,6 +4540,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C3 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3
super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C3
interfaces: 0, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4397,6 +4565,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1 im
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4420,6 +4590,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1_IA
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA
super_class: #x // java/lang/Object
interfaces: 2, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4443,6 +4615,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I2 im
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4466,6 +4640,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3 im
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4489,6 +4665,8 @@ public interface com.android.hoststubgen.test.tinyframework.subclasstest.I1
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I1
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4512,6 +4690,8 @@ public interface com.android.hoststubgen.test.tinyframework.subclasstest.I2 exte
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I2
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4535,6 +4715,8 @@ public interface com.android.hoststubgen.test.tinyframework.subclasstest.I3 exte
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I3
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4558,6 +4740,8 @@ public interface com.android.hoststubgen.test.tinyframework.subclasstest.IA
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/IA
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4581,6 +4765,8 @@ public interface com.android.hoststubgen.test.tinyframework.subclasstest.IB
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/IB
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4604,6 +4790,8 @@ public class com.supported.UnsupportedClass
this_class: #x // com/supported/UnsupportedClass
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 3, attributes: 3
+Constant pool:
+{
private final int mValue;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
@@ -4683,6 +4871,8 @@ public class com.unsupported.UnsupportedClass
this_class: #x // com/unsupported/UnsupportedClass
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 3, attributes: 3
+Constant pool:
+{
private static {};
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
@@ -4758,6 +4948,8 @@ public class rename_prefix.com.android.hoststubgen.test.tinyframework.TinyFramew
this_class: #x // rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 3, attributes: 3
+Constant pool:
+{
private final int mValue;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/01-hoststubgen-test-tiny-framework-orig-dump.txt b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/01-hoststubgen-test-tiny-framework-orig-dump.txt
index ad413425801b..78341d7afbb9 100644
--- a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/01-hoststubgen-test-tiny-framework-orig-dump.txt
+++ b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/01-hoststubgen-test-tiny-framework-orig-dump.txt
@@ -67,6 +67,28 @@ RuntimeVisibleAnnotations:
java.lang.annotation.Retention(
value=Ljava/lang/annotation/RetentionPolicy;.CLASS
)
+## Class: android/hosttest/annotation/HostSideTestPartiallyAllowlisted.class
+ Compiled from "HostSideTestPartiallyAllowlisted.java"
+public interface android.hosttest.annotation.HostSideTestPartiallyAllowlisted extends java.lang.annotation.Annotation
+ minor version: 0
+ major version: 61
+ flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION
+ this_class: #x // android/hosttest/annotation/HostSideTestPartiallyAllowlisted
+ super_class: #x // java/lang/Object
+ interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
+}
+SourceFile: "HostSideTestPartiallyAllowlisted.java"
+RuntimeVisibleAnnotations:
+ x: #x(#x=[e#x.#x])
+ java.lang.annotation.Target(
+ value=[Ljava/lang/annotation/ElementType;.TYPE]
+ )
+ x: #x(#x=e#x.#x)
+ java.lang.annotation.Retention(
+ value=Ljava/lang/annotation/RetentionPolicy;.CLASS
+ )
## Class: android/hosttest/annotation/HostSideTestRedirect.class
Compiled from "HostSideTestRedirect.java"
public interface android.hosttest.annotation.HostSideTestRedirect extends java.lang.annotation.Annotation
@@ -2967,6 +2989,228 @@ SourceFile: "TinyFrameworkPackageRedirect.java"
RuntimeInvisibleAnnotations:
x: #x()
android.hosttest.annotation.HostSideTestWholeClassKeep
+## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$NoAnnotations.class
+ Compiled from "TinyFrameworkPartiallyAllowlisted.java"
+public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$NoAnnotations
+ minor version: 0
+ major version: 61
+ flags: (0x0021) ACC_PUBLIC, ACC_SUPER
+ this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$NoAnnotations
+ super_class: #x // java/lang/Object
+ interfaces: 0, fields: 0, methods: 1, attributes: 3
+Constant pool:
+{
+ public com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$NoAnnotations();
+ descriptor: ()V
+ flags: (0x0001) ACC_PUBLIC
+ Code:
+ stack=1, locals=1, args_size=1
+ x: aload_0
+ x: invokespecial #x // Method java/lang/Object."<init>":()V
+ x: return
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$NoAnnotations;
+}
+SourceFile: "TinyFrameworkPartiallyAllowlisted.java"
+NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+InnerClasses:
+ public static #x= #x of #x; // NoAnnotations=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$NoAnnotations of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad.class
+ Compiled from "TinyFrameworkPartiallyAllowlisted.java"
+public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad
+ minor version: 0
+ major version: 61
+ flags: (0x0021) ACC_PUBLIC, ACC_SUPER
+ this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad
+ super_class: #x // java/lang/Object
+ interfaces: 0, fields: 0, methods: 1, attributes: 4
+Constant pool:
+{
+ public com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad();
+ descriptor: ()V
+ flags: (0x0001) ACC_PUBLIC
+ Code:
+ stack=1, locals=1, args_size=1
+ x: aload_0
+ x: invokespecial #x // Method java/lang/Object."<init>":()V
+ x: return
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad;
+}
+SourceFile: "TinyFrameworkPartiallyAllowlisted.java"
+RuntimeInvisibleAnnotations:
+ x: #x()
+ android.hosttest.annotation.HostSideTestPartiallyAllowlisted
+ x: #x()
+ android.hosttest.annotation.HostSideTestWholeClassKeep
+NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+InnerClasses:
+ public static #x= #x of #x; // PartialWithWholeClass_bad=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted.class
+ Compiled from "TinyFrameworkPartiallyAllowlisted.java"
+public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted
+ minor version: 0
+ major version: 61
+ flags: (0x0021) ACC_PUBLIC, ACC_SUPER
+ this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted
+ super_class: #x // java/lang/Object
+ interfaces: 0, fields: 0, methods: 3, attributes: 4
+Constant pool:
+{
+ public com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted();
+ descriptor: ()V
+ flags: (0x0001) ACC_PUBLIC
+ Code:
+ stack=1, locals=1, args_size=1
+ x: aload_0
+ x: invokespecial #x // Method java/lang/Object."<init>":()V
+ x: return
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted;
+
+ public static int foo1(int);
+ descriptor: (I)I
+ flags: (0x0009) ACC_PUBLIC, ACC_STATIC
+ Code:
+ stack=2, locals=1, args_size=1
+ x: iload_0
+ x: iconst_1
+ x: iadd
+ x: ireturn
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 4 0 value I
+
+ public static int foo2(int);
+ descriptor: (I)I
+ flags: (0x0009) ACC_PUBLIC, ACC_STATIC
+ Code:
+ stack=2, locals=1, args_size=1
+ x: iload_0
+ x: iconst_2
+ x: iadd
+ x: ireturn
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 4 0 value I
+ RuntimeInvisibleAnnotations:
+ x: #x()
+ android.hosttest.annotation.HostSideTestKeep
+}
+SourceFile: "TinyFrameworkPartiallyAllowlisted.java"
+RuntimeInvisibleAnnotations:
+ x: #x()
+ android.hosttest.annotation.HostSideTestPartiallyAllowlisted
+ x: #x()
+ android.hosttest.annotation.HostSideTestKeep
+NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+InnerClasses:
+ public static #x= #x of #x; // PartiallyAllowlisted=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad.class
+ Compiled from "TinyFrameworkPartiallyAllowlisted.java"
+public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad
+ minor version: 0
+ major version: 61
+ flags: (0x0021) ACC_PUBLIC, ACC_SUPER
+ this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad
+ super_class: #x // java/lang/Object
+ interfaces: 0, fields: 0, methods: 3, attributes: 4
+Constant pool:
+{
+ public com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad();
+ descriptor: ()V
+ flags: (0x0001) ACC_PUBLIC
+ Code:
+ stack=1, locals=1, args_size=1
+ x: aload_0
+ x: invokespecial #x // Method java/lang/Object."<init>":()V
+ x: return
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad;
+
+ public static int foo1(int);
+ descriptor: (I)I
+ flags: (0x0009) ACC_PUBLIC, ACC_STATIC
+ Code:
+ stack=2, locals=1, args_size=1
+ x: iload_0
+ x: iconst_1
+ x: iadd
+ x: ireturn
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 4 0 value I
+
+ public static int foo2(int);
+ descriptor: (I)I
+ flags: (0x0009) ACC_PUBLIC, ACC_STATIC
+ Code:
+ stack=2, locals=1, args_size=1
+ x: iload_0
+ x: iconst_2
+ x: iadd
+ x: ireturn
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 4 0 value I
+ RuntimeInvisibleAnnotations:
+ x: #x()
+ android.hosttest.annotation.HostSideTestKeep
+}
+SourceFile: "TinyFrameworkPartiallyAllowlisted.java"
+RuntimeInvisibleAnnotations:
+ x: #x()
+ android.hosttest.annotation.HostSideTestKeep
+NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+InnerClasses:
+ public static #x= #x of #x; // PartiallyAllowlistedWithoutAnnot_bad=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted.class
+ Compiled from "TinyFrameworkPartiallyAllowlisted.java"
+public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted
+ minor version: 0
+ major version: 61
+ flags: (0x0021) ACC_PUBLIC, ACC_SUPER
+ this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+ super_class: #x // java/lang/Object
+ interfaces: 0, fields: 0, methods: 1, attributes: 3
+Constant pool:
+{
+ public com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted();
+ descriptor: ()V
+ flags: (0x0001) ACC_PUBLIC
+ Code:
+ stack=1, locals=1, args_size=1
+ x: aload_0
+ x: invokespecial #x // Method java/lang/Object."<init>":()V
+ x: return
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted;
+}
+SourceFile: "TinyFrameworkPartiallyAllowlisted.java"
+NestMembers:
+ com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$NoAnnotations
+ com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad
+ com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad
+ com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted
+InnerClasses:
+ public static #x= #x of #x; // NoAnnotations=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$NoAnnotations of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+ public static #x= #x of #x; // PartiallyAllowlistedWithoutAnnot_bad=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+ public static #x= #x of #x; // PartialWithWholeClass_bad=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+ public static #x= #x of #x; // PartiallyAllowlisted=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.class
Compiled from "TinyFrameworkRenamedClassCaller.java"
public class com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller
diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/03-hoststubgen-test-tiny-framework-host-dump.txt b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/03-hoststubgen-test-tiny-framework-host-dump.txt
index eeec554e954c..2e0b1820a696 100644
--- a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/03-hoststubgen-test-tiny-framework-host-dump.txt
+++ b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/03-hoststubgen-test-tiny-framework-host-dump.txt
@@ -7,6 +7,8 @@ public interface android.hosttest.annotation.HostSideTestClassLoadHook extends j
this_class: #x // android/hosttest/annotation/HostSideTestClassLoadHook
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
public abstract java.lang.String value();
descriptor: ()Ljava/lang/String;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
@@ -35,6 +37,8 @@ public interface android.hosttest.annotation.HostSideTestKeep extends java.lang.
this_class: #x // android/hosttest/annotation/HostSideTestKeep
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "HostSideTestKeep.java"
RuntimeVisibleAnnotations:
@@ -48,6 +52,30 @@ RuntimeVisibleAnnotations:
java.lang.annotation.Retention(
value=Ljava/lang/annotation/RetentionPolicy;.CLASS
)
+## Class: android/hosttest/annotation/HostSideTestPartiallyAllowlisted.class
+ Compiled from "HostSideTestPartiallyAllowlisted.java"
+public interface android.hosttest.annotation.HostSideTestPartiallyAllowlisted extends java.lang.annotation.Annotation
+ minor version: 0
+ major version: 61
+ flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION
+ this_class: #x // android/hosttest/annotation/HostSideTestPartiallyAllowlisted
+ super_class: #x // java/lang/Object
+ interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
+}
+SourceFile: "HostSideTestPartiallyAllowlisted.java"
+RuntimeVisibleAnnotations:
+ x: #x()
+ com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep
+ x: #x(#x=[e#x.#x])
+ java.lang.annotation.Target(
+ value=[Ljava/lang/annotation/ElementType;.TYPE]
+ )
+ x: #x(#x=e#x.#x)
+ java.lang.annotation.Retention(
+ value=Ljava/lang/annotation/RetentionPolicy;.CLASS
+ )
## Class: android/hosttest/annotation/HostSideTestRedirect.class
Compiled from "HostSideTestRedirect.java"
public interface android.hosttest.annotation.HostSideTestRedirect extends java.lang.annotation.Annotation
@@ -57,6 +85,8 @@ public interface android.hosttest.annotation.HostSideTestRedirect extends java.l
this_class: #x // android/hosttest/annotation/HostSideTestRedirect
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "HostSideTestRedirect.java"
RuntimeVisibleAnnotations:
@@ -79,6 +109,8 @@ public interface android.hosttest.annotation.HostSideTestRedirectionClass extend
this_class: #x // android/hosttest/annotation/HostSideTestRedirectionClass
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
public abstract java.lang.String value();
descriptor: ()Ljava/lang/String;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
@@ -107,6 +139,8 @@ public interface android.hosttest.annotation.HostSideTestRemove extends java.lan
this_class: #x // android/hosttest/annotation/HostSideTestRemove
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "HostSideTestRemove.java"
RuntimeVisibleAnnotations:
@@ -129,6 +163,8 @@ public interface android.hosttest.annotation.HostSideTestStaticInitializerKeep e
this_class: #x // android/hosttest/annotation/HostSideTestStaticInitializerKeep
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "HostSideTestStaticInitializerKeep.java"
RuntimeVisibleAnnotations:
@@ -151,6 +187,8 @@ public interface android.hosttest.annotation.HostSideTestSubstitute extends java
this_class: #x // android/hosttest/annotation/HostSideTestSubstitute
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
public abstract java.lang.String suffix();
descriptor: ()Ljava/lang/String;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
@@ -179,6 +217,8 @@ public interface android.hosttest.annotation.HostSideTestThrow extends java.lang
this_class: #x // android/hosttest/annotation/HostSideTestThrow
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "HostSideTestThrow.java"
RuntimeVisibleAnnotations:
@@ -201,6 +241,8 @@ public interface android.hosttest.annotation.HostSideTestWholeClassKeep extends
this_class: #x // android/hosttest/annotation/HostSideTestWholeClassKeep
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "HostSideTestWholeClassKeep.java"
RuntimeVisibleAnnotations:
@@ -223,6 +265,8 @@ public class com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Pro
this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 2, attributes: 4
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Proxy();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
@@ -273,6 +317,8 @@ public class com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub
this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 2, attributes: 4
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
@@ -323,6 +369,8 @@ public interface com.android.hoststubgen.test.tinyframework.IPretendingAidl
this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 0, attributes: 4
+Constant pool:
+{
}
InnerClasses:
public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl
@@ -343,6 +391,8 @@ public class com.android.hoststubgen.test.tinyframework.R$Nested
this_class: #x // com/android/hoststubgen/test/tinyframework/R$Nested
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 2, attributes: 4
+Constant pool:
+{
public static int[] ARRAY;
descriptor: [I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
@@ -400,6 +450,8 @@ public class com.android.hoststubgen.test.tinyframework.R
this_class: #x // com/android/hoststubgen/test/tinyframework/R
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 1, attributes: 4
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.R();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
@@ -433,6 +485,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 7, attributes: 3
+Constant pool:
+{
public int keep;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -591,6 +645,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHo
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 3, attributes: 3
+Constant pool:
+{
public static final java.util.Set<java.lang.Class<?>> sLoadedClasses;
descriptor: Ljava/util/Set;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
@@ -668,6 +724,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWideAn
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 4, attributes: 3
+Constant pool:
+{
public int keep;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -768,6 +826,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithIn
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault
super_class: #x // java/lang/Object
interfaces: 0, fields: 2, methods: 0, attributes: 3
+Constant pool:
+{
public static boolean sInitialized;
descriptor: Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
@@ -805,6 +865,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithIn
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub
super_class: #x // java/lang/Object
interfaces: 0, fields: 2, methods: 1, attributes: 3
+Constant pool:
+{
public static boolean sInitialized;
descriptor: Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
@@ -867,6 +929,8 @@ public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumC
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex
super_class: #x // java/lang/Enum
interfaces: 0, fields: 6, methods: 7, attributes: 4
+Constant pool:
+{
public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex RED;
descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM
@@ -1112,6 +1176,8 @@ public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumS
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple
super_class: #x // java/lang/Enum
interfaces: 0, fields: 3, methods: 5, attributes: 4
+Constant pool:
+{
public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple CAT;
descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;
flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM
@@ -1260,6 +1326,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTe
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 2, attributes: 3
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTester();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
@@ -1323,6 +1391,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkForTextPoli
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 15, attributes: 2
+Constant pool:
+{
public int stub;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -1562,6 +1632,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas$Nes
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested
super_class: #x // java/lang/Object
interfaces: 0, fields: 2, methods: 8, attributes: 6
+Constant pool:
+{
public final java.util.function.Supplier<java.lang.Integer> mSupplier;
descriptor: Ljava/util/function/Supplier;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
@@ -1749,6 +1821,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas
super_class: #x // java/lang/Object
interfaces: 0, fields: 2, methods: 8, attributes: 6
+Constant pool:
+{
public final java.util.function.Supplier<java.lang.Integer> mSupplier;
descriptor: Ljava/util/function/Supplier;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
@@ -1937,6 +2011,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallR
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 3, attributes: 4
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
@@ -2006,6 +2082,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallR
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 4, attributes: 6
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
@@ -2115,6 +2193,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNative
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 14, attributes: 3
+Constant pool:
+{
int value;
descriptor: I
flags: (0x0000)
@@ -2373,6 +2453,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 7, attributes: 3
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
@@ -2503,6 +2585,8 @@ class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$1 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1
super_class: #x // java/lang/Object
interfaces: 1, fields: 1, methods: 3, attributes: 6
+Constant pool:
+{
final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0;
descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;
flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC
@@ -2583,6 +2667,8 @@ class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 3, attributes: 6
+Constant pool:
+{
com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2();
descriptor: ()V
flags: (0x0000)
@@ -2649,6 +2735,8 @@ class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$3 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3
super_class: #x // java/lang/Object
interfaces: 1, fields: 1, methods: 3, attributes: 6
+Constant pool:
+{
final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0;
descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;
flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC
@@ -2729,6 +2817,8 @@ class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 3, attributes: 6
+Constant pool:
+{
com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4();
descriptor: ()V
flags: (0x0000)
@@ -2795,6 +2885,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClass
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 1, attributes: 4
+Constant pool:
+{
public int value;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -2838,6 +2930,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClass
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass
super_class: #x // java/lang/Object
interfaces: 0, fields: 2, methods: 1, attributes: 4
+Constant pool:
+{
public int value;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -2894,6 +2988,8 @@ class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$Stat
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 3, attributes: 6
+Constant pool:
+{
com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$1();
descriptor: ()V
flags: (0x0000)
@@ -2961,6 +3057,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClass
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 1, attributes: 4
+Constant pool:
+{
public int value;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -3004,6 +3102,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClass
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 2, attributes: 4
+Constant pool:
+{
public int value;
descriptor: I
flags: (0x0001) ACC_PUBLIC
@@ -3063,6 +3163,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClass
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass
super_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass
interfaces: 0, fields: 0, methods: 1, attributes: 4
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$SubClass(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
@@ -3098,6 +3200,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClass
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses
super_class: #x // java/lang/Object
interfaces: 0, fields: 2, methods: 4, attributes: 5
+Constant pool:
+{
public final java.util.function.Supplier<java.lang.Integer> mSupplier;
descriptor: Ljava/util/function/Supplier;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
@@ -3223,6 +3327,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedi
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 2, attributes: 3
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedirect();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
@@ -3265,6 +3371,49 @@ RuntimeVisibleAnnotations:
RuntimeInvisibleAnnotations:
x: #x()
android.hosttest.annotation.HostSideTestWholeClassKeep
+## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted.class
+ Compiled from "TinyFrameworkPartiallyAllowlisted.java"
+public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted
+ minor version: 0
+ major version: 61
+ flags: (0x0021) ACC_PUBLIC, ACC_SUPER
+ this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted
+ super_class: #x // java/lang/Object
+ interfaces: 0, fields: 0, methods: 1, attributes: 5
+Constant pool:
+{
+ public static int foo2(int);
+ descriptor: (I)I
+ flags: (0x0009) ACC_PUBLIC, ACC_STATIC
+ Code:
+ stack=2, locals=1, args_size=1
+ x: iload_0
+ x: iconst_2
+ x: iadd
+ x: ireturn
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 4 0 value I
+ RuntimeVisibleAnnotations:
+ x: #x()
+ com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep
+ RuntimeInvisibleAnnotations:
+ x: #x()
+ android.hosttest.annotation.HostSideTestKeep
+}
+InnerClasses:
+ public static #x= #x of #x; // PartiallyAllowlisted=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+SourceFile: "TinyFrameworkPartiallyAllowlisted.java"
+RuntimeVisibleAnnotations:
+ x: #x()
+ com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep
+RuntimeInvisibleAnnotations:
+ x: #x()
+ android.hosttest.annotation.HostSideTestPartiallyAllowlisted
+ x: #x()
+ android.hosttest.annotation.HostSideTestKeep
+NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.class
Compiled from "TinyFrameworkRenamedClassCaller.java"
public class com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller
@@ -3274,6 +3423,8 @@ public class com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClas
this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 2, attributes: 3
+Constant pool:
+{
public com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
@@ -3325,6 +3476,8 @@ public class com.android.hoststubgen.test.tinyframework.packagetest.A
this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/A
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "A.java"
RuntimeVisibleAnnotations:
@@ -3339,6 +3492,8 @@ public class com.android.hoststubgen.test.tinyframework.packagetest.sub.A
this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/sub/A
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "A.java"
RuntimeVisibleAnnotations:
@@ -3353,6 +3508,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.C1
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "C1.java"
RuntimeVisibleAnnotations:
@@ -3367,6 +3524,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.C2 extends
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2
super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "C2.java"
RuntimeVisibleAnnotations:
@@ -3381,6 +3540,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.C3 extends
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C3
super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "C3.java"
RuntimeVisibleAnnotations:
@@ -3395,6 +3556,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.CA
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CA
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "CA.java"
RuntimeVisibleAnnotations:
@@ -3409,6 +3572,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.CB
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CB
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "CB.java"
RuntimeVisibleAnnotations:
@@ -3423,6 +3588,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C1 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1
super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "Class_C1.java"
RuntimeVisibleAnnotations:
@@ -3437,6 +3604,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C2 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2
super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "Class_C2.java"
RuntimeVisibleAnnotations:
@@ -3451,6 +3620,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C3 ex
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3
super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C3
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "Class_C3.java"
RuntimeVisibleAnnotations:
@@ -3465,6 +3636,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1 im
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "Class_I1.java"
RuntimeVisibleAnnotations:
@@ -3479,6 +3652,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1_IA
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA
super_class: #x // java/lang/Object
interfaces: 2, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "Class_I1_IA.java"
RuntimeVisibleAnnotations:
@@ -3493,6 +3668,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I2 im
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "Class_I2.java"
RuntimeVisibleAnnotations:
@@ -3507,6 +3684,8 @@ public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3 im
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "Class_I3.java"
RuntimeVisibleAnnotations:
@@ -3521,6 +3700,8 @@ public interface com.android.hoststubgen.test.tinyframework.subclasstest.I1
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I1
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "I1.java"
RuntimeVisibleAnnotations:
@@ -3535,6 +3716,8 @@ public interface com.android.hoststubgen.test.tinyframework.subclasstest.I2 exte
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I2
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "I2.java"
RuntimeVisibleAnnotations:
@@ -3549,6 +3732,8 @@ public interface com.android.hoststubgen.test.tinyframework.subclasstest.I3 exte
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I3
super_class: #x // java/lang/Object
interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "I3.java"
RuntimeVisibleAnnotations:
@@ -3563,6 +3748,8 @@ public interface com.android.hoststubgen.test.tinyframework.subclasstest.IA
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/IA
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "IA.java"
RuntimeVisibleAnnotations:
@@ -3577,6 +3764,8 @@ public interface com.android.hoststubgen.test.tinyframework.subclasstest.IB
this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/IB
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
}
SourceFile: "IB.java"
RuntimeVisibleAnnotations:
@@ -3591,6 +3780,8 @@ public class com.supported.UnsupportedClass
this_class: #x // com/supported/UnsupportedClass
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 2, attributes: 3
+Constant pool:
+{
private final int mValue;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
@@ -3650,6 +3841,8 @@ public class com.unsupported.UnsupportedClass
this_class: #x // com/unsupported/UnsupportedClass
super_class: #x // java/lang/Object
interfaces: 0, fields: 0, methods: 2, attributes: 3
+Constant pool:
+{
public com.unsupported.UnsupportedClass(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
@@ -3705,6 +3898,8 @@ public class rename_prefix.com.android.hoststubgen.test.tinyframework.TinyFramew
this_class: #x // rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed
super_class: #x // java/lang/Object
interfaces: 0, fields: 1, methods: 2, attributes: 3
+Constant pool:
+{
private final int mValue;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/13-hoststubgen-test-tiny-framework-host-ext-dump.txt b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/13-hoststubgen-test-tiny-framework-host-ext-dump.txt
index e4b9db2ed6d8..51f79258d53a 100644
--- a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/13-hoststubgen-test-tiny-framework-host-ext-dump.txt
+++ b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/13-hoststubgen-test-tiny-framework-host-ext-dump.txt
@@ -52,6 +52,30 @@ RuntimeVisibleAnnotations:
java.lang.annotation.Retention(
value=Ljava/lang/annotation/RetentionPolicy;.CLASS
)
+## Class: android/hosttest/annotation/HostSideTestPartiallyAllowlisted.class
+ Compiled from "HostSideTestPartiallyAllowlisted.java"
+public interface android.hosttest.annotation.HostSideTestPartiallyAllowlisted extends java.lang.annotation.Annotation
+ minor version: 0
+ major version: 61
+ flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION
+ this_class: #x // android/hosttest/annotation/HostSideTestPartiallyAllowlisted
+ super_class: #x // java/lang/Object
+ interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
+}
+SourceFile: "HostSideTestPartiallyAllowlisted.java"
+RuntimeVisibleAnnotations:
+ x: #x()
+ com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep
+ x: #x(#x=[e#x.#x])
+ java.lang.annotation.Target(
+ value=[Ljava/lang/annotation/ElementType;.TYPE]
+ )
+ x: #x(#x=e#x.#x)
+ java.lang.annotation.Retention(
+ value=Ljava/lang/annotation/RetentionPolicy;.CLASS
+ )
## Class: android/hosttest/annotation/HostSideTestRedirect.class
Compiled from "HostSideTestRedirect.java"
public interface android.hosttest.annotation.HostSideTestRedirect extends java.lang.annotation.Annotation
@@ -4181,6 +4205,64 @@ RuntimeVisibleAnnotations:
RuntimeInvisibleAnnotations:
x: #x()
android.hosttest.annotation.HostSideTestWholeClassKeep
+## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted.class
+ Compiled from "TinyFrameworkPartiallyAllowlisted.java"
+public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted
+ minor version: 0
+ major version: 61
+ flags: (0x0021) ACC_PUBLIC, ACC_SUPER
+ this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted
+ super_class: #x // java/lang/Object
+ interfaces: 0, fields: 0, methods: 2, attributes: 5
+Constant pool:
+{
+ private static {};
+ descriptor: ()V
+ flags: (0x000a) ACC_PRIVATE, ACC_STATIC
+ Code:
+ stack=2, locals=0, args_size=0
+ x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted
+ x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded
+ x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V
+ x: return
+
+ public static int foo2(int);
+ descriptor: (I)I
+ flags: (0x0009) ACC_PUBLIC, ACC_STATIC
+ Code:
+ stack=4, locals=1, args_size=1
+ x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted
+ x: ldc #x // String foo2
+ x: ldc #x // String (I)I
+ x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall
+ x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
+ x: iload_0
+ x: iconst_2
+ x: iadd
+ x: ireturn
+ LineNumberTable:
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 11 4 0 value I
+ RuntimeVisibleAnnotations:
+ x: #x()
+ com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep
+ RuntimeInvisibleAnnotations:
+ x: #x()
+ android.hosttest.annotation.HostSideTestKeep
+}
+InnerClasses:
+ public static #x= #x of #x; // PartiallyAllowlisted=class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted of class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
+SourceFile: "TinyFrameworkPartiallyAllowlisted.java"
+RuntimeVisibleAnnotations:
+ x: #x()
+ com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep
+RuntimeInvisibleAnnotations:
+ x: #x()
+ android.hosttest.annotation.HostSideTestPartiallyAllowlisted
+ x: #x()
+ android.hosttest.annotation.HostSideTestKeep
+NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted
## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.class
Compiled from "TinyFrameworkRenamedClassCaller.java"
public class com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller
diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/policy-override-tiny-framework.txt b/ravenwood/tools/hoststubgen/test-tiny-framework/policy-override-tiny-framework.txt
index 2f35d35d608d..1f64a3c78c53 100644
--- a/ravenwood/tools/hoststubgen/test-tiny-framework/policy-override-tiny-framework.txt
+++ b/ravenwood/tools/hoststubgen/test-tiny-framework/policy-override-tiny-framework.txt
@@ -73,3 +73,9 @@ class java.lang.Thread keep
# The leading / in the prefix is not needed (it'll be stripped), but it's added to make
# sure the stripping works.
rename ^.*/TinyFrameworkToBeRenamed$ /rename_prefix/
+
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlisted allow-annotation
+ method foo2 allow-annotation
+
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartialWithWholeClass_bad remove
+class com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted$PartiallyAllowlistedWithoutAnnot_bad remove \ No newline at end of file
diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/run-test-manually.sh b/ravenwood/tools/hoststubgen/test-tiny-framework/run-test-manually.sh
index 80ebf3adab3d..450da237d65d 100755
--- a/ravenwood/tools/hoststubgen/test-tiny-framework/run-test-manually.sh
+++ b/ravenwood/tools/hoststubgen/test-tiny-framework/run-test-manually.sh
@@ -13,8 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
-source "${0%/*}"/../../common.sh
+set -e
+source "${0%/*}"/../common.sh
# This scripts run the "tiny-framework" test, but does most stuff from the command line, using
# the native java and javac commands.
@@ -49,7 +49,7 @@ tiny_test_classes=$out/tiny-test/classes/
tiny_test_jar=$out/tiny-test.jar
framework_compile_classpaths=(
- $SOONG_INT/frameworks/base/tools/hoststubgen/hoststubgen/hoststubgen-annotations/android_common/javac/hoststubgen-annotations.jar
+ $SOONG_INT/frameworks/base/ravenwood/tools/hoststubgen/hoststubgen-annotations/android_common/javac/hoststubgen-annotations.jar
)
test_compile_classpaths=(
@@ -58,7 +58,7 @@ test_compile_classpaths=(
)
test_runtime_classpaths=(
- $SOONG_INT/frameworks/base/tools/hoststubgen/hoststubgen/hoststubgen-helper-runtime/linux_glibc_common/javac/hoststubgen-helper-runtime.jar
+ $SOONG_INT/frameworks/base/ravenwood/tools/hoststubgen/hoststubgen-helper-runtime/linux_glibc_common/javac/hoststubgen-helper-runtime.jar
)
# This suite runs all tests in the JAR.
@@ -73,7 +73,7 @@ echo "# Building tiny-framework..."
run $JAVAC \
-cp $( \
join : \
- ${framework_compile_classpaths[@]} \
+ "${framework_compile_classpaths[@]}" \
) \
-d $tiny_framework_classes \
tiny-framework/src/**/*.java
@@ -83,7 +83,9 @@ run $JAR cvf $tiny_framework_jar \
# Build stub/impl jars
echo "# Generating the stub and impl jars..."
+# Run with HOSTSTUBGEN_OPTS="-Jagentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8700" to enable the debugger
run $HOSTSTUBGEN \
+ $HOSTSTUBGEN_OPTS \
@../hoststubgen-standard-options.txt \
--in-jar $tiny_framework_jar \
--out-jar $tiny_framework_host_jar \
@@ -91,8 +93,7 @@ run $HOSTSTUBGEN \
--gen-keep-all-file out/tiny-framework_keep_all.txt \
--gen-input-dump-file out/tiny-framework_dump.txt \
--package-redirect com.unsupported:com.supported \
- --annotation-allowed-classes-file annotation-allowed-classes-tiny-framework.txt \
- $HOSTSTUBGEN_OPTS
+ --annotation-allowed-classes-file annotation-allowed-classes-tiny-framework.txt
# Extract the jar files, so we can look into them.
extract $tiny_framework_host_jar
@@ -127,4 +128,4 @@ run $JAVA \
"${test_runtime_classpaths[@]}" \
) \
org.junit.runner.JUnitCore \
- ${test_classes[@]}
+ "${test_classes[@]}"
diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted.java
new file mode 100644
index 000000000000..dfc9de4915bc
--- /dev/null
+++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkPartiallyAllowlisted.java
@@ -0,0 +1,67 @@
+/*
+ * 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 com.android.hoststubgen.test.tinyframework;
+
+import android.hosttest.annotation.HostSideTestKeep;
+import android.hosttest.annotation.HostSideTestPartiallyAllowlisted;
+import android.hosttest.annotation.HostSideTestWholeClassKeep;
+
+/**
+ * Contains subclasses for tests for "partially-allowlisted".
+ */
+public class TinyFrameworkPartiallyAllowlisted {
+ /** */
+ @HostSideTestPartiallyAllowlisted
+ @HostSideTestKeep
+ public static class PartiallyAllowlisted {
+ /** */
+ public static int foo1(int value) {
+ return value + 1;
+ }
+
+ /** */
+ @HostSideTestKeep
+ public static int foo2(int value) {
+ return value + 2;
+ }
+ }
+
+ /** */
+ @HostSideTestPartiallyAllowlisted
+ @HostSideTestWholeClassKeep // This should be disallowed.
+ public static class PartialWithWholeClass_bad {
+ }
+
+ /** */
+ // Missing @HostSideTestPartiallyAllowlisted
+ @HostSideTestKeep
+ public static class PartiallyAllowlistedWithoutAnnot_bad {
+ /** */
+ public static int foo1(int value) {
+ return value + 1;
+ }
+
+ /** */
+ @HostSideTestKeep
+ public static int foo2(int value) {
+ return value + 2;
+ }
+ }
+
+ /** */
+ public static class NoAnnotations {
+ }
+}
diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotationsTest.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotationsTest.java
index 1ae049371229..93387f5928a1 100644
--- a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotationsTest.java
+++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotationsTest.java
@@ -19,6 +19,8 @@ import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertThrows;
+import com.android.hoststubgen.test.tinyframework.TinyFrameworkPartiallyAllowlisted.PartiallyAllowlisted;
+
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
@@ -61,4 +63,19 @@ public class TinyFrameworkAnnotationsTest {
thrown.expectMessage("not yet supported");
tfc.unsupportedMethod();
}
+
+ @Test
+ public void testPartiallyAllowed() {
+ assertThat(PartiallyAllowlisted.foo2(1)).isEqualTo(3);
+ assertThrows(NoSuchMethodError.class, () -> PartiallyAllowlisted.foo1(1));
+
+ // Just make sure the following classes don't exist.
+ assertThrows(ClassNotFoundException.class,
+ () -> Class.forName("com.android.hoststubgen.test.tinyframework"
+ + ".TinyFrameworkPartiallyAllowlisted.PartialWithWholeClass_bad"));
+ assertThrows(ClassNotFoundException.class,
+ () -> Class.forName("com.android.hoststubgen.test.tinyframework"
+ + ".TinyFrameworkPartiallyAllowlisted.PartiallyAllowlistedWithoutAnnot_bad"
+ ));
+ }
}
diff --git a/ravenwood/tools/hoststubgen/test/com/android/hoststubgen/utils/ClassPredicateTest.kt b/ravenwood/tools/hoststubgen/test/com/android/hoststubgen/utils/ClassPredicateTest.kt
index 5a877e661484..3e6615ec7667 100644
--- a/ravenwood/tools/hoststubgen/test/com/android/hoststubgen/utils/ClassPredicateTest.kt
+++ b/ravenwood/tools/hoststubgen/test/com/android/hoststubgen/utils/ClassPredicateTest.kt
@@ -112,4 +112,4 @@ class ClassPredicateTest {
assertThat(f.matches("a/XyzAbc")).isEqualTo(false)
}
-} \ No newline at end of file
+}
diff --git a/ravenwood/tools/ravenhelper/src/com/android/platform/test/ravenwood/ravenhelper/policytoannot/Annotations.kt b/ravenwood/tools/ravenhelper/src/com/android/platform/test/ravenwood/ravenhelper/policytoannot/Annotations.kt
index ef1cb5dfca89..33fb015cc131 100644
--- a/ravenwood/tools/ravenhelper/src/com/android/platform/test/ravenwood/ravenhelper/policytoannot/Annotations.kt
+++ b/ravenwood/tools/ravenhelper/src/com/android/platform/test/ravenwood/ravenhelper/policytoannot/Annotations.kt
@@ -49,6 +49,7 @@ class Annotations {
"@android.ravenwood.annotation.RavenwoodIgnore"
FilterPolicy.Remove ->
"@android.ravenwood.annotation.RavenwoodRemove"
+ FilterPolicy.AnnotationAllowed -> null // Can't convert to an annotation.
}
}
diff --git a/services/accessibility/java/com/android/server/accessibility/autoclick/AutoclickController.java b/services/accessibility/java/com/android/server/accessibility/autoclick/AutoclickController.java
index aa82df493f84..9ee7ec952ec1 100644
--- a/services/accessibility/java/com/android/server/accessibility/autoclick/AutoclickController.java
+++ b/services/accessibility/java/com/android/server/accessibility/autoclick/AutoclickController.java
@@ -230,6 +230,11 @@ public class AutoclickController extends BaseEventStreamTransformation {
return Flags.enableAutoclickIndicator() && mAutoclickTypePanel.isPaused();
}
+ @VisibleForTesting
+ void onChangeForTesting(boolean selfChange, Uri uri) {
+ mAutoclickSettingsObserver.onChange(selfChange, uri);
+ }
+
/**
* Observes autoclick setting values, and updates ClickScheduler delay and indicator size
* whenever the setting value changes.
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index b85967fa2bac..3cb2125f7820 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -848,23 +848,6 @@ public class AudioService extends IAudioService.Stub
"media_audio.value_audio_playback_hardening_partial_restriction";
static final String METRIC_COUNTERS_PLAYBACK_STRICT =
"media_audio.value_audio_playback_hardening_strict_would_restrict";
-
- String getPackNameForUid(int uid) {
- final long token = Binder.clearCallingIdentity();
- try {
- final String[] names = AudioService.this.mContext.
- getPackageManager().getPackagesForUid(uid);
- if (names == null
- || names.length == 0
- || TextUtils.isEmpty(names[0])) {
- return "[" + uid + "]";
- }
- return names[0];
- } finally {
- Binder.restoreCallingIdentity(token);
- }
- }
-
// oneway
@Override
public void playbackHardeningEvent(int uid, byte type, boolean bypassed) {
@@ -882,7 +865,7 @@ public class AudioService extends IAudioService.Stub
String msg = "AudioHardening background playback "
+ (bypassed ? "would be " : "")
+ "muted for "
- + getPackNameForUid(uid) + " (" + uid + "), "
+ + getPackageNameForUid(uid) + " (" + uid + "), "
+ "level: " + (type == HardeningType.PARTIAL ? "partial" : "full");
AudioService.this.mHardeningLogger.enqueueAndSlog(msg,
@@ -1286,8 +1269,7 @@ public class AudioService extends IAudioService.Stub
}
};
- @GuardedBy("mSettingsLock")
- private boolean mRttEnabled = false;
+ private AtomicBoolean mRttEnabled = new AtomicBoolean(false);
private AtomicBoolean mMasterMute = new AtomicBoolean(false);
@@ -1638,7 +1620,9 @@ public class AudioService extends IAudioService.Stub
mMusicFxHelper = new MusicFxHelper(mContext, mAudioHandler);
- mHardeningEnforcer = new HardeningEnforcer(mContext, isPlatformAutomotive(), mAppOps,
+ mHardeningEnforcer = new HardeningEnforcer(mContext, isPlatformAutomotive(),
+ mShouldEnableAllHardening,
+ mAppOps,
context.getPackageManager(),
mHardeningLogger);
}
@@ -1664,13 +1648,13 @@ public class AudioService extends IAudioService.Stub
* Called by handling of MSG_INIT_STREAMS_VOLUMES
*/
private void onInitStreamsAndVolumes() {
- synchronized (mSettingsLock) {
- mCameraSoundForced = readCameraSoundForced();
+ synchronized (this) {
+ mCameraSoundForced.set(readCameraSoundForced());
sendMsg(mAudioHandler,
MSG_SET_FORCE_USE,
SENDMSG_QUEUE,
AudioSystem.FOR_SYSTEM,
- mCameraSoundForced
+ mCameraSoundForced.get()
? AudioSystem.FORCE_SYSTEM_ENFORCED : AudioSystem.FORCE_NONE,
new String("AudioService ctor"),
0);
@@ -2077,11 +2061,9 @@ public class AudioService extends IAudioService.Stub
onUpdateAudioMode(AudioSystem.MODE_CURRENT, android.os.Process.myPid(),
mContext.getPackageName(), true /*force*/, false /*signal*/);
}
- final int forSys;
- synchronized (mSettingsLock) {
- forSys = mCameraSoundForced ?
- AudioSystem.FORCE_SYSTEM_ENFORCED : AudioSystem.FORCE_NONE;
- }
+
+ final int forSys = mCameraSoundForced.get()
+ ? AudioSystem.FORCE_SYSTEM_ENFORCED : AudioSystem.FORCE_NONE;
mDeviceBroker.setForceUse_Async(AudioSystem.FOR_SYSTEM, forSys, "onAudioServerDied");
@@ -2108,13 +2090,13 @@ public class AudioService extends IAudioService.Stub
// Restore setParameters and other queued setters.
mRestorableParameters.restoreAll();
+ final int forDock = mDockAudioMediaEnabled ?
+ AudioSystem.FORCE_DIGITAL_DOCK : AudioSystem.FORCE_NONE;
+ mDeviceBroker.setForceUse_Async(AudioSystem.FOR_DOCK, forDock, "onAudioServerDied");
+ sendEncodedSurroundMode(mContentResolver, "onAudioServerDied");
+ sendEnabledSurroundFormats(mContentResolver, true);
+ AudioSystem.setRttEnabled(mRttEnabled.get());
synchronized (mSettingsLock) {
- final int forDock = mDockAudioMediaEnabled ?
- AudioSystem.FORCE_DIGITAL_DOCK : AudioSystem.FORCE_NONE;
- mDeviceBroker.setForceUse_Async(AudioSystem.FOR_DOCK, forDock, "onAudioServerDied");
- sendEncodedSurroundMode(mContentResolver, "onAudioServerDied");
- sendEnabledSurroundFormats(mContentResolver, true);
- AudioSystem.setRttEnabled(mRttEnabled);
resetAssistantServicesUidsLocked();
}
@@ -3251,9 +3233,10 @@ public class AudioService extends IAudioService.Stub
sendEnabledSurroundFormats(cr, true);
updateAssistantUIdLocked(/* forceUpdate= */ true);
resetActiveAssistantUidsLocked();
- AudioSystem.setRttEnabled(mRttEnabled);
}
+ AudioSystem.setRttEnabled(mRttEnabled.get());
+
mMuteAffectedStreams = mSettings.getSystemIntForUser(cr,
System.MUTE_STREAMS_AFFECTED, AudioSystem.DEFAULT_MUTE_STREAMS_AFFECTED,
UserHandle.USER_CURRENT);
@@ -3934,7 +3917,9 @@ public class AudioService extends IAudioService.Stub
public void adjustStreamVolumeWithAttribution(int streamType, int direction, int flags,
String callingPackage, String attributionTag) {
if (mHardeningEnforcer.blockVolumeMethod(
- HardeningEnforcer.METHOD_AUDIO_MANAGER_ADJUST_STREAM_VOLUME)) {
+ HardeningEnforcer.METHOD_AUDIO_MANAGER_ADJUST_STREAM_VOLUME,
+ callingPackage,
+ Binder.getCallingUid())) {
return;
}
if ((streamType == AudioManager.STREAM_ACCESSIBILITY) && !canChangeAccessibilityVolume()) {
@@ -4277,7 +4262,7 @@ public class AudioService extends IAudioService.Stub
final VolumeStreamState vss = mStreamStates.valueAt(streamIdx);
if (vss != null && streamAlias == sStreamVolumeAlias.get(vss.getStreamType())
&& vss.isMutable()) {
- if (!(mCameraSoundForced && (vss.getStreamType()
+ if (!(mCameraSoundForced.get() && (vss.getStreamType()
== AudioSystem.STREAM_SYSTEM_ENFORCED))) {
boolean changed = vss.mute(state, /* apply= */ false,
"muteAliasStreams");
@@ -4695,7 +4680,9 @@ public class AudioService extends IAudioService.Stub
public void setStreamVolumeWithAttribution(int streamType, int index, int flags,
String callingPackage, String attributionTag) {
if (mHardeningEnforcer.blockVolumeMethod(
- HardeningEnforcer.METHOD_AUDIO_MANAGER_SET_STREAM_VOLUME)) {
+ HardeningEnforcer.METHOD_AUDIO_MANAGER_SET_STREAM_VOLUME,
+ callingPackage,
+ Binder.getCallingUid())) {
return;
}
setStreamVolumeWithAttributionInt(streamType, index, flags, /*device*/ null,
@@ -6144,7 +6131,9 @@ public class AudioService extends IAudioService.Stub
public void setRingerModeExternal(int ringerMode, String caller) {
if (mHardeningEnforcer.blockVolumeMethod(
- HardeningEnforcer.METHOD_AUDIO_MANAGER_SET_RINGER_MODE)) {
+ HardeningEnforcer.METHOD_AUDIO_MANAGER_SET_RINGER_MODE,
+ getPackageNameForUid(Binder.getCallingUid()),
+ Binder.getCallingUid())) {
return;
}
if (isAndroidNPlus(caller) && wouldToggleZenMode(ringerMode)
@@ -6847,7 +6836,7 @@ public class AudioService extends IAudioService.Stub
return false;
}
- /** @see AudioManager#setRttEnabled() */
+ /** @see AudioManager#setRttEnabled(boolean) */
@Override
public void setRttEnabled(boolean rttEnabled) {
if (mContext.checkCallingOrSelfPermission(
@@ -6857,8 +6846,8 @@ public class AudioService extends IAudioService.Stub
+ Binder.getCallingPid() + ", uid=" + Binder.getCallingUid());
return;
}
- synchronized (mSettingsLock) {
- mRttEnabled = rttEnabled;
+ synchronized (this) {
+ mRttEnabled.set(rttEnabled);
final long identity = Binder.clearCallingIdentity();
try {
AudioSystem.setRttEnabled(rttEnabled);
@@ -6868,6 +6857,11 @@ public class AudioService extends IAudioService.Stub
}
}
+ @VisibleForTesting(visibility = PACKAGE)
+ protected boolean isRttEnabled() {
+ return mRttEnabled.get();
+ }
+
/** @see AudioManager#adjustSuggestedStreamVolumeForUid(int, int, int, String, int, int, int) */
@Override
public void adjustSuggestedStreamVolumeForUid(int streamType, int direction, int flags,
@@ -6913,7 +6907,9 @@ public class AudioService extends IAudioService.Stub
@Override
public void adjustVolume(int direction, int flags) {
if (mHardeningEnforcer.blockVolumeMethod(
- HardeningEnforcer.METHOD_AUDIO_MANAGER_ADJUST_VOLUME)) {
+ HardeningEnforcer.METHOD_AUDIO_MANAGER_ADJUST_VOLUME,
+ getPackageNameForUid(Binder.getCallingUid()),
+ Binder.getCallingUid())) {
return;
}
getMediaSessionManager().dispatchAdjustVolume(AudioManager.USE_DEFAULT_STREAM_TYPE,
@@ -6928,7 +6924,9 @@ public class AudioService extends IAudioService.Stub
@Override
public void adjustSuggestedStreamVolume(int direction, int suggestedStreamType, int flags) {
if (mHardeningEnforcer.blockVolumeMethod(
- HardeningEnforcer.METHOD_AUDIO_MANAGER_ADJUST_SUGGESTED_STREAM_VOLUME)) {
+ HardeningEnforcer.METHOD_AUDIO_MANAGER_ADJUST_SUGGESTED_STREAM_VOLUME,
+ getPackageNameForUid(Binder.getCallingUid()),
+ Binder.getCallingUid())) {
return;
}
getMediaSessionManager().dispatchAdjustVolume(suggestedStreamType, direction, flags);
@@ -7649,7 +7647,7 @@ public class AudioService extends IAudioService.Stub
ringerModeAffectedStreams = mRingerModeDelegate
.getRingerModeAffectedStreams(ringerModeAffectedStreams);
}
- if (mCameraSoundForced) {
+ if (mCameraSoundForced.get()) {
ringerModeAffectedStreams &= ~(1 << AudioSystem.STREAM_SYSTEM_ENFORCED);
} else {
ringerModeAffectedStreams |= (1 << AudioSystem.STREAM_SYSTEM_ENFORCED);
@@ -8032,11 +8030,11 @@ public class AudioService extends IAudioService.Stub
} else if (deviceSet.contains(AudioSystem.DEVICE_OUT_SPDIF)) {
return AudioSystem.DEVICE_OUT_SPDIF;
} else {
- // At this point, deviceSet should contain exactly one A2DP device;
- // regardless, return the first A2DP device in numeric order.
- // If there is no A2DP device, this falls through to log an error.
+ // At this point, deviceSet should contain exactly one removable device;
+ // regardless, return the first removable device in numeric order.
+ // If there is no removable device, this falls through to log an error.
for (int deviceType : deviceSet) {
- if (AudioSystem.DEVICE_OUT_ALL_A2DP_SET.contains(deviceType)) {
+ if (AudioSystem.DEVICE_OUT_PICK_FOR_VOLUME_SET.contains(deviceType)) {
return deviceType;
}
}
@@ -9173,7 +9171,7 @@ public class AudioService extends IAudioService.Stub
continue;
}
if (mPublicStreamType == AudioSystem.STREAM_SYSTEM_ENFORCED
- && mCameraSoundForced) {
+ && mCameraSoundForced.get()) {
index = mIndexMax;
}
if (DEBUG_VOL) {
@@ -9536,28 +9534,25 @@ public class AudioService extends IAudioService.Stub
}
public void readSettings() {
- synchronized (mSettingsLock) {
- synchronized (mVolumeStateLock) {
- // force maximum volume on all streams if fixed volume property is set
- if (mUseFixedVolume) {
- mIndexMap.put(AudioSystem.DEVICE_OUT_DEFAULT, mIndexMax);
- return;
- }
- // do not read system stream volume from settings: this stream is always aliased
- // to another stream type and its volume is never persisted. Values in settings can
- // only be stale values
- if ((mStreamType == AudioSystem.STREAM_SYSTEM) ||
- (mStreamType == AudioSystem.STREAM_SYSTEM_ENFORCED)) {
- int index = 10 * AudioSystem.DEFAULT_STREAM_VOLUME[mStreamType];
- if (mCameraSoundForced) {
- index = mIndexMax;
- }
- mIndexMap.put(AudioSystem.DEVICE_OUT_DEFAULT, index);
- return;
+ synchronized (mVolumeStateLock) {
+ // force maximum volume on all streams if fixed volume property is set
+ if (mUseFixedVolume) {
+ mIndexMap.put(AudioSystem.DEVICE_OUT_DEFAULT, mIndexMax);
+ return;
+ }
+ // do not read system stream volume from settings: this stream is always aliased
+ // to another stream type and its volume is never persisted. Values in settings can
+ // only be stale values
+ if ((mStreamType == AudioSystem.STREAM_SYSTEM)
+ || (mStreamType == AudioSystem.STREAM_SYSTEM_ENFORCED)) {
+ int index = 10 * AudioSystem.DEFAULT_STREAM_VOLUME[mStreamType];
+ if (mCameraSoundForced.get()) {
+ index = mIndexMax;
}
+ mIndexMap.put(AudioSystem.DEVICE_OUT_DEFAULT, index);
+ return;
}
- }
- synchronized (mVolumeStateLock) {
+
for (int device : AudioSystem.DEVICE_OUT_ALL_SET) {
// retrieve current volume for device
@@ -9706,7 +9701,8 @@ public class AudioService extends IAudioService.Stub
index = getValidIndex(index, hasModifyAudioSettings);
// for STREAM_SYSTEM_ENFORCED, do not sync aliased streams on the enforced index
int aliasIndex = index;
- if ((mStreamType == AudioSystem.STREAM_SYSTEM_ENFORCED) && mCameraSoundForced) {
+ if ((mStreamType == AudioSystem.STREAM_SYSTEM_ENFORCED)
+ && mCameraSoundForced.get()) {
index = mIndexMax;
}
mIndexMap.put(device, index);
@@ -12232,10 +12228,10 @@ public class AudioService extends IAudioService.Stub
Configuration config = mContext.getResources().getConfiguration();
mSoundDoseHelper.configureSafeMedia(/*forced*/false, TAG);
- boolean cameraSoundForced = readCameraSoundForced();
+ final boolean cameraSoundForced = readCameraSoundForced();
+ final boolean cameraSoundForcedChanged =
+ (mCameraSoundForced.getAndSet(cameraSoundForced) != cameraSoundForced);
synchronized (mSettingsLock) {
- final boolean cameraSoundForcedChanged = (cameraSoundForced != mCameraSoundForced);
- mCameraSoundForced = cameraSoundForced;
if (cameraSoundForcedChanged) {
if (!mIsSingleVolume) {
synchronized (mVolumeStateLock) {
@@ -12265,7 +12261,6 @@ public class AudioService extends IAudioService.Stub
0,
0,
getVssForStreamOrDefault(AudioSystem.STREAM_SYSTEM_ENFORCED), 0);
-
}
}
mVolumeController.setLayoutDirection(config.getLayoutDirection());
@@ -12630,14 +12625,11 @@ public class AudioService extends IAudioService.Stub
//==========================================================================================
// cached value of com.android.internal.R.bool.config_camera_sound_forced
- @GuardedBy("mSettingsLock")
- private boolean mCameraSoundForced;
+ private AtomicBoolean mCameraSoundForced = new AtomicBoolean(false);
// called by android.hardware.Camera to populate CameraInfo.canDisableShutterSound
public boolean isCameraSoundForced() {
- synchronized (mSettingsLock) {
- return mCameraSoundForced;
- }
+ return mCameraSoundForced.get();
}
//==========================================================================================
@@ -15489,4 +15481,22 @@ public class AudioService extends IAudioService.Stub
}
return true;
}
+
+ private String getPackageNameForUid(int uid) {
+ final long token = Binder.clearCallingIdentity();
+ try {
+ final String[] names = AudioService.this.mContext.
+ getPackageManager().getPackagesForUid(uid);
+ if (names == null
+ || names.length == 0
+ || TextUtils.isEmpty(names[0])) {
+ return "[" + uid + "]";
+ }
+ return names[0];
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+
+
}
diff --git a/services/core/java/com/android/server/audio/HardeningEnforcer.java b/services/core/java/com/android/server/audio/HardeningEnforcer.java
index f69a810b314f..9bb5160f108a 100644
--- a/services/core/java/com/android/server/audio/HardeningEnforcer.java
+++ b/services/core/java/com/android/server/audio/HardeningEnforcer.java
@@ -37,6 +37,7 @@ import com.android.modules.expresslog.Counter;
import com.android.server.utils.EventLogger;
import java.io.PrintWriter;
+import java.util.concurrent.atomic.AtomicBoolean;
/**
* Class to encapsulate all audio API hardening operations
@@ -49,6 +50,7 @@ public class HardeningEnforcer {
final Context mContext;
final AppOpsManager mAppOps;
+ final AtomicBoolean mShouldEnableAllHardening;
final boolean mIsAutomotive;
final ActivityManager mActivityManager;
@@ -106,10 +108,16 @@ public class HardeningEnforcer {
*/
public static final int METHOD_AUDIO_MANAGER_REQUEST_AUDIO_FOCUS = 300;
- public HardeningEnforcer(Context ctxt, boolean isAutomotive, AppOpsManager appOps,
- PackageManager pm, EventLogger logger) {
+ private static final int ALLOWED = 0;
+ private static final int DENIED_IF_PARTIAL = 1;
+ private static final int DENIED_IF_FULL = 2;
+
+ public HardeningEnforcer(Context ctxt, boolean isAutomotive,
+ AtomicBoolean shouldEnableHardening, AppOpsManager appOps, PackageManager pm,
+ EventLogger logger) {
mContext = ctxt;
mIsAutomotive = isAutomotive;
+ mShouldEnableAllHardening = shouldEnableHardening;
mAppOps = appOps;
mActivityManager = ctxt.getSystemService(ActivityManager.class);
mPackageManager = pm;
@@ -121,29 +129,59 @@ public class HardeningEnforcer {
* @param volumeMethod name of the method to check, for logging purposes
* @return false if the method call is allowed, true if it should be a no-op
*/
- protected boolean blockVolumeMethod(int volumeMethod) {
+ protected boolean blockVolumeMethod(int volumeMethod, String packageName, int uid) {
+ // Regardless of flag state, always permit callers with MODIFY_AUDIO_SETTINGS_PRIVILEGED
+ // Prevent them from showing up in metrics as well
+ if (mContext.checkCallingOrSelfPermission(
+ Manifest.permission.MODIFY_AUDIO_SETTINGS_PRIVILEGED)
+ == PackageManager.PERMISSION_GRANTED) {
+ return false;
+ }
// for Auto, volume methods require MODIFY_AUDIO_SETTINGS_PRIVILEGED
if (mIsAutomotive) {
if (!autoPublicVolumeApiHardening()) {
// automotive hardening flag disabled, no blocking on auto
return false;
}
- if (mContext.checkCallingOrSelfPermission(
- Manifest.permission.MODIFY_AUDIO_SETTINGS_PRIVILEGED)
- == PackageManager.PERMISSION_GRANTED) {
- return false;
- }
- if (Binder.getCallingUid() < UserHandle.AID_APP_START) {
+ if (uid < UserHandle.AID_APP_START) {
return false;
}
// TODO metrics?
// TODO log for audio dumpsys?
Slog.e(TAG, "Preventing volume method " + volumeMethod + " for "
- + getPackNameForUid(Binder.getCallingUid()));
+ + packageName);
return true;
+ } else {
+ int allowed;
+ // No flags controlling restriction yet
+ boolean enforced = mShouldEnableAllHardening.get();
+ if (!noteOp(AppOpsManager.OP_CONTROL_AUDIO_PARTIAL, uid, packageName, null)) {
+ // blocked by partial
+ Counter.logIncrementWithUid(
+ "media_audio.value_audio_volume_hardening_partial_restriction", uid);
+ allowed = DENIED_IF_PARTIAL;
+ } else if (!noteOp(AppOpsManager.OP_CONTROL_AUDIO, uid, packageName, null)) {
+ // blocked by full, permitted by partial
+ Counter.logIncrementWithUid(
+ "media_audio.value_audio_volume_hardening_strict_restriction", uid);
+ allowed = DENIED_IF_FULL;
+ } else {
+ // permitted with strict hardening, log anyway for API metrics
+ Counter.logIncrementWithUid(
+ "media_audio.value_audio_volume_hardening_allowed", uid);
+ allowed = ALLOWED;
+ }
+ if (allowed != ALLOWED) {
+ String msg = "AudioHardening volume control for api "
+ + volumeMethod
+ + (!enforced ? " would be " : " ")
+ + "ignored for "
+ + getPackNameForUid(uid) + " (" + uid + "), "
+ + "level: " + (allowed == DENIED_IF_PARTIAL ? "partial" : "full");
+ mEventLogger.enqueueAndSlog(msg, EventLogger.Event.ALOGW, TAG);
+ }
+ return enforced && allowed != ALLOWED;
}
- // not blocking
- return false;
}
/**
diff --git a/services/core/java/com/android/server/dreams/DreamManagerService.java b/services/core/java/com/android/server/dreams/DreamManagerService.java
index 2af74f620c95..7e8bb28b6a37 100644
--- a/services/core/java/com/android/server/dreams/DreamManagerService.java
+++ b/services/core/java/com/android/server/dreams/DreamManagerService.java
@@ -569,8 +569,7 @@ public final class DreamManagerService extends SystemService {
}
private void requestDreamInternal() {
- if (isDreamingInternal() && !dreamIsFrontmost() && mController.bringDreamToFront()
- && !isDozingInternal()) {
+ if (isDreamingInternal() && !dreamIsFrontmost() && mController.bringDreamToFront()) {
return;
}
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index 395d85e6237c..af726bd28718 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -4971,8 +4971,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
}
- mMenuControllerNew.show(imList, lastInputMethodId, selectedSubtypeIndex, displayId,
- userId);
+ mMenuControllerNew.show(imList, lastInputMethodId, selectedSubtypeIndex, isScreenLocked,
+ displayId, userId);
} else {
mMenuController.showInputMethodMenuLocked(showAuxSubtypes, displayId,
lastInputMethodId, lastInputMethodSubtypeIndex, imList, userId);
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodMenuControllerNew.java b/services/core/java/com/android/server/inputmethod/InputMethodMenuControllerNew.java
index 9f94905686fe..ea8aabc3f605 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodMenuControllerNew.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodMenuControllerNew.java
@@ -87,12 +87,14 @@ final class InputMethodMenuControllerNew {
* @param selectedSubtypeIndex the index of the selected subtype in the input method's array of
* subtypes, or {@link InputMethodUtils#NOT_A_SUBTYPE_INDEX} if no
* subtype is selected.
+ * @param isScreenLocked whether the screen is current locked.
* @param displayId the ID of the display where the menu was requested.
* @param userId the ID of the user that requested the menu.
*/
@RequiresPermission(allOf = {INTERACT_ACROSS_USERS, HIDE_OVERLAY_WINDOWS})
void show(@NonNull List<ImeSubtypeListItem> items, @Nullable String selectedImeId,
- int selectedSubtypeIndex, int displayId, @UserIdInt int userId) {
+ int selectedSubtypeIndex, boolean isScreenLocked, int displayId,
+ @UserIdInt int userId) {
// Hide the menu in case it was already showing.
hide(displayId, userId);
@@ -133,7 +135,7 @@ final class InputMethodMenuControllerNew {
recyclerView.requestFocus();
final var selectedItem = selectedIndex > -1 ? menuItems.get(selectedIndex) : null;
- updateLanguageSettingsButton(selectedItem, contentView, displayId, userId);
+ updateLanguageSettingsButton(selectedItem, contentView, isScreenLocked, displayId, userId);
builder.setOnCancelListener(dialog -> hide(displayId, userId));
mMenuItems = menuItems;
@@ -280,23 +282,24 @@ final class InputMethodMenuControllerNew {
/**
* Updates the visibility of the Language Settings button to visible if the currently selected
- * item specifies a (language) settings activity and the device is provisioned. Otherwise,
- * the button won't be shown.
+ * item specifies a (language) settings activity, the screen is not locked and the device is
+ * provisioned. Otherwise, the button won't be shown.
*
- * @param selectedItem the currently selected item, or {@code null} if no item is selected.
- * @param view the menu dialog view.
- * @param displayId the ID of the display where the menu was requested.
- * @param userId the ID of the user that requested the menu.
+ * @param selectedItem the currently selected item, or {@code null} if no item is selected.
+ * @param view the menu dialog view.
+ * @param isScreenLocked whether the screen is currently locked.
+ * @param displayId the ID of the display where the menu was requested.
+ * @param userId the ID of the user that requested the menu.
*/
@RequiresPermission(allOf = {INTERACT_ACROSS_USERS})
private void updateLanguageSettingsButton(@Nullable MenuItem selectedItem, @NonNull View view,
- int displayId, @UserIdInt int userId) {
+ boolean isScreenLocked, int displayId, @UserIdInt int userId) {
final var settingsIntent = (selectedItem instanceof SubtypeItem selectedSubtypeItem)
? selectedSubtypeItem.mImi.createImeLanguageSettingsActivityIntent() : null;
final boolean isDeviceProvisioned = Settings.Global.getInt(
view.getContext().getContentResolver(), Settings.Global.DEVICE_PROVISIONED,
0) != 0;
- final boolean hasButton = settingsIntent != null && isDeviceProvisioned;
+ final boolean hasButton = settingsIntent != null && !isScreenLocked && isDeviceProvisioned;
final View buttonBar = view.requireViewById(com.android.internal.R.id.button_bar);
final Button button = view.requireViewById(com.android.internal.R.id.button1);
final RecyclerView recyclerView = view.requireViewById(com.android.internal.R.id.list);
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 980fb155999e..d11f5e7b495f 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -1163,15 +1163,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
}
- private boolean shouldShowHub() {
- final boolean hubEnabled = Settings.Secure.getIntForUser(
- mContext.getContentResolver(), Settings.Secure.GLANCEABLE_HUB_ENABLED,
- 1, mCurrentUserId) == 1;
-
- return mUserManagerInternal != null && mUserManagerInternal.isUserUnlocked(mCurrentUserId)
- && hubEnabled && mDreamManagerInternal.dreamConditionActive();
- }
-
@VisibleForTesting
void powerPress(long eventTime, int count, int displayId) {
// SideFPS still needs to know about suppressed power buttons, in case it needs to block
@@ -1260,8 +1251,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mContext.getContentResolver(), Settings.Secure.GLANCEABLE_HUB_ENABLED,
1, mCurrentUserId) == 1;
- if ((mDreamManagerInternal != null && mDreamManagerInternal.isDreaming())
- || isKeyguardShowing()) {
+ if (mDreamManagerInternal.isDreaming() || isKeyguardShowing()) {
// If the device is already dreaming or on keyguard, go to sleep.
sleepDefaultDisplayFromPowerButton(eventTime, 0);
break;
@@ -1271,10 +1261,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
// show hub.
boolean keyguardAvailable = !mLockPatternUtils.isLockScreenDisabled(
mCurrentUserId);
- if (shouldShowHub() && keyguardAvailable) {
- // If the hub can be launched, send a message to keyguard. We do not know if
- // the hub is already running or not, keyguard handles turning screen off if
- // it is.
+ if (mUserManagerInternal.isUserUnlocked(mCurrentUserId) && hubEnabled
+ && keyguardAvailable && mDreamManagerInternal.dreamConditionActive()) {
+ // If the hub can be launched, send a message to keyguard.
Bundle options = new Bundle();
options.putBoolean(EXTRA_TRIGGER_HUB, true);
lockNow(options);
@@ -1335,14 +1324,14 @@ public class PhoneWindowManager implements WindowManagerPolicy {
* @param isScreenOn Whether the screen is currently on.
* @param noDreamAction The action to perform if dreaming is not possible.
*/
- private boolean attemptToDreamFromShortPowerButtonPress(
+ private void attemptToDreamFromShortPowerButtonPress(
boolean isScreenOn, Runnable noDreamAction) {
if (mShortPressOnPowerBehavior != SHORT_PRESS_POWER_DREAM_OR_SLEEP
&& mShortPressOnPowerBehavior != SHORT_PRESS_POWER_HUB_OR_DREAM_OR_SLEEP) {
// If the power button behavior isn't one that should be able to trigger the dream, give
// up.
noDreamAction.run();
- return false;
+ return;
}
final DreamManagerInternal dreamManagerInternal = getDreamManagerInternal();
@@ -1350,7 +1339,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
Slog.d(TAG, "Can't start dreaming when attempting to dream from short power"
+ " press (isScreenOn=" + isScreenOn + ")");
noDreamAction.run();
- return false;
+ return;
}
synchronized (mLock) {
@@ -1361,8 +1350,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
dreamManagerInternal.requestDream();
-
- return true;
}
/**
@@ -2340,10 +2327,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
WindowWakeUpPolicy getWindowWakeUpPolicy() {
return new WindowWakeUpPolicy(mContext);
}
-
- DreamManagerInternal getDreamManagerInternal() {
- return LocalServices.getService(DreamManagerInternal.class);
- }
}
/** {@inheritDoc} */
@@ -2362,7 +2345,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mActivityTaskManagerInternal = LocalServices.getService(ActivityTaskManagerInternal.class);
mInputManager = mContext.getSystemService(InputManager.class);
mInputManagerInternal = LocalServices.getService(InputManagerInternal.class);
- mDreamManagerInternal = injector.getDreamManagerInternal();
+ mDreamManagerInternal = LocalServices.getService(DreamManagerInternal.class);
mPowerManagerInternal = LocalServices.getService(PowerManagerInternal.class);
mAppOpsManager = mContext.getSystemService(AppOpsManager.class);
mSensorPrivacyManager = mContext.getSystemService(SensorPrivacyManager.class);
@@ -6409,17 +6392,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
event.getDisplayId(), event.getKeyCode(), "wakeUpFromWakeKey")) {
return;
}
-
- if (!shouldShowHub()
- && mShortPressOnPowerBehavior == SHORT_PRESS_POWER_HUB_OR_DREAM_OR_SLEEP
- && event.getKeyCode() == KEYCODE_POWER
- && attemptToDreamFromShortPowerButtonPress(false, () -> {})) {
- // In the case that we should wake to dream and successfully initiate dreaming, do not
- // continue waking up. Doing so will exit the dream state and cause UI to react
- // accordingly.
- return;
- }
-
wakeUpFromWakeKey(
event.getEventTime(),
event.getKeyCode(),
diff --git a/services/core/java/com/android/server/security/advancedprotection/features/DisallowCellular2GAdvancedProtectionHook.java b/services/core/java/com/android/server/security/advancedprotection/features/DisallowCellular2GAdvancedProtectionHook.java
index acdea881e3d1..be263346854e 100644
--- a/services/core/java/com/android/server/security/advancedprotection/features/DisallowCellular2GAdvancedProtectionHook.java
+++ b/services/core/java/com/android/server/security/advancedprotection/features/DisallowCellular2GAdvancedProtectionHook.java
@@ -60,8 +60,7 @@ public final class DisallowCellular2GAdvancedProtectionHook extends AdvancedProt
private static boolean isEmbeddedSubscriptionVisible(SubscriptionInfo subInfo) {
if (subInfo.isEmbedded()
&& (subInfo.getProfileClass() == SubscriptionManager.PROFILE_CLASS_PROVISIONING
- || (com.android.internal.telephony.flags.Flags.oemEnabledSatelliteFlag()
- && subInfo.isOnlyNonTerrestrialNetwork()))) {
+ || subInfo.isOnlyNonTerrestrialNetwork())) {
return false;
}
diff --git a/services/core/java/com/android/server/wm/InsetsPolicy.java b/services/core/java/com/android/server/wm/InsetsPolicy.java
index b4d55a160631..5c6695fe22c0 100644
--- a/services/core/java/com/android/server/wm/InsetsPolicy.java
+++ b/services/core/java/com/android/server/wm/InsetsPolicy.java
@@ -113,25 +113,33 @@ class InsetsPolicy {
abortTransient();
}
mFocusedWin = focusedWin;
+ final @InsetsType int[] requestedVisibleTypes =
+ {focusedWin != null ? focusedWin.getRequestedVisibleTypes() : 0};
final WindowState notificationShade = mPolicy.getNotificationShade();
final WindowState topApp = mPolicy.getTopFullscreenOpaqueWindow();
final InsetsControlTarget statusControlTarget =
- getStatusControlTarget(focusedWin, false /* fake */);
+ getStatusControlTarget(focusedWin, false /* fake */, requestedVisibleTypes);
mFakeStatusControlTarget = statusControlTarget == mTransientControlTarget
- ? getStatusControlTarget(focusedWin, true /* fake */)
+ ? getStatusControlTarget(focusedWin, true /* fake */, requestedVisibleTypes)
: statusControlTarget == notificationShade
- ? getStatusControlTarget(topApp, true /* fake */)
+ ? getStatusControlTarget(topApp, true /* fake */, requestedVisibleTypes)
: null;
final InsetsControlTarget navControlTarget =
- getNavControlTarget(focusedWin, false /* fake */);
+ getNavControlTarget(focusedWin, false /* fake */, requestedVisibleTypes);
mFakeNavControlTarget = navControlTarget == mTransientControlTarget
- ? getNavControlTarget(focusedWin, true /* fake */)
+ ? getNavControlTarget(focusedWin, true /* fake */, requestedVisibleTypes)
: navControlTarget == notificationShade
- ? getNavControlTarget(topApp, true /* fake */)
+ ? getNavControlTarget(topApp, true /* fake */, requestedVisibleTypes)
: null;
mStateController.onBarControlTargetChanged(
statusControlTarget, mFakeStatusControlTarget,
navControlTarget, mFakeNavControlTarget);
+
+ if (statusControlTarget == mDisplayContent.mRemoteInsetsControlTarget
+ && navControlTarget == mDisplayContent.mRemoteInsetsControlTarget) {
+ notifyRemoteInsetsController(focusedWin, requestedVisibleTypes[0]);
+ }
+
mStatusBar.updateVisibility(statusControlTarget, Type.statusBars());
mNavBar.updateVisibility(navControlTarget, Type.navigationBars());
}
@@ -182,12 +190,12 @@ class InsetsPolicy {
@VisibleForTesting
InsetsControlTarget getTransientControlTarget() {
- return mTransientControlTarget;
+ return mTransientControlTarget;
}
@VisibleForTesting
InsetsControlTarget getPermanentControlTarget() {
- return mPermanentControlTarget;
+ return mPermanentControlTarget;
}
void hideTransient() {
@@ -259,7 +267,7 @@ class InsetsPolicy {
* modes.
*
* @param target the target on which the policy is applied
- * @param state the input inset state containing all the sources
+ * @param state the input inset state containing all the sources
* @return The state stripped of the necessary information.
*/
InsetsState enforceInsetsPolicyForTarget(WindowState target, InsetsState state) {
@@ -461,7 +469,7 @@ class InsetsPolicy {
mStateController.getFakeControllingTypes(caller);
final @InsetsType int abortTypes =
(fakeControllingTypes & caller.getRequestedVisibleTypes())
- | (isImeVisible ? Type.navigationBars() : 0);
+ | (isImeVisible ? Type.navigationBars() : 0);
mShowingTransientTypes &= ~abortTypes;
if (abortTypes != 0) {
mDisplayContent.setLayoutNeeded();
@@ -496,6 +504,18 @@ class InsetsPolicy {
}
private @Nullable InsetsControlTarget getStatusControlTarget(@Nullable WindowState focusedWin,
+ boolean fake, @InsetsType int[] requestedVisibleTypes) {
+ final InsetsControlTarget target = getStatusControlTargetInner(focusedWin, fake);
+ if (remoteInsetsControllerControlsSystemBars(target)) {
+ requestedVisibleTypes[0] = (requestedVisibleTypes[0] & ~Type.statusBars()) | (
+ target.getRequestedVisibleTypes() & Type.statusBars());
+ return mDisplayContent.mRemoteInsetsControlTarget;
+ }
+ return target;
+ }
+
+ private @Nullable InsetsControlTarget getStatusControlTargetInner(
+ @Nullable WindowState focusedWin,
boolean fake) {
if (!fake && isTransient(Type.statusBars())) {
return mTransientControlTarget;
@@ -521,17 +541,7 @@ class InsetsPolicy {
&& (notificationShade == null || !notificationShade.canReceiveKeys())) {
// Non-fullscreen focused window should not break the state that the top-fullscreen-app
// window hides status bar, unless the notification shade can receive keys.
- if (remoteInsetsControllerControlsSystemBars(
- mPolicy.getTopFullscreenOpaqueWindow())) {
- notifyRemoteInsetsController(mPolicy.getTopFullscreenOpaqueWindow());
- return mDisplayContent.mRemoteInsetsControlTarget;
- } else {
- return mPolicy.getTopFullscreenOpaqueWindow();
- }
- }
- if (remoteInsetsControllerControlsSystemBars(focusedWin)) {
- notifyRemoteInsetsController(focusedWin);
- return mDisplayContent.mRemoteInsetsControlTarget;
+ return mPolicy.getTopFullscreenOpaqueWindow();
}
return focusedWin;
}
@@ -547,6 +557,17 @@ class InsetsPolicy {
}
private @Nullable InsetsControlTarget getNavControlTarget(@Nullable WindowState focusedWin,
+ boolean fake, @InsetsType int[] requestedVisibleTypes) {
+ final InsetsControlTarget target = getNavControlTargetInner(focusedWin, fake);
+ if (remoteInsetsControllerControlsSystemBars(target)) {
+ requestedVisibleTypes[0] = (requestedVisibleTypes[0] & ~Type.navigationBars()) | (
+ target.getRequestedVisibleTypes() & Type.navigationBars());
+ return mDisplayContent.mRemoteInsetsControlTarget;
+ }
+ return target;
+ }
+
+ private @Nullable InsetsControlTarget getNavControlTargetInner(@Nullable WindowState focusedWin,
boolean fake) {
final WindowState imeWin = mDisplayContent.mInputMethodWindow;
if (imeWin != null && imeWin.isVisible() && !mHideNavBarForKeyboard) {
@@ -585,29 +606,21 @@ class InsetsPolicy {
&& (notificationShade == null || !notificationShade.canReceiveKeys())) {
// Non-fullscreen focused window should not break the state that the top-fullscreen-app
// window hides navigation bar, unless the notification shade can receive keys.
- if (remoteInsetsControllerControlsSystemBars(
- mPolicy.getTopFullscreenOpaqueWindow())) {
- notifyRemoteInsetsController(mPolicy.getTopFullscreenOpaqueWindow());
- return mDisplayContent.mRemoteInsetsControlTarget;
- } else {
- return mPolicy.getTopFullscreenOpaqueWindow();
- }
- }
- if (remoteInsetsControllerControlsSystemBars(focusedWin)) {
- notifyRemoteInsetsController(focusedWin);
- return mDisplayContent.mRemoteInsetsControlTarget;
+ return mPolicy.getTopFullscreenOpaqueWindow();
}
return focusedWin;
}
- private void notifyRemoteInsetsController(@Nullable WindowState win) {
+ private void notifyRemoteInsetsController(@Nullable WindowState win,
+ @InsetsType int requestVisibleTypes) {
if (win == null) {
return;
}
ComponentName component = win.mActivityRecord != null
? win.mActivityRecord.mActivityComponent : null;
+
mDisplayContent.mRemoteInsetsControlTarget.topFocusedWindowChanged(
- component, win.getRequestedVisibleTypes());
+ component, requestVisibleTypes);
}
boolean areTypesForciblyShowing(@InsetsType int types) {
@@ -645,8 +658,8 @@ class InsetsPolicy {
* Determines whether the remote insets controller should take control of system bars for all
* windows.
*/
- boolean remoteInsetsControllerControlsSystemBars(@Nullable WindowState focusedWin) {
- if (focusedWin == null) {
+ boolean remoteInsetsControllerControlsSystemBars(@Nullable InsetsControlTarget target) {
+ if (!(target instanceof WindowState win)) {
return false;
}
@@ -660,8 +673,8 @@ class InsetsPolicy {
// If necessary, auto can control application windows when
// config_remoteInsetsControllerControlsSystemBars is set to true. This is useful in cases
// where we want to dictate system bar inset state for applications.
- return focusedWin.getAttrs().type >= WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW
- && focusedWin.getAttrs().type <= WindowManager.LayoutParams.LAST_APPLICATION_WINDOW;
+ return win.getAttrs().type >= WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW
+ && win.getAttrs().type <= WindowManager.LayoutParams.LAST_APPLICATION_WINDOW;
}
private void dispatchTransientSystemBarsVisibilityChanged(
@@ -708,7 +721,7 @@ class InsetsPolicy {
private class BarWindow {
private final int mId;
- private @StatusBarManager.WindowVisibleState int mState =
+ private @StatusBarManager.WindowVisibleState int mState =
StatusBarManager.WINDOW_STATE_SHOWING;
BarWindow(int id) {
@@ -790,11 +803,13 @@ class InsetsPolicy {
}
@Override
- public void notifyInsetsChanged() { }
+ public void notifyInsetsChanged() {
+ }
@Override
public void dispatchWindowInsetsAnimationPrepare(
- @NonNull WindowInsetsAnimation animation) { }
+ @NonNull WindowInsetsAnimation animation) {
+ }
@Override
public Bounds dispatchWindowInsetsAnimationStart(
@@ -812,7 +827,8 @@ class InsetsPolicy {
@Override
public void dispatchWindowInsetsAnimationEnd(
- @NonNull WindowInsetsAnimation animation) { }
+ @NonNull WindowInsetsAnimation animation) {
+ }
@Override
public void applySurfaceParams(SyncRtSurfaceTransactionApplier.SurfaceParams... p) {
@@ -834,7 +850,8 @@ class InsetsPolicy {
}
@Override
- public void setSystemBarsAppearance(int appearance, int mask) { }
+ public void setSystemBarsAppearance(int appearance, int mask) {
+ }
@Override
public int getSystemBarsAppearance() {
@@ -842,7 +859,8 @@ class InsetsPolicy {
}
@Override
- public void setSystemBarsBehavior(int behavior) { }
+ public void setSystemBarsBehavior(int behavior) {
+ }
@Override
public int getSystemBarsBehavior() {
@@ -855,10 +873,12 @@ class InsetsPolicy {
}
@Override
- public void addOnPreDrawRunnable(Runnable r) { }
+ public void addOnPreDrawRunnable(Runnable r) {
+ }
@Override
- public void postInsetsAnimationCallback(Runnable r) { }
+ public void postInsetsAnimationCallback(Runnable r) {
+ }
@Override
public InputMethodManager getInputMethodManager() {
diff --git a/services/tests/mockingservicestests/src/com/android/server/pm/UserManagerServiceTest.java b/services/tests/mockingservicestests/src/com/android/server/pm/UserManagerServiceTest.java
index 360d6ebfe1bd..6ad3df1dd6f2 100644
--- a/services/tests/mockingservicestests/src/com/android/server/pm/UserManagerServiceTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/pm/UserManagerServiceTest.java
@@ -206,7 +206,7 @@ public final class UserManagerServiceTest {
doNothing().when(mSpiedContext).sendBroadcastAsUser(any(), any(), any());
mockIsLowRamDevice(false);
- // Called when getting boot user. config_bootToHeadlessSystemUser is 0 by default.
+ // Called when getting boot user. config_hsumBootStrategy is 0 by default.
mSpyResources = spy(mSpiedContext.getResources());
when(mSpiedContext.getResources()).thenReturn(mSpyResources);
doReturn(0)
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/autoclick/AutoclickControllerTest.java b/services/tests/servicestests/src/com/android/server/accessibility/autoclick/AutoclickControllerTest.java
index 0745c68fd337..17d8882b487c 100644
--- a/services/tests/servicestests/src/com/android/server/accessibility/autoclick/AutoclickControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/accessibility/autoclick/AutoclickControllerTest.java
@@ -41,6 +41,7 @@ import android.view.MotionEvent;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityManager;
+import com.android.internal.accessibility.util.AccessibilityUtils;
import com.android.server.accessibility.AccessibilityTraceManager;
import org.junit.After;
@@ -79,7 +80,9 @@ public class AutoclickControllerTest {
@After
public void tearDown() {
+ mController.onDestroy();
mTestableLooper.processAllMessages();
+ TestableLooper.remove(this);
}
@Test
@@ -403,6 +406,133 @@ public class AutoclickControllerTest {
@Test
@EnableFlags(com.android.server.accessibility.Flags.FLAG_ENABLE_AUTOCLICK_INDICATOR)
+ public void onCursorAreaSizeSettingsChange_moveWithinCustomRadius_clickNotTriggered() {
+ // Move mouse to initialize autoclick panel before enabling ignore minor cursor movement.
+ injectFakeMouseActionHoverMoveEvent();
+ enableIgnoreMinorCursorMovement();
+
+ // Set a custom cursor area size.
+ int customSize = 250;
+ Settings.Secure.putIntForUser(mTestableContext.getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_AUTOCLICK_CURSOR_AREA_SIZE,
+ customSize,
+ mTestableContext.getUserId());
+ mController.onChangeForTesting(/* selfChange= */ true,
+ Settings.Secure.getUriFor(
+ Settings.Secure.ACCESSIBILITY_AUTOCLICK_CURSOR_AREA_SIZE));
+ assertThat(mController.mAutoclickIndicatorView.getRadiusForTesting()).isEqualTo(customSize);
+
+ // Move the mouse down, less than customSize radius so a click is not triggered.
+ float moveDownY = customSize - 25;
+ MotionEvent hoverMove = MotionEvent.obtain(
+ /* downTime= */ 0,
+ /* eventTime= */ 150,
+ /* action= */ MotionEvent.ACTION_HOVER_MOVE,
+ /* x= */ 0f,
+ /* y= */ moveDownY,
+ /* metaState= */ 0);
+ hoverMove.setSource(InputDevice.SOURCE_MOUSE);
+ mController.onMotionEvent(hoverMove, hoverMove, /* policyFlags= */ 0);
+ assertThat(mController.mClickScheduler.getIsActiveForTesting()).isFalse();
+ }
+
+ @Test
+ @EnableFlags(com.android.server.accessibility.Flags.FLAG_ENABLE_AUTOCLICK_INDICATOR)
+ public void onCursorAreaSizeSettingsChange_moveOutsideCustomRadius_clickTriggered() {
+ // Move mouse to initialize autoclick panel before enabling ignore minor cursor movement.
+ injectFakeMouseActionHoverMoveEvent();
+ enableIgnoreMinorCursorMovement();
+
+ // Set a custom cursor area size.
+ int customSize = 250;
+ Settings.Secure.putIntForUser(mTestableContext.getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_AUTOCLICK_CURSOR_AREA_SIZE,
+ customSize,
+ mTestableContext.getUserId());
+ mController.onChangeForTesting(/* selfChange= */ true,
+ Settings.Secure.getUriFor(
+ Settings.Secure.ACCESSIBILITY_AUTOCLICK_CURSOR_AREA_SIZE));
+ assertThat(mController.mAutoclickIndicatorView.getRadiusForTesting()).isEqualTo(customSize);
+
+ // Move the mouse right, greater than customSize radius so a click is triggered.
+ float moveRightX = customSize + 100;
+ MotionEvent hoverMove = MotionEvent.obtain(
+ /* downTime= */ 0,
+ /* eventTime= */ 200,
+ /* action= */ MotionEvent.ACTION_HOVER_MOVE,
+ /* x= */ moveRightX,
+ /* y= */ 0,
+ /* metaState= */ 0);
+ hoverMove.setSource(InputDevice.SOURCE_MOUSE);
+ mController.onMotionEvent(hoverMove, hoverMove, /* policyFlags= */ 0);
+ assertThat(mController.mClickScheduler.getIsActiveForTesting()).isTrue();
+ }
+
+ @Test
+ @EnableFlags(com.android.server.accessibility.Flags.FLAG_ENABLE_AUTOCLICK_INDICATOR)
+ public void onIgnoreCursorMovementFromSettingsChange_clickTriggered() {
+ // Send initial mouse movement.
+ injectFakeMouseActionHoverMoveEvent();
+
+ // Set a custom cursor area size.
+ int customSize = 250;
+ Settings.Secure.putIntForUser(mTestableContext.getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_AUTOCLICK_CURSOR_AREA_SIZE,
+ customSize,
+ mTestableContext.getUserId());
+ mController.onChangeForTesting(/* selfChange= */ true,
+ Settings.Secure.getUriFor(
+ Settings.Secure.ACCESSIBILITY_AUTOCLICK_CURSOR_AREA_SIZE));
+
+ // Move the mouse down less than customSize radius but ignore custom movement is not enabled
+ // so a click is triggered.
+ float moveDownY = customSize - 100;
+ MotionEvent hoverMove = MotionEvent.obtain(
+ /* downTime= */ 0,
+ /* eventTime= */ 150,
+ /* action= */ MotionEvent.ACTION_HOVER_MOVE,
+ /* x= */ 0f,
+ /* y= */ moveDownY,
+ /* metaState= */ 0);
+ hoverMove.setSource(InputDevice.SOURCE_MOUSE);
+ mController.onMotionEvent(hoverMove, hoverMove, /* policyFlags= */ 0);
+ assertThat(mController.mClickScheduler.getIsActiveForTesting()).isTrue();
+ }
+
+ @Test
+ @EnableFlags(com.android.server.accessibility.Flags.FLAG_ENABLE_AUTOCLICK_INDICATOR)
+ public void onIgnoreCursorMovementFromSettingsChange_clickNotTriggered() {
+ // Move mouse to initialize autoclick panel before enabling ignore minor cursor movement.
+ injectFakeMouseActionHoverMoveEvent();
+ enableIgnoreMinorCursorMovement();
+
+ // Set a custom cursor area size.
+ int customSize = 250;
+ Settings.Secure.putIntForUser(mTestableContext.getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_AUTOCLICK_CURSOR_AREA_SIZE,
+ customSize,
+ mTestableContext.getUserId());
+ mController.onChangeForTesting(/* selfChange= */ true,
+ Settings.Secure.getUriFor(
+ Settings.Secure.ACCESSIBILITY_AUTOCLICK_CURSOR_AREA_SIZE));
+
+ // After enabling ignore custom movement, move the mouse right, less than customSize radius
+ // so a click won't be triggered.
+ float moveRightX = customSize - 100;
+ MotionEvent hoverMove = MotionEvent.obtain(
+ /* downTime= */ 0,
+ /* eventTime= */ 200,
+ /* action= */ MotionEvent.ACTION_HOVER_MOVE,
+ /* x= */ moveRightX,
+ /* y= */ 0,
+ /* metaState= */ 0);
+ hoverMove.setSource(InputDevice.SOURCE_MOUSE);
+ mController.onMotionEvent(hoverMove, hoverMove, /* policyFlags= */ 0);
+ assertThat(mController.mClickScheduler.getIsActiveForTesting()).isFalse();
+ }
+
+ @Test
+ @EnableFlags(com.android.server.accessibility.Flags.FLAG_ENABLE_AUTOCLICK_INDICATOR)
public void pauseButton_flagOn_clickNotTriggeredWhenPaused() {
injectFakeMouseActionHoverMoveEvent();
@@ -473,4 +603,14 @@ public class AutoclickControllerTest {
/* y= */ 0,
/* metaState= */ 0);
}
+
+ private void enableIgnoreMinorCursorMovement() {
+ Settings.Secure.putIntForUser(mTestableContext.getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_AUTOCLICK_IGNORE_MINOR_CURSOR_MOVEMENT,
+ AccessibilityUtils.State.ON,
+ mTestableContext.getUserId());
+ mController.onChangeForTesting(/* selfChange= */ true,
+ Settings.Secure.getUriFor(
+ Settings.Secure.ACCESSIBILITY_AUTOCLICK_IGNORE_MINOR_CURSOR_MOVEMENT));
+ }
}
diff --git a/services/tests/servicestests/src/com/android/server/audio/AudioServiceTest.java b/services/tests/servicestests/src/com/android/server/audio/AudioServiceTest.java
index aa9d2058e659..9e8c34eabd40 100644
--- a/services/tests/servicestests/src/com/android/server/audio/AudioServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/audio/AudioServiceTest.java
@@ -259,4 +259,16 @@ public class AudioServiceTest {
inputGainIndex,
mAudioService.getInputGainIndex(ada));
}
+
+ @Test
+ public void testRttEnabled() throws Exception {
+ Log.i(TAG, "running testRttEnabled");
+ Assert.assertNotNull(mAudioService);
+
+ mAudioService.setRttEnabled(true);
+ Assert.assertTrue(mAudioService.isRttEnabled());
+
+ mAudioService.setRttEnabled(false);
+ Assert.assertFalse(mAudioService.isRttEnabled());
+ }
}
diff --git a/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTests.java b/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTests.java
index 22c86eb3a9b8..32a3b7f2c9cc 100644
--- a/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTests.java
+++ b/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTests.java
@@ -272,19 +272,6 @@ public class PhoneWindowManagerTests {
}
@Test
- public void powerPress_withoutDreamManagerInternal_doesNotCrash() {
- when(mDisplayPolicy.isAwake()).thenReturn(true);
- mDreamManagerInternal = null;
- initPhoneWindowManager();
-
- // Power button pressed.
- int eventTime = 0;
- mPhoneWindowManager.powerPress(eventTime, 1, 0);
-
- // verify no crash
- }
-
- @Test
public void powerPress_hubOrDreamOrSleep_hubAvailableLocks() {
when(mDisplayPolicy.isAwake()).thenReturn(true);
mContext.getTestablePermissions().setPermission(android.Manifest.permission.DEVICE_POWER,
@@ -365,10 +352,5 @@ public class PhoneWindowManagerTests {
WindowWakeUpPolicy getWindowWakeUpPolicy() {
return mock(WindowWakeUpPolicy.class);
}
-
- @Override
- DreamManagerInternal getDreamManagerInternal() {
- return mDreamManagerInternal;
- }
}
}
diff --git a/telephony/java/android/telephony/DisconnectCause.java b/telephony/java/android/telephony/DisconnectCause.java
index a8c077d24ed9..9c102a52fc1f 100644
--- a/telephony/java/android/telephony/DisconnectCause.java
+++ b/telephony/java/android/telephony/DisconnectCause.java
@@ -366,7 +366,6 @@ public final class DisconnectCause {
/**
* Indicates that the call was unable to be made because the satellite modem is enabled.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_ENABLED = 82;
//*********************************************************************************************
diff --git a/telephony/java/android/telephony/SubscriptionInfo.java b/telephony/java/android/telephony/SubscriptionInfo.java
index 4b175c134d84..57167c9dc498 100644
--- a/telephony/java/android/telephony/SubscriptionInfo.java
+++ b/telephony/java/android/telephony/SubscriptionInfo.java
@@ -900,7 +900,6 @@ public class SubscriptionInfo implements Parcelable {
* @return {@code true} if it is a non-terrestrial network subscription, {@code false}
* otherwise.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public boolean isOnlyNonTerrestrialNetwork() {
return mIsOnlyNonTerrestrialNetwork;
}
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 41569deeddb5..6e0304b58489 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -1241,7 +1241,6 @@ public class TelephonyManager {
* {@link #EXTRA_EMERGENCY_CALL_TO_SATELLITE_LAUNCH_INTENT} will not be included in the event
* {@link #EVENT_DISPLAY_EMERGENCY_MESSAGE}.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final String EVENT_DISPLAY_EMERGENCY_MESSAGE =
"android.telephony.event.DISPLAY_EMERGENCY_MESSAGE";
@@ -1256,7 +1255,6 @@ public class TelephonyManager {
* <p>
* Set in the extras for the {@link #EVENT_DISPLAY_EMERGENCY_MESSAGE} connection event.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final String EXTRA_EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE =
"android.telephony.extra.EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE";
@@ -1264,7 +1262,6 @@ public class TelephonyManager {
* Extra key used with the {@link #EVENT_DISPLAY_EMERGENCY_MESSAGE} for a {@link PendingIntent}
* which will be launched by the Dialer app.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final String EXTRA_EMERGENCY_CALL_TO_SATELLITE_LAUNCH_INTENT =
"android.telephony.extra.EMERGENCY_CALL_TO_SATELLITE_LAUNCH_INTENT";
diff --git a/telephony/java/android/telephony/satellite/AntennaDirection.java b/telephony/java/android/telephony/satellite/AntennaDirection.java
index c690f9852bd0..22412e6efadf 100644
--- a/telephony/java/android/telephony/satellite/AntennaDirection.java
+++ b/telephony/java/android/telephony/satellite/AntennaDirection.java
@@ -16,14 +16,11 @@
package android.telephony.satellite;
-import android.annotation.FlaggedApi;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
-import com.android.internal.telephony.flags.Flags;
-
import java.util.Objects;
/**
@@ -41,7 +38,6 @@ import java.util.Objects;
* @hide
*/
@SystemApi
-@FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public final class AntennaDirection implements Parcelable {
/** Antenna x axis direction. */
private float mX;
@@ -66,13 +62,11 @@ public final class AntennaDirection implements Parcelable {
}
@Override
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public int describeContents() {
return 0;
}
@Override
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void writeToParcel(@NonNull Parcel out, int flags) {
out.writeFloat(mX);
out.writeFloat(mY);
@@ -80,7 +74,6 @@ public final class AntennaDirection implements Parcelable {
}
@NonNull
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final Creator<AntennaDirection> CREATOR =
new Creator<>() {
@Override
@@ -125,17 +118,14 @@ public final class AntennaDirection implements Parcelable {
return Objects.hash(mX, mY, mZ);
}
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public float getX() {
return mX;
}
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public float getY() {
return mY;
}
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public float getZ() {
return mZ;
}
diff --git a/telephony/java/android/telephony/satellite/AntennaPosition.java b/telephony/java/android/telephony/satellite/AntennaPosition.java
index d6440fc7a119..a730e3f67143 100644
--- a/telephony/java/android/telephony/satellite/AntennaPosition.java
+++ b/telephony/java/android/telephony/satellite/AntennaPosition.java
@@ -16,14 +16,11 @@
package android.telephony.satellite;
-import android.annotation.FlaggedApi;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
-import com.android.internal.telephony.flags.Flags;
-
import java.util.Objects;
/**
@@ -32,7 +29,6 @@ import java.util.Objects;
* @hide
*/
@SystemApi
-@FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public final class AntennaPosition implements Parcelable {
/** Antenna direction used for satellite communication. */
@NonNull private AntennaDirection mAntennaDirection;
@@ -53,20 +49,17 @@ public final class AntennaPosition implements Parcelable {
}
@Override
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public int describeContents() {
return 0;
}
@Override
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void writeToParcel(@NonNull Parcel out, int flags) {
out.writeParcelable(mAntennaDirection, flags);
out.writeInt(mSuggestedHoldPosition);
}
@NonNull
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final Creator<AntennaPosition> CREATOR =
new Creator<>() {
@Override
@@ -107,13 +100,11 @@ public final class AntennaPosition implements Parcelable {
}
@NonNull
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public AntennaDirection getAntennaDirection() {
return mAntennaDirection;
}
@SatelliteManager.DeviceHoldPosition
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public int getSuggestedHoldPosition() {
return mSuggestedHoldPosition;
}
diff --git a/telephony/java/android/telephony/satellite/EnableRequestAttributes.java b/telephony/java/android/telephony/satellite/EnableRequestAttributes.java
index bc9d23081214..6f9b4a7e8897 100644
--- a/telephony/java/android/telephony/satellite/EnableRequestAttributes.java
+++ b/telephony/java/android/telephony/satellite/EnableRequestAttributes.java
@@ -16,12 +16,9 @@
package android.telephony.satellite;
-import android.annotation.FlaggedApi;
import android.annotation.NonNull;
import android.annotation.SystemApi;
-import com.android.internal.telephony.flags.Flags;
-
import java.util.concurrent.Executor;
import java.util.function.Consumer;
@@ -31,7 +28,6 @@ import java.util.function.Consumer;
* @hide
*/
@SystemApi
-@FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public class EnableRequestAttributes {
/** {@code true} to enable satellite and {@code false} to disable satellite */
private boolean mIsEnabled;
@@ -61,7 +57,6 @@ public class EnableRequestAttributes {
/**
* @return Whether satellite is to be enabled
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public boolean isEnabled() {
return mIsEnabled;
}
@@ -69,7 +64,6 @@ public class EnableRequestAttributes {
/**
* @return Whether demo mode is to be enabled
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public boolean isDemoMode() {
return mIsDemoMode;
}
@@ -77,7 +71,6 @@ public class EnableRequestAttributes {
/**
* @return Whether satellite is to be enabled for emergency mode
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public boolean isEmergencyMode() {
return mIsEmergencyMode;
}
@@ -85,13 +78,11 @@ public class EnableRequestAttributes {
/**
* The builder class of {@link EnableRequestAttributes}
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final class Builder {
private boolean mIsEnabled;
private boolean mIsDemoMode = false;
private boolean mIsEmergencyMode = false;
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public Builder(boolean isEnabled) {
mIsEnabled = isEnabled;
}
@@ -104,7 +95,6 @@ public class EnableRequestAttributes {
* {@code false} by Telephony.
* @return The builder object
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
@NonNull
public Builder setDemoMode(boolean isDemoMode) {
if (mIsEnabled) {
@@ -122,7 +112,6 @@ public class EnableRequestAttributes {
* Telephony.
* @return The builder object
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
@NonNull
public Builder setEmergencyMode(boolean isEmergencyMode) {
if (mIsEnabled) {
@@ -136,7 +125,6 @@ public class EnableRequestAttributes {
*
* @return The {@link EnableRequestAttributes} instance.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
@NonNull
public EnableRequestAttributes build() {
return new EnableRequestAttributes(this);
diff --git a/telephony/java/android/telephony/satellite/NtnSignalStrength.java b/telephony/java/android/telephony/satellite/NtnSignalStrength.java
index 2fec423d1d65..bb53d8e472c1 100644
--- a/telephony/java/android/telephony/satellite/NtnSignalStrength.java
+++ b/telephony/java/android/telephony/satellite/NtnSignalStrength.java
@@ -16,7 +16,6 @@
package android.telephony.satellite;
-import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.Nullable;
import android.annotation.SystemApi;
@@ -25,8 +24,6 @@ import android.os.Parcelable;
import androidx.annotation.NonNull;
-import com.android.internal.telephony.flags.Flags;
-
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -35,22 +32,16 @@ import java.lang.annotation.RetentionPolicy;
* @hide
*/
@SystemApi
-@FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public final class NtnSignalStrength implements Parcelable {
/** Non-terrestrial network signal strength is not available. */
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int NTN_SIGNAL_STRENGTH_NONE = 0;
/** Non-terrestrial network signal strength is poor. */
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int NTN_SIGNAL_STRENGTH_POOR = 1;
/** Non-terrestrial network signal strength is moderate. */
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int NTN_SIGNAL_STRENGTH_MODERATE = 2;
/** Non-terrestrial network signal strength is good. */
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int NTN_SIGNAL_STRENGTH_GOOD = 3;
/** Non-terrestrial network signal strength is great. */
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int NTN_SIGNAL_STRENGTH_GREAT = 4;
@NtnSignalStrengthLevel private int mLevel;
@@ -69,7 +60,6 @@ public final class NtnSignalStrength implements Parcelable {
* Create a parcelable object to inform the current non-terrestrial signal strength
* @hide
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public NtnSignalStrength(@NtnSignalStrengthLevel int level) {
this.mLevel = level;
}
@@ -77,7 +67,6 @@ public final class NtnSignalStrength implements Parcelable {
/**
* This constructor is used to create a copy of an existing NtnSignalStrength object.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public NtnSignalStrength(@Nullable NtnSignalStrength source) {
this.mLevel = (source == null) ? NTN_SIGNAL_STRENGTH_NONE : source.getLevel();
}
@@ -89,7 +78,6 @@ public final class NtnSignalStrength implements Parcelable {
/**
* Returns notified non-terrestrial network signal strength level.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
@NtnSignalStrengthLevel public int getLevel() {
return mLevel;
}
@@ -98,7 +86,6 @@ public final class NtnSignalStrength implements Parcelable {
* @return 0
*/
@Override
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public int describeContents() {
return 0;
}
@@ -109,7 +96,6 @@ public final class NtnSignalStrength implements Parcelable {
* May be 0 or {@link #PARCELABLE_WRITE_RETURN_VALUE}.
*/
@Override
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void writeToParcel(@NonNull Parcel out, int flags) {
out.writeInt(mLevel);
}
@@ -118,7 +104,6 @@ public final class NtnSignalStrength implements Parcelable {
mLevel = in.readInt();
}
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
@NonNull public static final Creator<NtnSignalStrength> CREATOR =
new Creator<NtnSignalStrength>() {
@Override public NtnSignalStrength createFromParcel(Parcel in) {
diff --git a/telephony/java/android/telephony/satellite/NtnSignalStrengthCallback.java b/telephony/java/android/telephony/satellite/NtnSignalStrengthCallback.java
index 4b79590b9bc6..b277b0efd4cd 100644
--- a/telephony/java/android/telephony/satellite/NtnSignalStrengthCallback.java
+++ b/telephony/java/android/telephony/satellite/NtnSignalStrengthCallback.java
@@ -16,24 +16,19 @@
package android.telephony.satellite;
-import android.annotation.FlaggedApi;
import android.annotation.NonNull;
import android.annotation.SystemApi;
-import com.android.internal.telephony.flags.Flags;
-
/**
* A callback class for notifying satellite signal strength change.
*
* @hide
*/
@SystemApi
-@FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public interface NtnSignalStrengthCallback {
/**
* Called when non-terrestrial network signal strength changes.
* @param ntnSignalStrength The new non-terrestrial network signal strength.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
void onNtnSignalStrengthChanged(@NonNull NtnSignalStrength ntnSignalStrength);
}
diff --git a/telephony/java/android/telephony/satellite/PointingInfo.java b/telephony/java/android/telephony/satellite/PointingInfo.java
index 9440b65a61aa..d0c51bc48c7d 100644
--- a/telephony/java/android/telephony/satellite/PointingInfo.java
+++ b/telephony/java/android/telephony/satellite/PointingInfo.java
@@ -16,15 +16,12 @@
package android.telephony.satellite;
-import android.annotation.FlaggedApi;
import android.annotation.FloatRange;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
-import com.android.internal.telephony.flags.Flags;
-
import java.util.Objects;
/**
@@ -34,7 +31,6 @@ import java.util.Objects;
* @hide
*/
@SystemApi
-@FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public final class PointingInfo implements Parcelable {
/** Satellite azimuth in degrees */
private float mSatelliteAzimuthDegrees;
@@ -55,19 +51,16 @@ public final class PointingInfo implements Parcelable {
}
@Override
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public int describeContents() {
return 0;
}
@Override
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void writeToParcel(@NonNull Parcel out, int flags) {
out.writeFloat(mSatelliteAzimuthDegrees);
out.writeFloat(mSatelliteElevationDegrees);
}
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final @android.annotation.NonNull Creator<PointingInfo> CREATOR =
new Creator<PointingInfo>() {
@Override
@@ -113,7 +106,6 @@ public final class PointingInfo implements Parcelable {
* Returns the azimuth of the satellite, in degrees.
*/
@FloatRange(from = -180, to = 180)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public float getSatelliteAzimuthDegrees() {
return mSatelliteAzimuthDegrees;
}
@@ -122,7 +114,6 @@ public final class PointingInfo implements Parcelable {
* Returns the elevation of the satellite, in degrees.
*/
@FloatRange(from = -90, to = 90)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public float getSatelliteElevationDegrees() {
return mSatelliteElevationDegrees;
}
diff --git a/telephony/java/android/telephony/satellite/SatelliteCapabilities.java b/telephony/java/android/telephony/satellite/SatelliteCapabilities.java
index f34522aedeac..a5b9deb67720 100644
--- a/telephony/java/android/telephony/satellite/SatelliteCapabilities.java
+++ b/telephony/java/android/telephony/satellite/SatelliteCapabilities.java
@@ -16,15 +16,12 @@
package android.telephony.satellite;
-import android.annotation.FlaggedApi;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
-import com.android.internal.telephony.flags.Flags;
-
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
@@ -37,7 +34,6 @@ import java.util.Set;
* @hide
*/
@SystemApi
-@FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public final class SatelliteCapabilities implements Parcelable {
/**
* List of technologies supported by the satellite modem.
@@ -80,13 +76,11 @@ public final class SatelliteCapabilities implements Parcelable {
}
@Override
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public int describeContents() {
return 0;
}
@Override
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void writeToParcel(@NonNull Parcel out, int flags) {
if (mSupportedRadioTechnologies != null && !mSupportedRadioTechnologies.isEmpty()) {
out.writeInt(mSupportedRadioTechnologies.size());
@@ -112,7 +106,6 @@ public final class SatelliteCapabilities implements Parcelable {
}
}
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
@NonNull public static final Creator<SatelliteCapabilities> CREATOR = new Creator<>() {
@Override
public SatelliteCapabilities createFromParcel(Parcel in) {
@@ -172,7 +165,6 @@ public final class SatelliteCapabilities implements Parcelable {
/**
* @return The list of technologies supported by the satellite modem.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
@NonNull @SatelliteManager.NTRadioTechnology public Set<Integer>
getSupportedRadioTechnologies() {
return mSupportedRadioTechnologies;
@@ -184,7 +176,6 @@ public final class SatelliteCapabilities implements Parcelable {
* @return {@code true} if UE needs to point to a satellite to send and receive data and
* {@code false} otherwise.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public boolean isPointingRequired() {
return mIsPointingRequired;
}
@@ -194,7 +185,6 @@ public final class SatelliteCapabilities implements Parcelable {
*
* @return The maximum number of bytes per datagram that can be sent over satellite.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public int getMaxBytesPerOutgoingDatagram() {
return mMaxBytesPerOutgoingDatagram;
}
@@ -214,7 +204,6 @@ public final class SatelliteCapabilities implements Parcelable {
* @return Map key: {@link SatelliteManager.DeviceHoldPosition} value: AntennaPosition
*/
@NonNull
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public Map<Integer, AntennaPosition> getAntennaPositionMap() {
return mAntennaPositionMap;
}
diff --git a/telephony/java/android/telephony/satellite/SatelliteCapabilitiesCallback.java b/telephony/java/android/telephony/satellite/SatelliteCapabilitiesCallback.java
index b68dd5a150ff..b236cf64bf65 100644
--- a/telephony/java/android/telephony/satellite/SatelliteCapabilitiesCallback.java
+++ b/telephony/java/android/telephony/satellite/SatelliteCapabilitiesCallback.java
@@ -16,24 +16,19 @@
package android.telephony.satellite;
-import android.annotation.FlaggedApi;
import android.annotation.NonNull;
import android.annotation.SystemApi;
-import com.android.internal.telephony.flags.Flags;
-
/**
* A callback class for satellite capabilities change events.
*
* @hide
*/
@SystemApi
-@FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public interface SatelliteCapabilitiesCallback {
/**
* Called when satellite capability has changed.
* @param capabilities The new satellite capabilities.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
void onSatelliteCapabilitiesChanged(@NonNull SatelliteCapabilities capabilities);
}
diff --git a/telephony/java/android/telephony/satellite/SatelliteDatagram.java b/telephony/java/android/telephony/satellite/SatelliteDatagram.java
index 4d67f80241f9..9037f0c4078d 100644
--- a/telephony/java/android/telephony/satellite/SatelliteDatagram.java
+++ b/telephony/java/android/telephony/satellite/SatelliteDatagram.java
@@ -16,21 +16,17 @@
package android.telephony.satellite;
-import android.annotation.FlaggedApi;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
-import com.android.internal.telephony.flags.Flags;
-
/**
* SatelliteDatagram is used to store data that is to be sent or received over satellite.
* Data is stored in byte array format.
* @hide
*/
@SystemApi
-@FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public final class SatelliteDatagram implements Parcelable {
/**
* Datagram to be sent or received over satellite.
@@ -49,18 +45,15 @@ public final class SatelliteDatagram implements Parcelable {
}
@Override
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public int describeContents() {
return 0;
}
@Override
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void writeToParcel(@NonNull Parcel out, int flags) {
out.writeByteArray(mData);
}
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
@NonNull public static final Creator<SatelliteDatagram> CREATOR =
new Creator<>() {
@Override
@@ -80,7 +73,6 @@ public final class SatelliteDatagram implements Parcelable {
* satellite provider. Client application should be aware of how to encode the datagram based
* upon the satellite provider.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
@NonNull public byte[] getSatelliteDatagram() {
return mData;
}
diff --git a/telephony/java/android/telephony/satellite/SatelliteDatagramCallback.java b/telephony/java/android/telephony/satellite/SatelliteDatagramCallback.java
index 9aaa986435cd..8b6e3ca44fd7 100644
--- a/telephony/java/android/telephony/satellite/SatelliteDatagramCallback.java
+++ b/telephony/java/android/telephony/satellite/SatelliteDatagramCallback.java
@@ -16,12 +16,9 @@
package android.telephony.satellite;
-import android.annotation.FlaggedApi;
import android.annotation.NonNull;
import android.annotation.SystemApi;
-import com.android.internal.telephony.flags.Flags;
-
import java.util.concurrent.Executor;
import java.util.function.Consumer;
@@ -35,7 +32,6 @@ import java.util.function.Consumer;
* @hide
*/
@SystemApi
-@FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public interface SatelliteDatagramCallback {
/**
* Called when there is an incoming datagram to be received.
@@ -47,7 +43,6 @@ public interface SatelliteDatagramCallback {
* that they received the datagram. If the callback is not received within
* five minutes, Telephony will resend the datagram.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
void onSatelliteDatagramReceived(long datagramId, @NonNull SatelliteDatagram datagram,
int pendingCount, @NonNull Consumer<Void> callback);
}
diff --git a/telephony/java/android/telephony/satellite/SatelliteManager.java b/telephony/java/android/telephony/satellite/SatelliteManager.java
index 13096548a8ba..270d599e0a0a 100644
--- a/telephony/java/android/telephony/satellite/SatelliteManager.java
+++ b/telephony/java/android/telephony/satellite/SatelliteManager.java
@@ -148,7 +148,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static class SatelliteException extends Exception {
@SatelliteResult private final int mErrorCode;
@@ -157,7 +156,6 @@ public final class SatelliteManager {
*
* @param errorCode The {@link SatelliteResult}.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public SatelliteException(@SatelliteResult int errorCode) {
mErrorCode = errorCode;
}
@@ -167,7 +165,6 @@ public final class SatelliteManager {
*
* @return The {@link SatelliteResult}.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
@SatelliteResult public int getErrorCode() {
return mErrorCode;
}
@@ -311,7 +308,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_SUCCESS = 0;
/**
@@ -319,7 +315,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_ERROR = 1;
/**
@@ -327,7 +322,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_SERVER_ERROR = 2;
/**
@@ -336,7 +330,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_SERVICE_ERROR = 3;
/**
@@ -345,7 +338,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_MODEM_ERROR = 4;
/**
@@ -354,7 +346,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_NETWORK_ERROR = 5;
/**
@@ -362,7 +353,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_INVALID_TELEPHONY_STATE = 6;
/**
@@ -370,7 +360,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_INVALID_MODEM_STATE = 7;
/**
@@ -379,7 +368,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_INVALID_ARGUMENTS = 8;
/**
@@ -388,7 +376,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_REQUEST_FAILED = 9;
/**
@@ -396,7 +383,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_RADIO_NOT_AVAILABLE = 10;
/**
@@ -404,7 +390,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_REQUEST_NOT_SUPPORTED = 11;
/**
@@ -412,7 +397,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_NO_RESOURCES = 12;
/**
@@ -420,7 +404,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_SERVICE_NOT_PROVISIONED = 13;
/**
@@ -428,7 +411,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_SERVICE_PROVISION_IN_PROGRESS = 14;
/**
@@ -438,7 +420,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_REQUEST_ABORTED = 15;
/**
@@ -446,7 +427,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_ACCESS_BARRED = 16;
/**
@@ -455,7 +435,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_NETWORK_TIMEOUT = 17;
/**
@@ -463,7 +442,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_NOT_REACHABLE = 18;
/**
@@ -471,7 +449,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_NOT_AUTHORIZED = 19;
/**
@@ -479,7 +456,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_NOT_SUPPORTED = 20;
/**
@@ -487,7 +463,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_REQUEST_IN_PROGRESS = 21;
/**
@@ -495,7 +470,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_MODEM_BUSY = 22;
/**
@@ -503,7 +477,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_ILLEGAL_STATE = 23;
/**
@@ -512,7 +485,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_RESULT_MODEM_TIMEOUT = 24;
/**
@@ -608,7 +580,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int NT_RADIO_TECHNOLOGY_UNKNOWN = 0;
/**
@@ -616,7 +587,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int NT_RADIO_TECHNOLOGY_NB_IOT_NTN = 1;
/**
@@ -624,7 +594,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int NT_RADIO_TECHNOLOGY_NR_NTN = 2;
/**
@@ -632,7 +601,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int NT_RADIO_TECHNOLOGY_EMTC_NTN = 3;
/**
@@ -640,7 +608,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int NT_RADIO_TECHNOLOGY_PROPRIETARY = 4;
/** @hide */
@@ -659,7 +626,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int DEVICE_HOLD_POSITION_UNKNOWN = 0;
/**
@@ -667,7 +633,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int DEVICE_HOLD_POSITION_PORTRAIT = 1;
/**
@@ -675,7 +640,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int DEVICE_HOLD_POSITION_LANDSCAPE_LEFT = 2;
/**
@@ -683,7 +647,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int DEVICE_HOLD_POSITION_LANDSCAPE_RIGHT = 3;
/** @hide */
@@ -701,7 +664,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int DISPLAY_MODE_UNKNOWN = 0;
/**
@@ -709,7 +671,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int DISPLAY_MODE_FIXED = 1;
/**
@@ -718,7 +679,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int DISPLAY_MODE_OPENED = 2;
/**
@@ -727,7 +687,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int DISPLAY_MODE_CLOSED = 3;
/** @hide */
@@ -746,7 +705,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE_SOS = 1;
/**
@@ -919,7 +877,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void requestEnabled(@NonNull EnableRequestAttributes attributes,
@NonNull @CallbackExecutor Executor executor,
@SatelliteResult @NonNull Consumer<Integer> resultListener) {
@@ -968,7 +925,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void requestIsEnabled(@NonNull @CallbackExecutor Executor executor,
@NonNull OutcomeReceiver<Boolean, SatelliteException> callback) {
Objects.requireNonNull(executor);
@@ -1028,7 +984,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void requestIsDemoModeEnabled(@NonNull @CallbackExecutor Executor executor,
@NonNull OutcomeReceiver<Boolean, SatelliteException> callback) {
Objects.requireNonNull(executor);
@@ -1088,7 +1043,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void requestIsEmergencyModeEnabled(@NonNull @CallbackExecutor Executor executor,
@NonNull OutcomeReceiver<Boolean, SatelliteException> callback) {
Objects.requireNonNull(executor);
@@ -1148,7 +1102,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void requestIsSupported(@NonNull @CallbackExecutor Executor executor,
@NonNull OutcomeReceiver<Boolean, SatelliteException> callback) {
Objects.requireNonNull(executor);
@@ -1207,7 +1160,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void requestCapabilities(@NonNull @CallbackExecutor Executor executor,
@NonNull OutcomeReceiver<SatelliteCapabilities, SatelliteException> callback) {
Objects.requireNonNull(executor);
@@ -1257,7 +1209,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_IDLE = 0;
/**
@@ -1265,7 +1216,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_SENDING = 1;
/**
@@ -1275,7 +1225,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_SEND_SUCCESS = 2;
/**
@@ -1286,7 +1235,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_SEND_FAILED = 3;
/**
@@ -1294,7 +1242,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVING = 4;
/**
@@ -1304,7 +1251,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_SUCCESS = 5;
/**
@@ -1315,7 +1261,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_NONE = 6;
/**
@@ -1325,7 +1270,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_FAILED = 7;
/**
@@ -1339,7 +1283,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_WAITING_TO_CONNECT = 8;
/**
@@ -1349,7 +1292,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_UNKNOWN = -1;
/** @hide */
@@ -1374,7 +1316,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_MODEM_STATE_IDLE = 0;
/**
@@ -1382,7 +1323,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_MODEM_STATE_LISTENING = 1;
/**
@@ -1390,7 +1330,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_MODEM_STATE_DATAGRAM_TRANSFERRING = 2;
/**
@@ -1398,7 +1337,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_MODEM_STATE_DATAGRAM_RETRYING = 3;
/**
@@ -1406,7 +1344,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_MODEM_STATE_OFF = 4;
/**
@@ -1414,7 +1351,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_MODEM_STATE_UNAVAILABLE = 5;
/**
@@ -1422,7 +1358,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_MODEM_STATE_NOT_CONNECTED = 6;
/**
@@ -1430,7 +1365,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_MODEM_STATE_CONNECTED = 7;
/**
@@ -1455,7 +1389,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int SATELLITE_MODEM_STATE_UNKNOWN = -1;
/** @hide */
@@ -1481,7 +1414,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int DATAGRAM_TYPE_UNKNOWN = 0;
/**
@@ -1489,7 +1421,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int DATAGRAM_TYPE_SOS_MESSAGE = 1;
/**
@@ -1498,7 +1429,6 @@ public final class SatelliteManager {
* @hide
*/
@SystemApi
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public static final int DATAGRAM_TYPE_LOCATION_SHARING = 2;
/**
@@ -1653,7 +1583,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
@SuppressWarnings("SamShouldBeLast")
public void startTransmissionUpdates(@NonNull @CallbackExecutor Executor executor,
@SatelliteResult @NonNull Consumer<Integer> resultListener,
@@ -1739,7 +1668,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void stopTransmissionUpdates(@NonNull SatelliteTransmissionUpdateCallback callback,
@SuppressWarnings("ListenerLast") @NonNull @CallbackExecutor Executor executor,
@SuppressWarnings("ListenerLast") @SatelliteResult @NonNull
@@ -1800,7 +1728,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void provisionService(@NonNull String token, @NonNull byte[] provisionData,
@Nullable CancellationSignal cancellationSignal,
@NonNull @CallbackExecutor Executor executor,
@@ -1858,7 +1785,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void deprovisionService(@NonNull String token,
@NonNull @CallbackExecutor Executor executor,
@SatelliteResult @NonNull Consumer<Integer> resultListener) {
@@ -1904,7 +1830,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
@SatelliteResult public int registerForProvisionStateChanged(
@NonNull @CallbackExecutor Executor executor,
@NonNull SatelliteProvisionStateCallback callback) {
@@ -1959,7 +1884,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void unregisterForProvisionStateChanged(
@NonNull SatelliteProvisionStateCallback callback) {
Objects.requireNonNull(callback);
@@ -2000,7 +1924,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void requestIsProvisioned(@NonNull @CallbackExecutor Executor executor,
@NonNull OutcomeReceiver<Boolean, SatelliteException> callback) {
Objects.requireNonNull(executor);
@@ -2058,7 +1981,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
@SatelliteResult public int registerForModemStateChanged(
@NonNull @CallbackExecutor Executor executor,
@NonNull SatelliteModemStateCallback callback) {
@@ -2121,7 +2043,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void unregisterForModemStateChanged(
@NonNull SatelliteModemStateCallback callback) {
Objects.requireNonNull(callback);
@@ -2164,7 +2085,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
@SatelliteResult public int registerForIncomingDatagram(
@NonNull @CallbackExecutor Executor executor,
@NonNull SatelliteDatagramCallback callback) {
@@ -2223,7 +2143,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void unregisterForIncomingDatagram(@NonNull SatelliteDatagramCallback callback) {
Objects.requireNonNull(callback);
ISatelliteDatagramCallback internalCallback =
@@ -2264,7 +2183,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void pollPendingDatagrams(@NonNull @CallbackExecutor Executor executor,
@SatelliteResult @NonNull Consumer<Integer> resultListener) {
Objects.requireNonNull(executor);
@@ -2322,7 +2240,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void sendDatagram(@DatagramType int datagramType,
@NonNull SatelliteDatagram datagram, boolean needFullScreenPointingUI,
@NonNull @CallbackExecutor Executor executor,
@@ -2373,7 +2290,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void requestIsCommunicationAllowedForCurrentLocation(
@NonNull @CallbackExecutor Executor executor,
@NonNull OutcomeReceiver<Boolean, SatelliteException> callback) {
@@ -2497,7 +2413,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void requestTimeForNextSatelliteVisibility(@NonNull @CallbackExecutor Executor executor,
@NonNull OutcomeReceiver<Duration, SatelliteException> callback) {
Objects.requireNonNull(executor);
@@ -2711,7 +2626,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void setDeviceAlignedWithSatellite(boolean isAligned) {
try {
ITelephony telephony = getITelephony();
@@ -3072,7 +2986,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void requestNtnSignalStrength(@NonNull @CallbackExecutor Executor executor,
@NonNull OutcomeReceiver<NtnSignalStrength, SatelliteException> callback) {
Objects.requireNonNull(executor);
@@ -3138,7 +3051,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void registerForNtnSignalStrengthChanged(@NonNull @CallbackExecutor Executor executor,
@NonNull NtnSignalStrengthCallback callback) {
Objects.requireNonNull(executor);
@@ -3190,7 +3102,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void unregisterForNtnSignalStrengthChanged(@NonNull NtnSignalStrengthCallback callback) {
Objects.requireNonNull(callback);
INtnSignalStrengthCallback internalCallback =
@@ -3227,7 +3138,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
@SatelliteResult public int registerForCapabilitiesChanged(
@NonNull @CallbackExecutor Executor executor,
@NonNull SatelliteCapabilitiesCallback callback) {
@@ -3273,7 +3183,6 @@ public final class SatelliteManager {
*/
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public void unregisterForCapabilitiesChanged(
@NonNull SatelliteCapabilitiesCallback callback) {
Objects.requireNonNull(callback);
diff --git a/telephony/java/android/telephony/satellite/SatelliteModemStateCallback.java b/telephony/java/android/telephony/satellite/SatelliteModemStateCallback.java
index 040fbbbb2689..ef26b17e15f5 100644
--- a/telephony/java/android/telephony/satellite/SatelliteModemStateCallback.java
+++ b/telephony/java/android/telephony/satellite/SatelliteModemStateCallback.java
@@ -27,13 +27,11 @@ import com.android.internal.telephony.flags.Flags;
* @hide
*/
@SystemApi
-@FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public interface SatelliteModemStateCallback {
/**
* Called when satellite modem state changes.
* @param state The new satellite modem state.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
void onSatelliteModemStateChanged(@SatelliteManager.SatelliteModemState int state);
/**
diff --git a/telephony/java/android/telephony/satellite/SatelliteProvisionStateCallback.java b/telephony/java/android/telephony/satellite/SatelliteProvisionStateCallback.java
index 6b95eb3c1ac3..fe5d2a143778 100644
--- a/telephony/java/android/telephony/satellite/SatelliteProvisionStateCallback.java
+++ b/telephony/java/android/telephony/satellite/SatelliteProvisionStateCallback.java
@@ -30,7 +30,6 @@ import java.util.List;
* @hide
*/
@SystemApi
-@FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public interface SatelliteProvisionStateCallback {
/**
* Called when satellite provision state changes.
@@ -40,7 +39,6 @@ public interface SatelliteProvisionStateCallback {
* It is generally expected that the provisioning app retries if
* provisioning fails.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
void onSatelliteProvisionStateChanged(boolean provisioned);
/**
diff --git a/telephony/java/android/telephony/satellite/SatelliteTransmissionUpdateCallback.java b/telephony/java/android/telephony/satellite/SatelliteTransmissionUpdateCallback.java
index e18fad3eda79..9c6eb8f43804 100644
--- a/telephony/java/android/telephony/satellite/SatelliteTransmissionUpdateCallback.java
+++ b/telephony/java/android/telephony/satellite/SatelliteTransmissionUpdateCallback.java
@@ -29,14 +29,12 @@ import com.android.internal.telephony.flags.Flags;
* @hide
*/
@SystemApi
-@FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
public interface SatelliteTransmissionUpdateCallback {
/**
* Called when the satellite position changed.
*
* @param pointingInfo The pointing info containing the satellite location.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
void onSatellitePositionChanged(@NonNull PointingInfo pointingInfo);
/**
@@ -46,7 +44,6 @@ public interface SatelliteTransmissionUpdateCallback {
* @param sendPendingCount The number of datagrams that are currently being sent.
* @param errorCode If datagram transfer failed, the reason for failure.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
void onSendDatagramStateChanged(
@SatelliteManager.SatelliteDatagramTransferState int state, int sendPendingCount,
@SatelliteManager.SatelliteResult int errorCode);
@@ -70,7 +67,6 @@ public interface SatelliteTransmissionUpdateCallback {
* @param receivePendingCount The number of datagrams that are currently pending to be received.
* @param errorCode If datagram transfer failed, the reason for failure.
*/
- @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
void onReceiveDatagramStateChanged(
@SatelliteManager.SatelliteDatagramTransferState int state, int receivePendingCount,
@SatelliteManager.SatelliteResult int errorCode);
diff --git a/tests/Input/src/com/android/test/input/AnrTest.kt b/tests/Input/src/com/android/test/input/AnrTest.kt
index cd6ab30d8678..73192eac89c0 100644
--- a/tests/Input/src/com/android/test/input/AnrTest.kt
+++ b/tests/Input/src/com/android/test/input/AnrTest.kt
@@ -27,8 +27,6 @@ import android.hardware.display.DisplayManager
import android.os.Build
import android.os.IInputConstants.UNMULTIPLIED_DEFAULT_DISPATCHING_TIMEOUT_MILLIS
import android.os.SystemClock
-import android.provider.Settings
-import android.provider.Settings.Global.HIDE_ERROR_DIALOGS
import android.server.wm.CtsWindowInfoUtils.waitForStableWindowGeometry
import android.testing.PollingCheck
@@ -38,6 +36,7 @@ import androidx.test.uiautomator.UiObject2
import androidx.test.uiautomator.Until
import com.android.cts.input.DebugInputRule
+import com.android.cts.input.ShowErrorDialogsRule
import com.android.cts.input.UinputTouchScreen
import java.time.Duration
@@ -79,18 +78,16 @@ class AnrTest {
@get:Rule
val debugInputRule = DebugInputRule()
+ @get:Rule
+ val showErrorDialogs = ShowErrorDialogsRule()
+
@Before
fun setUp() {
- val contentResolver = instrumentation.targetContext.contentResolver
- hideErrorDialogs = Settings.Global.getInt(contentResolver, HIDE_ERROR_DIALOGS, 0)
- Settings.Global.putInt(contentResolver, HIDE_ERROR_DIALOGS, 0)
PACKAGE_NAME = UnresponsiveGestureMonitorActivity::class.java.getPackage()!!.getName()
}
@After
fun tearDown() {
- val contentResolver = instrumentation.targetContext.contentResolver
- Settings.Global.putInt(contentResolver, HIDE_ERROR_DIALOGS, hideErrorDialogs)
}
@Test
diff --git a/tests/vcn/Android.bp b/tests/vcn/Android.bp
index 661ed07a5669..5ad1d1dce324 100644
--- a/tests/vcn/Android.bp
+++ b/tests/vcn/Android.bp
@@ -17,8 +17,9 @@ android_test {
// For access hidden connectivity methods in tests
defaults: ["framework-connectivity-test-defaults"],
- // TODO: b/374174952 Use 36 after Android B finalization
- min_sdk_version: "35",
+ // Tethering module is released in R so this test needs to be installable
+ // on R
+ min_sdk_version: "30",
srcs: [
"java/**/*.java",
diff --git a/tests/vcn/AndroidManifest.xml b/tests/vcn/AndroidManifest.xml
index 08effbd1f7cf..6e8b4ac48816 100644
--- a/tests/vcn/AndroidManifest.xml
+++ b/tests/vcn/AndroidManifest.xml
@@ -17,7 +17,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.frameworks.tests.vcn">
<!-- TODO: b/374174952 Use 36 after Android B finalization -->
- <uses-sdk android:minSdkVersion="35" android:targetSdkVersion="35" />
+ <uses-sdk android:minSdkVersion="30" android:targetSdkVersion="35" />
<application>
<uses-library android:name="android.test.runner" />