summaryrefslogtreecommitdiff
path: root/packages/SettingsLib/src/com/android/settingslib/Utils.java
diff options
context:
space:
mode:
authorChris Gross <chrisgross@google.com>2019-10-03 11:00:04 -0700
committerDaniel Norman <danielnorman@google.com>2019-10-14 11:25:02 -0700
commit4a86611b36ac6f0b21ef953ce9b27ca55fec83f7 (patch)
treebb1c1ead89cf261fea3925f7ba309cc22dade245 /packages/SettingsLib/src/com/android/settingslib/Utils.java
parent4477ac18abecd5a78c0dec95ca7e796020bf0c50 (diff)
Overload getWifiIconResource().
getWifiIconResource() has been modified to include two extra parameters from upstream. New unmodified upstream code in WifiEntryPreference.java does not have the required information to call the modified getWifiIconResource method. This change instead overloads the getWifiIconResource method to also accept a single parameter as it does upstream. Bug: 142554997 Change-Id: I38494a0e973048fdf6265c7ed47901ec845118fd
Diffstat (limited to 'packages/SettingsLib/src/com/android/settingslib/Utils.java')
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/Utils.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/Utils.java b/packages/SettingsLib/src/com/android/settingslib/Utils.java
index 7b3eff6b1231..3c677bd44778 100644
--- a/packages/SettingsLib/src/com/android/settingslib/Utils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/Utils.java
@@ -345,6 +345,16 @@ public class Utils {
* @param level The number of bars to show (0-4)
* @throws IllegalArgumentException if an invalid RSSI level is given.
*/
+ public static int getWifiIconResource(int level) {
+ return getWifiIconResource(level, 0 /* generation */, false /* isReady */);
+ }
+
+ /**
+ * Returns the Wifi icon resource for a given RSSI level.
+ *
+ * @param level The number of bars to show (0-4)
+ * @throws IllegalArgumentException if an invalid RSSI level is given.
+ */
public static int getWifiIconResource(int level, int generation, boolean isReady) {
if (level < 0 || level >= WIFI_PIE.length) {
throw new IllegalArgumentException("No Wifi icon found for level: " + level);