Merge "Prevent NPE when init device profile" into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
11438429a8
@@ -600,9 +600,11 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
|
||||
|
||||
private void initDeviceProfile(InvariantDeviceProfile idp) {
|
||||
// Load configuration-specific DeviceProfile
|
||||
mDeviceProfile = isInMultiWindowMode()
|
||||
? mDeviceProfile.getMultiWindowProfile(this, getMultiWindowDisplaySize())
|
||||
: idp.getDeviceProfile(this);
|
||||
mDeviceProfile = idp.getDeviceProfile(this);
|
||||
if (isInMultiWindowMode()) {
|
||||
mDeviceProfile = mDeviceProfile.getMultiWindowProfile(
|
||||
this, getMultiWindowDisplaySize());
|
||||
}
|
||||
|
||||
onDeviceProfileInitiated();
|
||||
mModelWriter = mModel.getWriter(getDeviceProfile().isVerticalBarLayout(), true, this);
|
||||
|
||||
Reference in New Issue
Block a user