summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJason Monk <jmonk@google.com>2015-06-15 14:14:50 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-15 14:14:52 +0000
commit5d8c276bb91788441ec9a98717017eb01f1b348f (patch)
tree409229dd8e1c1423500e47743f5cc682a4303f21 /packages
parent991f0f6549fd25a658f2519b4ee2169c6c5195eb (diff)
parent6980d12c5864941e68933705c1f15a102ac348cb (diff)
downloadframeworks_base-5d8c276bb91788441ec9a98717017eb01f1b348f.zip
frameworks_base-5d8c276bb91788441ec9a98717017eb01f1b348f.tar.gz
frameworks_base-5d8c276bb91788441ec9a98717017eb01f1b348f.tar.bz2
Merge "Make references to ssid use a verbatim TtsSpan" into mnc-dev
Diffstat (limited to 'packages')
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java25
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java4
3 files changed, 21 insertions, 12 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
index 3130875..4cef286 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
@@ -16,7 +16,11 @@
package com.android.settingslib.wifi;
+import android.app.AppGlobals;
import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.IPackageManager;
+import android.content.pm.PackageManager;
import android.net.ConnectivityManager;
import android.net.Network;
import android.net.NetworkCapabilities;
@@ -30,17 +34,15 @@ import android.net.wifi.WifiConfiguration.KeyMgmt;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.Bundle;
-import android.text.TextUtils;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.os.UserHandle;
+import android.text.Spannable;
+import android.text.SpannableString;
+import android.text.TextUtils;
+import android.text.style.TtsSpan;
import android.util.Log;
import android.util.LruCache;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.IPackageManager;
-import android.content.pm.PackageManager;
-import android.os.UserHandle;
-import android.os.RemoteException;
-import android.app.AppGlobals;
import com.android.settingslib.R;
@@ -280,10 +282,17 @@ public class AccessPoint implements Comparable<AccessPoint> {
}
}
- public String getSsid() {
+ public String getSsidStr() {
return ssid;
}
+ public CharSequence getSsid() {
+ SpannableString str = new SpannableString(ssid);
+ str.setSpan(new TtsSpan.VerbatimBuilder(ssid).build(), 0, ssid.length(),
+ Spannable.SPAN_INCLUSIVE_INCLUSIVE);
+ return str;
+ }
+
public String getConfigName() {
if (mConfig != null && mConfig.isPasspoint()) {
return mConfig.providerFriendlyName;
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
index 09c93e9..19be4a5 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
@@ -273,7 +273,7 @@ public class WifiTracker {
accessPoints.add(accessPoint);
if (config.isPasspoint() == false) {
- apMap.put(accessPoint.getSsid(), accessPoint);
+ apMap.put(accessPoint.getSsidStr(), accessPoint);
}
} else {
// If we aren't using saved networks, drop them into the cache so that
@@ -321,7 +321,7 @@ public class WifiTracker {
}
accessPoints.add(accessPoint);
- apMap.put(accessPoint.getSsid(), accessPoint);
+ apMap.put(accessPoint.getSsidStr(), accessPoint);
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java b/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java
index 95ac558..2a44e56 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java
@@ -239,8 +239,8 @@ public class QSDetailItems extends FrameLayout {
public static class Item {
public int icon;
public Drawable overlay;
- public String line1;
- public String line2;
+ public CharSequence line1;
+ public CharSequence line2;
public Object tag;
public boolean canDisconnect;
}