Allow bypassing setup for Auto in startDockOrHome
Auto allows for setup deferral, so keycode presses for HOME should propagate to the application layer when user setup is in progress. Bug: 140787161 Test: KEYCODE_HOME should trigger an intent with Intent.CATEGORY_HOME Change-Id: I05751f93c44405b28f93789e6f8e6cf0a3f34524 Merged-In: I05751f93c44405b28f93789e6f8e6cf0a3f34524 Signed-off-by: Julius D'souza <jdsouza@google.com>
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.content.Context.CONTEXT_RESTRICTED;
|
||||
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_LEANBACK;
|
||||
import static android.content.pm.PackageManager.FEATURE_PICTURE_IN_PICTURE;
|
||||
@@ -384,6 +385,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
BurnInProtectionHelper mBurnInProtectionHelper;
|
||||
private DisplayFoldController mDisplayFoldController;
|
||||
AppOpsManager mAppOpsManager;
|
||||
private boolean mHasFeatureAuto;
|
||||
private boolean mHasFeatureWatch;
|
||||
private boolean mHasFeatureLeanback;
|
||||
private boolean mHasFeatureHdmiCec;
|
||||
@@ -1752,6 +1754,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
mDisplayManager = mContext.getSystemService(DisplayManager.class);
|
||||
mHasFeatureWatch = mContext.getPackageManager().hasSystemFeature(FEATURE_WATCH);
|
||||
mHasFeatureLeanback = mContext.getPackageManager().hasSystemFeature(FEATURE_LEANBACK);
|
||||
mHasFeatureAuto = mContext.getPackageManager().hasSystemFeature(FEATURE_AUTOMOTIVE);
|
||||
mHasFeatureHdmiCec = mContext.getPackageManager().hasSystemFeature(FEATURE_HDMI_CEC);
|
||||
mAccessibilityShortcutController =
|
||||
new AccessibilityShortcutController(mContext, new Handler(), mCurrentUserId);
|
||||
@@ -5216,7 +5219,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
awakenDreams();
|
||||
}
|
||||
|
||||
if (!isUserSetupComplete()) {
|
||||
if (!mHasFeatureAuto && !isUserSetupComplete()) {
|
||||
Slog.i(TAG, "Not going home because user setup is in progress.");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user