Merge "Move DensityUtils into SettingsLib" into nyc-dev
diff --git a/res/layout/redaction_interstitial.xml b/res/layout/redaction_interstitial.xml
index e7678ce..f48b917 100644
--- a/res/layout/redaction_interstitial.xml
+++ b/res/layout/redaction_interstitial.xml
@@ -17,61 +17,61 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingStart="?attr/side_margin"
- android:paddingEnd="?attr/side_margin">
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingStart="?attr/side_margin"
+ android:paddingEnd="?attr/side_margin">
<TextView
- android:id="@+id/message"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/redaction_vertical_margins"
- android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
- android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd"
- android:text="@string/lock_screen_notifications_interstitial_message"
- android:textAppearance="?android:attr/textAppearanceMedium" />
+ android:id="@+id/message"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/redaction_vertical_margins"
+ android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
+ android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:text="@string/lock_screen_notifications_interstitial_message"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
<RadioGroup
- android:id="@+id/radio_group"
- android:layout_width="wrap_content"
+ android:id="@+id/radio_group"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/redaction_vertical_margins"
+ android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
+ android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:checkedButton="@+id/redact_sensitive">
+
+ <com.android.settings.RestrictedRadioButton
+ android:id="@+id/show_all"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/redaction_vertical_margins"
- android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
- android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd"
- android:checkedButton="@+id/redact_sensitive">
+ style="@style/RedactionItemAndLabel"
+ android:text="@string/lock_screen_notifications_summary_show" />
<com.android.settings.RestrictedRadioButton
- android:id="@+id/show_all"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/redaction_vertical_margins"
- android:text="@string/lock_screen_notifications_summary_show" />
-
- <com.android.settings.RestrictedRadioButton
- android:id="@+id/redact_sensitive"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/redaction_vertical_margins"
- android:text="@string/lock_screen_notifications_summary_hide" />
+ android:id="@+id/redact_sensitive"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/RedactionItemAndLabel"
+ android:text="@string/lock_screen_notifications_summary_hide" />
<RadioButton
- android:id="@+id/hide_all"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/redaction_vertical_margins"
- android:text="@string/lock_screen_notifications_summary_disable" />
+ android:id="@+id/hide_all"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/RedactionItemAndLabel"
+ android:text="@string/lock_screen_notifications_summary_disable" />
</RadioGroup>
<CheckBox
- android:id="@+id/lockscreen_remote_input"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/redaction_vertical_margins"
- android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
- android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd"
- android:text="@string/lockscreen_remote_input" />
+ android:id="@+id/lockscreen_remote_input"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/RedactionItemAndLabel"
+ android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
+ android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:text="@string/lockscreen_remote_input" />
</LinearLayout>
\ No newline at end of file
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 9d4a97c..3cd5503 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -295,4 +295,7 @@
<!-- Display Size and Font Size preview screen -->
<dimen name="preview_pager_padding">8dp</dimen>
+ <!-- Padding between the radio buttons/checkbox and text on the redaction interstitial -->
+ <dimen name="redaction_padding_start">16dp</dimen>
+
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index acd658f..45d2c11 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -386,4 +386,10 @@
<item name="android:gravity">center_vertical</item>
</style>
+ <style name="RedactionItemAndLabel">
+ <item name="android:layout_marginTop">@dimen/redaction_vertical_margins</item>
+ <item name="android:paddingStart">@dimen/redaction_padding_start</item>
+ <item name="android:textAppearance">@android:style/TextAppearance.Material.Subhead</item>
+ </style>
+
</resources>
diff --git a/src/com/android/settings/notification/ZenModeAutomationSettings.java b/src/com/android/settings/notification/ZenModeAutomationSettings.java
index d38c580..3cf28e1 100644
--- a/src/com/android/settings/notification/ZenModeAutomationSettings.java
+++ b/src/com/android/settings/notification/ZenModeAutomationSettings.java
@@ -311,6 +311,7 @@
ServiceInfo si = mServiceListing.findService(mContext, CONFIG, rule.getOwner());
ComponentName settingsActivity = getSettingsActivity(si);
setIntent(getRuleIntent(action, settingsActivity, mId));
+ setSelectable(settingsActivity != null || isSystemRule);
setWidgetLayoutResource(R.layout.zen_rule_widget);
}
@@ -323,6 +324,8 @@
if (v != null) {
v.setOnClickListener(mDeleteListener);
}
+ view.setDividerAllowedAbove(true);
+ view.setDividerAllowedBelow(true);
}
private final View.OnClickListener mDeleteListener = new View.OnClickListener() {
diff --git a/src/com/android/settings/print/PrintJobSettingsFragment.java b/src/com/android/settings/print/PrintJobSettingsFragment.java
index 10c96f0..3cd18e1 100644
--- a/src/com/android/settings/print/PrintJobSettingsFragment.java
+++ b/src/com/android/settings/print/PrintJobSettingsFragment.java
@@ -227,7 +227,7 @@
} break;
}
- CharSequence status = info.getStatus();
+ CharSequence status = info.getStatus(getPackageManager());
if (!TextUtils.isEmpty(status)) {
if (getPreferenceScreen().findPreference(PRINT_JOB_MESSAGE_PREFERENCE) == null) {
getPreferenceScreen().addPreference(mMessagePreference);