Add help url placeholders for new pages
Bug: 38412798 Test: visual Change-Id: I4ede523cb13790ea05309279f80a778b2086f850
This commit is contained in:
@@ -6181,6 +6181,8 @@
|
|||||||
<string name="help_url_location_access" translatable="false"></string>
|
<string name="help_url_location_access" translatable="false"></string>
|
||||||
<!-- Help URL, Security settings [DO NOT TRANSLATE] -->
|
<!-- Help URL, Security settings [DO NOT TRANSLATE] -->
|
||||||
<string name="help_url_security" translatable="false"></string>
|
<string name="help_url_security" translatable="false"></string>
|
||||||
|
<!-- Help URL, Encryption settings [DO NOT TRANSLATE] -->
|
||||||
|
<string name="help_url_encryption" translatable="false"></string>
|
||||||
<!-- Help URL, Tap & pay [DO NOT TRANSLATE] -->
|
<!-- Help URL, Tap & pay [DO NOT TRANSLATE] -->
|
||||||
<string name="help_url_nfc_payment" translatable="false"></string>
|
<string name="help_url_nfc_payment" translatable="false"></string>
|
||||||
<!-- Help URL, Remote display [DO NOT TRANSLATE] -->
|
<!-- Help URL, Remote display [DO NOT TRANSLATE] -->
|
||||||
@@ -6198,6 +6200,26 @@
|
|||||||
<!-- Help URL, Display size [DO NOT TRANSLATE] -->
|
<!-- Help URL, Display size [DO NOT TRANSLATE] -->
|
||||||
<string name="help_url_display_size" translatable="false"></string>
|
<string name="help_url_display_size" translatable="false"></string>
|
||||||
|
|
||||||
|
<string name="help_url_network_dashboard" translatable="false"></string>
|
||||||
|
<string name="help_url_connected_devices" translatable="false"></string>
|
||||||
|
<string name="help_url_apps_and_notifications" translatable="false"></string>
|
||||||
|
<string name="help_url_night_display" translatable="false"></string>
|
||||||
|
<string name="help_url_screen_saver" translatable="false"></string>
|
||||||
|
<string name="help_url_pickup_gesture" translatable="false"></string>
|
||||||
|
<string name="help_url_storage_dashboard" translatable="false"></string>
|
||||||
|
<string name="help_url_lockscreen" translatable="false"></string>
|
||||||
|
<string name="help_url_trust_agent" translatable="false"></string>
|
||||||
|
<string name="help_url_usage_access" translatable="false"></string>
|
||||||
|
<string name="help_url_screen_pinning" translatable="false"></string>
|
||||||
|
<string name="help_url_user_and_account_dashboard" translatable="false"></string>
|
||||||
|
<string name="help_url_accessibility_shortcut" translatable="false"></string>
|
||||||
|
<string name="help_url_magnification" translatable="false"></string>
|
||||||
|
<string name="help_url_color_correction" translatable="false"></string>
|
||||||
|
<string name="help_url_autoclick" translatable="false"></string>
|
||||||
|
<string name="help_url_system_dashboard" translatable="false"></string>
|
||||||
|
<string name="help_url_double_tap_screen" translatable="false"></string>
|
||||||
|
<string name="help_url_account_detail" translatable="false"></string>
|
||||||
|
|
||||||
<!-- User account title [CHAR LIMIT=30] -->
|
<!-- User account title [CHAR LIMIT=30] -->
|
||||||
<string name="user_account_title">Account for content</string>
|
<string name="user_account_title">Account for content</string>
|
||||||
<!-- User picture title [CHAR LIMIT=30] -->
|
<!-- User picture title [CHAR LIMIT=30] -->
|
||||||
|
@@ -168,7 +168,7 @@ public class EncryptionAndCredential extends SettingsPreferenceFragment implemen
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getHelpResource() {
|
protected int getHelpResource() {
|
||||||
return R.string.help_url_security;
|
return R.string.help_url_encryption;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -74,6 +74,11 @@ public class ScreenPinningSettings extends SettingsPreferenceFragment
|
|||||||
mSwitchBar.setChecked(isLockToAppEnabled(getActivity()));
|
mSwitchBar.setChecked(isLockToAppEnabled(getActivity()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHelpResource() {
|
||||||
|
return R.string.help_url_screen_pinning;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
@@ -35,7 +35,6 @@ import android.util.ArraySet;
|
|||||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||||
import com.android.internal.widget.LockPatternUtils;
|
import com.android.internal.widget.LockPatternUtils;
|
||||||
import com.android.settings.overlay.FeatureFactory;
|
import com.android.settings.overlay.FeatureFactory;
|
||||||
import com.android.settings.security.SecurityFeatureProvider;
|
|
||||||
import com.android.settings.trustagent.TrustAgentManager;
|
import com.android.settings.trustagent.TrustAgentManager;
|
||||||
import com.android.settingslib.RestrictedLockUtils;
|
import com.android.settingslib.RestrictedLockUtils;
|
||||||
import com.android.settingslib.RestrictedSwitchPreference;
|
import com.android.settingslib.RestrictedSwitchPreference;
|
||||||
@@ -78,6 +77,11 @@ public class TrustAgentSettings extends SettingsPreferenceFragment implements
|
|||||||
return MetricsEvent.TRUST_AGENT;
|
return MetricsEvent.TRUST_AGENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHelpResource() {
|
||||||
|
return R.string.help_url_trust_agent;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle icicle) {
|
public void onCreate(Bundle icicle) {
|
||||||
super.onCreate(icicle);
|
super.onCreate(icicle);
|
||||||
|
@@ -51,6 +51,11 @@ public class AccessibilityShortcutPreferenceFragment extends ToggleFeaturePrefer
|
|||||||
return MetricsEvent.ACCESSIBILITY_TOGGLE_GLOBAL_GESTURE;
|
return MetricsEvent.ACCESSIBILITY_TOGGLE_GLOBAL_GESTURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHelpResource() {
|
||||||
|
return R.string.help_url_accessibility_shortcut;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@@ -31,11 +31,9 @@ import android.view.accessibility.AccessibilityManager;
|
|||||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
import com.android.settings.SettingsPreferenceFragment;
|
import com.android.settings.SettingsPreferenceFragment;
|
||||||
import com.android.settings.core.PreferenceController;
|
|
||||||
import com.android.settings.search.BaseSearchIndexProvider;
|
import com.android.settings.search.BaseSearchIndexProvider;
|
||||||
import com.android.settings.search.Indexable;
|
import com.android.settings.search.Indexable;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -67,6 +65,11 @@ public final class MagnificationPreferenceFragment extends SettingsPreferenceFra
|
|||||||
mMagnificationNavbarPreference = findPreference(MAGNIFICATION_NAVBAR_PREFERENCE_SCREEN_KEY);
|
mMagnificationNavbarPreference = findPreference(MAGNIFICATION_NAVBAR_PREFERENCE_SCREEN_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHelpResource() {
|
||||||
|
return R.string.help_url_magnification;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
@@ -104,6 +104,11 @@ public class ToggleAutoclickPreferenceFragment extends ToggleFeaturePreferenceFr
|
|||||||
return MetricsEvent.ACCESSIBILITY_TOGGLE_AUTOCLICK;
|
return MetricsEvent.ACCESSIBILITY_TOGGLE_AUTOCLICK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHelpResource() {
|
||||||
|
return R.string.help_url_autoclick;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@@ -41,6 +41,11 @@ public class ToggleDaltonizerPreferenceFragment extends ToggleFeaturePreferenceF
|
|||||||
return MetricsEvent.ACCESSIBILITY_TOGGLE_DALTONIZER;
|
return MetricsEvent.ACCESSIBILITY_TOGGLE_DALTONIZER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHelpResource() {
|
||||||
|
return R.string.help_url_color_correction;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@@ -96,6 +96,11 @@ public class AccountDetailDashboardFragment extends DashboardFragment {
|
|||||||
return TAG;
|
return TAG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHelpResource() {
|
||||||
|
return R.string.help_url_account_detail;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getPreferenceScreenResId() {
|
protected int getPreferenceScreenResId() {
|
||||||
return R.xml.account_type_settings;
|
return R.xml.account_type_settings;
|
||||||
|
@@ -57,6 +57,11 @@ public class UserAndAccountDashboardFragment extends DashboardFragment {
|
|||||||
return R.xml.user_and_accounts_settings;
|
return R.xml.user_and_accounts_settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHelpResource() {
|
||||||
|
return R.string.help_url_user_and_account_dashboard;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<PreferenceController> getPreferenceControllers(Context context) {
|
protected List<PreferenceController> getPreferenceControllers(Context context) {
|
||||||
final List<PreferenceController> controllers = new ArrayList<>();
|
final List<PreferenceController> controllers = new ArrayList<>();
|
||||||
|
@@ -53,6 +53,11 @@ public class AppAndNotificationDashboardFragment extends DashboardFragment {
|
|||||||
mProgressiveDisclosureMixin.setTileLimit(3);
|
mProgressiveDisclosureMixin.setTileLimit(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHelpResource() {
|
||||||
|
return R.string.help_url_apps_and_notifications;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getPreferenceScreenResId() {
|
protected int getPreferenceScreenResId() {
|
||||||
return R.xml.app_and_notification;
|
return R.xml.app_and_notification;
|
||||||
|
@@ -18,6 +18,7 @@ package com.android.settings.applications;
|
|||||||
|
|
||||||
import android.annotation.IdRes;
|
import android.annotation.IdRes;
|
||||||
import android.annotation.Nullable;
|
import android.annotation.Nullable;
|
||||||
|
import android.annotation.StringRes;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@@ -148,7 +149,8 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
|||||||
public static final int FILTER_APPS_COUNT = 13; // This should always be the last entry
|
public static final int FILTER_APPS_COUNT = 13; // This should always be the last entry
|
||||||
|
|
||||||
// Mapping to string labels for the FILTER_APPS_* constants above.
|
// Mapping to string labels for the FILTER_APPS_* constants above.
|
||||||
public static final @IdRes int[] FILTER_LABELS = new int[FILTER_APPS_COUNT];
|
@IdRes
|
||||||
|
public static final int[] FILTER_LABELS = new int[FILTER_APPS_COUNT];
|
||||||
|
|
||||||
// Mapping to filters for the FILTER_APPS_* constants above.
|
// Mapping to filters for the FILTER_APPS_* constants above.
|
||||||
public static final AppFilter[] FILTERS = new AppFilter[FILTER_APPS_COUNT];
|
public static final AppFilter[] FILTERS = new AppFilter[FILTER_APPS_COUNT];
|
||||||
@@ -261,8 +263,8 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
|||||||
|
|
||||||
// List types that should show instant apps.
|
// List types that should show instant apps.
|
||||||
public static final Set<Integer> LIST_TYPES_WITH_INSTANT = new ArraySet<>(Arrays.asList(
|
public static final Set<Integer> LIST_TYPES_WITH_INSTANT = new ArraySet<>(Arrays.asList(
|
||||||
LIST_TYPE_MAIN,
|
LIST_TYPE_MAIN,
|
||||||
LIST_TYPE_STORAGE));
|
LIST_TYPE_STORAGE));
|
||||||
|
|
||||||
private View mRootView;
|
private View mRootView;
|
||||||
|
|
||||||
@@ -338,7 +340,7 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
// initialize the inflater
|
// initialize the inflater
|
||||||
mInflater = inflater;
|
mInflater = inflater;
|
||||||
|
|
||||||
@@ -425,7 +427,8 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
static @Nullable AppFilter getCompositeFilter(int listType, int storageType, String volumeUuid) {
|
@Nullable
|
||||||
|
static AppFilter getCompositeFilter(int listType, int storageType, String volumeUuid) {
|
||||||
AppFilter filter = new VolumeFilter(volumeUuid);
|
AppFilter filter = new VolumeFilter(volumeUuid);
|
||||||
if (listType == LIST_TYPE_STORAGE) {
|
if (listType == LIST_TYPE_STORAGE) {
|
||||||
if (storageType == STORAGE_TYPE_MUSIC) {
|
if (storageType == STORAGE_TYPE_MUSIC) {
|
||||||
@@ -595,8 +598,8 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
|||||||
startAppInfoFragment(AppStorageSettings.class, R.string.storage_movies_tv);
|
startAppInfoFragment(AppStorageSettings.class, R.string.storage_movies_tv);
|
||||||
break;
|
break;
|
||||||
// TODO: Figure out if there is a way where we can spin up the profile's settings
|
// TODO: Figure out if there is a way where we can spin up the profile's settings
|
||||||
// process ahead of time, to avoid a long load of data when user clicks on a managed app.
|
// process ahead of time, to avoid a long load of data when user clicks on a managed
|
||||||
// Maybe when they load the list of apps that contains managed profile apps.
|
// app. Maybe when they load the list of apps that contains managed profile apps.
|
||||||
default:
|
default:
|
||||||
startAppInfoFragment(InstalledAppDetails.class, R.string.application_info_label);
|
startAppInfoFragment(InstalledAppDetails.class, R.string.application_info_label);
|
||||||
break;
|
break;
|
||||||
@@ -610,8 +613,7 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
HelpUtils.prepareHelpMenuItem(getActivity(), menu, mListType == LIST_TYPE_MAIN
|
HelpUtils.prepareHelpMenuItem(getActivity(), menu, getHelpResource(), getClass().getName());
|
||||||
? R.string.help_uri_apps : R.string.help_uri_notifications, getClass().getName());
|
|
||||||
mOptionsMenu = menu;
|
mOptionsMenu = menu;
|
||||||
inflater.inflate(R.menu.manage_apps, menu);
|
inflater.inflate(R.menu.manage_apps, menu);
|
||||||
updateOptionsMenu();
|
updateOptionsMenu();
|
||||||
@@ -627,6 +629,17 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
|||||||
mOptionsMenu = null;
|
mOptionsMenu = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@StringRes
|
||||||
|
int getHelpResource() {
|
||||||
|
if (mListType == LIST_TYPE_MAIN) {
|
||||||
|
return R.string.help_uri_apps;
|
||||||
|
} else if (mListType == LIST_TYPE_USAGE_ACCESS) {
|
||||||
|
return R.string.help_url_usage_access;
|
||||||
|
} else {
|
||||||
|
return R.string.help_uri_notifications;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void updateOptionsMenu() {
|
void updateOptionsMenu() {
|
||||||
if (mOptionsMenu == null) {
|
if (mOptionsMenu == null) {
|
||||||
return;
|
return;
|
||||||
@@ -670,7 +683,8 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
|||||||
if (mListType == LIST_TYPE_NOTIFICATION) {
|
if (mListType == LIST_TYPE_NOTIFICATION) {
|
||||||
((SettingsActivity) getActivity()).startPreferencePanel(this,
|
((SettingsActivity) getActivity()).startPreferencePanel(this,
|
||||||
ConfigureNotificationSettings.class.getName(), null,
|
ConfigureNotificationSettings.class.getName(), null,
|
||||||
R.string.configure_notification_settings, null, this, ADVANCED_SETTINGS);
|
R.string.configure_notification_settings, null, this,
|
||||||
|
ADVANCED_SETTINGS);
|
||||||
} else {
|
} else {
|
||||||
((SettingsActivity) getActivity()).startPreferencePanel(this,
|
((SettingsActivity) getActivity()).startPreferencePanel(this,
|
||||||
AdvancedAppSettings.class.getName(), null, R.string.configure_apps,
|
AdvancedAppSettings.class.getName(), null, R.string.configure_apps,
|
||||||
@@ -877,7 +891,7 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
|||||||
};
|
};
|
||||||
|
|
||||||
public ApplicationsAdapter(ApplicationsState state, ManageApplications manageApplications,
|
public ApplicationsAdapter(ApplicationsState state, ManageApplications manageApplications,
|
||||||
int filterMode) {
|
int filterMode) {
|
||||||
mState = state;
|
mState = state;
|
||||||
mFgHandler = new Handler();
|
mFgHandler = new Handler();
|
||||||
mBgHandler = new Handler(mState.getBackgroundLooper());
|
mBgHandler = new Handler(mState.getBackgroundLooper());
|
||||||
@@ -950,7 +964,8 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
|||||||
// Record the current scroll position before pausing.
|
// Record the current scroll position before pausing.
|
||||||
mLastIndex = mManageApplications.mListView.getFirstVisiblePosition();
|
mLastIndex = mManageApplications.mListView.getFirstVisiblePosition();
|
||||||
View v = mManageApplications.mListView.getChildAt(0);
|
View v = mManageApplications.mListView.getChildAt(0);
|
||||||
mLastTop = (v == null) ? 0 : (v.getTop() - mManageApplications.mListView.getPaddingTop());
|
mLastTop =
|
||||||
|
(v == null) ? 0 : (v.getTop() - mManageApplications.mListView.getPaddingTop());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void release() {
|
public void release() {
|
||||||
@@ -1037,8 +1052,7 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
private ArrayList<ApplicationsState.AppEntry> removeDuplicateIgnoringUser(
|
private ArrayList<ApplicationsState.AppEntry> removeDuplicateIgnoringUser(
|
||||||
ArrayList<ApplicationsState.AppEntry> entries)
|
ArrayList<ApplicationsState.AppEntry> entries) {
|
||||||
{
|
|
||||||
int size = entries.size();
|
int size = entries.size();
|
||||||
// returnList will not have more entries than entries
|
// returnList will not have more entries than entries
|
||||||
ArrayList<ApplicationsState.AppEntry> returnEntries = new
|
ArrayList<ApplicationsState.AppEntry> returnEntries = new
|
||||||
@@ -1097,7 +1111,7 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void rebuildSections() {
|
private void rebuildSections() {
|
||||||
if (mEntries!= null && mManageApplications.mListView.isFastScrollEnabled()) {
|
if (mEntries != null && mManageApplications.mListView.isFastScrollEnabled()) {
|
||||||
// Rebuild sections
|
// Rebuild sections
|
||||||
if (mIndex == null) {
|
if (mIndex == null) {
|
||||||
LocaleList locales = mContext.getResources().getConfiguration().getLocales();
|
LocaleList locales = mContext.getResources().getConfiguration().getLocales();
|
||||||
@@ -1142,7 +1156,7 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
ArrayList<ApplicationsState.AppEntry> applyPrefixFilter(CharSequence prefix,
|
ArrayList<ApplicationsState.AppEntry> applyPrefixFilter(CharSequence prefix,
|
||||||
ArrayList<ApplicationsState.AppEntry> origEntries) {
|
ArrayList<ApplicationsState.AppEntry> origEntries) {
|
||||||
if (prefix == null || prefix.length() == 0) {
|
if (prefix == null || prefix.length() == 0) {
|
||||||
return origEntries;
|
return origEntries;
|
||||||
} else {
|
} else {
|
||||||
@@ -1464,7 +1478,7 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
|||||||
= new SummaryLoader.SummaryProviderFactory() {
|
= new SummaryLoader.SummaryProviderFactory() {
|
||||||
@Override
|
@Override
|
||||||
public SummaryLoader.SummaryProvider createSummaryProvider(Activity activity,
|
public SummaryLoader.SummaryProvider createSummaryProvider(Activity activity,
|
||||||
SummaryLoader summaryLoader) {
|
SummaryLoader summaryLoader) {
|
||||||
return new SummaryProvider(activity, summaryLoader);
|
return new SummaryProvider(activity, summaryLoader);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@@ -54,6 +54,11 @@ public class ConnectedDeviceDashboardFragment extends DashboardFragment {
|
|||||||
return TAG;
|
return TAG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHelpResource() {
|
||||||
|
return R.string.help_url_connected_devices;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getPreferenceScreenResId() {
|
protected int getPreferenceScreenResId() {
|
||||||
return R.xml.connected_devices;
|
return R.xml.connected_devices;
|
||||||
|
@@ -113,6 +113,11 @@ public class StorageDashboardFragment extends DashboardFragment
|
|||||||
getLoaderManager().initLoader(VOLUME_SIZE_JOB_ID, Bundle.EMPTY, new VolumeSizeCallbacks());
|
getLoaderManager().initLoader(VOLUME_SIZE_JOB_ID, Bundle.EMPTY, new VolumeSizeCallbacks());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHelpResource() {
|
||||||
|
return R.string.help_url_storage_dashboard;
|
||||||
|
}
|
||||||
|
|
||||||
private void onReceivedSizes() {
|
private void onReceivedSizes() {
|
||||||
if (mStorageInfo == null || mAppsResult == null) {
|
if (mStorageInfo == null || mAppsResult == null) {
|
||||||
return;
|
return;
|
||||||
|
@@ -73,6 +73,11 @@ public class NightDisplaySettings extends SettingsPreferenceFragment
|
|||||||
mTemperaturePreference.setContinuousUpdates(true);
|
mTemperaturePreference.setContinuousUpdates(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHelpResource() {
|
||||||
|
return R.string.help_url_night_display;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||||
super.onCreatePreferences(savedInstanceState, rootKey);
|
super.onCreatePreferences(savedInstanceState, rootKey);
|
||||||
|
@@ -16,17 +16,19 @@
|
|||||||
|
|
||||||
package com.android.settings.dream;
|
package com.android.settings.dream;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.provider.SearchIndexableResource;
|
import android.provider.SearchIndexableResource;
|
||||||
import android.support.annotation.VisibleForTesting;
|
import android.support.annotation.VisibleForTesting;
|
||||||
|
|
||||||
|
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
import com.android.settings.core.PreferenceController;
|
import com.android.settings.core.PreferenceController;
|
||||||
import com.android.settings.dashboard.DashboardFragment;
|
import com.android.settings.dashboard.DashboardFragment;
|
||||||
import com.android.settings.search.BaseSearchIndexProvider;
|
import com.android.settings.search.BaseSearchIndexProvider;
|
||||||
import com.android.settingslib.dream.DreamBackend;
|
import com.android.settingslib.dream.DreamBackend;
|
||||||
import com.android.settingslib.dream.DreamBackend.WhenToDream;
|
import com.android.settingslib.dream.DreamBackend.WhenToDream;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import android.content.Context;
|
|
||||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -96,6 +98,11 @@ public class DreamSettings extends DashboardFragment {
|
|||||||
return R.xml.dream_fragment_overview;
|
return R.xml.dream_fragment_overview;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHelpResource() {
|
||||||
|
return R.string.help_url_screen_saver;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getLogTag() {
|
protected String getLogTag() {
|
||||||
return TAG;
|
return TAG;
|
||||||
|
@@ -52,6 +52,11 @@ public class DoubleTapScreenSettings extends DashboardFragment {
|
|||||||
return R.xml.double_tap_screen_settings;
|
return R.xml.double_tap_screen_settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHelpResource() {
|
||||||
|
return R.string.help_url_double_tap_screen;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<PreferenceController> getPreferenceControllers(Context context) {
|
protected List<PreferenceController> getPreferenceControllers(Context context) {
|
||||||
return buildPreferenceControllers(context, getLifecycle());
|
return buildPreferenceControllers(context, getLifecycle());
|
||||||
|
@@ -52,6 +52,11 @@ public class PickupGestureSettings extends DashboardFragment {
|
|||||||
return R.xml.pick_up_gesture_settings;
|
return R.xml.pick_up_gesture_settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHelpResource() {
|
||||||
|
return R.string.help_url_pickup_gesture;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<PreferenceController> getPreferenceControllers(Context context) {
|
protected List<PreferenceController> getPreferenceControllers(Context context) {
|
||||||
return buildPreferenceControllers(context, getLifecycle());
|
return buildPreferenceControllers(context, getLifecycle());
|
||||||
|
@@ -69,6 +69,11 @@ public class NetworkDashboardFragment extends DashboardFragment implements
|
|||||||
mNetworkResetController = new NetworkResetActionMenuController(context);
|
mNetworkResetController = new NetworkResetActionMenuController(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHelpResource() {
|
||||||
|
return R.string.help_url_network_dashboard;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
super.onCreateOptionsMenu(menu, inflater);
|
super.onCreateOptionsMenu(menu, inflater);
|
||||||
|
@@ -67,6 +67,11 @@ public class LockscreenDashboardFragment extends DashboardFragment
|
|||||||
return R.xml.security_lockscreen_settings;
|
return R.xml.security_lockscreen_settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHelpResource() {
|
||||||
|
return R.string.help_url_lockscreen;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<PreferenceController> getPreferenceControllers(Context context) {
|
protected List<PreferenceController> getPreferenceControllers(Context context) {
|
||||||
final List<PreferenceController> controllers = new ArrayList<>();
|
final List<PreferenceController> controllers = new ArrayList<>();
|
||||||
|
@@ -54,6 +54,11 @@ public class SystemDashboardFragment extends DashboardFragment {
|
|||||||
return R.xml.system_dashboard_fragment;
|
return R.xml.system_dashboard_fragment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getHelpResource() {
|
||||||
|
return R.string.help_url_system_dashboard;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<PreferenceController> getPreferenceControllers(Context context) {
|
protected List<PreferenceController> getPreferenceControllers(Context context) {
|
||||||
return buildPreferenceControllers(context);
|
return buildPreferenceControllers(context);
|
||||||
|
Reference in New Issue
Block a user