Direct notification of network interface changes.
Connectivity broadcasts recently changed and are no longer sent for certain types of network changes. For example, when stacked network interfaces change for a mobile network. To ensure that we pick up all these details, directly wire the two services together. Also remove some unused code for split network types. Bug: 18666753 Change-Id: I0467bd5b330c0e0cb51af2306d821b41ad16337a
This commit is contained in:
@@ -40,8 +40,12 @@ interface INetworkStatsService {
|
||||
|
||||
/** Mark given UID as being in foreground for stats purposes. */
|
||||
void setUidForeground(int uid, boolean uidForeground);
|
||||
|
||||
/** Force update of ifaces. */
|
||||
void forceUpdateIfaces();
|
||||
/** Force update of statistics. */
|
||||
void forceUpdate();
|
||||
|
||||
/** Advise persistance threshold; may be overridden internally. */
|
||||
void advisePersistThreshold(long thresholdBytes);
|
||||
|
||||
|
||||
@@ -41,7 +41,11 @@ public class NetworkIdentity implements Comparable<NetworkIdentity> {
|
||||
/**
|
||||
* When enabled, combine all {@link #mSubType} together under
|
||||
* {@link #SUBTYPE_COMBINED}.
|
||||
*
|
||||
* @deprecated we no longer offer to collect statistics on a per-subtype
|
||||
* basis; this is always disabled.
|
||||
*/
|
||||
@Deprecated
|
||||
public static final boolean COMBINE_SUBTYPE_ENABLED = true;
|
||||
|
||||
public static final int SUBTYPE_COMBINED = -1;
|
||||
|
||||
@@ -49,7 +49,9 @@ import java.util.Objects;
|
||||
public class NetworkTemplate implements Parcelable {
|
||||
|
||||
public static final int MATCH_MOBILE_ALL = 1;
|
||||
@Deprecated
|
||||
public static final int MATCH_MOBILE_3G_LOWER = 2;
|
||||
@Deprecated
|
||||
public static final int MATCH_MOBILE_4G = 3;
|
||||
public static final int MATCH_WIFI = 4;
|
||||
public static final int MATCH_ETHERNET = 5;
|
||||
@@ -293,6 +295,7 @@ public class NetworkTemplate implements Parcelable {
|
||||
/**
|
||||
* Check if mobile network classified 3G or lower with matching IMSI.
|
||||
*/
|
||||
@Deprecated
|
||||
private boolean matchesMobile3gLower(NetworkIdentity ident) {
|
||||
ensureSubtypeAvailable();
|
||||
if (ident.mType == TYPE_WIMAX) {
|
||||
@@ -311,6 +314,7 @@ public class NetworkTemplate implements Parcelable {
|
||||
/**
|
||||
* Check if mobile network classified 4G with matching IMSI.
|
||||
*/
|
||||
@Deprecated
|
||||
private boolean matchesMobile4g(NetworkIdentity ident) {
|
||||
ensureSubtypeAvailable();
|
||||
if (ident.mType == TYPE_WIMAX) {
|
||||
|
||||
Reference in New Issue
Block a user