Allow extras to be passed to app info subscreens
And pass though some extras through to notification settings. This enables us to highlight appropriate preferences on the subscreens while still funneling users through the app info screen. Test: make RunSettingsRoboTests Bug: 72764587 Change-Id: I0197b595fe4bf3504588d9dd2985dd20de73c640
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.android.settings.applications.appinfo;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.preference.Preference;
|
||||
import android.support.v7.preference.PreferenceScreen;
|
||||
import android.text.TextUtils;
|
||||
@@ -58,7 +59,7 @@ public abstract class AppInfoPreferenceControllerBase extends BasePreferenceCont
|
||||
public boolean handlePreferenceTreeClick(Preference preference) {
|
||||
if (TextUtils.equals(preference.getKey(), mPreferenceKey) && mDetailFragmenClass != null) {
|
||||
AppInfoDashboardFragment.startAppInfoFragment(
|
||||
mDetailFragmenClass, -1, mParent, mParent.getAppEntry());
|
||||
mDetailFragmenClass, -1, getArguments(), mParent, mParent.getAppEntry());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -77,4 +78,12 @@ public abstract class AppInfoPreferenceControllerBase extends BasePreferenceCont
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets any extras that should be passed to the fragment class when the preference is clicked.
|
||||
* @return a bundle of extras to include in the launch intent
|
||||
*/
|
||||
protected Bundle getArguments() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user