Added SIM Card Activity to Settings
+ Added SIM Card menu to Settings menu + Added SIM card detail dialog when selecting a SIM Card + Added ability to select the default SIM for Cellular data, Calls, and SMS Bug: 16241745 Change-Id: I43437aa4c591c5097a8865d564f88726671e1b7d
This commit is contained in:
BIN
res/drawable-hdpi/ic_sim_sd.png
Normal file
BIN
res/drawable-hdpi/ic_sim_sd.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 836 B |
BIN
res/drawable-mdpi/ic_sim_sd.png
Normal file
BIN
res/drawable-mdpi/ic_sim_sd.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 700 B |
BIN
res/drawable-xhdpi/ic_sim_sd.png
Normal file
BIN
res/drawable-xhdpi/ic_sim_sd.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 912 B |
BIN
res/drawable-xxhdpi/ic_sim_sd.png
Normal file
BIN
res/drawable-xxhdpi/ic_sim_sd.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
res/drawable-xxxhdpi/ic_sim_sd.png
Normal file
BIN
res/drawable-xxxhdpi/ic_sim_sd.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
114
res/layout/multi_sim_dialog.xml
Normal file
114
res/layout/multi_sim_dialog.xml
Normal file
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2014 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/sim_dialog_padding"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout android:id="@+id/type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/sim_dialog_margin_top"
|
||||
android:text="@string/sim_editor_name"
|
||||
style="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<EditText android:id="@+id/sim_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:paddingBottom="@dimen/sim_dialog_margin_bottom"
|
||||
android:hint="@string/wifi_ssid_hint"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:maxLength="@integer/sim_name_length" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/sim_dialog_margin_top"
|
||||
android:text="@string/sim_editor_carrier" />
|
||||
|
||||
<TextView android:id="@+id/carrier"
|
||||
android:textColor="@android:color/black"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/sim_dialog_margin_bottom"
|
||||
android:singleLine="true"
|
||||
style="?android:attr/textAppearanceMedium" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/sim_dialog_margin_top"
|
||||
android:text="@string/sim_editor_number" />
|
||||
|
||||
<TextView android:id="@+id/number"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/sim_dialog_margin_bottom"
|
||||
android:singleLine="true"
|
||||
android:textColor="@android:color/black"
|
||||
style="?android:attr/textAppearanceMedium" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/sim_dialog_margin_top"
|
||||
android:text="@string/sim_editor_num_format" />
|
||||
|
||||
<Spinner android:id="@+id/display_numbers"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:entries="@array/sim_card_data_range"
|
||||
android:paddingBottom="@dimen/sim_dialog_margin_bottom"
|
||||
android:prompt="@string/sim_editor_num_format" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
@@ -192,4 +192,13 @@
|
||||
<!-- Screen pinning textview paddings -->
|
||||
<dimen name="screen_pinning_textview_padding">40dp</dimen>
|
||||
|
||||
<!-- SIM Dialog Margin top -->
|
||||
<dimen name="sim_dialog_margin_top">8dip</dimen>
|
||||
<!-- SIM Dialog Margin bottom -->
|
||||
<dimen name="sim_dialog_margin_bottom">16dip</dimen>
|
||||
<!-- SIM Dialog padding -->
|
||||
<dimen name="sim_dialog_padding">8dip</dimen>
|
||||
<!-- Sim Card Name length -->
|
||||
<integer name="sim_name_length">32</integer>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -5422,6 +5422,8 @@
|
||||
<string name="sim_setup_wizard_title">SIM cards</string>
|
||||
<!-- Title for SIM settings title settings during Setup Wizard. [CHAR LIMIT=40] -->
|
||||
<string name="sim_settings_title">SIM cards</string>
|
||||
<!-- Summary for SIM settings title settings during Setup Wizard. [CHAR LIMIT=40] -->
|
||||
<string name="sim_settings_summary"><xliff:g id="sim_name">%1$s</xliff:g> - <xliff:g id="sim_number">%2$s</xliff:g></string>
|
||||
<!-- Message that SIM cards have changed. [CHAR LIMIT=40] -->
|
||||
<string name="sim_cards_changed_message">SIM cards have changed</string>
|
||||
<!-- Message smmary that SIM cards have changed. [CHAR LIMIT=60] -->
|
||||
@@ -5436,6 +5438,8 @@
|
||||
<string name="sim_select_card">Select a SIM card</string>
|
||||
<!-- Label for a numbered SIM card. [CHAR LIMIT=40] -->
|
||||
<string name="sim_card_number_title">SIM <xliff:g id="card_number">%1$d</xliff:g></string>
|
||||
<!-- Name label of Sim card that is empty. [CHAR LIMIT=40] -->
|
||||
<string name="sim_slot_empty">SIM empty</string>
|
||||
<!-- Name label of Sim Editor. [CHAR LIMIT=40] -->
|
||||
<string name="sim_editor_name">SIM name</string>
|
||||
<!-- Title label of Sim Editor. [CHAR LIMIT=40] -->
|
||||
|
||||
@@ -38,6 +38,14 @@
|
||||
android:icon="@drawable/ic_settings_bluetooth2"
|
||||
/>
|
||||
|
||||
<!-- SIM Cards -->
|
||||
<dashboard-tile
|
||||
android:id="@+id/sim_settings"
|
||||
android:title="@string/sim_settings_title"
|
||||
android:fragment="com.android.settings.sim.SimSettings"
|
||||
android:icon="@drawable/ic_sim_sd"
|
||||
/>
|
||||
|
||||
<!-- Data Usage -->
|
||||
<dashboard-tile
|
||||
android:id="@+id/data_usage_settings"
|
||||
|
||||
44
res/xml/sim_settings.xml
Normal file
44
res/xml/sim_settings.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2014 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:title="@string/sim_settings_title">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="sim_cards"
|
||||
android:title="@string/sim_settings_title" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="sim_activities"
|
||||
android:title="@string/sim_pref_divider">
|
||||
|
||||
<com.android.settings.notification.DropDownPreference
|
||||
android:key="sim_cellular_data"
|
||||
android:title="@string/cellular_data_title"
|
||||
android:dialogTitle="@string/cellular_data_title" />
|
||||
|
||||
<com.android.settings.notification.DropDownPreference
|
||||
android:key="sim_calls"
|
||||
android:title="@string/calls_title" />
|
||||
|
||||
<com.android.settings.notification.DropDownPreference
|
||||
android:key="sim_sms"
|
||||
android:title="@string/sms_messages_title"
|
||||
android:dialogTitle="@string/sms_messages_title" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
Reference in New Issue
Block a user