summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/dialpadview/res
diff options
context:
space:
mode:
authorroldenburg <roldenburg@google.com>2018-02-15 15:22:24 -0800
committerRyan Oldenburg <roldenburg@google.com>2018-02-22 10:57:29 -0800
commit9c9175fc3cf874d7b1e8f6334b8ba709a9e3a310 (patch)
tree22a037ffc19b006367e2eee75f081a63a811e66c /java/com/android/dialer/dialpadview/res
parentc54ce2658988ca36ca3dfab00daefca4dcfed3b2 (diff)
Show IMEI/MEID in hex, dec, and barcode when appropriate
Bug: 69063060,71706655 Test: SpecialCharSequenceMgrTest PiperOrigin-RevId: 185910798 Change-Id: I60a614d5357809eb982991caa4765d08a53fe936
Diffstat (limited to 'java/com/android/dialer/dialpadview/res')
-rw-r--r--java/com/android/dialer/dialpadview/res/layout/dialog_deviceids.xml26
-rw-r--r--java/com/android/dialer/dialpadview/res/layout/row_deviceid.xml49
-rw-r--r--java/com/android/dialer/dialpadview/res/values/dimens.xml2
-rw-r--r--java/com/android/dialer/dialpadview/res/values/strings.xml6
-rw-r--r--java/com/android/dialer/dialpadview/res/values/styles.xml5
5 files changed, 88 insertions, 0 deletions
diff --git a/java/com/android/dialer/dialpadview/res/layout/dialog_deviceids.xml b/java/com/android/dialer/dialpadview/res/layout/dialog_deviceids.xml
new file mode 100644
index 000000000..89e256bde
--- /dev/null
+++ b/java/com/android/dialer/dialpadview/res/layout/dialog_deviceids.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 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="match_parent"
+ android:layout_height="match_parent">
+ <LinearLayout
+ android:id="@+id/deviceids_holder"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingStart="?dialogPreferredPadding"
+ android:paddingEnd="?dialogPreferredPadding"
+ android:orientation="vertical"/>
+</ScrollView>
diff --git a/java/com/android/dialer/dialpadview/res/layout/row_deviceid.xml b/java/com/android/dialer/dialpadview/res/layout/row_deviceid.xml
new file mode 100644
index 000000000..53f3e5d0d
--- /dev/null
+++ b/java/com/android/dialer/dialpadview/res/layout/row_deviceid.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 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.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="?dialogPreferredPadding"
+ android:orientation="vertical">
+ <TextView
+ style="@style/DeviceIdBody"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/hex"/>
+ <TextView
+ android:id="@+id/deviceid_hex"
+ style="@style/DeviceIdBody"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+ <TextView
+ android:id="@+id/deviceid_dec_label"
+ style="@style/DeviceIdBody"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/dec"
+ android:visibility="gone"/>
+ <TextView
+ android:id="@+id/deviceid_dec"
+ style="@style/DeviceIdBody"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+ <ImageView
+ android:id="@+id/deviceid_barcode"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/barcode_height"
+ android:layout_margin="24dp"
+ android:layout_gravity="center_horizontal"/>
+</LinearLayout>
diff --git a/java/com/android/dialer/dialpadview/res/values/dimens.xml b/java/com/android/dialer/dialpadview/res/values/dimens.xml
index 4b386eeb5..6892fcf30 100644
--- a/java/com/android/dialer/dialpadview/res/values/dimens.xml
+++ b/java/com/android/dialer/dialpadview/res/values/dimens.xml
@@ -43,4 +43,6 @@
<!-- Length of dialpad's shadows in dialer. -->
<dimen name="shadow_length">10dp</dimen>
+
+ <dimen name="barcode_height">100dp</dimen>
</resources>
diff --git a/java/com/android/dialer/dialpadview/res/values/strings.xml b/java/com/android/dialer/dialpadview/res/values/strings.xml
index 094ca6b8f..51367b644 100644
--- a/java/com/android/dialer/dialpadview/res/values/strings.xml
+++ b/java/com/android/dialer/dialpadview/res/values/strings.xml
@@ -77,6 +77,12 @@
<!-- The title of a dialog that displays the MEID of the CDMA phone -->
<string name="meid">MEID</string>
+ <!-- The label for the hex encoding of the device ID -->
+ <string name="hex" translatable="false">HEX:</string>
+
+ <!-- The label for the decimal encoding of the device ID -->
+ <string name="dec" translatable="false">DEC:</string>
+
<!-- Dialog text displayed when loading a phone number from the SIM card for speed dial -->
<string name="simContacts_emptyLoading">Loading from SIM card\u2026</string>
diff --git a/java/com/android/dialer/dialpadview/res/values/styles.xml b/java/com/android/dialer/dialpadview/res/values/styles.xml
index d69e6a832..75a54a305 100644
--- a/java/com/android/dialer/dialpadview/res/values/styles.xml
+++ b/java/com/android/dialer/dialpadview/res/values/styles.xml
@@ -116,4 +116,9 @@
<item name="dialpad_voicemail_tint">?attr/dialpad_text_color_secondary</item>
<item name="dialpad_background">#00000000</item>
</style>
+
+ <style name="DeviceIdBody">
+ <item name="android:textColor">?android:textColorPrimary</item>
+ <item name="android:textSize">16sp</item>
+ </style>
</resources>