File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
app/src/main/java/com/afwsamples/testdpc/provision Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -103,12 +103,14 @@ public boolean performPostProvisioningOperations(Intent intent) {
103
103
104
104
// If TestDPC asked GmsCore to store its state in the FRP area before factory reset, the
105
105
// state will be handed over to it during the next device setup.
106
- if (BuildCompat .isAtLeastOMR1 () && extras .containsKey (KEY_DEVICE_OWNER_STATE )) {
106
+ if (BuildCompat .isAtLeastOMR1 ()
107
+ && extras != null
108
+ && extras .containsKey (KEY_DEVICE_OWNER_STATE )) {
107
109
Util .setPersistentDoStateWithApplicationRestriction (
108
- mContext ,
109
- mDevicePolicyManager ,
110
- DeviceAdminReceiver .getComponentName (mContext ),
111
- extras .getString (KEY_DEVICE_OWNER_STATE ));
110
+ mContext ,
111
+ mDevicePolicyManager ,
112
+ DeviceAdminReceiver .getComponentName (mContext ),
113
+ extras .getString (KEY_DEVICE_OWNER_STATE ));
112
114
}
113
115
114
116
// Hide the setup launcher when this app is the admin
You can’t perform that action at this time.
0 commit comments