mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Add new buttons to taskbar
Cherry picked from commit 53db50dd0b2bd6ed1842b25396c9c52b7abe1157 after resolving conflicts The CL adds two new buttons for desktop usage. No listeners are registered yet. Recall: http://recall/clips/f52b70ed-c437-4374-a492-e4b7c802520a Bug: 198355239 Test: m, verify that new buttons are added Change-Id: I1d4a12da3041e113a978c37c9e36ec085d15e8b3
This commit is contained in:
committed by
Shuming Hao
parent
94c97fbe59
commit
db5960de5e
@@ -15,11 +15,15 @@
|
||||
*/
|
||||
package com.android.launcher3.taskbar;
|
||||
|
||||
import static android.content.pm.PackageManager.FEATURE_PC;
|
||||
|
||||
import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X;
|
||||
import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_A11Y;
|
||||
import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_BACK;
|
||||
import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_HOME;
|
||||
import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_IME_SWITCH;
|
||||
import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_NOTIFICATIONS;
|
||||
import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_QUICK_SETTINGS;
|
||||
import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_RECENTS;
|
||||
import static com.android.launcher3.taskbar.TaskbarViewController.ALPHA_INDEX_KEYGUARD;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_CLICKABLE;
|
||||
@@ -231,6 +235,17 @@ public class NavbarButtonsViewController {
|
||||
|
||||
applyState();
|
||||
mPropertyHolders.forEach(StatePropertyHolder::endAnimation);
|
||||
|
||||
// quick setting and notification buttons
|
||||
if (mContext.getPackageManager().hasSystemFeature(FEATURE_PC)) {
|
||||
addButton(R.drawable.ic_sysbar_quick_settings, BUTTON_QUICK_SETTINGS,
|
||||
mNavButtonContainer, mControllers.navButtonController,
|
||||
R.id.quick_settings_button);
|
||||
addButton(R.drawable.ic_sysbar_notifications, BUTTON_NOTIFICATIONS,
|
||||
mNavButtonContainer, mControllers.navButtonController,
|
||||
R.id.notifications_button);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initButtons(ViewGroup navContainer, ViewGroup endContainer,
|
||||
|
||||
Reference in New Issue
Block a user