Change Settings to use URL_FILTERED and blocks menu options when DPC Apns are enforced.

Change-Id: I64f55d9a625097baa17c0fa05250d944dea09896
Fix: 68208277
Test: manual
This commit is contained in:
yuemingw
2018-01-10 21:22:09 +00:00
parent 6ce0b4e8b2
commit ab1f251def
2 changed files with 23 additions and 11 deletions

View File

@@ -16,11 +16,12 @@
package com.android.settings;
import static android.provider.Telephony.Carriers.FILTERED_URI;
import android.content.ContentUris;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.provider.Telephony;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceViewHolder;
import android.telephony.SubscriptionManager;
@@ -118,7 +119,7 @@ public class ApnPreference extends Preference implements
Context context = getContext();
if (context != null) {
int pos = Integer.parseInt(getKey());
Uri url = ContentUris.withAppendedId(Telephony.Carriers.CONTENT_URI, pos);
Uri url = ContentUris.withAppendedId(FILTERED_URI, pos);
Intent editIntent = new Intent(Intent.ACTION_EDIT, url);
editIntent.putExtra(ApnSettings.SUB_ID, mSubId);
context.startActivity(editIntent);