Merge "Remove usages of hidden resources in Telephony"
diff --git a/res/drawable/preference_background.xml b/res/drawable/preference_background.xml
index 19ca432..1ec90fb 100644
--- a/res/drawable/preference_background.xml
+++ b/res/drawable/preference_background.xml
@@ -21,7 +21,7 @@
android:insetBottom="0dip">
<shape android:shape="rectangle">
- <solid android:color="@*android:color/background_material_light" />
+ <solid android:color="@color/background_material_light" />
</shape>
</inset>
diff --git a/res/drawable/progress_indeterminate_horizontal_material_trimmed.xml b/res/drawable/progress_indeterminate_horizontal_material_trimmed.xml
deleted file mode 100644
index 905dc55..0000000
--- a/res/drawable/progress_indeterminate_horizontal_material_trimmed.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?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.
--->
-
-<!-- Variant of progress_indeterminate_horizontal_material in frameworks/base/core/res, which
- draws the whole height of the progress bar instead having blank space above and below the
- bar. -->
-<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:drawable="@drawable/vector_drawable_progress_indeterminate_horizontal_trimmed" >
- <target
- android:name="rect2_grp"
- android:animation="@*android:anim/progress_indeterminate_horizontal_rect2" />
- <target
- android:name="rect1_grp"
- android:animation="@*android:anim/progress_indeterminate_horizontal_rect1" />
-</animated-vector>
\ No newline at end of file
diff --git a/res/layout/choose_network_progress_header.xml b/res/layout/choose_network_progress_header.xml
deleted file mode 100644
index 671c297..0000000
--- a/res/layout/choose_network_progress_header.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?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.
--->
-
-<FrameLayout
- android:layout_width="match_parent"
- android:layout_height="3dp"
- xmlns:android="http://schemas.android.com/apk/res/android">
- <View
- android:id="@+id/progress_bar_background"
- style="@style/TrimmedHorizontalProgressBar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="?android:attr/colorSecondary" />
- <ProgressBar
- android:id="@+id/progress_bar_animation"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- style="@style/TrimmedHorizontalProgressBar"
- android:indeterminate="true" />
-</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/pref_dialog_editpin.xml b/res/layout/pref_dialog_editpin.xml
deleted file mode 100644
index 94cdadf..0000000
--- a/res/layout/pref_dialog_editpin.xml
+++ /dev/null
@@ -1,31 +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.
--->
-
-<!-- Layout used as the dialog's content View for EditTextPreference. -->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@*android:id/edittext_container"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:padding="?android:attr/dialogPreferredPadding">
-
- <TextView android:id="@android:id/message"
- style="?android:attr/textAppearanceSmall"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textColor="?android:attr/textColorSecondary" />
-
-</LinearLayout>
diff --git a/res/values-night/styles.xml b/res/values-night/styles.xml
index fa5c8a1..f7d831b 100644
--- a/res/values-night/styles.xml
+++ b/res/values-night/styles.xml
@@ -27,31 +27,31 @@
<item name="android:dialogTheme">@style/DialerAlertDialogTheme</item>
</style>
- <style name="EmergencyInfoNameTextAppearance">
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
+ <style name="EmergencyInfoNameTextAppearance"
+ parent="@android:style/TextAppearance.Material.Subhead">
<item name="android:textColor">@android:color/white</item>
<item name="android:textSize">@dimen/emergency_info_name_text_size</item>
</style>
- <style name="EmergencyInfoHintTextAppearance">
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
+ <style name="EmergencyInfoHintTextAppearance"
+ parent="@android:style/TextAppearance.Material.Subhead">
<item name="android:textColor">@color/white_70_percent</item>
<item name="android:textSize">@dimen/emergency_info_hint_text_size</item>
</style>
- <style name="EmergencyInfoTapHintTextAppearance">
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
+ <style name="EmergencyInfoTapHintTextAppearance"
+ parent="@android:style/TextAppearance.Material.Subhead">
<item name="android:textColor">@android:color/white</item>
<item name="android:textSize">@dimen/emergency_info_tap_hint_text_size</item>
</style>
- <style name="ShortcutViewHintTextAppearance">
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
+ <style name="ShortcutViewHintTextAppearance"
+ parent="@android:style/TextAppearance.Material.Subhead">
<item name="android:textColor">@android:color/white</item>
</style>
- <style name="PhoneNumberTextAppearance">
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
+ <style name="PhoneNumberTextAppearance"
+ parent="@android:style/TextAppearance.Material.Subhead">
<item name="android:textColor">@android:color/white</item>
<item name="android:textSize">@dimen/emergency_shortcut_number_text_size</item>
</style>
@@ -62,8 +62,8 @@
<item name="android:textSize">@dimen/emergency_shortcut_type_text_size</item>
</style>
- <style name="PhoneNumberTapHintAppearance">
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
+ <style name="PhoneNumberTapHintAppearance"
+ parent="@android:style/TextAppearance.Material.Subhead">
<item name="android:textColor">@android:color/white</item>
<item name="android:textSize">@dimen/emergency_shortcut_tap_hint_text_size</item>
</style>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index a9ed307..d131bd8 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -211,12 +211,6 @@
<item name="android:textColor">?android:attr/textColorPrimaryInverseDisableOnly</item>
</style>
- <style name="TrimmedHorizontalProgressBar" parent="android:Widget.Material.ProgressBar.Horizontal">
- <item name="android:indeterminateDrawable">@drawable/progress_indeterminate_horizontal_material_trimmed</item>
- <item name="android:minHeight">3dip</item>
- <item name="android:maxHeight">3dip</item>
- </style>
-
<style name="Empty" parent="@android:style/Theme.Material.Light">
<item name="android:forceDarkAllowed">true</item>
<item name="android:windowIsTranslucent">true</item>
@@ -227,33 +221,6 @@
<item name="android:backgroundDimEnabled">true</item>
</style>
- <style name="InCallAnimationStyle" parent="@*android:style/Animation.Holo.Activity">
- <!-- Suppress task-to-task animation happening during the transition from
- OutgoingCallBroadcaster (and SipOptionHandler) to InCallScreen.
- The transition unexpectedly happens during the transition (inside the phone task),
- because InCallScreen is using android:launchMode="singleInstance".
-
- - taskOpenEnterAnimation/taskOpenExitAnimation is used for the first time
- InCallScreen instance is created.
-
- - taskToFrontEnterAnimation/taskToFrontExitAnimation is used when InCallScreen
- is already available.
- (Note that InCallScreen won't be destroyed once it is created)
-
- TODO: try removing the flag instead -->
- <item name="*android:taskOpenEnterAnimation">@*android:anim/activity_open_enter</item>
- <item name="*android:taskOpenExitAnimation">@*android:anim/activity_open_exit</item>
- <item name="*android:taskToFrontEnterAnimation">@*android:anim/activity_open_enter</item>
- <item name="*android:taskToFrontExitAnimation">@*android:anim/activity_open_exit</item>
- </style>
-
- <style name="OutgoingAnimationStyle" parent="@*android:style/Animation.Holo.Activity">
- <!-- Suppress task-to-task transition animation happening from
- DialtactsActivity to OutgoingCallBroadcaster. -->
- <item name="*android:taskOpenEnterAnimation">@*android:anim/activity_open_enter</item>
- <item name="*android:taskOpenExitAnimation">@*android:anim/activity_open_exit</item>
- </style>
-
<!-- Style for the call settings action bar. Should be kept in sync with Dialer. -->
<style name="DialtactsActionBarStyle" parent="@style/TelephonyActionBarStyle">
<!-- Shift the title text to the right -->
@@ -284,7 +251,7 @@
<item name="android:src">@drawable/overflow_menu</item>
</style>
- <style name="EmergencyDialerTheme" parent="@*android:style/Theme.DeviceDefault.Settings.Dark.NoActionBar">
+ <style name="EmergencyDialerTheme" parent="@android:style/Theme.Material.NoActionBar">
<item name="android:forceDarkAllowed">true</item>
<item name="android:colorPrimaryDark">?android:attr/colorPrimary</item>
<item name="android:colorBackgroundCacheHint">@null</item>
@@ -318,13 +285,6 @@
<item name="android:actionOverflowButtonStyle">@style/DialtactsActionBarOverflow</item>
</style>
- <style name="OutgoingCallBroadcasterTheme" parent="@android:style/Theme.Holo.NoActionBar">
- <item name="android:forceDarkAllowed">true</item>
- <item name="android:windowBackground">@android:color/black</item>
-
- <item name="*android:windowAnimationStyle">@style/OutgoingAnimationStyle</item>
- </style>
-
<style name="DialtactsDigitsTextAppearance">
<item name="android:maxLines">1</item>
<item name="android:textSize">@dimen/dialpad_digits_text_size</item>
@@ -347,43 +307,43 @@
<item name="android:listDivider">@null</item>
</style>
- <style name="EmergencyInfoNameTextAppearance">
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
- <item name="android:textColor">@*android:color/primary_text_default_material_dark</item>
+ <style name="EmergencyInfoNameTextAppearance"
+ parent="@android:style/TextAppearance.Material.Subhead">
+ <item name="android:textColor">@color/primary_text_default_material_dark</item>
<item name="android:textSize">@dimen/emergency_info_name_text_size</item>
</style>
- <style name="EmergencyInfoHintTextAppearance">
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
- <item name="android:textColor">@*android:color/secondary_text_default_material_dark</item>
+ <style name="EmergencyInfoHintTextAppearance"
+ parent="@android:style/TextAppearance.Material.Subhead">
+ <item name="android:textColor">@color/secondary_text_default_material_dark</item>
<item name="android:textSize">@dimen/emergency_info_hint_text_size</item>
</style>
- <style name="EmergencyInfoTapHintTextAppearance">
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
+ <style name="EmergencyInfoTapHintTextAppearance"
+ parent="@android:style/TextAppearance.Material.Subhead">
<item name="android:textColor">@android:color/white</item>
<item name="android:textSize">@dimen/emergency_info_tap_hint_text_size</item>
</style>
- <style name="ShortcutViewHintTextAppearance">
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
- <item name="android:textColor">@*android:color/secondary_text_default_material_dark</item>
+ <style name="ShortcutViewHintTextAppearance"
+ parent="@android:style/TextAppearance.Material.Subhead">
+ <item name="android:textColor">@color/secondary_text_default_material_dark</item>
</style>
- <style name="PhoneNumberTextAppearance">
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
- <item name="android:textColor">@*android:color/primary_text_default_material_light</item>
+ <style name="PhoneNumberTextAppearance"
+ parent="@android:style/TextAppearance.Material.Subhead">
+ <item name="android:textColor">@color/primary_text_default_material_light</item>
<item name="android:textSize">@dimen/emergency_shortcut_number_text_size</item>
</style>
<style name="PhoneNumberTypeAppearance">
<item name="android:fontFamily">roboto</item>
- <item name="android:textColor">@*android:color/secondary_text_default_material_light</item>
+ <item name="android:textColor">@color/secondary_text_default_material_light</item>
<item name="android:textSize">@dimen/emergency_shortcut_type_text_size</item>
</style>
- <style name="PhoneNumberTapHintAppearance">
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
+ <style name="PhoneNumberTapHintAppearance"
+ parent="@android:style/TextAppearance.Material.Subhead">
<item name="android:textColor">@android:color/white</item>
<item name="android:textSize">@dimen/emergency_shortcut_tap_hint_text_size</item>
</style>
diff --git a/res/values/styles_preference.xml b/res/values/styles_preference.xml
index fef4f72..eace2e7 100644
--- a/res/values/styles_preference.xml
+++ b/res/values/styles_preference.xml
@@ -19,22 +19,22 @@
<!-- Things unrelated to preference framework UI customization should go to other styles files -->
<resources>
<!-- Preferences -->
- <style name="SettingsPreference" parent="@*android:style/Preference.DeviceDefault">
+ <style name="SettingsPreference" parent="@style/Preference.Material">
<item name="android:singleLineTitle">false</item>
<item name="android:iconSpaceReserved">true</item>
</style>
- <style name="SettingsSwitchPreference" parent="@*android:style/Preference.DeviceDefault.SwitchPreference">
+ <style name="SettingsSwitchPreference" parent="@style/Preference.SwitchPreference.Material">
<item name="android:iconSpaceReserved">true</item>
<item name="android:singleLineTitle">false</item>
</style>
- <style name="SettingsDialogPreference" parent="@*android:style/Preference.DeviceDefault.DialogPreference">
+ <style name="SettingsDialogPreference" parent="@style/Preference.DialogPreference.Material">
<item name="android:singleLineTitle">false</item>
<item name="android:iconSpaceReserved">true</item>
</style>
- <style name="SettingsPreferenceScreen" parent="@*android:style/Preference.DeviceDefault.PreferenceScreen">
+ <style name="SettingsPreferenceScreen" parent="@style/Preference.PreferenceScreen.Material">
<item name="android:singleLineTitle">false</item>
<item name="android:iconSpaceReserved">true</item>
</style>
diff --git a/src/com/android/phone/settings/fdn/EditPinPreference.java b/src/com/android/phone/settings/fdn/EditPinPreference.java
index 9596f39..a9d1948 100644
--- a/src/com/android/phone/settings/fdn/EditPinPreference.java
+++ b/src/com/android/phone/settings/fdn/EditPinPreference.java
@@ -23,8 +23,6 @@
import android.util.AttributeSet;
import android.view.View;
-import com.android.phone.R;
-
/**
* Class similar to the com.android.settings.EditPinPreference
* class, with a couple of modifications, including a different layout
@@ -62,27 +60,12 @@
super(context, attrs, defStyle);
}
- /**
- * Overridden to setup the correct dialog layout, as well as setting up
- * other properties for the pin / puk entry field.
- */
- @Override
- protected View onCreateDialogView() {
- // set the dialog layout
- setDialogLayoutResource(R.layout.pref_dialog_editpin);
-
- View dialog = super.onCreateDialogView();
-
- getEditText().setInputType(InputType.TYPE_CLASS_NUMBER |
- InputType.TYPE_NUMBER_VARIATION_PASSWORD);
-
- return dialog;
- }
-
@Override
protected void onBindDialogView(View view) {
super.onBindDialogView(view);
+ getEditText().setInputType(InputType.TYPE_CLASS_NUMBER
+ | InputType.TYPE_NUMBER_VARIATION_PASSWORD);
// If the layout does not contain an edittext, hide the buttons.
shouldHideButtons = (view.findViewById(android.R.id.edit) == null);
}