Loading AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -2665,7 +2665,7 @@ <!-- Show regulatory info (from settings item or dialing "*#07#") --> <activity android:name="RegulatoryInfoDisplayActivity" android:label="@string/regulatory_information" android:label="@string/regulatory_labels" android:taskAffinity="" android:enabled="@bool/config_show_regulatory_info"> <intent-filter> Loading res/values/strings.xml +4 −2 Original line number Diff line number Diff line Loading @@ -3011,8 +3011,10 @@ <string name="contributors_title">Contributors</string> <!-- About phone settings screen, setting option name to show Manual [CHAR LIMIT=25] --> <string name="manual">Manual</string> <!-- About phone settings screen, setting option name to show regulatory information [CHAR LIMIT=25] --> <string name="regulatory_information">Regulatory information</string> <!-- About phone settings screen, setting option name to show regulatory labels [CHAR LIMIT=25] --> <string name="regulatory_labels">Regulatory labels</string> <!-- About phone settings screen, setting option name to show safety and regulatory information [CHAR LIMIT=40] --> <string name="safety_and_regulatory_info">Safety & regulatory information</string> <!-- Note: this may be replaced by a more-specific title of the activity that will get launched --> <skip /> <!-- About phone settings screen, setting option name to see copyright-related info --> <string name="copyright_title">Copyright</string> Loading res/xml/device_info_settings.xml +7 −1 Original line number Diff line number Diff line Loading @@ -56,10 +56,16 @@ <PreferenceScreen android:key="regulatory_info" android:title="@string/regulatory_information"> android:title="@string/regulatory_labels"> <intent android:action="android.settings.SHOW_REGULATORY_INFO" /> </PreferenceScreen> <PreferenceScreen android:key="safety_info" android:title="@string/safety_and_regulatory_info"> <intent android:action="android.settings.SHOW_SAFETY_AND_REGULATORY_INFO" /> </PreferenceScreen> <!-- Feedback on the device --> <PreferenceScreen android:key="device_feedback" android:title="@string/device_feedback"> Loading src/com/android/settings/DeviceInfoSettings.java +16 −8 Original line number Diff line number Diff line Loading @@ -175,14 +175,12 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In // Remove manual entry if none present. removePreferenceIfBoolFalse(KEY_MANUAL, R.bool.config_show_manual); // Remove regulatory information if none present. final Intent intent = new Intent(Settings.ACTION_SHOW_REGULATORY_INFO); if (getPackageManager().queryIntentActivities(intent, 0).isEmpty()) { Preference pref = findPreference(KEY_REGULATORY_INFO); if (pref != null) { getPreferenceScreen().removePreference(pref); } } // Remove regulatory labels if no activity present to handle intent. removePreferenceIfActivityMissing( KEY_REGULATORY_INFO, Settings.ACTION_SHOW_REGULATORY_INFO); removePreferenceIfActivityMissing( "safety_info", "android.settings.SHOW_SAFETY_AND_REGULATORY_INFO"); } @Override Loading Loading @@ -327,6 +325,16 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In } } private void removePreferenceIfActivityMissing(String preferenceKey, String action) { final Intent intent = new Intent(action); if (getPackageManager().queryIntentActivities(intent, 0).isEmpty()) { Preference pref = findPreference(preferenceKey); if (pref != null) { getPreferenceScreen().removePreference(pref); } } } private void removePreferenceIfBoolFalse(String preference, int resId) { if (!getResources().getBoolean(resId)) { Preference pref = findPreference(preference); Loading src/com/android/settings/RegulatoryInfoDisplayActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ public class RegulatoryInfoDisplayActivity extends Activity implements } AlertDialog.Builder builder = new AlertDialog.Builder(this) .setTitle(R.string.regulatory_information) .setTitle(R.string.regulatory_labels) .setOnDismissListener(this); boolean regulatoryInfoDrawableExists = false; Loading Loading
AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -2665,7 +2665,7 @@ <!-- Show regulatory info (from settings item or dialing "*#07#") --> <activity android:name="RegulatoryInfoDisplayActivity" android:label="@string/regulatory_information" android:label="@string/regulatory_labels" android:taskAffinity="" android:enabled="@bool/config_show_regulatory_info"> <intent-filter> Loading
res/values/strings.xml +4 −2 Original line number Diff line number Diff line Loading @@ -3011,8 +3011,10 @@ <string name="contributors_title">Contributors</string> <!-- About phone settings screen, setting option name to show Manual [CHAR LIMIT=25] --> <string name="manual">Manual</string> <!-- About phone settings screen, setting option name to show regulatory information [CHAR LIMIT=25] --> <string name="regulatory_information">Regulatory information</string> <!-- About phone settings screen, setting option name to show regulatory labels [CHAR LIMIT=25] --> <string name="regulatory_labels">Regulatory labels</string> <!-- About phone settings screen, setting option name to show safety and regulatory information [CHAR LIMIT=40] --> <string name="safety_and_regulatory_info">Safety & regulatory information</string> <!-- Note: this may be replaced by a more-specific title of the activity that will get launched --> <skip /> <!-- About phone settings screen, setting option name to see copyright-related info --> <string name="copyright_title">Copyright</string> Loading
res/xml/device_info_settings.xml +7 −1 Original line number Diff line number Diff line Loading @@ -56,10 +56,16 @@ <PreferenceScreen android:key="regulatory_info" android:title="@string/regulatory_information"> android:title="@string/regulatory_labels"> <intent android:action="android.settings.SHOW_REGULATORY_INFO" /> </PreferenceScreen> <PreferenceScreen android:key="safety_info" android:title="@string/safety_and_regulatory_info"> <intent android:action="android.settings.SHOW_SAFETY_AND_REGULATORY_INFO" /> </PreferenceScreen> <!-- Feedback on the device --> <PreferenceScreen android:key="device_feedback" android:title="@string/device_feedback"> Loading
src/com/android/settings/DeviceInfoSettings.java +16 −8 Original line number Diff line number Diff line Loading @@ -175,14 +175,12 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In // Remove manual entry if none present. removePreferenceIfBoolFalse(KEY_MANUAL, R.bool.config_show_manual); // Remove regulatory information if none present. final Intent intent = new Intent(Settings.ACTION_SHOW_REGULATORY_INFO); if (getPackageManager().queryIntentActivities(intent, 0).isEmpty()) { Preference pref = findPreference(KEY_REGULATORY_INFO); if (pref != null) { getPreferenceScreen().removePreference(pref); } } // Remove regulatory labels if no activity present to handle intent. removePreferenceIfActivityMissing( KEY_REGULATORY_INFO, Settings.ACTION_SHOW_REGULATORY_INFO); removePreferenceIfActivityMissing( "safety_info", "android.settings.SHOW_SAFETY_AND_REGULATORY_INFO"); } @Override Loading Loading @@ -327,6 +325,16 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In } } private void removePreferenceIfActivityMissing(String preferenceKey, String action) { final Intent intent = new Intent(action); if (getPackageManager().queryIntentActivities(intent, 0).isEmpty()) { Preference pref = findPreference(preferenceKey); if (pref != null) { getPreferenceScreen().removePreference(pref); } } } private void removePreferenceIfBoolFalse(String preference, int resId) { if (!getResources().getBoolean(resId)) { Preference pref = findPreference(preference); Loading
src/com/android/settings/RegulatoryInfoDisplayActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ public class RegulatoryInfoDisplayActivity extends Activity implements } AlertDialog.Builder builder = new AlertDialog.Builder(this) .setTitle(R.string.regulatory_information) .setTitle(R.string.regulatory_labels) .setOnDismissListener(this); boolean regulatoryInfoDrawableExists = false; Loading