DO NOT MERGE: Add conditions for Auto to isUserSetupComplete()
Similarly to Android TV, Android Auto also has a separate secure setting for when setup is finished. Use this for the default setup complete check. Test: manual Bug: 171432173 Signed-off-by: Julius D'Souza <jdsouza@google.com> Change-Id: Ica8b7bb5f06c34976e8acc5f540af19a98ef5dd6
This commit is contained in:
committed by
Julius D'souza
parent
8f692ef01a
commit
9e0f7d9ef6
@@ -1466,10 +1466,17 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
Settings.Secure.USER_SETUP_COMPLETE, 0, UserHandle.USER_CURRENT) != 0;
|
Settings.Secure.USER_SETUP_COMPLETE, 0, UserHandle.USER_CURRENT) != 0;
|
||||||
if (mHasFeatureLeanback) {
|
if (mHasFeatureLeanback) {
|
||||||
isSetupComplete &= isTvUserSetupComplete();
|
isSetupComplete &= isTvUserSetupComplete();
|
||||||
|
} else if (mHasFeatureAuto) {
|
||||||
|
isSetupComplete &= isAutoUserSetupComplete();
|
||||||
}
|
}
|
||||||
return isSetupComplete;
|
return isSetupComplete;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isAutoUserSetupComplete() {
|
||||||
|
return Settings.Secure.getIntForUser(mContext.getContentResolver(),
|
||||||
|
"android.car.SETUP_WIZARD_IN_PROGRESS", 0, UserHandle.USER_CURRENT) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
private boolean isTvUserSetupComplete() {
|
private boolean isTvUserSetupComplete() {
|
||||||
return Settings.Secure.getIntForUser(mContext.getContentResolver(),
|
return Settings.Secure.getIntForUser(mContext.getContentResolver(),
|
||||||
Settings.Secure.TV_USER_SETUP_COMPLETE, 0, UserHandle.USER_CURRENT) != 0;
|
Settings.Secure.TV_USER_SETUP_COMPLETE, 0, UserHandle.USER_CURRENT) != 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user