Skip to content

Commit f5fc4de

Browse files
committed
Use getSystemService() overload compatible with L
This prevents crashes on devices running L Change-Id: I2dc514ff2aea002ca1f4119892a79cd4813b0ae0
1 parent 92abd19 commit f5fc4de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/main/java/com/afwsamples/testdpc/provision/PostProvisioningTask.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ public class PostProvisioningTask {
7373

7474
public PostProvisioningTask(Context context) {
7575
mContext = context;
76-
mDevicePolicyManager = context.getSystemService(DevicePolicyManager.class);
76+
mDevicePolicyManager =
77+
(DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE);
7778
mSharedPrefs = context.getSharedPreferences(POST_PROV_PREFS, Context.MODE_PRIVATE);
7879
}
7980

0 commit comments

Comments
 (0)