diff options
7 files changed, 32 insertions, 28 deletions
diff --git a/api/current.txt b/api/current.txt index 72666062c7fe..d42c310db961 100644 --- a/api/current.txt +++ b/api/current.txt @@ -37531,11 +37531,11 @@ package android.provider { field public static final java.lang.String ADDRESS = "address"; } - public static final class Telephony.CarrierIdentification implements android.provider.BaseColumns { + public static final class Telephony.CarrierId implements android.provider.BaseColumns { method public static android.net.Uri getUriForSubscriptionId(int); - field public static final java.lang.String CID = "carrier_id"; + field public static final java.lang.String CARRIER_ID = "carrier_id"; + field public static final java.lang.String CARRIER_NAME = "carrier_name"; field public static final android.net.Uri CONTENT_URI; - field public static final java.lang.String NAME = "carrier_name"; } public static final class Telephony.Carriers implements android.provider.BaseColumns { diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java index 96e2ae3d5ac1..3b37808e9778 100644 --- a/core/java/android/os/Process.java +++ b/core/java/android/os/Process.java @@ -140,6 +140,12 @@ public class Process { public static final int CAMERASERVER_UID = 1047; /** + * Defines the UID/GID for the tethering DNS resolver (currently dnsmasq). + * @hide + */ + public static final int DNS_TETHER_UID = 1052; + + /** * Defines the UID/GID for the WebView zygote process. * @hide */ diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 79297aacaa57..1c9ca9fead99 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -5484,8 +5484,11 @@ public class ConnectivityService extends IConnectivityManager.Stub if (!networkAgent.everConnected && state == NetworkInfo.State.CONNECTED) { networkAgent.everConnected = true; + if (networkAgent.linkProperties == null) { + Slog.wtf(TAG, networkAgent.name() + " connected with null LinkProperties"); + } + updateLinkProperties(networkAgent, null); - notifyIfacesChangedForNetworkStats(); networkAgent.networkMonitor.sendMessage(NetworkMonitor.CMD_NETWORK_CONNECTED); scheduleUnvalidatedPrompt(networkAgent); diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java index e202618df575..3927ebd593bd 100644 --- a/services/core/java/com/android/server/TelephonyRegistry.java +++ b/services/core/java/com/android/server/TelephonyRegistry.java @@ -203,6 +203,10 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { private PreciseDataConnectionState mPreciseDataConnectionState = new PreciseDataConnectionState(); + static final int ENFORCE_COARSE_LOCATION_PERMISSION_MASK = + PhoneStateListener.LISTEN_CELL_LOCATION + | PhoneStateListener.LISTEN_CELL_INFO; + static final int ENFORCE_PHONE_STATE_PERMISSION_MASK = PhoneStateListener.LISTEN_CALL_FORWARDING_INDICATOR | PhoneStateListener.LISTEN_MESSAGE_WAITING_INDICATOR | @@ -1721,16 +1725,13 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { } private boolean checkListenerPermission(int events, String callingPackage, String message) { - if ((events & PhoneStateListener.LISTEN_CELL_LOCATION) != 0) { + if ((events & ENFORCE_COARSE_LOCATION_PERMISSION_MASK) != 0) { mContext.enforceCallingOrSelfPermission( android.Manifest.permission.ACCESS_COARSE_LOCATION, null); - - } - - if ((events & PhoneStateListener.LISTEN_CELL_INFO) != 0) { - mContext.enforceCallingOrSelfPermission( - android.Manifest.permission.ACCESS_COARSE_LOCATION, null); - + if (mAppOps.noteOp(AppOpsManager.OP_COARSE_LOCATION, Binder.getCallingUid(), + callingPackage) != AppOpsManager.MODE_ALLOWED) { + return false; + } } if ((events & ENFORCE_PHONE_STATE_PERMISSION_MASK) != 0) { diff --git a/services/core/java/com/android/server/net/NetworkStatsService.java b/services/core/java/com/android/server/net/NetworkStatsService.java index 93c04fe2068c..2ea235a49db2 100644 --- a/services/core/java/com/android/server/net/NetworkStatsService.java +++ b/services/core/java/com/android/server/net/NetworkStatsService.java @@ -156,8 +156,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub { static final boolean LOGV = Log.isLoggable(TAG, Log.VERBOSE); private static final int MSG_PERFORM_POLL = 1; - private static final int MSG_UPDATE_IFACES = 2; - private static final int MSG_REGISTER_GLOBAL_ALERT = 3; + private static final int MSG_REGISTER_GLOBAL_ALERT = 2; /** Flags to control detail level of poll event. */ private static final int FLAG_PERSIST_NETWORK = 0x1; @@ -1569,10 +1568,6 @@ public class NetworkStatsService extends INetworkStatsService.Stub { mService.performPoll(flags); return true; } - case MSG_UPDATE_IFACES: { - mService.updateIfaces(null); - return true; - } case MSG_REGISTER_GLOBAL_ALERT: { mService.registerGlobalAlert(); return true; diff --git a/services/core/java/com/android/server/updates/CarrierIdInstallReceiver.java b/services/core/java/com/android/server/updates/CarrierIdInstallReceiver.java index 045081679d81..a1233047c5a1 100644 --- a/services/core/java/com/android/server/updates/CarrierIdInstallReceiver.java +++ b/services/core/java/com/android/server/updates/CarrierIdInstallReceiver.java @@ -22,7 +22,6 @@ import android.content.Context; import android.content.Intent; import android.net.Uri; import android.provider.Telephony; -import android.util.Log; public class CarrierIdInstallReceiver extends ConfigUpdateInstallReceiver { @@ -33,7 +32,7 @@ public class CarrierIdInstallReceiver extends ConfigUpdateInstallReceiver { @Override protected void postInstall(Context context, Intent intent) { ContentResolver resolver = context.getContentResolver(); - resolver.update(Uri.withAppendedPath(Telephony.CarrierIdentification.All.CONTENT_URI, + resolver.update(Uri.withAppendedPath(Telephony.CarrierId.All.CONTENT_URI, "update_db"), new ContentValues(), null, null); } } diff --git a/telephony/java/android/provider/Telephony.java b/telephony/java/android/provider/Telephony.java index cb87d1fb1d56..fb52ff704a14 100644 --- a/telephony/java/android/provider/Telephony.java +++ b/telephony/java/android/provider/Telephony.java @@ -3356,23 +3356,23 @@ public final class Telephony { * Contains carrier identification information for the current subscriptions. * @see SubscriptionManager#getActiveSubscriptionIdList() */ - public static final class CarrierIdentification implements BaseColumns { + public static final class CarrierId implements BaseColumns { /** * Not instantiable. * @hide */ - private CarrierIdentification() {} + private CarrierId() {} /** * The {@code content://} style URI for this provider. */ - public static final Uri CONTENT_URI = Uri.parse("content://carrier_identification"); + public static final Uri CONTENT_URI = Uri.parse("content://carrier_id"); /** - * The authority string for the CarrierIdentification Provider + * The authority string for the CarrierId Provider * @hide */ - public static final String AUTHORITY = "carrier_identification"; + public static final String AUTHORITY = "carrier_id"; /** @@ -3399,14 +3399,14 @@ public final class Telephony { * @see TelephonyManager#getAndroidCarrierNameForSubscription() * <P>Type: TEXT </P> */ - public static final String NAME = "carrier_name"; + public static final String CARRIER_NAME = "carrier_name"; /** * A unique carrier id * @see TelephonyManager#getAndroidCarrierIdForSubscription() * <P>Type: INTEGER </P> */ - public static final String CID = "carrier_id"; + public static final String CARRIER_ID = "carrier_id"; /** * Contains mappings between matching rules with carrier id for all carriers. @@ -3464,7 +3464,7 @@ public final class Telephony { /** * The {@code content://} URI for this table. */ - public static final Uri CONTENT_URI = Uri.parse("content://carrier_identification/all"); + public static final Uri CONTENT_URI = Uri.parse("content://carrier_id/all"); } } } |