Display FCC id for LTE in Settings.

If ro.ril.fccid is set by RIL, display it at Settings -> About Tablet -> FCC Equipment ID.

bug:4965501
Change-Id: I920ab071bf1997c4fbf3ce81f88e24f512d004c3
This commit is contained in:
John Wang
2011-06-30 14:31:44 -07:00
parent e3cfa9bc55
commit f44308a78d
3 changed files with 36 additions and 20 deletions

View File

@@ -1511,6 +1511,8 @@
<string name="firmware_version">Android version</string> <string name="firmware_version">Android version</string>
<!-- About phone screen, status item label--> <!-- About phone screen, status item label-->
<string name="model_number">Model number</string> <string name="model_number">Model number</string>
<!-- About phone screen, fcc equipment id label [CHAR LIMIT=30]-->
<string name="fcc_equipment_id">FCC Equipment ID</string>
<!-- About phone screen, setting option name--> <!-- About phone screen, setting option name-->
<string name="baseband_version">Baseband version</string> <string name="baseband_version">Baseband version</string>
<!-- About phone screen, setting option name--> <!-- About phone screen, setting option name-->
@@ -1591,7 +1593,7 @@
<!-- SD card & phone storage settings title. Displayed as a title when showing the total usage of media on the device. Below it will be a number like "123.4 MB" indicating used storage. [CHAR LIMIT=50] --> <!-- SD card & phone storage settings title. Displayed as a title when showing the total usage of media on the device. Below it will be a number like "123.4 MB" indicating used storage. [CHAR LIMIT=50] -->
<string name="memory_media_usage">Media</string> <string name="memory_media_usage">Media</string>
<!-- SD card & phone storage settings title. Displayed as a title when showing the total usage of /sdcard/Download on the device. Below it will be a number like "123.4 MB" indicating used storage. [CHAR LIMIT=50] --> <!-- SD card & phone storage settings title. Displayed as a title when showing the total usage of /sdcard/Download on the device. Below it will be a number like "123.4 MB" indicating used storage. [CHAR LIMIT=50] -->
<string name="memory_downloads_usage">Downloads</string> <string name="memory_downloads_usage">Downloads</string>
<!-- SD card & phone storage settings title. Displayed as a title when showing the total usage of all pictures, videos in /sdcard/DCIM, /sdcard/Pictures folders on the device. Below it will be a number like "123.4 MB" indicating used storage. [CHAR LIMIT=50] --> <!-- SD card & phone storage settings title. Displayed as a title when showing the total usage of all pictures, videos in /sdcard/DCIM, /sdcard/Pictures folders on the device. Below it will be a number like "123.4 MB" indicating used storage. [CHAR LIMIT=50] -->
<string name="memory_dcim_usage">Pictures, Videos</string> <string name="memory_dcim_usage">Pictures, Videos</string>
<!-- SD card & phone storage settings title. Displayed as a title when showing the total usage of audio files in /sdcard on the device. Below it will be a number like "123.4 MB" indicating used storage. [CHAR LIMIT=50] --> <!-- SD card & phone storage settings title. Displayed as a title when showing the total usage of audio files in /sdcard on the device. Below it will be a number like "123.4 MB" indicating used storage. [CHAR LIMIT=50] -->

View File

