Merge "Add meteredOverride field to WifiConfiguration."
am: f9479fe639
Change-Id: I0d2540cf0a360f07c1dd103191fd348602099ff5
This commit is contained in:
@@ -685,10 +685,20 @@ public class WifiConfiguration implements Parcelable {
|
|||||||
/**
|
/**
|
||||||
* @hide
|
* @hide
|
||||||
* A hint about whether or not the network represented by this WifiConfiguration
|
* A hint about whether or not the network represented by this WifiConfiguration
|
||||||
* is metered.
|
* is metered. This is hinted at via the meteredHint bit on DHCP results set in
|
||||||
|
* {@link com.android.server.wifi.WifiStateMachine}, or via a network score in
|
||||||
|
* {@link com.android.server.wifi.ExternalScoreEvaluator}.
|
||||||
*/
|
*/
|
||||||
public boolean meteredHint;
|
public boolean meteredHint;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @hide
|
||||||
|
* Indicates if a user has specified the WifiConfiguration to be metered. Users
|
||||||
|
* can toggle if a network is metered within Settings -> Data Usage -> Network
|
||||||
|
* Restrictions.
|
||||||
|
*/
|
||||||
|
public boolean meteredOverride;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hide
|
* @hide
|
||||||
* Setting this value will force scan results associated with this configuration to
|
* Setting this value will force scan results associated with this configuration to
|
||||||
@@ -1367,6 +1377,7 @@ public class WifiConfiguration implements Parcelable {
|
|||||||
didSelfAdd = false;
|
didSelfAdd = false;
|
||||||
ephemeral = false;
|
ephemeral = false;
|
||||||
meteredHint = false;
|
meteredHint = false;
|
||||||
|
meteredOverride = false;
|
||||||
useExternalScores = false;
|
useExternalScores = false;
|
||||||
validatedInternetAccess = false;
|
validatedInternetAccess = false;
|
||||||
mIpConfiguration = new IpConfiguration();
|
mIpConfiguration = new IpConfiguration();
|
||||||
@@ -1470,9 +1481,11 @@ public class WifiConfiguration implements Parcelable {
|
|||||||
if (this.validatedInternetAccess) sbuf.append(" validatedInternetAccess");
|
if (this.validatedInternetAccess) sbuf.append(" validatedInternetAccess");
|
||||||
if (this.ephemeral) sbuf.append(" ephemeral");
|
if (this.ephemeral) sbuf.append(" ephemeral");
|
||||||
if (this.meteredHint) sbuf.append(" meteredHint");
|
if (this.meteredHint) sbuf.append(" meteredHint");
|
||||||
|
if (this.meteredOverride) sbuf.append(" meteredOverride");
|
||||||
if (this.useExternalScores) sbuf.append(" useExternalScores");
|
if (this.useExternalScores) sbuf.append(" useExternalScores");
|
||||||
if (this.didSelfAdd || this.selfAdded || this.validatedInternetAccess
|
if (this.didSelfAdd || this.selfAdded || this.validatedInternetAccess
|
||||||
|| this.ephemeral || this.meteredHint || this.useExternalScores) {
|
|| this.ephemeral || this.meteredHint || this.meteredOverride
|
||||||
|
|| this.useExternalScores) {
|
||||||
sbuf.append("\n");
|
sbuf.append("\n");
|
||||||
}
|
}
|
||||||
sbuf.append(" KeyMgmt:");
|
sbuf.append(" KeyMgmt:");
|
||||||
@@ -1897,6 +1910,7 @@ public class WifiConfiguration implements Parcelable {
|
|||||||
validatedInternetAccess = source.validatedInternetAccess;
|
validatedInternetAccess = source.validatedInternetAccess;
|
||||||
ephemeral = source.ephemeral;
|
ephemeral = source.ephemeral;
|
||||||
meteredHint = source.meteredHint;
|
meteredHint = source.meteredHint;
|
||||||
|
meteredOverride = source.meteredOverride;
|
||||||
useExternalScores = source.useExternalScores;
|
useExternalScores = source.useExternalScores;
|
||||||
if (source.visibility != null) {
|
if (source.visibility != null) {
|
||||||
visibility = new Visibility(source.visibility);
|
visibility = new Visibility(source.visibility);
|
||||||
@@ -1978,6 +1992,7 @@ public class WifiConfiguration implements Parcelable {
|
|||||||
dest.writeInt(validatedInternetAccess ? 1 : 0);
|
dest.writeInt(validatedInternetAccess ? 1 : 0);
|
||||||
dest.writeInt(ephemeral ? 1 : 0);
|
dest.writeInt(ephemeral ? 1 : 0);
|
||||||
dest.writeInt(meteredHint ? 1 : 0);
|
dest.writeInt(meteredHint ? 1 : 0);
|
||||||
|
dest.writeInt(meteredOverride ? 1 : 0);
|
||||||
dest.writeInt(useExternalScores ? 1 : 0);
|
dest.writeInt(useExternalScores ? 1 : 0);
|
||||||
dest.writeInt(creatorUid);
|
dest.writeInt(creatorUid);
|
||||||
dest.writeInt(lastConnectUid);
|
dest.writeInt(lastConnectUid);
|
||||||
@@ -2049,6 +2064,7 @@ public class WifiConfiguration implements Parcelable {
|
|||||||
config.validatedInternetAccess = in.readInt() != 0;
|
config.validatedInternetAccess = in.readInt() != 0;
|
||||||
config.ephemeral = in.readInt() != 0;
|
config.ephemeral = in.readInt() != 0;
|
||||||
config.meteredHint = in.readInt() != 0;
|
config.meteredHint = in.readInt() != 0;
|
||||||
|
config.meteredOverride = in.readInt() != 0;
|
||||||
config.useExternalScores = in.readInt() != 0;
|
config.useExternalScores = in.readInt() != 0;
|
||||||
config.creatorUid = in.readInt();
|
config.creatorUid = in.readInt();
|
||||||
config.lastConnectUid = in.readInt();
|
config.lastConnectUid = in.readInt();
|
||||||
|
|||||||
Reference in New Issue
Block a user