We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26deb93 commit 9c5538fCopy full SHA for 9c5538f
src/main/java/com/afwsamples/testdpc/policy/PolicyManagementFragment.java
@@ -4238,12 +4238,14 @@ private void showEapTlsWifiConfigCreationDialog() {
4238
4239
@TargetApi(VERSION_CODES.N)
4240
private void reboot() {
4241
- if (mTelephonyManager.getCallState() != TelephonyManager.CALL_STATE_IDLE) {
4242
- showToast(R.string.reboot_error_msg);
4243
- return;
4244
- }
4245
mDevicePolicyManagerGateway.reboot(
4246
- (v) -> onSuccessLog("reboot"), (e) -> onErrorLog("reboot", e));
+ (v) -> onSuccessLog("reboot"),
+ (e) -> {
+ onErrorLog("reboot", e);
+ if (e instanceof IllegalStateException) {
+ showToast(R.string.reboot_error_msg);
4247
+ }
4248
+ });
4249
}
4250
4251
private void showSetupManagement() {
0 commit comments