1 /* 2 * Copyright (C) 2020 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 17 package com.android.settings.search; 18 19 import android.util.ArrayMap; 20 21 import com.android.settings.backup.UserBackupSettingsActivity; 22 import com.android.settings.connecteddevice.ConnectedDeviceDashboardFragment; 23 import com.android.settings.connecteddevice.usb.UsbDetailsFragment; 24 import com.android.settings.fuelgauge.PowerUsageAdvanced; 25 import com.android.settings.fuelgauge.PowerUsageSummary; 26 import com.android.settings.gestures.GestureNavigationSettingsFragment; 27 import com.android.settings.gestures.SystemNavigationGestureSettings; 28 import com.android.settings.location.LocationSettings; 29 import com.android.settings.location.RecentLocationAccessSeeAllFragment; 30 import com.android.settings.network.NetworkDashboardFragment; 31 import com.android.settings.notification.zen.ZenModeBlockedEffectsSettings; 32 import com.android.settings.notification.zen.ZenModeRestrictNotificationsSettings; 33 import com.android.settings.security.SecuritySettings; 34 import com.android.settings.security.screenlock.ScreenLockSettings; 35 import com.android.settings.system.SystemDashboardFragment; 36 import com.android.settings.wifi.WifiSettings; 37 38 import java.util.Map; 39 40 /** 41 * A registry of custom site map. 42 */ 43 public class CustomSiteMapRegistry { 44 45 /** 46 * Map from child class to parent class. 47 */ 48 public static final Map<String, String> CUSTOM_SITE_MAP; 49 50 static { 51 CUSTOM_SITE_MAP = new ArrayMap<>(); ScreenLockSettings.class.getName()52 CUSTOM_SITE_MAP.put(ScreenLockSettings.class.getName(), SecuritySettings.class.getName()); 53 CUSTOM_SITE_MAP.put( WifiSettings.class.getName()54 WifiSettings.class.getName(), NetworkDashboardFragment.class.getName()); PowerUsageAdvanced.class.getName()55 CUSTOM_SITE_MAP.put(PowerUsageAdvanced.class.getName(), PowerUsageSummary.class.getName()); RecentLocationAccessSeeAllFragment.class.getName()56 CUSTOM_SITE_MAP.put(RecentLocationAccessSeeAllFragment.class.getName(), 57 LocationSettings.class.getName()); UsbDetailsFragment.class.getName()58 CUSTOM_SITE_MAP.put(UsbDetailsFragment.class.getName(), 59 ConnectedDeviceDashboardFragment.class.getName()); UserBackupSettingsActivity.class.getName()60 CUSTOM_SITE_MAP.put(UserBackupSettingsActivity.class.getName(), 61 SystemDashboardFragment.class.getName()); ZenModeBlockedEffectsSettings.class.getName()62 CUSTOM_SITE_MAP.put(ZenModeBlockedEffectsSettings.class.getName(), 63 ZenModeRestrictNotificationsSettings.class.getName()); GestureNavigationSettingsFragment.class.getName()64 CUSTOM_SITE_MAP.put(GestureNavigationSettingsFragment.class.getName(), 65 SystemNavigationGestureSettings.class.getName()); 66 } 67 } 68