Merge "DevicePolicyManager: Skip clearing APN before boot completed" into udc-dev
This commit is contained in:
@@ -446,7 +446,6 @@ import android.util.AtomicFile;
|
||||
import android.util.DebugUtils;
|
||||
import android.util.IndentingPrintWriter;
|
||||
import android.util.IntArray;
|
||||
import android.util.Log;
|
||||
import android.util.Pair;
|
||||
import android.util.Slog;
|
||||
import android.util.SparseArray;
|
||||
@@ -489,6 +488,7 @@ import com.android.server.LockGuard;
|
||||
import com.android.server.PersistentDataBlockManagerInternal;
|
||||
import com.android.server.SystemServerInitThreadPool;
|
||||
import com.android.server.SystemService;
|
||||
import com.android.server.SystemServiceManager;
|
||||
import com.android.server.devicepolicy.ActiveAdmin.TrustAgentInfo;
|
||||
import com.android.server.inputmethod.InputMethodManagerInternal;
|
||||
import com.android.server.net.NetworkPolicyManagerInternal;
|
||||
@@ -10071,6 +10071,13 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
|
||||
if (!mHasTelephonyFeature) {
|
||||
return;
|
||||
}
|
||||
if (!LocalServices.getService(SystemServiceManager.class).isBootCompleted()) {
|
||||
Slogf.i(LOG_TAG, "Skip clearing managed profile Apn before boot completed");
|
||||
// Cannot talk to APN content provider before system boots
|
||||
// Ideally we should delay the cleanup post boot_completed, not just
|
||||
// skipping it altogether.
|
||||
return;
|
||||
}
|
||||
final List<ApnSetting> apns = getOverrideApnsUnchecked();
|
||||
for (ApnSetting apn : apns) {
|
||||
if (apn.getApnTypeBitmask() == ApnSetting.TYPE_ENTERPRISE) {
|
||||
|
||||
Reference in New Issue
Block a user