Use custom action key icon

1. get icon from getKeyboardSettingsFeatureProvider
2. set color for it

Bug: 269214138
Test: manual, atest KeyboardSettingsFeatureProviderImplTest
Change-Id: I3a2d47e8230aec1404300b000e8b1fcf221e2a65
This commit is contained in:
danielwbhuang
2023-05-22 23:44:23 +08:00
parent 097cd12494
commit 19a5e212de
8 changed files with 268 additions and 25 deletions

View File

@@ -17,7 +17,9 @@
package com.android.settings.inputmethod;
import android.content.Context;
import android.graphics.drawable.Drawable;
import androidx.annotation.Nullable;
import androidx.preference.PreferenceScreen;
/**
@@ -41,4 +43,14 @@ public interface KeyboardSettingsFeatureProvider {
* @return true if the category is added successfully.
*/
boolean addFirmwareUpdateCategory(Context context, PreferenceScreen screen);
/**
* Get custom action key icon.
*
* @param context Context for accessing resources.
*
* @return Returns the image of the icon, or null if there is no any custom icon.
*/
@Nullable
Drawable getActionKeyIcon(Context context);
}