Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8266b3f8 authored by Etan Cohen's avatar Etan Cohen
Browse files

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

To be used in permission check.

Bug: 27696149
Change-Id: I5be5aed93c556cf24b596bd2a7c5672502f84d74
parent 6007681b
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -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;