Fix NPE caused by wrong initialization order.
Fix: 234341630 Fix: 234820610 Test: manual Change-Id: If25671bb9dc8c6150bab71eb09b66ac97ebe0719
This commit is contained in:
@@ -2068,6 +2068,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
|
||||
launchMode = aInfo.launchMode;
|
||||
|
||||
// Don't move below setActivityType since it triggers onConfigurationChange ->
|
||||
// resolveOverrideConfiguration that requires having mLetterboxUiController initialised.
|
||||
mLetterboxUiController = new LetterboxUiController(mWmService, this);
|
||||
mCameraCompatControlEnabled = mWmService.mContext.getResources()
|
||||
.getBoolean(R.bool.config_isCameraCompatControlForStretchedIssuesEnabled);
|
||||
|
||||
setActivityType(_componentSpecified, _launchedFromUid, _intent, options, sourceRecord);
|
||||
|
||||
immersive = (aInfo.flags & FLAG_IMMERSIVE) != 0;
|
||||
@@ -2096,9 +2102,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
mPersistentState = persistentState;
|
||||
taskDescription = _taskDescription;
|
||||
|
||||
mLetterboxUiController = new LetterboxUiController(mWmService, this);
|
||||
mCameraCompatControlEnabled = mWmService.mContext.getResources()
|
||||
.getBoolean(R.bool.config_isCameraCompatControlForStretchedIssuesEnabled);
|
||||
shouldDockBigOverlays = mWmService.mContext.getResources()
|
||||
.getBoolean(R.bool.config_dockBigOverlayWindows);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user