1 /*
2  * Copyright (C) 2019 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.permissioncontroller.role.ui.handheld;
18 
19 import androidx.annotation.NonNull;
20 import androidx.annotation.StringRes;
21 import androidx.preference.PreferenceFragmentCompat;
22 
23 import com.android.permissioncontroller.R;
24 
25 /**
26  * Handheld fragment for the list of default apps.
27  */
28 public class HandheldDefaultAppListFragment extends SettingsFragment
29         implements HandheldDefaultAppListPreferenceFragment.Parent {
30 
31     /**
32      * Create a new instance of this fragment.
33      *
34      * @return a new instance of this fragment
35      */
36     @NonNull
newInstance()37     public static HandheldDefaultAppListFragment newInstance() {
38         return new HandheldDefaultAppListFragment();
39     }
40 
41     @NonNull
42     @Override
onCreatePreferenceFragment()43     protected PreferenceFragmentCompat onCreatePreferenceFragment() {
44         return HandheldDefaultAppListPreferenceFragment.newInstance();
45     }
46 
47     @Override
48     @StringRes
getEmptyTextResource()49     protected int getEmptyTextResource() {
50         return R.string.no_default_apps;
51     }
52 
53     @Override
getHelpUriResource()54     protected int getHelpUriResource() {
55         return R.string.help_uri_default_apps;
56     }
57 }
58