mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Add content descriptions to task bar nav buttons
Fixes: 209608812 Test: manual Change-Id: Iba50abfb2a3d33104b6d88574df0bc7b5daf1d3a
This commit is contained in:
@@ -25,7 +25,9 @@ import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
import androidx.annotation.StringRes;
|
||||
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.testing.TestLogging;
|
||||
import com.android.launcher3.testing.TestProtocol;
|
||||
import com.android.quickstep.OverviewCommandHelper;
|
||||
@@ -120,6 +122,23 @@ public class TaskbarNavButtonController {
|
||||
}
|
||||
}
|
||||
|
||||
public @StringRes int getButtonContentDescription(@TaskbarButton int buttonType) {
|
||||
switch (buttonType) {
|
||||
case BUTTON_HOME:
|
||||
return R.string.taskbar_button_home;
|
||||
case BUTTON_A11Y:
|
||||
return R.string.taskbar_button_a11y;
|
||||
case BUTTON_BACK:
|
||||
return R.string.taskbar_button_back;
|
||||
case BUTTON_IME_SWITCH:
|
||||
return R.string.taskbar_button_ime_switcher;
|
||||
case BUTTON_RECENTS:
|
||||
return R.string.taskbar_button_recents;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the user has long pressed back and recents buttons
|
||||
* "together" (within {@link #SCREEN_PIN_LONG_PRESS_THRESHOLD})ms
|
||||
|
||||
Reference in New Issue
Block a user