Skip to content

Commit 9c5538f

Browse files
jscott1989pfmaggi
authored andcommitted
No public description
PiperOrigin-RevId: 609334174
1 parent 26deb93 commit 9c5538f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/main/java/com/afwsamples/testdpc/policy/PolicyManagementFragment.java

+7-5
Original file line numberDiff line numberDiff line change
@@ -4238,12 +4238,14 @@ private void showEapTlsWifiConfigCreationDialog() {
42384238

42394239
@TargetApi(VERSION_CODES.N)
42404240
private void reboot() {
4241-
if (mTelephonyManager.getCallState() != TelephonyManager.CALL_STATE_IDLE) {
4242-
showToast(R.string.reboot_error_msg);
4243-
return;
4244-
}
42454241
mDevicePolicyManagerGateway.reboot(
4246-
(v) -> onSuccessLog("reboot"), (e) -> onErrorLog("reboot", e));
4242+
(v) -> onSuccessLog("reboot"),
4243+
(e) -> {
4244+
onErrorLog("reboot", e);
4245+
if (e instanceof IllegalStateException) {
4246+
showToast(R.string.reboot_error_msg);
4247+
}
4248+
});
42474249
}
42484250

42494251
private void showSetupManagement() {

0 commit comments

Comments
 (0)