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

Commit f16dce6f authored by David Su's avatar David Su Committed by Android (Google) Code Review
Browse files

Merge changes from topic "api-review-getNetworkDisableReasonString" into rvc-dev

* changes:
  Settings: Rename NetworkSelectionStatus#getNetworkDisableReasonString
  Rename NetworkSelectionStatus#getNetworkDisableReasonString
parents c4b4ccf5 565f187c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7315,8 +7315,8 @@ package android.net.wifi {
    method @Deprecated public int getDisableReasonCounter(int);
    method @Deprecated public long getDisableTime();
    method @Deprecated public static int getMaxNetworkSelectionDisableReason();
    method @Deprecated @Nullable public static String getNetworkDisableReasonString(int);
    method @Deprecated public int getNetworkSelectionDisableReason();
    method @Deprecated @Nullable public static String getNetworkSelectionDisableReasonString(int);
    method @Deprecated public int getNetworkSelectionStatus();
    method @Deprecated @NonNull public String getNetworkStatusString();
    method @Deprecated public boolean hasEverConnected();
+2 −1
Original line number Diff line number Diff line
@@ -68,7 +68,8 @@ public class WifiUtils {
            for (int reason = 0; reason <= getMaxNetworkSelectionDisableReason(); reason++) {
                if (networkStatus.getDisableReasonCounter(reason) != 0) {
                    summary.append(" ")
                            .append(NetworkSelectionStatus.getNetworkDisableReasonString(reason))
                            .append(NetworkSelectionStatus
                                    .getNetworkSelectionDisableReasonString(reason))
                            .append("=")
                            .append(networkStatus.getDisableReasonCounter(reason));
                }
+12 −8
Original line number Diff line number Diff line
@@ -1713,7 +1713,7 @@ public class WifiConfiguration implements Parcelable {
         * @return network disable reason string, or null if the reason is invalid.
         */
        @Nullable
        public static String getNetworkDisableReasonString(
        public static String getNetworkSelectionDisableReasonString(
                @NetworkSelectionDisableReason int reason) {
            DisableReasonInfo info = DISABLE_REASON_INFOS.get(reason);
            if (info == null) {
@@ -1727,8 +1727,8 @@ public class WifiConfiguration implements Parcelable {
         * @return current network disable reason in String (for debug purpose)
         * @hide
         */
        public String getNetworkDisableReasonString() {
            return getNetworkDisableReasonString(mNetworkSelectionDisableReason);
        public String getNetworkSelectionDisableReasonString() {
            return getNetworkSelectionDisableReasonString(mNetworkSelectionDisableReason);
        }

        /**
@@ -2189,17 +2189,21 @@ public class WifiConfiguration implements Parcelable {


        sbuf.append(" NetworkSelectionStatus ")
                .append(mNetworkSelectionStatus.getNetworkStatusString() + "\n");
                .append(mNetworkSelectionStatus.getNetworkStatusString())
                .append("\n");
        if (mNetworkSelectionStatus.getNetworkSelectionDisableReason() > 0) {
            sbuf.append(" mNetworkSelectionDisableReason ")
                    .append(mNetworkSelectionStatus.getNetworkDisableReasonString() + "\n");
                    .append(mNetworkSelectionStatus.getNetworkSelectionDisableReasonString())
                    .append("\n");

            for (int index = NetworkSelectionStatus.DISABLED_NONE;
                    index < NetworkSelectionStatus.NETWORK_SELECTION_DISABLED_MAX; index++) {
                if (mNetworkSelectionStatus.getDisableReasonCounter(index) != 0) {
                    sbuf.append(NetworkSelectionStatus.getNetworkDisableReasonString(index)
                            + " counter:" + mNetworkSelectionStatus.getDisableReasonCounter(index)
                            + "\n");
                    sbuf.append(
                            NetworkSelectionStatus.getNetworkSelectionDisableReasonString(index))
                            .append(" counter:")
                            .append(mNetworkSelectionStatus.getDisableReasonCounter(index))
                            .append("\n");
                }
            }
        }