Revert "Fix the crash when editing or deleting APN."
This reverts commit db9a9bb0b0
.
Reason for revert: As per discussion in b/72484718, we are going to
block Access Point Name entry point in Network&Settings, so we no longer
need the change in ApnSettings fragment itself.
Bug: 72484718
Change-Id: Ia84f129b86fe72b3b2dc9699d5893ced7c65e1c3
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.android.settings;
|
||||
|
||||
import static android.provider.Telephony.Carriers.CONTENT_URI;
|
||||
import static android.provider.Telephony.Carriers.FILTERED_URI;
|
||||
|
||||
import android.content.ContentUris;
|
||||
@@ -37,7 +36,6 @@ import android.widget.RelativeLayout;
|
||||
public class ApnPreference extends Preference implements
|
||||
CompoundButton.OnCheckedChangeListener, OnClickListener {
|
||||
final static String TAG = "ApnPreference";
|
||||
private boolean mDpcEnforced = false;
|
||||
|
||||
private int mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
|
||||
|
||||
@@ -121,8 +119,7 @@ public class ApnPreference extends Preference implements
|
||||
Context context = getContext();
|
||||
if (context != null) {
|
||||
int pos = Integer.parseInt(getKey());
|
||||
Uri url = ContentUris.withAppendedId(
|
||||
mDpcEnforced ? FILTERED_URI : 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);
|
||||
@@ -141,8 +138,4 @@ public class ApnPreference extends Preference implements
|
||||
public void setSubId(int subId) {
|
||||
mSubId = subId;
|
||||
}
|
||||
|
||||
public void setDpcEnforced(boolean enforced) {
|
||||
mDpcEnforced = enforced;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user