diff options
author | Eric Erfanian <erfanian@google.com> | 2017-03-15 14:41:07 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-03-15 16:24:23 -0700 |
commit | d5e47f6da5b08b13ecdfa7f1edc7e12aeb83fab9 (patch) | |
tree | b54abbb51fb7d66e7755a1fbb5db023ff601090b /java/com/android/dialer/calldetails/res | |
parent | 30436e7e6d3f2c8755a91b2b6222b74d465a9e87 (diff) | |
download | android_packages_apps_Dialer-d5e47f6da5b08b13ecdfa7f1edc7e12aeb83fab9.tar.gz android_packages_apps_Dialer-d5e47f6da5b08b13ecdfa7f1edc7e12aeb83fab9.tar.bz2 android_packages_apps_Dialer-d5e47f6da5b08b13ecdfa7f1edc7e12aeb83fab9.zip |
Update Dialer source from latest green build.
* Refactor voicemail component
* Add new enriched calling components
Test: treehugger, manual aosp testing
Change-Id: I521a0f86327d4b42e14d93927c7d613044ed5942
Diffstat (limited to 'java/com/android/dialer/calldetails/res')
10 files changed, 428 insertions, 0 deletions
diff --git a/java/com/android/dialer/calldetails/res/drawable/multimedia_image_background.xml b/java/com/android/dialer/calldetails/res/drawable/multimedia_image_background.xml new file mode 100644 index 000000000..421bdbfee --- /dev/null +++ b/java/com/android/dialer/calldetails/res/drawable/multimedia_image_background.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <corners android:radius="2dp"/> +</shape> diff --git a/java/com/android/dialer/calldetails/res/layout/call_details_activity.xml b/java/com/android/dialer/calldetails/res/layout/call_details_activity.xml new file mode 100644 index 000000000..038a8745e --- /dev/null +++ b/java/com/android/dialer/calldetails/res/layout/call_details_activity.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <Toolbar + android:id="@+id/toolbar" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + android:background="@color/dialer_theme_color" + android:elevation="4dp" + android:titleTextAppearance="@style/toolbar_title_text" + android:title="@string/call_details" + android:navigationIcon="@drawable/quantum_ic_arrow_back_white_24"/> + + <android.support.v7.widget.RecyclerView + android:id="@+id/recycler_view" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/background_dialer_white"/> +</LinearLayout>
\ No newline at end of file diff --git a/java/com/android/dialer/calldetails/res/layout/call_details_entry.xml b/java/com/android/dialer/calldetails/res/layout/call_details_entry.xml new file mode 100644 index 000000000..7f8bb8087 --- /dev/null +++ b/java/com/android/dialer/calldetails/res/layout/call_details_entry.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingTop="@dimen/call_entry_padding"> + + <ImageView + android:id="@+id/call_direction" + android:layout_width="@dimen/call_entry_icon_size" + android:layout_height="@dimen/call_entry_icon_size" + android:layout_marginStart="@dimen/call_entry_padding" + android:layout_marginEnd="@dimen/call_entry_left_margin"/> + + <TextView + android:id="@+id/call_type" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toEndOf="@+id/call_direction" + style="@style/PrimaryText"/> + + <TextView + android:id="@+id/call_time" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toEndOf="@id/call_direction" + android:layout_below="@+id/call_type" + android:layout_marginBottom="@dimen/call_entry_bottom_padding" + style="@style/SecondaryText"/> + + <TextView + android:id="@+id/call_duration" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentEnd="true" + android:layout_marginEnd="@dimen/call_entry_padding" + style="@style/PrimaryText"/> + + <include + layout="@layout/ec_data_container" + android:id="@+id/ec_container" + android:layout_height="@dimen/ec_container_height" + android:layout_width="match_parent" + android:layout_marginStart="@dimen/ec_text_left_margin" + android:layout_below="@+id/call_time" + android:visibility="gone"/> + + <View + android:id="@+id/divider" + android:layout_width="match_parent" + android:layout_height="1dp" + android:layout_below="@id/ec_container" + android:layout_marginTop="@dimen/ec_divider_top_bottom_margin" + android:layout_marginBottom="@dimen/ec_divider_top_bottom_margin" + android:layout_marginStart="@dimen/ec_text_left_margin" + android:background="#12000000" + android:visibility="gone"/> +</RelativeLayout>
\ No newline at end of file diff --git a/java/com/android/dialer/calldetails/res/layout/call_details_footer.xml b/java/com/android/dialer/calldetails/res/layout/call_details_footer.xml new file mode 100644 index 000000000..885cb0989 --- /dev/null +++ b/java/com/android/dialer/calldetails/res/layout/call_details_footer.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2015 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:orientation="vertical"> + + <View + android:layout_width="match_parent" + android:layout_height="1dp" + android:layout_marginTop="@dimen/ec_divider_top_bottom_margin" + android:layout_marginBottom="@dimen/ec_divider_top_bottom_margin" + android:background="#12000000"/> + + <TextView + android:id="@+id/call_detail_action_copy" + style="@style/CallDetailsActionItemStyle" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:drawableStart="@drawable/quantum_ic_content_copy_grey600_24" + android:text="@string/call_details_copy_number"/> + + <TextView + android:id="@+id/call_detail_action_edit_before_call" + style="@style/CallDetailsActionItemStyle" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:drawableStart="@drawable/quantum_ic_edit_grey600_24" + android:text="@string/call_details_edit_number"/> +</LinearLayout> diff --git a/java/com/android/dialer/calldetails/res/layout/contact_container.xml b/java/com/android/dialer/calldetails/res/layout/contact_container.xml new file mode 100644 index 000000000..95fe189b2 --- /dev/null +++ b/java/com/android/dialer/calldetails/res/layout/contact_container.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:padding="@dimen/contact_container_padding"> + + <QuickContactBadge + android:id="@+id/quick_contact_photo" + android:layout_width="@dimen/call_details_contact_photo_size" + android:layout_height="@dimen/call_details_contact_photo_size" + android:focusable="true"/> + + <TextView + android:id="@+id/contact_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/text_bottom_margin" + android:layout_marginStart="@dimen/photo_text_margin" + android:layout_toEndOf="@+id/quick_contact_photo" + android:layout_toStartOf="@+id/call_back_button" + style="@style/PrimaryText"/> + + <TextView + android:id="@+id/phone_number" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/photo_text_margin" + android:layout_toEndOf="@+id/quick_contact_photo" + android:layout_toStartOf="@+id/call_back_button" + android:layout_below="@+id/contact_name" + style="@style/SecondaryText"/> + + <ImageView + android:id="@+id/call_back_button" + android:layout_width="@dimen/call_back_button_size" + android:layout_height="@dimen/call_back_button_size" + android:layout_alignParentEnd="true" + android:layout_centerVertical="true" + android:background="?android:attr/selectableItemBackgroundBorderless" + android:contentDescription="@string/description_call_log_call_action" + android:src="@drawable/quantum_ic_call_white_24" + android:tint="@color/secondary_text_color"/> +</RelativeLayout>
\ No newline at end of file diff --git a/java/com/android/dialer/calldetails/res/layout/ec_data_container.xml b/java/com/android/dialer/calldetails/res/layout/ec_data_container.xml new file mode 100644 index 000000000..5ad7912fa --- /dev/null +++ b/java/com/android/dialer/calldetails/res/layout/ec_data_container.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="@dimen/ec_container_height"> + + <TextView + android:id="@+id/multimedia_details" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:maxLines="2" + style="@style/SecondaryText"/> + + <FrameLayout + android:id="@+id/multimedia_image_container" + android:layout_width="@dimen/ec_photo_size" + android:layout_height="@dimen/ec_photo_size" + android:layout_alignParentEnd="true" + android:layout_marginEnd="@dimen/call_entry_padding" + android:layout_centerVertical="true" + android:background="@drawable/multimedia_image_background" + android:outlineProvider="background" + android:visibility="gone"> + + <ImageView + android:id="@+id/multimedia_image" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:scaleType="centerCrop"/> + + <com.android.incallui.autoresizetext.AutoResizeTextView + android:id="@+id/multimedia_attachments_number" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:padding="4dp" + android:gravity="center" + android:textColor="@color/background_dialer_white" + android:textSize="100sp" + android:background="#80000000" + android:visibility="gone"/> + </FrameLayout> +</RelativeLayout>
\ No newline at end of file diff --git a/java/com/android/dialer/calldetails/res/menu/call_details_menu.xml b/java/com/android/dialer/calldetails/res/menu/call_details_menu.xml new file mode 100644 index 000000000..c2d1032da --- /dev/null +++ b/java/com/android/dialer/calldetails/res/menu/call_details_menu.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> +<menu xmlns:android="http://schemas.android.com/apk/res/android"> + <item + android:id="@+id/call_detail_delete_menu_item" + android:icon="@drawable/quantum_ic_delete_white_24" + android:title="@string/delete" + android:showAsAction="ifRoom"/> +</menu>
\ No newline at end of file diff --git a/java/com/android/dialer/calldetails/res/values/dimens.xml b/java/com/android/dialer/calldetails/res/values/dimens.xml new file mode 100644 index 000000000..b1a8f1c8e --- /dev/null +++ b/java/com/android/dialer/calldetails/res/values/dimens.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> +<resources> + <dimen name="text_bottom_margin">2dp</dimen> + <dimen name="call_details_primary_text_size">16sp</dimen> + <dimen name="call_details_secondary_text_size">14sp</dimen> + + <!-- contact container --> + <dimen name="contact_container_padding">16dp</dimen> + <dimen name="call_details_contact_photo_size">40dp</dimen> + <dimen name="photo_text_margin">16dp</dimen> + <dimen name="call_back_button_size">24dp</dimen> + + <!-- call entry container --> + <dimen name="call_entry_icon_size">24dp</dimen> + <dimen name="call_entry_padding">16dp</dimen> + <dimen name="call_entry_bottom_padding">14dp</dimen> + <dimen name="call_entry_left_margin">32dp</dimen> + + <!-- EC container --> + <dimen name="call_details_ec_text_size">12sp</dimen> + <dimen name="ec_container_height">48dp</dimen> + <dimen name="ec_text_left_margin">72dp</dimen> + <dimen name="ec_photo_size">40dp</dimen> + <dimen name="ec_divider_top_bottom_margin">8dp</dimen> +</resources>
\ No newline at end of file diff --git a/java/com/android/dialer/calldetails/res/values/strings.xml b/java/com/android/dialer/calldetails/res/values/strings.xml new file mode 100644 index 000000000..8a7cc4cfc --- /dev/null +++ b/java/com/android/dialer/calldetails/res/values/strings.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Title bar for call detail screen --> + <string name="call_details">Call details</string> + + <!-- Menu item in call details used to remove a call or voicemail from the call log. --> + <string name="delete">Delete</string> + + <!-- Option displayed in context menu to copy long pressed phone number. [CHAR LIMIT=48] --> + <string name="call_details_copy_number">Copy number</string> + + <!-- Label for action to edit a number before calling it. [CHAR LIMIT=48] --> + <string name="call_details_edit_number">Edit number before call</string> + + <!-- String describing the phone icon on a call log list item. When tapped, it will place a + call to the number represented by that call log entry. [CHAR LIMIT=NONE]--> + <string name="description_call_log_call_action">Call</string> + + <!-- String shown when the call details show a image that was sent --> + <string name="sent_a_photo">Sent a photo</string> + + <!-- String shown when the call details show a image that was received --> + <string name="received_a_photo">Received a photo</string> + + <!-- Messages shown to the user are wrapped in quotes, e.g. the user would see "Some text" --> + <string name="message_in_quotes">\"<xliff:g id="message">%1$s</xliff:g>\"</string> +</resources> diff --git a/java/com/android/dialer/calldetails/res/values/styles.xml b/java/com/android/dialer/calldetails/res/values/styles.xml new file mode 100644 index 000000000..4fffe1afb --- /dev/null +++ b/java/com/android/dialer/calldetails/res/values/styles.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> +<resources> + <style name="PrimaryText"> + <item name="android:textColor">#DE000000</item> + <item name="android:textSize">@dimen/call_details_primary_text_size</item> + <item name="android:maxLines">1</item> + </style> + + <style name="SecondaryText"> + <item name="android:textColor">#8A000000</item> + <item name="android:textSize">@dimen/call_details_secondary_text_size</item> + <item name="android:maxLines">1</item> + </style> + + <style name="ECText"> + <item name="android:textColor">#8A000000</item> + <item name="android:textSize">@dimen/call_details_ec_text_size</item> + <item name="android:maxLines">1</item> + </style> + + <style name="CallDetailsActionItemStyle"> + <item name="android:foreground">?android:attr/selectableItemBackground</item> + <item name="android:clickable">true</item> + <item name="android:drawablePadding">28dp</item> + <item name="android:gravity">center_vertical</item> + <item name="android:paddingStart">28dp</item> + <item name="android:paddingEnd">28dp</item> + <item name="android:paddingTop">16dp</item> + <item name="android:paddingBottom">16dp</item> + <item name="android:textColor">#8A000000</item> + <item name="android:textSize">14sp</item> + </style> +</resources>
\ No newline at end of file |