Loading java/com/android/dialer/oem/res/values/motorola_config.xml +1 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ used for different carriers--> <string-array name="cequint_providers"> <item>com.cequint.ecid</item> <item>com.vzw.ecid</item> </string-array> <!-- Flag to control whether to disable phone number formatting --> Loading java/com/android/dialer/spam/promo/SpamBlockingPromoHelper.java +4 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.app.Notification.Builder; import android.app.PendingIntent; import android.content.Context; import android.content.DialogInterface.OnDismissListener; import android.graphics.drawable.Icon; import android.support.design.widget.Snackbar; import android.support.v4.os.BuildCompat; import android.view.View; Loading Loading @@ -179,6 +180,8 @@ public class SpamBlockingPromoHelper { .setPriority(Notification.PRIORITY_DEFAULT) .setColor(context.getColor(R.color.dialer_theme_color)) .setSmallIcon(R.drawable.quantum_ic_call_vd_theme_24) .setLargeIcon(Icon.createWithResource(context, R.drawable.spam_blocking_promo_icon)) .setContentText(context.getString(R.string.spam_blocking_promo_text)) .setStyle( new Notification.BigTextStyle() .bigText(context.getString(R.string.spam_blocking_promo_text))) Loading @@ -196,3 +199,4 @@ public class SpamBlockingPromoHelper { return builder.build(); } } java/com/android/dialer/spam/promo/res/drawable/spam_blocking_promo_icon.xml 0 → 100644 +34 −0 Original line number Diff line number Diff line <?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 --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="oval"> <solid android:color="@color/incall_call_spam_background_color"/> <size android:height="@android:dimen/notification_large_icon_height" android:width="@android:dimen/notification_large_icon_width"/> </shape> </item> <item android:drawable="@drawable/quantum_ic_report_white_36" android:gravity="center"/> </layer-list> java/com/android/dialer/spam/promo/res/values/strings.xml +4 −3 Original line number Diff line number Diff line Loading @@ -17,9 +17,10 @@ <resources> <!-- Title for the spam blocking promo dialog. [CHAR LIMIT=100] --> <string name="spam_blocking_promo_title">Also filter suspected spam calls?</string> <!-- Text for the spam blocking promo dialog. [CHAR LIMIT=100] --> <string name="spam_blocking_promo_text">You won\'t be disturbed by incoming suspected spam calls</string> <string name="spam_blocking_promo_title">Filter all suspected spam calls?</string> <!-- Text for the spam blocking promo dialog. [CHAR LIMIT=NONE] --> <string name="spam_blocking_promo_text">Calls like the one you just blocked will no longer disturb you</string> <!-- Label for filter spam dialog action. [CHAR LIMIT=32] --> <string name="spam_blocking_promo_action_filter_spam">Filter Spam</string> <!-- Label for "Dismiss" dialog action. [CHAR LIMIT=32] --> Loading java/com/android/dialer/telecom/TelecomUtil.java +3 −2 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ import java.util.concurrent.ConcurrentHashMap; * perform the required check and return the fallback default if the permission is missing, * otherwise return the value from TelecomManager. */ @SuppressWarnings("MissingPermission") @SuppressWarnings({"MissingPermission", "Guava"}) public abstract class TelecomUtil { private static final String TAG = "TelecomUtil"; Loading Loading @@ -145,7 +145,8 @@ public abstract class TelecomUtil { public static List<PhoneAccountHandle> getCallCapablePhoneAccounts(Context context) { if (hasReadPhoneStatePermission(context)) { return getTelecomManager(context).getCallCapablePhoneAccounts(); return Optional.fromNullable(getTelecomManager(context).getCallCapablePhoneAccounts()) .or(new ArrayList<>()); } return new ArrayList<>(); } Loading Loading
java/com/android/dialer/oem/res/values/motorola_config.xml +1 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ used for different carriers--> <string-array name="cequint_providers"> <item>com.cequint.ecid</item> <item>com.vzw.ecid</item> </string-array> <!-- Flag to control whether to disable phone number formatting --> Loading
java/com/android/dialer/spam/promo/SpamBlockingPromoHelper.java +4 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.app.Notification.Builder; import android.app.PendingIntent; import android.content.Context; import android.content.DialogInterface.OnDismissListener; import android.graphics.drawable.Icon; import android.support.design.widget.Snackbar; import android.support.v4.os.BuildCompat; import android.view.View; Loading Loading @@ -179,6 +180,8 @@ public class SpamBlockingPromoHelper { .setPriority(Notification.PRIORITY_DEFAULT) .setColor(context.getColor(R.color.dialer_theme_color)) .setSmallIcon(R.drawable.quantum_ic_call_vd_theme_24) .setLargeIcon(Icon.createWithResource(context, R.drawable.spam_blocking_promo_icon)) .setContentText(context.getString(R.string.spam_blocking_promo_text)) .setStyle( new Notification.BigTextStyle() .bigText(context.getString(R.string.spam_blocking_promo_text))) Loading @@ -196,3 +199,4 @@ public class SpamBlockingPromoHelper { return builder.build(); } }
java/com/android/dialer/spam/promo/res/drawable/spam_blocking_promo_icon.xml 0 → 100644 +34 −0 Original line number Diff line number Diff line <?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 --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="oval"> <solid android:color="@color/incall_call_spam_background_color"/> <size android:height="@android:dimen/notification_large_icon_height" android:width="@android:dimen/notification_large_icon_width"/> </shape> </item> <item android:drawable="@drawable/quantum_ic_report_white_36" android:gravity="center"/> </layer-list>
java/com/android/dialer/spam/promo/res/values/strings.xml +4 −3 Original line number Diff line number Diff line Loading @@ -17,9 +17,10 @@ <resources> <!-- Title for the spam blocking promo dialog. [CHAR LIMIT=100] --> <string name="spam_blocking_promo_title">Also filter suspected spam calls?</string> <!-- Text for the spam blocking promo dialog. [CHAR LIMIT=100] --> <string name="spam_blocking_promo_text">You won\'t be disturbed by incoming suspected spam calls</string> <string name="spam_blocking_promo_title">Filter all suspected spam calls?</string> <!-- Text for the spam blocking promo dialog. [CHAR LIMIT=NONE] --> <string name="spam_blocking_promo_text">Calls like the one you just blocked will no longer disturb you</string> <!-- Label for filter spam dialog action. [CHAR LIMIT=32] --> <string name="spam_blocking_promo_action_filter_spam">Filter Spam</string> <!-- Label for "Dismiss" dialog action. [CHAR LIMIT=32] --> Loading
java/com/android/dialer/telecom/TelecomUtil.java +3 −2 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ import java.util.concurrent.ConcurrentHashMap; * perform the required check and return the fallback default if the permission is missing, * otherwise return the value from TelecomManager. */ @SuppressWarnings("MissingPermission") @SuppressWarnings({"MissingPermission", "Guava"}) public abstract class TelecomUtil { private static final String TAG = "TelecomUtil"; Loading Loading @@ -145,7 +145,8 @@ public abstract class TelecomUtil { public static List<PhoneAccountHandle> getCallCapablePhoneAccounts(Context context) { if (hasReadPhoneStatePermission(context)) { return getTelecomManager(context).getCallCapablePhoneAccounts(); return Optional.fromNullable(getTelecomManager(context).getCallCapablePhoneAccounts()) .or(new ArrayList<>()); } return new ArrayList<>(); } Loading