diff options
10 files changed, 59 insertions, 40 deletions
diff --git a/core/java/android/content/pm/multiuser.aconfig b/core/java/android/content/pm/multiuser.aconfig index 833260a15c45..d351ebc22026 100644 --- a/core/java/android/content/pm/multiuser.aconfig +++ b/core/java/android/content/pm/multiuser.aconfig @@ -363,6 +363,17 @@ flag { is_fixed_read_only: true } +flag { + name: "cache_user_restrictions_read_only" + namespace: "multiuser" + description: "Cache hasUserRestriction to avoid unnecessary binder calls" + bug: "350419621" + metadata { + purpose: PURPOSE_BUGFIX + } + is_fixed_read_only: true +} + # This flag guards the private space feature and all its implementations excluding the APIs. APIs are guarded by android.os.Flags.allow_private_profile. flag { name: "enable_private_space_features" diff --git a/core/java/android/permission/flags.aconfig b/core/java/android/permission/flags.aconfig index 8d846ab2231f..b5139b5b7ef6 100644 --- a/core/java/android/permission/flags.aconfig +++ b/core/java/android/permission/flags.aconfig @@ -454,3 +454,12 @@ flag { description: "API change to enable getTextClassifier by type" bug: "377229653" } + +flag { + name: "updatable_text_classifier_for_otp_detection_enabled" + is_fixed_read_only: true + is_exported: true + namespace: "permissions" + description: "Enables text classifier for OTP detection that is updatable from mainline module" + bug: "377229653" +} diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTransition.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTransition.java index 8f02c1b157b5..b171db2c3793 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTransition.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTransition.java @@ -627,6 +627,12 @@ public class PipTransition extends PipTransitionController implements finishTransition(); }); cacheAndStartTransitionAnimator(animator); + + // Save the PiP bounds in case, we re-enter the PiP with the same component. + float snapFraction = mPipBoundsAlgorithm.getSnapFraction( + mPipBoundsState.getBounds()); + mPipBoundsState.saveReentryState(snapFraction); + return true; } @@ -912,11 +918,6 @@ public class PipTransition extends PipTransitionController implements "Unexpected bundle for " + mPipTransitionState); break; case PipTransitionState.EXITED_PIP: - // Save the PiP bounds in case, we re-enter the PiP with the same component. - float snapFraction = mPipBoundsAlgorithm.getSnapFraction( - mPipBoundsState.getBounds()); - mPipBoundsState.saveReentryState(snapFraction); - mPipTransitionState.setPinnedTaskLeash(null); mPipTransitionState.setPipTaskInfo(null); break; diff --git a/services/autofill/features.aconfig b/services/autofill/features.aconfig index 444844121190..57036335bb75 100644 --- a/services/autofill/features.aconfig +++ b/services/autofill/features.aconfig @@ -31,6 +31,14 @@ flag { } flag { + name: "fill_dialog_improvements_impl" + is_exported: true + namespace: "autofill" + description: "Improvements for Fill Dialog for non-api changes" + bug: "336223371" +} + +flag { name: "fill_dialog_improvements" is_exported: true namespace: "autofill" diff --git a/services/core/Android.bp b/services/core/Android.bp index b9540eba938f..6d60164e3d0e 100644 --- a/services/core/Android.bp +++ b/services/core/Android.bp @@ -238,7 +238,6 @@ java_library_static { "connectivity_flags_lib", "device_config_service_flags_java", "dreams_flags_lib", - "aconfig_flags_java", "aconfig_new_storage_flags_lib", "powerstats_flags_lib", "locksettings_flags_lib", diff --git a/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java b/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java index 7660c154efd5..e838a8dc7e7f 100644 --- a/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java +++ b/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java @@ -42,7 +42,6 @@ import android.aconfigd.Aconfigd.StorageReturnMessages; import static com.android.aconfig_new_storage.Flags.enableAconfigStorageDaemon; import static com.android.aconfig_new_storage.Flags.supportImmediateLocalOverrides; import static com.android.aconfig_new_storage.Flags.supportClearLocalOverridesImmediately; -import static com.android.aconfig.flags.Flags.enableSystemAconfigdRust; import java.io.DataInputStream; import java.io.DataOutputStream; @@ -461,9 +460,8 @@ public class SettingsToPropertiesMapper { static ProtoInputStream sendAconfigdRequests(ProtoOutputStream requests) { // connect to aconfigd socket LocalSocket client = new LocalSocket(); - String socketName = enableSystemAconfigdRust() - ? "aconfigd_system" : "aconfigd"; - try{ + String socketName = "aconfigd_system"; + try { client.connect(new LocalSocketAddress( socketName, LocalSocketAddress.Namespace.RESERVED)); Slog.d(TAG, "connected to aconfigd socket"); diff --git a/services/tests/servicestests/Android.bp b/services/tests/servicestests/Android.bp index 0c058df35195..009ce88cfd6c 100644 --- a/services/tests/servicestests/Android.bp +++ b/services/tests/servicestests/Android.bp @@ -897,16 +897,6 @@ test_module_config { } test_module_config { - name: "FrameworksServicesTests_server_accessibility", - base: "FrameworksServicesTests", - test_suites: [ - "automotive-tests", - "device-tests", - ], - include_filters: ["com.android.server.accessibility"], -} - -test_module_config { name: "FrameworksServicesTests_server_binarytransparencyservicetest", base: "FrameworksServicesTests", test_suites: [ diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java index 863f42f3d1c1..90bf1d36a4ce 100644 --- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java @@ -6884,10 +6884,16 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { public void testReadPolicyXml_backupRestoreLogging() throws Exception { BackupRestoreEventLogger logger = mock(BackupRestoreEventLogger.class); + if (ActivityManager.getCurrentUser() != UserHandle.USER_SYSTEM) { + // By default, the ZenModeHelper only has a configuration for the system user. + // If the current user is not the system user, the user must be updated. + mService.mZenModeHelper.onUserSwitched(ActivityManager.getCurrentUser()); + } UserInfo ui = new UserInfo(ActivityManager.getCurrentUser(), "Clone", UserInfo.FLAG_FULL); ui.userType = USER_TYPE_FULL_SYSTEM; when(mUmInternal.getUserInfo(ActivityManager.getCurrentUser())).thenReturn(ui); - when(mPermissionHelper.getNotificationPermissionValues(0)).thenReturn(new ArrayMap<>()); + when(mPermissionHelper.getNotificationPermissionValues(ActivityManager.getCurrentUser())) + .thenReturn(new ArrayMap<>()); TypedXmlSerializer serializer = Xml.newFastSerializer(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); @@ -8931,8 +8937,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { @Test public void testAreBubblesEnabled_false() throws Exception { - Settings.Secure.putInt(mContext.getContentResolver(), - Settings.Secure.NOTIFICATION_BUBBLES, 0); + Settings.Secure.putIntForUser(mContext.getContentResolver(), + Settings.Secure.NOTIFICATION_BUBBLES, 0, UserHandle.getUserId(mUid)); mService.mPreferencesHelper.updateBubblesEnabled(); assertFalse(mBinderService.areBubblesEnabled(UserHandle.getUserHandleForUid(mUid))); } @@ -13310,6 +13316,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { when(mPermissionHelper.hasPermission(UID_N_MR1)).thenReturn(false); when(mPermissionHelper.hasPermission(UID_P)).thenReturn(true); + enableInteractAcrossUsers(); assertThat(mBinderService.getPackagesBypassingDnd(UserHandle.getUserId(UID_P)).getList()) .containsExactly(new ZenBypassingApp(PKG_P, false)); } diff --git a/tests/FlickerTests/Android.bp b/tests/FlickerTests/Android.bp index f44eacbaafbf..1e997b386faa 100644 --- a/tests/FlickerTests/Android.bp +++ b/tests/FlickerTests/Android.bp @@ -41,7 +41,6 @@ java_defaults { "platform-test-annotations", "wm-flicker-common-app-helpers", "wm-shell-flicker-utils", - "systemui-tapl", ], data: [":FlickerTestApp"], } diff --git a/tests/FlickerTests/Notification/src/com/android/server/wm/flicker/notification/OpenAppFromNotificationWarmTest.kt b/tests/FlickerTests/Notification/src/com/android/server/wm/flicker/notification/OpenAppFromNotificationWarmTest.kt index da90c4f624d2..ad70757a9a4d 100644 --- a/tests/FlickerTests/Notification/src/com/android/server/wm/flicker/notification/OpenAppFromNotificationWarmTest.kt +++ b/tests/FlickerTests/Notification/src/com/android/server/wm/flicker/notification/OpenAppFromNotificationWarmTest.kt @@ -16,8 +16,6 @@ package com.android.server.wm.flicker.notification -import android.platform.systemui_tapl.controller.NotificationIdentity -import android.platform.systemui_tapl.ui.Root import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.Presubmit import android.platform.test.rule.DisableNotificationCooldownSettingRule @@ -30,6 +28,8 @@ import android.tools.helpers.wakeUpAndGoToHomeScreen import android.tools.traces.component.ComponentNameMatcher import android.view.WindowInsets import android.view.WindowManager +import androidx.test.uiautomator.By +import androidx.test.uiautomator.Until import com.android.server.wm.flicker.helpers.NotificationAppHelper import com.android.server.wm.flicker.helpers.setRotation import com.android.server.wm.flicker.navBarLayerIsVisibleAtEnd @@ -87,9 +87,8 @@ open class OpenAppFromNotificationWarmTest(flicker: LegacyFlickerTest) : .withWindowSurfaceDisappeared(ComponentNameMatcher.NOTIFICATION_SHADE) .waitForAndVerify() } - protected fun FlickerTestData.openAppFromNotification() { - doOpenAppAndWait() + doOpenAppAndWait(startY = 10, endY = 3 * device.displayHeight / 4, steps = 25) } protected fun FlickerTestData.openAppFromLockNotification() { @@ -102,27 +101,25 @@ open class OpenAppFromNotificationWarmTest(flicker: LegacyFlickerTest) : WindowInsets.Type.statusBars() or WindowInsets.Type.displayCutout() ) - doOpenAppAndWait() + doOpenAppAndWait(startY = insets.top + 100, endY = device.displayHeight / 2, steps = 4) } - protected fun FlickerTestData.doOpenAppAndWait() { - val shade = Root.get().openNotificationShade() + protected fun FlickerTestData.doOpenAppAndWait(startY: Int, endY: Int, steps: Int) { + // Swipe down to show the notification shade + val x = device.displayWidth / 2 + device.swipe(x, startY, x, endY, steps) + device.waitForIdle(2000) + instrumentation.uiAutomation.syncInputTransactions() // Launch the activity by clicking the notification - // Post notification and ensure that it's collapsed val notification = - shade.notificationStack.findNotification( - NotificationIdentity( - type = NotificationIdentity.Type.BY_TEXT, - text = "Flicker Test Notification", - ) - ) + device.wait(Until.findObject(By.text("Flicker Test Notification")), 2000L) + notification?.click() ?: error("Notification not found") + instrumentation.uiAutomation.syncInputTransactions() - notification.clickToApp() // Wait for the app to launch wmHelper.StateSyncBuilder().withFullScreenApp(testApp).waitForAndVerify() } - @Presubmit @Test override fun appWindowBecomesVisible() = appWindowBecomesVisible_warmStart() @Presubmit @Test override fun appLayerBecomesVisible() = appLayerBecomesVisible_warmStart() |