@@ -4,9 +4,9 @@
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,20 +19,20 @@
<!-- System update settings - launches activity --> <!-- System update settings - launches activity -->
<PreferenceScreen android:key="system_update_settings" <PreferenceScreen android:key="system_update_settings"
android:title="@string/system_update_settings_list_item_title" android:title="@string/system_update_settings_list_item_title"
android:summary="@string/system_update_settings_list_item_summary"> android:summary="@string/system_update_settings_list_item_summary">
<intent android:action="android.settings.SYSTEM_UPDATE_SETTINGS" /> <intent android:action="android.settings.SYSTEM_UPDATE_SETTINGS" />
</PreferenceScreen> </PreferenceScreen>
<!-- Device status - launches activity --> <!-- Device status - launches activity -->
<PreferenceScreen android:key="status_info" <PreferenceScreen android:key="status_info"
android:title="@string/device_status" android:title="@string/device_status"
android:summary="@string/device_status_summary"> android:summary="@string/device_status_summary">
<intent android:action="android.intent.action.MAIN" <intent android:action="android.intent.action.MAIN"
android:targetPackage="com.android.settings" android:targetPackage="com.android.settings"
android:targetClass="com.android.settings.deviceinfo.Status" /> android:targetClass="com.android.settings.deviceinfo.Status" />
</PreferenceScreen> </PreferenceScreen>
<PreferenceScreen <PreferenceScreen
android:key="power_usage" android:key="power_usage"
android:fragment="com.android.settings.fuelgauge.PowerUsageSummary" android:fragment="com.android.settings.fuelgauge.PowerUsageSummary"
@@ -44,7 +44,7 @@
<PreferenceScreen <PreferenceScreen
android:key="container" android:key="container"
android:title="@string/legal_information"> android:title="@string/legal_information">
<!-- Note: The titles given here probably won't be used. Instead, we programmatically <!-- Note: The titles given here probably won't be used. Instead, we programmatically
fill the title with the label of the activity with the corresponding action. fill the title with the label of the activity with the corresponding action.
If there is not an activity for an action, the item will be removed from the If there is not an activity for an action, the item will be removed from the
@@ -72,7 +72,7 @@
</PreferenceScreen> </PreferenceScreen>
</PreferenceScreen> </PreferenceScreen>
<PreferenceScreen <PreferenceScreen
android:key="safetylegal" android:key="safetylegal"
android:title="@string/settings_safetylegal_title"> android:title="@string/settings_safetylegal_title">
@@ -80,7 +80,7 @@
</PreferenceScreen> </PreferenceScreen>
<!-- Contributors --> <!-- Contributors -->
<!-- <!--
<PreferenceScreen <PreferenceScreen
android:key="contributors" android:key="contributors"
android:title="@string/contributors_title"> android:title="@string/contributors_title">
@@ -89,37 +89,43 @@
--> -->
<!-- System Tutorial - launches activity --> <!-- System Tutorial - launches activity -->
<PreferenceScreen android:key="system_tutorial" <PreferenceScreen android:key="system_tutorial"
android:title="@string/system_tutorial_list_item_title" android:title="@string/system_tutorial_list_item_title"
android:summary="@string/system_tutorial_list_item_summary"> android:summary="@string/system_tutorial_list_item_summary">
<intent android:action="android.intent.action.SYSTEM_TUTORIAL" /> <intent android:action="android.intent.action.SYSTEM_TUTORIAL" />
</PreferenceScreen> </PreferenceScreen>
<!-- Device hardware model --> <!-- Device hardware model -->
<Preference android:key="device_model" <Preference android:key="device_model"
style="?android:preferenceInformationStyle" style="?android:preferenceInformationStyle"
android:title="@string/model_number" android:title="@string/model_number"
android:summary="@string/device_info_default"/> android:summary="@string/device_info_default"/>
<!-- Device firmware version --> <!-- Device firmware version -->
<Preference android:key="firmware_version" <Preference android:key="firmware_version"
style="?android:preferenceInformationStyle" style="?android:preferenceInformationStyle"
android:title="@string/firmware_version" android:title="@string/firmware_version"
android:summary="@string/device_info_default"/> android:summary="@string/device_info_default"/>
<!-- Device FCC equipment id -->
<Preference android:key="fcc_equipment_id"
style="?android:preferenceInformationStyle"
android:title="@string/fcc_equipment_id"
android:summary="@string/device_info_default"/>
<!-- Device Baseband version --> <!-- Device Baseband version -->
<Preference android:key="baseband_version" <Preference android:key="baseband_version"
style="?android:preferenceInformationStyle" style="?android:preferenceInformationStyle"
android:title="@string/baseband_version" android:title="@string/baseband_version"
android:summary="@string/device_info_default"/> android:summary="@string/device_info_default"/>
<!-- Device Kernel version --> <!-- Device Kernel version -->
<Preference android:key="kernel_version" <Preference android:key="kernel_version"
style="?android:preferenceInformationStyle" style="?android:preferenceInformationStyle"
android:title="@string/kernel_version" android:title="@string/kernel_version"
android:summary="@string/device_info_default"/> android:summary="@string/device_info_default"/>
<!-- Detailed build version --> <!-- Detailed build version -->
<Preference android:key="build_number" <Preference android:key="build_number"
style="?android:preferenceInformationStyle" style="?android:preferenceInformationStyle"
android:title="@string/build_number" android:title="@string/build_number"
android:summary="@string/device_info_default"/> android:summary="@string/device_info_default"/>

View File

@@ -55,6 +55,8 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment {
private static final String KEY_DEVICE_MODEL = "device_model"; private static final String KEY_DEVICE_MODEL = "device_model";
private static final String KEY_BASEBAND_VERSION = "baseband_version"; private static final String KEY_BASEBAND_VERSION = "baseband_version";
private static final String KEY_FIRMWARE_VERSION = "firmware_version"; private static final String KEY_FIRMWARE_VERSION = "firmware_version";
private static final String KEY_EQUIPMENT_ID = "fcc_equipment_id";
private static final String PROPERTY_EQUIPMENT_ID = "ro.ril.fccid";
long[] mHits = new long[3]; long[] mHits = new long[3];
@@ -78,6 +80,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment {
setStringSummary(KEY_FIRMWARE_VERSION, Build.VERSION.RELEASE); setStringSummary(KEY_FIRMWARE_VERSION, Build.VERSION.RELEASE);
findPreference(KEY_FIRMWARE_VERSION).setEnabled(true); findPreference(KEY_FIRMWARE_VERSION).setEnabled(true);
setValueSummary(KEY_BASEBAND_VERSION, "gsm.version.baseband"); setValueSummary(KEY_BASEBAND_VERSION, "gsm.version.baseband");
setValueSummary(KEY_EQUIPMENT_ID, PROPERTY_EQUIPMENT_ID);
setStringSummary(KEY_DEVICE_MODEL, Build.MODEL); setStringSummary(KEY_DEVICE_MODEL, Build.MODEL);
setStringSummary(KEY_BUILD_NUMBER, Build.DISPLAY); setStringSummary(KEY_BUILD_NUMBER, Build.DISPLAY);
findPreference(KEY_KERNEL_VERSION).setSummary(getFormattedKernelVersion()); findPreference(KEY_KERNEL_VERSION).setSummary(getFormattedKernelVersion());
@@ -86,6 +89,11 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment {
removePreferenceIfPropertyMissing(getPreferenceScreen(), "safetylegal", removePreferenceIfPropertyMissing(getPreferenceScreen(), "safetylegal",
PROPERTY_URL_SAFETYLEGAL); PROPERTY_URL_SAFETYLEGAL);
// Remove Equipment id preference if FCC ID is not set by RIL
removePreferenceIfPropertyMissing(getPreferenceScreen(), KEY_EQUIPMENT_ID,
PROPERTY_EQUIPMENT_ID);
// Remove Baseband version if wifi-only device // Remove Baseband version if wifi-only device
if (Utils.isWifiOnly()) { if (Utils.isWifiOnly()) {
getPreferenceScreen().removePreference(findPreference(KEY_BASEBAND_VERSION)); getPreferenceScreen().removePreference(findPreference(KEY_BASEBAND_VERSION));