• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2023 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.inputmethod;
18 
19 import android.content.Context;
20 import android.graphics.drawable.Drawable;
21 
22 import androidx.annotation.Nullable;
23 import androidx.preference.PreferenceScreen;
24 
25 /**
26  * Provider for Keyboard settings related features.
27  */
28 public interface KeyboardSettingsFeatureProvider {
29 
30     /**
31      * Checks whether the connected device supports firmware update.
32      *
33      * @return true if the connected device supports firmware update.
34      */
supportsFirmwareUpdate()35     boolean supportsFirmwareUpdate();
36 
37     /**
38      * Register firmware information preferences update on preference screen.
39      *
40      * @param screen The {@link PreferenceScreen} to add the firmware information preferences.
41      */
registerKeyboardInformationCategory(@ullable PreferenceScreen screen)42     void registerKeyboardInformationCategory(@Nullable PreferenceScreen screen);
43 
44     /**
45      * Unregister firmware information preferences update on preference screen.
46      */
unregisterKeyboardInformationCategory()47     void unregisterKeyboardInformationCategory();
48 
49     /**
50      * Get custom action key icon.
51      *
52      * @param context Context for accessing resources.
53      * @return Returns the image of the icon, or null if there is no any custom icon.
54      */
55     @Nullable
getActionKeyIcon(Context context)56     Drawable getActionKeyIcon(Context context);
57 }
58