summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2023-08-14 17:10:25 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-08-14 17:10:25 +0000
commit4b25dd7cf34eadd6689b3443d83d4800bc8c56e9 (patch)
treededefb47d431fbfc9ef630c4193cfcf26d8556d0
parentc6e97192b14bdaff3fce99168407808a9527c70d (diff)
parenta3033abc8ff69d78c6181f760324c53fbcbd1777 (diff)
Merge "Fixes more @Nullable issues in System UI and WMShell." into udc-qpr-dev am: ecb947c2a7 am: a3033abc8f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24407292 Change-Id: I83c49d222301938c1a03cb6c200405e82d0092c7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt2
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewTransition.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardTransitionExecutor.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/ActionIntentExecutor.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/user/domain/interactor/GuestUserInteractor.kt3
5 files changed, 7 insertions, 6 deletions
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 d8ce427dc3ee..1d46e755ec9d 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
@@ -275,7 +275,7 @@ class DesktopTasksController(
*/
fun onDesktopSplitSelectAnimComplete(taskInfo: RunningTaskInfo) {
val wct = WindowContainerTransaction()
- wct.setBounds(taskInfo.token, null)
+ wct.setBounds(taskInfo.token, Rect())
shellTaskOrganizer.applyTransaction(wct)
}
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewTransition.kt b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewTransition.kt
index 96ac8ad56651..e1c060f0e8cb 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewTransition.kt
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewTransition.kt
@@ -66,11 +66,11 @@ class KeyguardSecurityViewTransition : Transition() {
}
override fun createAnimator(
- sceneRoot: ViewGroup?,
+ sceneRoot: ViewGroup,
startValues: TransitionValues?,
endValues: TransitionValues?
): Animator? {
- if (sceneRoot == null || startValues == null || endValues == null) {
+ if (startValues == null || endValues == null) {
return null
}
diff --git a/packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardTransitionExecutor.kt b/packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardTransitionExecutor.kt
index 0b8e83edc88a..1b45ecd09d31 100644
--- a/packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardTransitionExecutor.kt
+++ b/packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardTransitionExecutor.kt
@@ -59,7 +59,7 @@ constructor(val context: Context, val displayTracker: DisplayTracker) {
context.startActivity(intent, transition.first.toBundle())
val runner = RemoteAnimationAdapter(NULL_ACTIVITY_TRANSITION, 0, 0)
try {
- WindowManagerGlobal.getWindowManagerService()
+ checkNotNull(WindowManagerGlobal.getWindowManagerService())
.overridePendingAppTransitionRemote(runner, displayTracker.defaultDisplayId)
} catch (e: Exception) {
Log.e(TAG, "Error overriding clipboard app transition", e)
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ActionIntentExecutor.kt b/packages/SystemUI/src/com/android/systemui/screenshot/ActionIntentExecutor.kt
index ecd456887fa4..aa6bfc3473d2 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/ActionIntentExecutor.kt
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/ActionIntentExecutor.kt
@@ -83,7 +83,7 @@ constructor(
if (overrideTransition) {
val runner = RemoteAnimationAdapter(SCREENSHOT_REMOTE_RUNNER, 0, 0)
try {
- WindowManagerGlobal.getWindowManagerService()
+ checkNotNull(WindowManagerGlobal.getWindowManagerService())
.overridePendingAppTransitionRemote(runner, displayTracker.defaultDisplayId)
} catch (e: Exception) {
Log.e(TAG, "Error overriding screenshot app transition", e)
diff --git a/packages/SystemUI/src/com/android/systemui/user/domain/interactor/GuestUserInteractor.kt b/packages/SystemUI/src/com/android/systemui/user/domain/interactor/GuestUserInteractor.kt
index f026f0f9de37..bfed0c44f6b7 100644
--- a/packages/SystemUI/src/com/android/systemui/user/domain/interactor/GuestUserInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/user/domain/interactor/GuestUserInteractor.kt
@@ -227,7 +227,8 @@ constructor(
)
}
try {
- WindowManagerGlobal.getWindowManagerService().lockNow(/* options= */ null)
+ checkNotNull(WindowManagerGlobal.getWindowManagerService())
+ .lockNow(/* options= */ null)
} catch (e: RemoteException) {
Log.e(
TAG,