Link to external settings activity from the app header.

Bug: 26288458
Change-Id: Ib7c723f23a09f2dbcb6c9738db8e455fb7b82462
This commit is contained in:
Julia Reynolds
2016-01-29 10:15:31 -05:00
parent a1f84c745d
commit fe22e8998b
4 changed files with 28 additions and 26 deletions

View File

@@ -51,7 +51,6 @@ public class AppNotificationSettings extends NotificationSettingsBase {
private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
private static final String KEY_BLOCK = "block";
private static final String KEY_APP_SETTINGS = "app_settings";
private static final String KEY_CATEGORIES = "categories";
private static final Intent APP_NOTIFICATION_PREFS_CATEGORY_INTENT
@@ -66,7 +65,8 @@ public class AppNotificationSettings extends NotificationSettingsBase {
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
if (mAppRow == null) return;
AppHeader.createAppHeader(this, mAppRow.icon, mAppRow.label, mAppRow.pkg, mAppRow.uid);
AppHeader.createAppHeader(this, mAppRow.icon, mAppRow.label, mAppRow.pkg, mAppRow.uid,
mAppRow.settingsIntent);
}
@Override
@@ -127,19 +127,6 @@ public class AppNotificationSettings extends NotificationSettingsBase {
mCategories.addPreference(topicPreference);
}
}
if (mAppRow.settingsIntent != null) {
findPreference(KEY_APP_SETTINGS).setOnPreferenceClickListener(
new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
mContext.startActivity(mAppRow.settingsIntent);
return true;
}
});
} else {
removePreference(KEY_APP_SETTINGS);
}
}
@Override