|
16 | 16 |
|
17 | 17 | package com.afwsamples.testdpc;
|
18 | 18 |
|
19 |
| -import static com.afwsamples.testdpc.policy.PolicyManagementFragment.OVERRIDE_KEY_SELECTION_KEY; |
20 |
| - |
21 | 19 | import android.annotation.TargetApi;
|
22 | 20 | import android.app.NotificationManager;
|
23 | 21 | import android.app.PendingIntent;
|
24 | 22 | import android.app.admin.DevicePolicyManager;
|
25 |
| -import android.app.admin.NetworkEvent; |
26 | 23 | import android.content.ComponentName;
|
27 | 24 | import android.content.Context;
|
28 | 25 | import android.content.Intent;
|
|
35 | 32 | import android.os.Process;
|
36 | 33 | import android.os.UserHandle;
|
37 | 34 | import android.os.UserManager;
|
38 |
| -import android.preference.PreferenceManager; |
39 | 35 | import android.support.v4.app.NotificationCompat;
|
40 | 36 | import android.support.v4.os.BuildCompat;
|
41 |
| -import android.text.TextUtils; |
42 | 37 | import android.util.Log;
|
43 | 38 | import android.widget.Toast;
|
44 | 39 | import com.afwsamples.testdpc.common.NotificationUtil;
|
|
60 | 55 | import java.util.ArrayList;
|
61 | 56 | import java.util.Collections;
|
62 | 57 | import java.util.Date;
|
63 |
| -import java.util.List; |
64 | 58 |
|
65 | 59 | /**
|
66 | 60 | * Handles events related to the managed profile.
|
@@ -127,16 +121,6 @@ public void onProfileProvisioningComplete(Context context, Intent intent) {
|
127 | 121 | if (!task.performPostProvisioningOperations(intent)) {
|
128 | 122 | return;
|
129 | 123 | }
|
130 |
| - |
131 |
| - Intent launchIntent = task.getPostProvisioningLaunchIntent(intent); |
132 |
| - if (launchIntent != null) { |
133 |
| - context.startActivity(launchIntent); |
134 |
| - } else { |
135 |
| - Log.e(TAG, "DeviceAdminReceiver.onProvisioningComplete() invoked, but ownership " |
136 |
| - + "not assigned"); |
137 |
| - Toast.makeText(context, R.string.device_admin_receiver_failure, Toast.LENGTH_LONG) |
138 |
| - .show(); |
139 |
| - } |
140 | 124 | }
|
141 | 125 |
|
142 | 126 | @TargetApi(Build.VERSION_CODES.N)
|
|
0 commit comments