Merge "Allow bypassing setup for Auto in startDockOrHome" into qt-qpr1-dev
am: 88b79a34b8
Change-Id: I376bcc3f668d563df4e3b8f902311206cbffa3f8
This commit is contained in:
@@ -23,6 +23,7 @@ import static android.app.AppOpsManager.OP_TOAST_WINDOW;
|
|||||||
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
|
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
|
||||||
import static android.content.Context.CONTEXT_RESTRICTED;
|
import static android.content.Context.CONTEXT_RESTRICTED;
|
||||||
import static android.content.Context.WINDOW_SERVICE;
|
import static android.content.Context.WINDOW_SERVICE;
|
||||||
|
import static android.content.pm.PackageManager.FEATURE_AUTOMOTIVE;
|
||||||
import static android.content.pm.PackageManager.FEATURE_HDMI_CEC;
|
import static android.content.pm.PackageManager.FEATURE_HDMI_CEC;
|
||||||
import static android.content.pm.PackageManager.FEATURE_LEANBACK;
|
import static android.content.pm.PackageManager.FEATURE_LEANBACK;
|
||||||
import static android.content.pm.PackageManager.FEATURE_PICTURE_IN_PICTURE;
|
import static android.content.pm.PackageManager.FEATURE_PICTURE_IN_PICTURE;
|
||||||
@@ -384,6 +385,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
BurnInProtectionHelper mBurnInProtectionHelper;
|
BurnInProtectionHelper mBurnInProtectionHelper;
|
||||||
private DisplayFoldController mDisplayFoldController;
|
private DisplayFoldController mDisplayFoldController;
|
||||||
AppOpsManager mAppOpsManager;
|
AppOpsManager mAppOpsManager;
|
||||||
|
private boolean mHasFeatureAuto;
|
||||||
private boolean mHasFeatureWatch;
|
private boolean mHasFeatureWatch;
|
||||||
private boolean mHasFeatureLeanback;
|
private boolean mHasFeatureLeanback;
|
||||||
private boolean mHasFeatureHdmiCec;
|
private boolean mHasFeatureHdmiCec;
|
||||||
@@ -1752,6 +1754,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
mDisplayManager = mContext.getSystemService(DisplayManager.class);
|
mDisplayManager = mContext.getSystemService(DisplayManager.class);
|
||||||
mHasFeatureWatch = mContext.getPackageManager().hasSystemFeature(FEATURE_WATCH);
|
mHasFeatureWatch = mContext.getPackageManager().hasSystemFeature(FEATURE_WATCH);
|
||||||
mHasFeatureLeanback = mContext.getPackageManager().hasSystemFeature(FEATURE_LEANBACK);
|
mHasFeatureLeanback = mContext.getPackageManager().hasSystemFeature(FEATURE_LEANBACK);
|
||||||
|
mHasFeatureAuto = mContext.getPackageManager().hasSystemFeature(FEATURE_AUTOMOTIVE);
|
||||||
mHasFeatureHdmiCec = mContext.getPackageManager().hasSystemFeature(FEATURE_HDMI_CEC);
|
mHasFeatureHdmiCec = mContext.getPackageManager().hasSystemFeature(FEATURE_HDMI_CEC);
|
||||||
mAccessibilityShortcutController =
|
mAccessibilityShortcutController =
|
||||||
new AccessibilityShortcutController(mContext, new Handler(), mCurrentUserId);
|
new AccessibilityShortcutController(mContext, new Handler(), mCurrentUserId);
|
||||||
@@ -5215,7 +5218,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
awakenDreams();
|
awakenDreams();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isUserSetupComplete()) {
|
if (!mHasFeatureAuto && !isUserSetupComplete()) {
|
||||||
Slog.i(TAG, "Not going home because user setup is in progress.");
|
Slog.i(TAG, "Not going home because user setup is in progress.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user