Add separator line in notification settings,

above link to in-app settings.

Test: make RunSettingsRoboTests
Bug: 62543732
Change-Id: Ibf4f08c3d5feba90598d71f48c050e87ab9c3fdf
This commit is contained in:
Alison Cichowlas
2017-06-15 11:06:28 -04:00
parent 08f1523ac7
commit d58d342967
2 changed files with 28 additions and 5 deletions

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto">
<Preference
android:key="app_link"
android:title="@string/app_settings_link"
android:order="500"
settings:allowDividerAbove="true"/>
</PreferenceScreen>

View File

@@ -264,12 +264,9 @@ abstract public class NotificationSettingsBase extends SettingsPreferenceFragmen
protected void addAppLinkPref() {
if (mAppRow.settingsIntent != null && mAppLink == null) {
mAppLink = new Preference(getPrefContext());
mAppLink.setKey(KEY_APP_LINK);
mAppLink.setOrder(500);
addPreferencesFromResource(R.xml.inapp_notification_settings);
mAppLink = (Preference) findPreference(KEY_APP_LINK);
mAppLink.setIntent(mAppRow.settingsIntent);
mAppLink.setTitle(mContext.getString(R.string.app_settings_link));
getPreferenceScreen().addPreference(mAppLink);
}
}