[NAN] Add method to ConfigRequest to determine if non-default

To be used in permission check.

Bug: 27696149
Change-Id: I5be5aed93c556cf24b596bd2a7c5672502f84d74
This commit is contained in:
Etan Cohen
2016-08-18 16:51:50 -07:00
parent 6007681b19
commit 8266b3f876

View File

@@ -173,6 +173,18 @@ public class ConfigRequest implements Parcelable {
&& mClusterLow == lhs.mClusterLow && mClusterHigh == lhs.mClusterHigh;
}
/**
* Checks whether the configuration's settings which impact on-air behavior are non-default.
*
* @return true if any of the on-air-impacting settings are non-default.
*
* @hide
*/
public boolean isNonDefaultOnTheAir() {
return mSupport5gBand || mMasterPreference != 0 || mClusterLow != CLUSTER_ID_MIN
|| mClusterHigh != CLUSTER_ID_MAX;
}
@Override
public int hashCode() {
int result = 17;