From 162280b4f9f21673b2450551647d95d5c84e7569 Mon Sep 17 00:00:00 2001 From: Alejandro Nijamkin Date: Tue, 8 Aug 2023 17:35:41 -0700 Subject: [PATCH] Fixes @Nullable issues in System UI and WMShell. Test: followed these steps: 1. Patched in https://r.android.com/2688146 2. m sysuig 3. Fix compilation issues 4. Repeat 2 and 3 until done Fix: 294098415 Change-Id: I74cc61fd87819be7302590d788c3c230bff57544 --- .../wm/shell/bubbles/ManageEducationView.kt | 8 ++-- .../wm/shell/bubbles/StackEducationView.kt | 6 +-- .../desktopmode/DesktopTasksController.kt | 39 ++++++++++--------- ...oggleResizeDesktopTaskTransitionHandler.kt | 2 +- ...deAppControlsWindowDecorationViewHolder.kt | 20 +++++----- ...opModeFocusedWindowDecorationViewHolder.kt | 11 +++--- .../DesktopModeWindowDecorationViewHolder.kt | 15 ++++--- .../graph/ThemedBatteryDrawable.kt | 2 +- .../animation/DialogLaunchAnimator.kt | 10 ++--- .../GhostedViewLaunchAnimatorController.kt | 7 ++-- .../systemui/animation/LaunchAnimator.kt | 4 +- .../systemui/animation/TextAnimator.kt | 12 +++--- .../animation/ViewHierarchyAnimator.kt | 2 +- .../android/systemui/plugins/WeatherData.kt | 2 +- .../shared/system/ActivityManagerKt.kt | 2 +- .../system/smartspace/SmartspaceState.kt | 10 ++--- .../NaturalRotationUnfoldProgressProvider.kt | 2 +- .../keyguard/BouncerKeyguardMessageArea.kt | 4 +- .../android/keyguard/ClockEventController.kt | 8 ++-- .../biometrics/AuthRippleController.kt | 2 +- .../systemui/biometrics/AuthRippleView.kt | 18 ++++----- .../FaceAuthAccessibilityDelegate.kt | 4 +- .../systemui/biometrics/SideFpsController.kt | 4 +- .../systemui/biometrics/UdfpsFpmEmptyView.kt | 3 +- .../UdfpsKeyguardAccessibilityDelegate.kt | 4 +- .../UdfpsKeyguardViewControllerLegacy.kt | 5 ++- .../domain/interactor/CredentialInteractor.kt | 13 ++++--- .../biometrics/ui/CredentialPasswordView.kt | 2 +- .../ui/binder/BiometricViewBinder.kt | 22 +++++------ .../ui/binder/BiometricViewSizeBinder.kt | 4 +- .../charging/WiredChargingRippleController.kt | 6 +-- .../classifier/FalsingA11yDelegate.kt | 2 +- .../repository/ConfigurationRepository.kt | 2 +- .../systemui/contrast/ContrastDialog.kt | 6 +-- .../controller/ControlsControllerImpl.kt | 2 +- .../management/ControlsFavoritingActivity.kt | 2 +- .../systemui/controls/ui/ChallengeDialogs.kt | 10 ++--- .../systemui/controls/ui/ControlViewHolder.kt | 6 +-- .../systemui/controls/ui/DetailDialog.kt | 8 ++-- .../systemui/controls/ui/RenderInfo.kt | 3 +- .../systemui/controls/ui/StatusBehavior.kt | 6 +-- .../controls/ui/ToggleRangeBehavior.kt | 4 +- .../repository/DisplayMetricsRepository.kt | 2 +- .../ui/view/KeyboardBacklightDialog.kt | 2 +- ...cessWalletKeyguardQuickAffordanceConfig.kt | 8 ++-- .../DeviceEntryFaceAuthRepository.kt | 2 +- .../repository/LightRevealScrimRepository.kt | 3 +- .../ui/binder/KeyguardBottomAreaViewBinder.kt | 2 +- .../KeyguardQuickAffordanceViewBinder.kt | 2 +- .../ui/binder/KeyguardSettingsViewBinder.kt | 2 +- .../binder/UdfpsKeyguardInternalViewBinder.kt | 6 +-- .../ui/preview/KeyguardPreviewRenderer.kt | 2 +- .../systemui/lifecycle/RepeatWhenAttached.kt | 4 +- .../models/player/SeekBarViewModel.kt | 4 +- .../controls/pipeline/MediaDataFilter.kt | 10 +---- .../controls/pipeline/MediaDataManager.kt | 19 +++++---- .../pipeline/MediaSessionBasedFilter.kt | 10 +++-- .../media/controls/ui/IlluminationDrawable.kt | 2 +- .../media/controls/ui/LightSourceDrawable.kt | 11 ++---- .../controls/ui/MediaCarouselScrollHandler.kt | 8 ++-- .../controls/ui/MediaHierarchyManager.kt | 10 ++--- .../systemui/media/controls/ui/MediaHost.kt | 4 +- .../media/controls/ui/SquigglyProgress.kt | 2 +- .../MediaTttChipControllerReceiver.kt | 4 +- .../MediaTttReceiverRippleController.kt | 4 +- .../receiver/ReceiverChipRippleView.kt | 4 +- .../sender/MediaTttSenderCoordinator.kt | 2 +- .../MediaProjectionRecentsViewController.kt | 2 +- .../MediaProjectionManagerRepository.kt | 4 +- .../notetask/NoteTaskRoleManagerExt.kt | 9 ++++- .../people/ui/view/PeopleViewBinder.kt | 4 +- .../systemui/privacy/PrivacyDialogV2.kt | 4 +- .../BaseScreenSharePermissionDialog.kt | 18 ++++----- .../ScreenRecordPermissionDialog.kt | 8 ++-- .../systemui/shade/ShadeHeaderController.kt | 16 ++++---- .../systemui/shade/ShadeViewProviderModule.kt | 30 +++++++------- .../systemui/statusbar/BatteryStatusChip.kt | 4 +- .../systemui/statusbar/LightRevealScrim.kt | 11 +++--- .../LockscreenShadeTransitionController.kt | 2 +- .../statusbar/MediaArtworkProcessor.kt | 2 +- .../NotificationShadeDepthController.kt | 2 +- .../events/PrivacyDotViewController.kt | 4 +- .../LockscreenSmartspaceController.kt | 21 ++++++---- .../notification/ViewGroupFadeHelper.kt | 2 +- .../notification/row/ChannelEditorListView.kt | 14 +++---- .../statusbar/phone/ActivityStarterImpl.kt | 4 +- .../statusbar/phone/KeyguardBottomAreaView.kt | 3 +- .../phone/PhoneStatusBarViewController.kt | 6 +-- .../phone/StatusBarContentInsetsProvider.kt | 8 ++-- .../UnlockedScreenOffAnimationController.kt | 8 ++-- .../StatusBarUserSwitcherContainer.kt | 4 +- .../policy/DeviceControlsControllerImpl.kt | 6 ++- .../android/systemui/stylus/StylusManager.kt | 4 +- .../user/UserSwitcherFullscreenDialog.kt | 2 +- .../systemui/user/UserSwitcherPopupMenu.kt | 28 ++++++------- .../legacyhelper/ui/LegacyUserUiHelper.kt | 2 +- .../util/animation/TransitionLayout.kt | 8 ++-- .../biometrics/SideFpsControllerTest.kt | 2 +- .../shade/ShadeHeaderControllerTest.kt | 12 +++--- 99 files changed, 350 insertions(+), 337 deletions(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/ManageEducationView.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/ManageEducationView.kt index e95e8e5cdaea1..1b41f793311d0 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/ManageEducationView.kt +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/ManageEducationView.kt @@ -41,9 +41,9 @@ class ManageEducationView constructor(context: Context, positioner: BubblePositi private val ANIMATE_DURATION: Long = 200 private val positioner: BubblePositioner = positioner - private val manageView by lazy { findViewById(R.id.manage_education_view) } - private val manageButton by lazy { findViewById