Only modify network settings on system user
Captive portal, wi-fi and mobile data should not be modified for secondary users without user intervention Issue: calyxos#1025 Change-Id: Ic24d18268d05b5a1535b3993bdd0a614055847f6
This commit is contained in:
committed by
Michael Bestas
parent
8e8329a05c
commit
0002daed48
@@ -312,8 +312,10 @@ public abstract class BaseSetupWizardActivity extends Activity implements Naviga
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void onSetupStart() {
|
protected void onSetupStart() {
|
||||||
SetupWizardUtils.disableCaptivePortalDetection(getApplicationContext());
|
if (SetupWizardUtils.isOwner()) {
|
||||||
tryEnablingWifi();
|
SetupWizardUtils.disableCaptivePortalDetection(getApplicationContext());
|
||||||
|
tryEnablingWifi();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void exitIfSetupComplete() {
|
protected void exitIfSetupComplete() {
|
||||||
|
@@ -37,7 +37,9 @@ public class NetworkSetupActivity extends WrapperSubBaseActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onStartSubactivity() {
|
protected void onStartSubactivity() {
|
||||||
tryEnablingWifi();
|
if (SetupWizardUtils.isOwner()) {
|
||||||
|
tryEnablingWifi();
|
||||||
|
}
|
||||||
Intent intent = new Intent(ACTION_SETUP_NETWORK);
|
Intent intent = new Intent(ACTION_SETUP_NETWORK);
|
||||||
if (SetupWizardUtils.hasLeanback(this)) {
|
if (SetupWizardUtils.hasLeanback(this)) {
|
||||||
intent.setComponent(SetupWizardUtils.sTvWifiSetupSettingsActivity);
|
intent.setComponent(SetupWizardUtils.sTvWifiSetupSettingsActivity);
|
||||||
|
@@ -95,7 +95,9 @@ public class SetupWizardApp extends Application {
|
|||||||
NetworkMonitor.initInstance(this);
|
NetworkMonitor.initInstance(this);
|
||||||
PhoneMonitor.initInstance(this);
|
PhoneMonitor.initInstance(this);
|
||||||
SetupWizardUtils.disableComponentsForMissingFeatures(this);
|
SetupWizardUtils.disableComponentsForMissingFeatures(this);
|
||||||
SetupWizardUtils.setMobileDataEnabled(this, false);
|
if (SetupWizardUtils.isOwner()) {
|
||||||
|
SetupWizardUtils.setMobileDataEnabled(this, false);
|
||||||
|
}
|
||||||
sStatusBarManager = SetupWizardUtils.disableStatusBar(this);
|
sStatusBarManager = SetupWizardUtils.disableStatusBar(this);
|
||||||
mHandler.postDelayed(mRadioTimeoutRunnable, SetupWizardApp.RADIO_READY_TIMEOUT);
|
mHandler.postDelayed(mRadioTimeoutRunnable, SetupWizardApp.RADIO_READY_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
@@ -40,7 +40,9 @@ public class SetupWizardExitActivity extends BaseSetupWizardActivity {
|
|||||||
if (LOGV) {
|
if (LOGV) {
|
||||||
Log.v(TAG, "onCreate savedInstanceState=" + savedInstanceState);
|
Log.v(TAG, "onCreate savedInstanceState=" + savedInstanceState);
|
||||||
}
|
}
|
||||||
SetupWizardUtils.enableCaptivePortalDetection(this);
|
if (SetupWizardUtils.isOwner()) {
|
||||||
|
SetupWizardUtils.enableCaptivePortalDetection(this);
|
||||||
|
}
|
||||||
PhoneMonitor.onSetupFinished();
|
PhoneMonitor.onSetupFinished();
|
||||||
if (!getSystemService(UserManager.class).isManagedProfile()) {
|
if (!getSystemService(UserManager.class).isManagedProfile()) {
|
||||||
launchHome();
|
launchHome();
|
||||||
|
Reference in New Issue
Block a user