SetupWizard: Ensure UI doesn't show when user is guest
Issue-id: CYNGNOS-1736 Change-Id: Ibcd85ca3f90a6ab35a3ae6da622f59786ddcbcd3
This commit is contained in:
@@ -99,14 +99,20 @@ public class SetupWizardApp extends Application {
|
||||
if (!isOwner
|
||||
|| Settings.Secure.getInt(getContentResolver(),
|
||||
Settings.Secure.USER_SETUP_COMPLETE) == 1) {
|
||||
Settings.Global.putInt(getContentResolver(), Settings.Global.DEVICE_PROVISIONED, 1);
|
||||
Settings.Secure.putInt(getContentResolver(),
|
||||
Settings.Secure.USER_SETUP_COMPLETE, 1);
|
||||
SetupWizardUtils.disableGMSSetupWizard(this);
|
||||
SetupWizardUtils.disableSetupWizard(this);
|
||||
if (!isOwner) {
|
||||
disableThemeComponentsForSecondaryUser();
|
||||
}
|
||||
Thread t = new Thread(){
|
||||
@Override
|
||||
public void run() {
|
||||
Settings.Global.putInt(getContentResolver(), Settings.Global.DEVICE_PROVISIONED, 1);
|
||||
Settings.Secure.putInt(getContentResolver(),
|
||||
Settings.Secure.USER_SETUP_COMPLETE, 1);
|
||||
SetupWizardUtils.disableGMSSetupWizard(SetupWizardApp.this);
|
||||
SetupWizardUtils.disableSetupWizard(SetupWizardApp.this);
|
||||
if (!isOwner) {
|
||||
disableThemeComponentsForSecondaryUser();
|
||||
}
|
||||
}
|
||||
};
|
||||
t.run();
|
||||
} else {
|
||||
disableCaptivePortalDetection();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user