AppAndNotificationDashboardFragment.java revision f2cf2aea3777ef5298bb1131890552f5f619dd30
1/* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package com.android.settings.applications; 18 19import android.content.Context; 20import android.provider.SearchIndexableResource; 21 22import com.android.internal.logging.nano.MetricsProto; 23import com.android.settings.R; 24import com.android.settings.core.PreferenceController; 25import com.android.settings.dashboard.DashboardFragment; 26import com.android.settings.search.BaseSearchIndexProvider; 27 28import java.util.Arrays; 29import java.util.List; 30 31public class AppAndNotificationDashboardFragment extends DashboardFragment { 32 33 private static final String TAG = "AppAndNotifDashboard"; 34 35 @Override 36 public int getMetricsCategory() { 37 return MetricsProto.MetricsEvent.SETTINGS_APP_NOTIF_CATEGORY; 38 } 39 40 @Override 41 protected String getLogTag() { 42 return TAG; 43 } 44 45 @Override 46 protected int getPreferenceScreenResId() { 47 return R.xml.app_and_notification; 48 } 49 50 @Override 51 protected List<PreferenceController> getPreferenceControllers(Context context) { 52 return null; 53 } 54 55 public static final SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER = 56 new BaseSearchIndexProvider() { 57 @Override 58 public List<SearchIndexableResource> getXmlResourcesToIndex( 59 Context context, boolean enabled) { 60 final SearchIndexableResource sir = new SearchIndexableResource(context); 61 sir.xmlResId = R.xml.app_and_notification; 62 return Arrays.asList(sir); 63 } 64 }; 65} 66