summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/blocking/res
diff options
context:
space:
mode:
authorlinyuh <linyuh@google.com>2018-02-26 10:56:21 -0800
committerCopybara-Service <copybara-piper@google.com>2018-02-26 10:57:18 -0800
commit719341fb552ddb1b1e955e0f8ace79ffc0491b67 (patch)
treed570f076bea55bc2446a3edd3c50d1b6bc023d8a /java/com/android/dialer/blocking/res
parent19a126b0c12c0ea93ffe7f60f3250e81aa305785 (diff)
Implement logic of bottom sheet options related to spam numbers.
Bug: 70989605 Test: ShowBlockReportSpamDialogNotifierEndToEndTest + Manual PiperOrigin-RevId: 187047450 Change-Id: I23c3929135bcfe5c14fe317ef65f628dc126027f
Diffstat (limited to 'java/com/android/dialer/blocking/res')
-rw-r--r--java/com/android/dialer/blocking/res/layout/block_report_spam_dialog.xml36
-rw-r--r--java/com/android/dialer/blocking/res/values/colors.xml3
-rw-r--r--java/com/android/dialer/blocking/res/values/dimens.xml18
-rw-r--r--java/com/android/dialer/blocking/res/values/strings.xml88
4 files changed, 33 insertions, 112 deletions
diff --git a/java/com/android/dialer/blocking/res/layout/block_report_spam_dialog.xml b/java/com/android/dialer/blocking/res/layout/block_report_spam_dialog.xml
deleted file mode 100644
index 82e8d80b3..000000000
--- a/java/com/android/dialer/blocking/res/layout/block_report_spam_dialog.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 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="wrap_content"
- android:layout_height="wrap_content"
- android:padding="25dp"
- android:orientation="vertical">
- <TextView
- android:id="@+id/block_details"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="10dp"
- android:text="@string/block_report_number_alert_details"
- android:textColor="@color/block_report_spam_primary_text_color"
- android:textSize="@dimen/blocked_report_spam_primary_text_size"/>
-
- <CheckBox
- android:id="@+id/report_number_as_spam_action"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/checkbox_report_as_spam_action"
- android:textSize="@dimen/blocked_report_spam_primary_text_size"/>
-</LinearLayout>
diff --git a/java/com/android/dialer/blocking/res/values/colors.xml b/java/com/android/dialer/blocking/res/values/colors.xml
index d1a567d9e..374ba8d14 100644
--- a/java/com/android/dialer/blocking/res/values/colors.xml
+++ b/java/com/android/dialer/blocking/res/values/colors.xml
@@ -15,9 +15,6 @@
-->
<resources>
- <!-- 87% black -->
- <color name="block_report_spam_primary_text_color">#de000000</color>
-
<!-- Note, this is also used by InCallUi. -->
<color name="blocked_contact_background">#A52714</color>
diff --git a/java/com/android/dialer/blocking/res/values/dimens.xml b/java/com/android/dialer/blocking/res/values/dimens.xml
deleted file mode 100644
index cd7cfe2fd..000000000
--- a/java/com/android/dialer/blocking/res/values/dimens.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<!--
- ~ Copyright (C) 2012 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="blocked_report_spam_primary_text_size">16sp</dimen>
-</resources>
diff --git a/java/com/android/dialer/blocking/res/values/strings.xml b/java/com/android/dialer/blocking/res/values/strings.xml
index 8abff4561..a660731b4 100644
--- a/java/com/android/dialer/blocking/res/values/strings.xml
+++ b/java/com/android/dialer/blocking/res/values/strings.xml
@@ -24,54 +24,59 @@
<!-- Positive confirmation button for the dialog which opens when the user needs to migrate to the framework blocking implementation [CHAR LIMIT=NONE]-->
<string name="migrate_blocked_numbers_dialog_allow_button">Allow</string>
- <!-- Do not translate -->
- <string name="migrate_blocked_numbers_dialog_cancel_button">@android:string/cancel</string>
+ <string name="migrate_blocked_numbers_dialog_cancel_button" translatable="false">
+ @android:string/cancel
+ </string>
<!-- Confirmation dialog title for blocking a number. [CHAR LIMIT=NONE] -->
- <string name="block_number_confirmation_title">Block
- <xliff:g example="(555) 555-5555" id="number">%1$s</xliff:g>?</string>
+ <string name="block_number_confirmation_title">
+ Block<xliff:g example="(555) 555-5555" id="number">%1$s</xliff:g>?
+ </string>
<!-- Confirmation dialog message for blocking a number with visual voicemail active.
[CHAR LIMIT=NONE] -->
- <string name="block_number_confirmation_message_vvm">
- Calls from this number will be blocked and voicemails will be automatically deleted.
- </string>
+ <string name="block_number_confirmation_message_vvm">
+ Calls from this number will be blocked and voicemails will be automatically deleted.
+ </string>
<!-- Confirmation dialog message for blocking a number with no visual voicemail.
[CHAR LIMIT=NONE] -->
- <string name="block_number_confirmation_message_no_vvm">
- Calls from this number will be blocked, but the caller may still be able to leave you voicemails.
- </string>
+ <string name="block_number_confirmation_message_no_vvm">
+ Calls from this number will be blocked, but the caller may still be able to leave you voicemails.
+ </string>
<!-- Confirmation dialog message for blocking a number with new filtering enabled.
[CHAR LIMIT=NONE] -->
- <string name="block_number_confirmation_message_new_filtering">
- You will no longer receive calls or texts from this number.
- </string>
+ <string name="block_number_confirmation_message_new_filtering">
+ You will no longer receive calls or texts from this number.
+ </string>
<!-- Block number alert dialog button [CHAR LIMIT=32] -->
<string name="block_number_ok">BLOCK</string>
<!-- Confirmation dialog for unblocking a number. [CHAR LIMIT=NONE] -->
- <string name="unblock_number_confirmation_title">Unblock
- <xliff:g example="(555) 555-5555" id="number">%1$s</xliff:g>?</string>
+ <string name="unblock_number_confirmation_title">
+ Unblock<xliff:g example="(555) 555-5555" id="number">%1$s</xliff:g>?
+ </string>
<!-- Unblock number alert dialog button [CHAR LIMIT=32] -->
<string name="unblock_number_ok">UNBLOCK</string>
<!-- Error message shown when user tries to add invalid number to the block list.
[CHAR LIMIT=64] -->
- <string name="invalidNumber"><xliff:g example="(555) 555-5555" id="number">%1$s</xliff:g>
- is invalid.</string>
+ <string name="invalidNumber">
+ <xliff:g example="(555) 555-5555" id="number">%1$s</xliff:g>is invalid.
+ </string>
<!-- Text for snackbar to undo blocking a number. [CHAR LIMIT=64] -->
- <string name="snackbar_number_blocked">
- <xliff:g example="(555) 555-5555" id="number">%1$s</xliff:g> blocked</string>
+ <string name="snackbar_number_blocked">
+ <xliff:g example="(555) 555-5555" id="number">%1$s</xliff:g> blocked
+ </string>
<!-- Text for snackbar to undo unblocking a number. [CHAR LIMIT=64] -->
- <string name="snackbar_number_unblocked">
- <xliff:g example="(555) 555-5555" id="number">%1$s</xliff:g>
- unblocked</string>
+ <string name="snackbar_number_unblocked">
+ <xliff:g example="(555) 555-5555" id="number">%1$s</xliff:g>unblocked
+ </string>
<!-- Text for undo button in snackbar for blocking/unblocking number. [CHAR LIMIT=10] -->
<string name="block_number_undo">UNDO</string>
@@ -81,42 +86,15 @@
<!-- Title of notification telling the user that call blocking has been temporarily disabled.
[CHAR LIMIT=56] -->
- <string name="call_blocking_disabled_notification_title">
- Call blocking disabled for 48 hours
- </string>
+ <string name="call_blocking_disabled_notification_title">
+ Call blocking disabled for 48 hours
+ </string>
<!-- Text for notification which provides the reason that call blocking has been temporarily
disabled. Namely, we disable call blocking after an emergency call in case of return
phone calls made by emergency services. [CHAR LIMIT=64] -->
- <string name="call_blocking_disabled_notification_text">
- Disabled because an emergency call was made.
- </string>
-
- <!-- Title of alert dialog after clicking on Block/report as spam. [CHAR LIMIT=100] -->
- <string name="block_report_number_alert_title">Block <xliff:g id="number">%1$s</xliff:g>?</string>
-
- <!-- Text in alert dialog after clicking on Block/report as spam. [CHAR LIMIT=100] -->
- <string name="block_report_number_alert_details">You will no longer receive calls from this number.</string>
-
- <!-- Text in alert dialog after clicking on Block. [CHAR LIMIT=100] -->
- <string name="block_number_alert_details"><xliff:g id="text">%1$s</xliff:g> This call will be reported as spam.</string>
-
- <!-- Text in alert dialog after clicking on Unblock. [CHAR LIMIT=100] -->
- <string name="unblock_number_alert_details">This number will be unblocked and reported as not spam. Future calls won\'t be identified as spam.</string>
-
- <!-- Title of alert dialog after clicking on Unblock. [CHAR LIMIT=100] -->
- <string name="unblock_report_number_alert_title">Unblock <xliff:g id="number">%1$s</xliff:g>?</string>
-
- <!-- Report not spam number alert dialog button [CHAR LIMIT=32] -->
- <string name="report_not_spam_alert_button">Report</string>
-
- <!-- Title of alert dialog after clicking on Report as not spam. [CHAR LIMIT=100] -->
- <string name="report_not_spam_alert_title">Report a mistake?</string>
-
- <!-- Text in alert dialog after clicking on Report as not spam. [CHAR LIMIT=100] -->
- <string name="report_not_spam_alert_details">Future calls from <xliff:g id="number">%1$s</xliff:g> will no longer be identified as spam.</string>
-
- <!-- Label for checkbox in the Alert dialog to allow the user to report the number as spam as well. [CHAR LIMIT=30] -->
- <string name="checkbox_report_as_spam_action">Report call as spam</string>
+ <string name="call_blocking_disabled_notification_text">
+ Disabled because an emergency call was made.
+ </string>
</resources>