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

Commit a54c89ec authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Standardize usages of "/" separator in SettingsLib"

parents 3599a281 d3171ca2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -113,6 +113,9 @@
    <!-- Speed label for very fast network speed -->
    <string name="speed_label_very_fast">Very Fast</string>

    <!-- Summary text separator for preferences including a short description (eg. "Fast / Connected"). -->
    <string name="preference_summary_default_combination"><xliff:g id="state" example="ON">%1$s</xliff:g> / <xliff:g id="description" example="High accuracy mode">%2$s</xliff:g></string>

    <!-- Bluetooth settings.  Message when a device is disconnected -->
    <string name="bluetooth_disconnected">Disconnected</string>
    <!-- Bluetooth settings.  Message when disconnecting from a device -->
+8 −14
Original line number Diff line number Diff line
@@ -673,13 +673,6 @@ public class AccessPoint implements Comparable<AccessPoint> {
        // Update to new summary
        StringBuilder summary = new StringBuilder();

        // TODO(b/62354743): Standardize and international delimiter usage
        final String concatenator = " / ";

        if (mSpeed != Speed.NONE) {
            summary.append(getSpeedLabel() + concatenator);
        }

        if (isActive() && config != null && config.isPasspoint()) {
            // This is the active connection on passpoint
            summary.append(getSummary(mContext, getDetailedState(),
@@ -773,15 +766,16 @@ public class AccessPoint implements Comparable<AccessPoint> {
            }
        }

        // Strip trailing delimiter if applicable
        int concatLength = concatenator.length();
        if (summary.length() >= concatLength && summary.substring(
                summary.length() - concatLength, summary.length()).equals(concatenator)) {
            summary.delete(summary.length() - concatLength, summary.length());
        }

        // If Speed label is present, use the preference combination to prepend it to the summary.
        if (mSpeed != Speed.NONE) {
            return mContext.getResources().getString(
                    R.string.preference_summary_default_combination,
                    getSpeedLabel(),
                    summary.toString());
        } else {
            return summary.toString();
        }
    }

    /**
     * Returns the visibility status of the WifiConfiguration.