diff options
author | Doug Zongker <dougz@android.com> | 2011-02-25 14:45:08 -0800 |
---|---|---|
committer | Doug Zongker <dougz@android.com> | 2011-02-25 15:01:50 -0800 |
commit | 489c7bff5c54c35e7156a99337d538e08f3aab7f (patch) | |
tree | 5b13f7c54fbf5bcf3420034feda0c593f1676423 /src/com/android/settings/deviceinfo/Status.java | |
parent | 8639a46a22a10e8a27ed5dbaea53a04f83d1d136 (diff) | |
download | packages_apps_Settings-489c7bff5c54c35e7156a99337d538e08f3aab7f.tar.gz packages_apps_Settings-489c7bff5c54c35e7156a99337d538e08f3aab7f.tar.bz2 packages_apps_Settings-489c7bff5c54c35e7156a99337d538e08f3aab7f.zip |
show Build.SERIAL in settings > about > status
For wifi-only devices, this may be the only way we have to identify
the device.
Change-Id: I70c09e4cdb101282e5d085bcab3f57c890bc7a98
Bug: 3490911
Diffstat (limited to 'src/com/android/settings/deviceinfo/Status.java')
-rw-r--r-- | src/com/android/settings/deviceinfo/Status.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/com/android/settings/deviceinfo/Status.java b/src/com/android/settings/deviceinfo/Status.java index f171c81d9..2dd6ecdfc 100644 --- a/src/com/android/settings/deviceinfo/Status.java +++ b/src/com/android/settings/deviceinfo/Status.java @@ -25,6 +25,7 @@ import android.content.res.Resources; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; import android.os.BatteryManager; +import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.Message; @@ -78,6 +79,7 @@ public class Status extends PreferenceActivity { private static final String KEY_BATTERY_LEVEL = "battery_level"; private static final String KEY_WIFI_MAC_ADDRESS = "wifi_mac_address"; private static final String KEY_BT_ADDRESS = "bt_address"; + private static final String KEY_SERIAL_NUMBER = "serial_number"; private static final int EVENT_SIGNAL_STRENGTH_CHANGED = 200; private static final int EVENT_SERVICE_STATE_CHANGED = 300; @@ -236,6 +238,13 @@ public class Status extends PreferenceActivity { setWifiStatus(); setBtStatus(); + + String serial = Build.SERIAL; + if (serial != null && !serial.equals("")) { + setSummaryText(KEY_SERIAL_NUMBER, serial); + } else { + removePreferenceFromScreen(KEY_SERIAL_NUMBER); + } } @Override |