OSDN Git Service

Intent.ACTION_AIRPLANE_MODE_CHANGED should have a boolean extra.
authoryuemingw <yuemingw@google.com>
Wed, 28 Mar 2018 14:35:40 +0000 (15:35 +0100)
committerYueming Wang <yuemingw@google.com>
Wed, 28 Mar 2018 18:57:33 +0000 (18:57 +0000)
Bug: 76468718
Test: run cts --module CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.DeviceOwnerTest#testAirplaneModeRestriction
Change-Id: Iec208f744b80e48e29f5a38ee88613e19f0d01b3

services/core/java/com/android/server/pm/UserRestrictionsUtils.java

index c362274..9ca02ba 100644 (file)
@@ -559,7 +559,7 @@ public class UserRestrictionsUtils {
                                     android.provider.Settings.Global.AIRPLANE_MODE_ON, 0);
                             // Post the intent.
                             Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED);
-                            intent.putExtra("state", 0);
+                            intent.putExtra("state", false);
                             context.sendBroadcastAsUser(intent, UserHandle.ALL);
                         }
                     }