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 * Add firmware update preference category . 39 * 40 * @param context The context to initialize the application with. 41 * @param screen The {@link PreferenceScreen} to add the firmware update preference category. 42 * 43 * @return true if the category is added successfully. 44 */ addFirmwareUpdateCategory(Context context, PreferenceScreen screen)45 boolean addFirmwareUpdateCategory(Context context, PreferenceScreen screen); 46 47 /** 48 * Get custom action key icon. 49 * 50 * @param context Context for accessing resources. 51 * 52 * @return Returns the image of the icon, or null if there is no any custom icon. 53 */ 54 @Nullable getActionKeyIcon(Context context)55 Drawable getActionKeyIcon(Context context); 56 } 57