Remove permission review build property - settings
Change-Id: I2f480642c35b14c4db85878eb8deddd3c4001856
This commit is contained in:
@@ -105,9 +105,8 @@ public class RequestToggleWiFiActivity extends AlertActivity
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (which != DialogInterface.BUTTON_POSITIVE) {
|
||||
return;
|
||||
}
|
||||
switch (which) {
|
||||
case DialogInterface.BUTTON_POSITIVE: {
|
||||
switch (mState) {
|
||||
case STATE_ENABLE: {
|
||||
mWiFiManager.setWifiEnabled(true);
|
||||
@@ -124,6 +123,13 @@ public class RequestToggleWiFiActivity extends AlertActivity
|
||||
} break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DialogInterface.BUTTON_NEGATIVE: {
|
||||
finish();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
@@ -221,6 +227,8 @@ public class RequestToggleWiFiActivity extends AlertActivity
|
||||
case STATE_ENABLE: {
|
||||
mAlertParams.mPositiveButtonText = getString(android.R.string.ok);
|
||||
mAlertParams.mPositiveButtonListener = this;
|
||||
mAlertParams.mNegativeButtonText = getString(android.R.string.no);
|
||||
mAlertParams.mNegativeButtonListener = this;
|
||||
mAlertParams.mMessage = getString(R.string.wifi_ask_enable, mAppLabel);
|
||||
} break;
|
||||
|
||||
@@ -228,14 +236,19 @@ public class RequestToggleWiFiActivity extends AlertActivity
|
||||
// Params set button text only if non-null, but we want a null
|
||||
// button text to hide the button, so reset the controller directly.
|
||||
mAlert.setButton(DialogInterface.BUTTON_POSITIVE, null, null, null);
|
||||
mAlert.setButton(DialogInterface.BUTTON_NEGATIVE, null, null, null);
|
||||
mAlertParams.mPositiveButtonText = null;
|
||||
mAlertParams.mPositiveButtonListener = null;
|
||||
mAlertParams.mNegativeButtonText = null;
|
||||
mAlertParams.mNegativeButtonListener = null;
|
||||
mAlertParams.mMessage = getString(R.string.wifi_starting);
|
||||
} break;
|
||||
|
||||
case STATE_DISABLE: {
|
||||
mAlertParams.mPositiveButtonText = getString(android.R.string.ok);
|
||||
mAlertParams.mPositiveButtonListener = this;
|
||||
mAlertParams.mNegativeButtonText = getString(android.R.string.no);
|
||||
mAlertParams.mNegativeButtonListener = this;
|
||||
mAlertParams.mMessage = getString(R.string.wifi_ask_disable, mAppLabel);
|
||||
} break;
|
||||
|
||||
@@ -243,8 +256,11 @@ public class RequestToggleWiFiActivity extends AlertActivity
|
||||
// Params set button text only if non-null, but we want a null
|
||||
// button text to hide the button, so reset the controller directly.
|
||||
mAlert.setButton(DialogInterface.BUTTON_POSITIVE, null, null, null);
|
||||
mAlert.setButton(DialogInterface.BUTTON_NEGATIVE, null, null, null);
|
||||
mAlertParams.mPositiveButtonText = null;
|
||||
mAlertParams.mPositiveButtonListener = null;
|
||||
mAlertParams.mNegativeButtonText = null;
|
||||
mAlertParams.mNegativeButtonListener = null;
|
||||
mAlertParams.mMessage = getString(R.string.wifi_stopping);
|
||||
} break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user