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