diff options
6 files changed, 28 insertions, 31 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt index d73c85b0803b..776b336e7b61 100644 --- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt @@ -279,7 +279,7 @@ class ControlsUiControllerImpl @Inject constructor ( controlsListingController.get().removeCallback(listingCallback) controlsController.get().unsubscribe() - taskViewController?.dismiss() + taskViewController?.removeTask() taskViewController = null val fadeAnim = ObjectAnimator.ofFloat(parent, "alpha", 1.0f, 0.0f) @@ -777,7 +777,7 @@ class ControlsUiControllerImpl @Inject constructor ( closeDialogs(true) controlsController.get().unsubscribe() - taskViewController?.dismiss() + taskViewController?.removeTask() taskViewController = null controlsById.clear() diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/PanelTaskViewController.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/PanelTaskViewController.kt index 025d7e40201e..db009dc46d89 100644 --- a/packages/SystemUI/src/com/android/systemui/controls/ui/PanelTaskViewController.kt +++ b/packages/SystemUI/src/com/android/systemui/controls/ui/PanelTaskViewController.kt @@ -18,7 +18,6 @@ package com.android.systemui.controls.ui import android.app.ActivityOptions -import android.app.ActivityTaskManager import android.app.ActivityTaskManager.INVALID_TASK_ID import android.app.PendingIntent import android.content.ComponentName @@ -28,6 +27,7 @@ import android.graphics.Color import android.graphics.drawable.ShapeDrawable import android.graphics.drawable.shapes.RoundRectShape import android.os.Trace +import com.android.internal.annotations.VisibleForTesting import com.android.systemui.R import com.android.systemui.util.boundsOnScreen import com.android.wm.shell.taskview.TaskView @@ -54,12 +54,6 @@ class PanelTaskViewController( addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK) } - private fun removeDetailTask() { - if (detailTaskId == INVALID_TASK_ID) return - ActivityTaskManager.getInstance().removeTask(detailTaskId) - detailTaskId = INVALID_TASK_ID - } - private val stateCallback = object : TaskView.Listener { override fun onInitialized() { @@ -95,7 +89,7 @@ class PanelTaskViewController( override fun onTaskRemovalStarted(taskId: Int) { detailTaskId = INVALID_TASK_ID - dismiss() + release() } override fun onTaskCreated(taskId: Int, name: ComponentName?) { @@ -103,12 +97,7 @@ class PanelTaskViewController( taskView.alpha = 1f } - override fun onReleased() { - removeDetailTask() - } - override fun onBackPressedOnTaskRoot(taskId: Int) { - dismiss() hide() } } @@ -117,10 +106,17 @@ class PanelTaskViewController( taskView.onLocationChanged() } - fun dismiss() { + /** Call when the taskView is no longer being used, shouldn't be called before removeTask. */ + @VisibleForTesting + fun release() { taskView.release() } + /** Call to explicitly remove the task from window manager. */ + fun removeTask() { + taskView.removeTask() + } + fun launchTaskView() { taskView.setListener(uiExecutor, stateCallback) } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/StackCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/StackCoordinator.kt index 62a0d138fd05..5c2f9a8d28ec 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/StackCoordinator.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/StackCoordinator.kt @@ -39,7 +39,10 @@ class StackCoordinator @Inject internal constructor( override fun attach(pipeline: NotifPipeline) { pipeline.addOnAfterRenderListListener(::onAfterRenderList) - groupExpansionManagerImpl.attach(pipeline) + // TODO(b/282865576): This has an issue where it makes changes to some groups without + // notifying listeners. To be fixed in QPR, but for now let's comment it out to avoid the + // group expansion bug. + // groupExpansionManagerImpl.attach(pipeline) } fun onAfterRenderList(entries: List<ListEntry>, controller: NotifStackController) = diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt index 592d1aa8f43f..135307accd13 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt @@ -182,7 +182,7 @@ class UnlockedScreenOffAnimationController @Inject constructor( // Cancel any existing CUJs before starting the animation interactionJankMonitor.cancel(CUJ_SCREEN_OFF_SHOW_AOD) - + PropertyAnimator.cancelAnimation(keyguardView, AnimatableProperty.ALPHA) PropertyAnimator.setProperty( keyguardView, AnimatableProperty.ALPHA, 1f, AnimationProperties() diff --git a/packages/SystemUI/tests/src/com/android/systemui/controls/ui/PanelTaskViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/controls/ui/PanelTaskViewControllerTest.kt index 7840525b14aa..021facc51dba 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/controls/ui/PanelTaskViewControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/controls/ui/PanelTaskViewControllerTest.kt @@ -146,17 +146,8 @@ class PanelTaskViewControllerTest : SysuiTestCase() { } @Test - fun testTaskViewReleasedOnDismiss() { - underTest.dismiss() - verify(taskView).release() - } - - @Test - fun testTaskViewReleasedOnBackOnRoot() { - underTest.launchTaskView() - verify(taskView).setListener(any(), capture(listenerCaptor)) - - listenerCaptor.value.onBackPressedOnTaskRoot(0) + fun testTaskViewReleasedOnRelease() { + underTest.release() verify(taskView).release() } diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index e44b8cdbaab0..51e4fe3027f3 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -241,7 +241,6 @@ import static android.provider.Telephony.Carriers.ENFORCE_KEY; import static android.provider.Telephony.Carriers.ENFORCE_MANAGED_URI; import static android.provider.Telephony.Carriers.INVALID_APN_ID; import static android.security.keystore.AttestationUtils.USE_INDIVIDUAL_ATTESTATION; - import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.PROVISIONING_ENTRY_POINT_ADB; import static com.android.internal.widget.LockPatternUtils.CREDENTIAL_TYPE_NONE; import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW; @@ -540,6 +539,8 @@ import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.function.Consumer; @@ -18803,10 +18804,16 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { }); } + ThreadPoolExecutor calculateHasIncompatibleAccountsExecutor = new ThreadPoolExecutor( + 1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>()); + @Override public void calculateHasIncompatibleAccounts() { + if (calculateHasIncompatibleAccountsExecutor.getQueue().size() > 1) { + return; + } new CalculateHasIncompatibleAccountsTask().executeOnExecutor( - AsyncTask.THREAD_POOL_EXECUTOR, null); + calculateHasIncompatibleAccountsExecutor, null); } @Nullable |