diff options
Diffstat (limited to 'java/com/android')
24 files changed, 17 insertions, 198 deletions
diff --git a/java/com/android/contacts/common/dialog/CallSubjectDialog.java b/java/com/android/contacts/common/dialog/CallSubjectDialog.java index 2ba2476a6..7bc13fe72 100644 --- a/java/com/android/contacts/common/dialog/CallSubjectDialog.java +++ b/java/com/android/contacts/common/dialog/CallSubjectDialog.java @@ -331,7 +331,7 @@ public class CallSubjectDialog extends Activity { mNumberView.setText( TextUtils.isEmpty(mNumberLabel) ? mDisplayNumber - : getString(R.string.call_subject_type_and_number, mNumberLabel, mDisplayNumber)); + : getString(R.string.old_call_subject_type_and_number, mNumberLabel, mDisplayNumber)); } else { mNumberView.setVisibility(View.GONE); mNumberView.setText(null); diff --git a/java/com/android/contacts/common/res/values/strings.xml b/java/com/android/contacts/common/res/values/strings.xml index 809439ee5..cf24a8867 100644 --- a/java/com/android/contacts/common/res/values/strings.xml +++ b/java/com/android/contacts/common/res/values/strings.xml @@ -395,7 +395,7 @@ <!-- String used to build a phone number type and phone number string. Example: Mobile 650-555-1212 --> - <string name="call_subject_type_and_number"><xliff:g example="Mobile" id="type">%1$s</xliff:g> <xliff:g example="(650) 555-1212" id="number">%2$s</xliff:g></string> + <string name="old_call_subject_type_and_number"><xliff:g example="Mobile" id="type">%1$s</xliff:g> <xliff:g example="(650) 555-1212" id="number">%2$s</xliff:g></string> <!-- String format to describe a tab e.g.call history tab. --> <string name="tab_title"><xliff:g id="title">%1$s</xliff:g> tab.</string> diff --git a/java/com/android/dialer/app/MainComponent.java b/java/com/android/dialer/app/MainComponent.java index 3bd48bf15..f8d457c5f 100644 --- a/java/com/android/dialer/app/MainComponent.java +++ b/java/com/android/dialer/app/MainComponent.java @@ -16,34 +16,21 @@ package com.android.dialer.app; -import android.annotation.TargetApi; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; -import android.os.Build; -import android.os.Build.VERSION_CODES; -import android.support.v4.content.pm.ShortcutInfoCompat; -import android.support.v4.content.pm.ShortcutManagerCompat; -import android.support.v4.graphics.drawable.IconCompat; import com.android.dialer.configprovider.ConfigProviderBindings; /** This class is a copy of dialer.main.impl.MainImpl to get around a dependency issue. */ public class MainComponent { - private static final String SHORTCUT_KEY = "nui_launcher_shortcut"; - public static boolean isNewUiEnabled(Context context) { return ConfigProviderBindings.get(context).getBoolean("is_nui_shortcut_enabled", false); } public static void createNewUiLauncherShortcut(Context context) { enableComponent(context); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - createLauncherShortcutO(context); - } else { - createLauncherShortcutPreO(context); - } } public static boolean isNuiComponentEnabled(Context context) { @@ -70,27 +57,6 @@ public class MainComponent { PackageManager.DONT_KILL_APP); } - @TargetApi(VERSION_CODES.O) - private static void createLauncherShortcutO(Context context) { - ShortcutInfoCompat shortcutInfo = - new ShortcutInfoCompat.Builder(context, SHORTCUT_KEY) - .setIcon(IconCompat.createWithResource(context, R.drawable.nui_launcher_icon)) - .setIntent(getIntent(context)) - .setShortLabel(context.getString(R.string.nui_shortcut_name)) - .build(); - ShortcutManagerCompat.requestPinShortcut(context, shortcutInfo, null); - } - - private static void createLauncherShortcutPreO(Context context) { - Intent intent = new Intent("com.android.launcher.action.INSTALL_SHORTCUT"); - intent.putExtra( - Intent.EXTRA_SHORTCUT_ICON, - Intent.ShortcutIconResource.fromContext(context, R.drawable.nui_launcher_icon)); - intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, context.getString(R.string.nui_shortcut_name)); - intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, getIntent(context)); - context.sendBroadcast(intent); - } - /** * @param context Context of the application package implementing MainActivity class. * @return intent for MainActivity.class diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_handle.png b/java/com/android/dialer/app/res/drawable-hdpi/old_ic_handle.png Binary files differindex 34310aa49..34310aa49 100644 --- a/java/com/android/dialer/app/res/drawable-hdpi/ic_handle.png +++ b/java/com/android/dialer/app/res/drawable-hdpi/old_ic_handle.png diff --git a/java/com/android/dialer/app/res/drawable-mdpi/ic_handle.png b/java/com/android/dialer/app/res/drawable-mdpi/old_ic_handle.png Binary files differindex 81a67ba6f..81a67ba6f 100644 --- a/java/com/android/dialer/app/res/drawable-mdpi/ic_handle.png +++ b/java/com/android/dialer/app/res/drawable-mdpi/old_ic_handle.png diff --git a/java/com/android/dialer/app/res/drawable-xhdpi/ic_handle.png b/java/com/android/dialer/app/res/drawable-xhdpi/old_ic_handle.png Binary files differindex 0ad839286..0ad839286 100644 --- a/java/com/android/dialer/app/res/drawable-xhdpi/ic_handle.png +++ b/java/com/android/dialer/app/res/drawable-xhdpi/old_ic_handle.png diff --git a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_handle.png b/java/com/android/dialer/app/res/drawable-xxhdpi/old_ic_handle.png Binary files differindex d07a1d057..d07a1d057 100644 --- a/java/com/android/dialer/app/res/drawable-xxhdpi/ic_handle.png +++ b/java/com/android/dialer/app/res/drawable-xxhdpi/old_ic_handle.png diff --git a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_handle.png b/java/com/android/dialer/app/res/drawable-xxxhdpi/old_ic_handle.png Binary files differindex 72641c7ab..72641c7ab 100644 --- a/java/com/android/dialer/app/res/drawable-xxxhdpi/ic_handle.png +++ b/java/com/android/dialer/app/res/drawable-xxxhdpi/old_ic_handle.png diff --git a/java/com/android/dialer/app/res/drawable/ic_voicemail_seek_handle.xml b/java/com/android/dialer/app/res/drawable/ic_voicemail_seek_handle.xml index 84cda0310..ffdd64edc 100644 --- a/java/com/android/dialer/app/res/drawable/ic_voicemail_seek_handle.xml +++ b/java/com/android/dialer/app/res/drawable/ic_voicemail_seek_handle.xml @@ -15,6 +15,6 @@ ~ limitations under the License --> <bitmap xmlns:android="http://schemas.android.com/apk/res/android" - android:src="@drawable/ic_handle" + android:src="@drawable/old_ic_handle" android:tint="@color/actionbar_background_color"> </bitmap>
\ No newline at end of file diff --git a/java/com/android/dialer/app/res/drawable/ic_voicemail_seek_handle_disabled.xml b/java/com/android/dialer/app/res/drawable/old_ic_voicemail_seek_handle_disabled.xml index 5e974c45a..cfce81812 100644 --- a/java/com/android/dialer/app/res/drawable/ic_voicemail_seek_handle_disabled.xml +++ b/java/com/android/dialer/app/res/drawable/old_ic_voicemail_seek_handle_disabled.xml @@ -15,6 +15,6 @@ ~ limitations under the License --> <bitmap xmlns:android="http://schemas.android.com/apk/res/android" - android:src="@drawable/ic_handle" + android:src="@drawable/old_ic_handle" android:tint="@color/voicemail_icon_disabled_tint"> </bitmap>
\ No newline at end of file diff --git a/java/com/android/dialer/app/res/values/strings.xml b/java/com/android/dialer/app/res/values/strings.xml index 7c883299c..e5092f001 100644 --- a/java/com/android/dialer/app/res/values/strings.xml +++ b/java/com/android/dialer/app/res/values/strings.xml @@ -718,8 +718,4 @@ <!-- If a user deletes a call that has attachments (photo, message, ect) bundled with it, they need to be told that they need to go to the SMS app to delete the attachments. [CHAR LIMIT=NONE] --> <string name="multiple_ec_data_deleted">Calls deleted. View and delete attachments shared during calls in Messages.</string> - - <!-- Name of launcher shortcut for the new UI main activity. - TODO(38502365): Remove this once we're ready to launch the new UI. --> - <string translatable="false" name="nui_shortcut_name">Phone NUI</string> </resources> diff --git a/java/com/android/dialer/app/voicemail/VoicemailPlaybackLayout.java b/java/com/android/dialer/app/voicemail/VoicemailPlaybackLayout.java index 05da8e752..009fb9e10 100644 --- a/java/com/android/dialer/app/voicemail/VoicemailPlaybackLayout.java +++ b/java/com/android/dialer/app/voicemail/VoicemailPlaybackLayout.java @@ -234,7 +234,7 @@ public class VoicemailPlaybackLayout extends LinearLayout getResources().getDrawable(R.drawable.ic_voicemail_seek_handle, context.getTheme()); voicemailSeekHandleDisabled = getResources() - .getDrawable(R.drawable.ic_voicemail_seek_handle_disabled, context.getTheme()); + .getDrawable(R.drawable.old_ic_voicemail_seek_handle_disabled, context.getTheme()); } @Override diff --git a/java/com/android/dialer/blocking/BlockNumberDialogFragment.java b/java/com/android/dialer/blocking/BlockNumberDialogFragment.java index dfd6ef076..621287f6c 100644 --- a/java/com/android/dialer/blocking/BlockNumberDialogFragment.java +++ b/java/com/android/dialer/blocking/BlockNumberDialogFragment.java @@ -137,7 +137,7 @@ public class BlockNumberDialogFragment extends DialogFragment { } else { title = ContactDisplayUtils.getTtsSpannedPhoneNumber( - getResources(), R.string.block_number_confirmation_title, displayNumber); + getResources(), R.string.old_block_number_confirmation_title, displayNumber); okText = getString(R.string.block_number_ok); if (FilteredNumberCompat.useNewFiltering(getContext())) { message = getString(R.string.block_number_confirmation_message_new_filtering); diff --git a/java/com/android/dialer/blocking/res/values/strings.xml b/java/com/android/dialer/blocking/res/values/strings.xml index 7b344da4a..e5f6c8000 100644 --- a/java/com/android/dialer/blocking/res/values/strings.xml +++ b/java/com/android/dialer/blocking/res/values/strings.xml @@ -29,7 +29,7 @@ </string> <!-- Confirmation dialog title for blocking a number. [CHAR LIMIT=NONE] --> - <string name="block_number_confirmation_title"> + <string name="old_block_number_confirmation_title"> Block<xliff:g example="(555) 555-5555" id="number">%1$s</xliff:g>? </string> diff --git a/java/com/android/dialer/historyitemactions/SharedModules.java b/java/com/android/dialer/historyitemactions/SharedModules.java index fa7062653..468661feb 100644 --- a/java/com/android/dialer/historyitemactions/SharedModules.java +++ b/java/com/android/dialer/historyitemactions/SharedModules.java @@ -179,7 +179,7 @@ public class SharedModules { @Override public int getDrawableId() { return isBlocked - ? R.drawable.ic_unblock // TODO(a bug): use a vector icon + ? R.drawable.bottomsheet_unblock // TODO(a bug): use a vector icon : R.drawable.quantum_ic_block_vd_theme_24; } diff --git a/java/com/android/dialer/historyitemactions/res/drawable-xxxhdpi/ic_unblock.png b/java/com/android/dialer/historyitemactions/res/drawable-xxxhdpi/bottomsheet_unblock.png Binary files differindex 01551e2fc..01551e2fc 100644 --- a/java/com/android/dialer/historyitemactions/res/drawable-xxxhdpi/ic_unblock.png +++ b/java/com/android/dialer/historyitemactions/res/drawable-xxxhdpi/bottomsheet_unblock.png diff --git a/java/com/android/dialer/main/impl/MainImpl.java b/java/com/android/dialer/main/impl/MainImpl.java index 1cd457c8a..717350e5f 100644 --- a/java/com/android/dialer/main/impl/MainImpl.java +++ b/java/com/android/dialer/main/impl/MainImpl.java @@ -16,23 +16,15 @@ package com.android.dialer.main.impl; -import android.annotation.TargetApi; import android.content.ComponentName; import android.content.Context; -import android.content.Intent; import android.content.pm.PackageManager; -import android.os.Build; -import android.os.Build.VERSION_CODES; -import android.support.v4.content.pm.ShortcutInfoCompat; -import android.support.v4.content.pm.ShortcutManagerCompat; -import android.support.v4.graphics.drawable.IconCompat; import com.android.dialer.configprovider.ConfigProviderBindings; import com.android.dialer.main.Main; import javax.inject.Inject; /** The entry point for the main feature. */ final class MainImpl implements Main { - private static final String SHORTCUT_KEY = "nui_launcher_shortcut"; @Inject MainImpl() {} @@ -45,11 +37,6 @@ final class MainImpl implements Main { @Override public void createNewUiLauncherShortcut(Context context) { enableComponent(context); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - createLauncherShortcutO(context); - } else { - createLauncherShortcutPreO(context); - } } /** @@ -75,25 +62,4 @@ final class MainImpl implements Main { PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP); } - - @TargetApi(VERSION_CODES.O) - private static void createLauncherShortcutO(Context context) { - ShortcutInfoCompat shortcutInfo = - new ShortcutInfoCompat.Builder(context, SHORTCUT_KEY) - .setIcon(IconCompat.createWithResource(context, R.drawable.nui_launcher_icon)) - .setIntent(MainActivity.getIntent(context)) - .setShortLabel(context.getString(R.string.nui_shortcut_name)) - .build(); - ShortcutManagerCompat.requestPinShortcut(context, shortcutInfo, null); - } - - private static void createLauncherShortcutPreO(Context context) { - Intent intent = new Intent("com.android.launcher.action.INSTALL_SHORTCUT"); - intent.putExtra( - Intent.EXTRA_SHORTCUT_ICON, - Intent.ShortcutIconResource.fromContext(context, R.drawable.nui_launcher_icon)); - intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, context.getString(R.string.nui_shortcut_name)); - intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, MainActivity.getIntent(context)); - context.sendBroadcast(intent); - } } diff --git a/java/com/android/dialer/main/impl/res/values/strings.xml b/java/com/android/dialer/main/impl/res/values/strings.xml index 4e65432e5..121820383 100644 --- a/java/com/android/dialer/main/impl/res/values/strings.xml +++ b/java/com/android/dialer/main/impl/res/values/strings.xml @@ -18,10 +18,6 @@ <!-- Name of the main activity. --> <string name="main_activity_label" tools:ignore="UnusedResources">Phone</string> - <!-- Name of launcher shortcut for the new UI main activity. - TODO(38502365): Remove this once we're ready to launch the new UI. --> - <string name="nui_shortcut_name">Phone NUI</string> - <!-- Title for the activity that dials the phone, when launched directly into the dialpad --> <string name="dialpad_activity_title">Phone Keypad</string> diff --git a/java/com/android/dialer/main/impl/res/values/styles.xml b/java/com/android/dialer/main/impl/res/values/styles.xml index 47fdbac93..387b1d79e 100644 --- a/java/com/android/dialer/main/impl/res/values/styles.xml +++ b/java/com/android/dialer/main/impl/res/values/styles.xml @@ -46,12 +46,12 @@ <!-- Required for actionmode/multiselect to render properly. --> <!-- TODO(calderwoodra): Check to see if we can remove this after NewVoicemailFragment launches --> - <item name="actionModeStyle">@style/ActionModeStyle</item> + <item name="actionModeStyle">@style/NuiActionModeStyle</item> <item name="actionBarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item> </style> <!-- Colors our actionbar in action mode to dialer theme color. --> - <style name="ActionModeStyle" parent="@style/Widget.AppCompat.ActionMode"> + <style name="NuiActionModeStyle" parent="@style/Widget.AppCompat.ActionMode"> <item name="background">@color/dialer_theme_color</item> <item name="titleTextStyle">@style/ActionModeTitleTextStyle</item> </style> diff --git a/java/com/android/dialer/searchfragment/directories/res/values/strings.xml b/java/com/android/dialer/searchfragment/directories/res/values/strings.xml index 097f353ea..beabba135 100644 --- a/java/com/android/dialer/searchfragment/directories/res/values/strings.xml +++ b/java/com/android/dialer/searchfragment/directories/res/values/strings.xml @@ -17,10 +17,4 @@ <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- Label for a list of contacts stored in a seperate directory [CHAR LIMIT=30]--> <string name="directory">Directory <xliff:g example="google.com" id="email">%1$s</xliff:g></string> - - <!-- String used to build a phone number type and phone number string. - Example: Mobile 650-555-1212 --> - <string name="call_subject_type_and_number"> - <xliff:g example="Mobile" id="type">%1$s</xliff:g> <xliff:g example="(650) 555-1212" id="number">%2$s</xliff:g> - </string> </resources>
\ No newline at end of file diff --git a/java/com/android/dialer/speeddial/SuggestionViewHolder.java b/java/com/android/dialer/speeddial/SuggestionViewHolder.java index 68c0ce4c3..213a54f55 100644 --- a/java/com/android/dialer/speeddial/SuggestionViewHolder.java +++ b/java/com/android/dialer/speeddial/SuggestionViewHolder.java @@ -63,8 +63,7 @@ public class SuggestionViewHolder extends RecyclerView.ViewHolder implements OnC String secondaryInfo = TextUtils.isEmpty(label) ? number - : context.getString( - com.android.contacts.common.R.string.call_subject_type_and_number, label, number); + : context.getString(R.string.call_subject_type_and_number, label, number); nameOrNumberView.setText(name); numberView.setText(secondaryInfo); diff --git a/java/com/android/dialer/theme/res/values/strings.xml b/java/com/android/dialer/theme/res/values/strings.xml index a14693f51..6194751ef 100644 --- a/java/com/android/dialer/theme/res/values/strings.xml +++ b/java/com/android/dialer/theme/res/values/strings.xml @@ -32,4 +32,10 @@ <!-- Label shown on the 'positive' button for the dialog. Indicates that the call will proceed --> <string name="call">Call</string> + + <!-- String used to build a phone number type and phone number string. + Example: Mobile 650-555-1212 --> + <string name="call_subject_type_and_number"> + <xliff:g example="Mobile" id="type">%1$s</xliff:g> <xliff:g example="(650) 555-1212" id="number">%2$s</xliff:g> + </string> </resources> diff --git a/java/com/android/dialer/voicemail/listui/res/layout/voicemail_tos_fragment.xml b/java/com/android/dialer/voicemail/listui/res/layout/voicemail_tos_fragment.xml deleted file mode 100644 index d78d193fd..000000000 --- a/java/com/android/dialer/voicemail/listui/res/layout/voicemail_tos_fragment.xml +++ /dev/null @@ -1,102 +0,0 @@ -<?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:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical"> - - <ScrollView - android:id="@+id/voicemail_tos_message" - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1" - android:orientation="vertical"> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingLeft="16dp" - android:paddingRight="16dp" - android:paddingTop="32dp" - android:orientation="vertical"> - <ImageView - android:id="@+id/voicemail_image" - android:layout_width="@dimen/voicemail_tos_image_size" - android:layout_height="@dimen/voicemail_tos_image_size" - android:layout_gravity="center" - android:paddingBottom="32dp" - android:importantForAccessibility="no"/> - <TextView - android:id="@+id/tos_message_title" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center_horizontal|top" - android:minHeight="20dp" - android:text="@string/verizon_terms_and_conditions_title" - style="@style/TosTitleStyle"/> - <TextView - android:id="@+id/tos_message_details" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingTop="16dp" - android:paddingBottom="16dp" - android:text="@string/verizon_terms_and_conditions_1.1_english" - style="@style/TosTextStyle"/> - </LinearLayout> - </ScrollView> - - <View - android:layout_width="match_parent" - android:layout_height="0.5dp" - android:elevation="1dp" - android:background="@drawable/shadow"/> - - <LinearLayout - android:id="@+id/voicemail_tos_button" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center_vertical" - android:minHeight="56dp" - android:paddingStart="16dp" - android:paddingEnd="16dp" - android:paddingTop="4dp" - android:paddingBottom="4dp" - android:background="#ffffffff" - android:orientation="horizontal"> - <Button - android:id="@+id/voicemail_tos_button_decline" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/verizon_terms_and_conditions_decline_english" - android:textColor="#757575" - style="@style/TosButtonStyle"/> - - <android.support.v4.widget.Space - android:layout_width="8dp" - android:layout_height="match_parent" - android:layout_weight="1"/> - - - <Button - android:id="@+id/voicemail_tos_button_accept" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/verizon_terms_and_conditions_accept_english" - android:textColor="@color/dialer_theme_color" - style="@style/TosButtonStyle"/> - - </LinearLayout> - -</LinearLayout> diff --git a/java/com/android/dialer/voicemail/listui/res/values/strings.xml b/java/com/android/dialer/voicemail/listui/res/values/strings.xml index 322912eb2..dc54daa19 100644 --- a/java/com/android/dialer/voicemail/listui/res/values/strings.xml +++ b/java/com/android/dialer/voicemail/listui/res/values/strings.xml @@ -35,8 +35,6 @@ <!-- Header in voicemail tab to group calls from before yesterday. [CHAR LIMIT=30] --> <string name="new_voicemail_header_older">Older</string> - <string name="verizon_terms_and_conditions_title" translatable="false">Turn on visual voicemail</string> - <string translatable="false" name="verizon_terms_and_conditions_1.1_english"> Visual Voice Mail (VVM) is a service that provides access to voice mail messages directly on the device, without the need to call *86. This service requires traditional Voice Mail but does not support all traditional Voice Mail features, which you can access by dialing *86 from your handset. Use of this feature will be billed on a per-megabyte basis, or according to any data package you have. Mobile to mobile minutes do not apply. Standard rates apply to any calls, emails or messages initiated from Visual Voice Mail.\n \n |