Merge "Remove Change Navigation Mode option for Taskbar Divider Popup Menu" into udc-qpr-dev

This commit is contained in:
Treehugger Robot authored and Android (Google) Code Review committed 2023-08-21 19:41:19 +00:00
commit 4dc9893028
4 files changed
+2 -81

No files matched your search

@@ -17,7 +17,6 @@ package com.android.launcher3.taskbar
import android.annotation.SuppressLint
import android.content.Context
import android.content.Intent
import android.graphics.Rect
import android.graphics.drawable.GradientDrawable
import android.util.AttributeSet
@@ -44,9 +43,6 @@ constructor(
companion object {
private const val TAG = "TaskbarDividerPopupView"
private const val DIVIDER_POPUP_CLOSING_DELAY = 500L
private const val SETTINGS_PACKAGE_NAME = "com.android.settings"
private const val CHANGE_NAVIGATION_MODE_ACTION =
"com.android.settings.NAVIGATION_MODE_SETTINGS"
@JvmStatic
fun createAndPopulate(
@@ -103,21 +99,12 @@ constructor(
super.onFinishInflate()
val taskbarSwitchOption = findViewById<LinearLayout>(R.id.taskbar_switch_option)
val alwaysShowTaskbarSwitch = findViewById<Switch>(R.id.taskbar_pinning_switch)
val navigationModeChangeOption =
findViewById<LinearLayout>(R.id.navigation_mode_switch_option)
alwaysShowTaskbarSwitch.isChecked = alwaysShowTaskbarOn
taskbarSwitchOption.setOnClickListener {
alwaysShowTaskbarSwitch.isClickable = true
alwaysShowTaskbarSwitch.isChecked = !alwaysShowTaskbarOn
onClickAlwaysShowTaskbarSwitchOption()
}
navigationModeChangeOption.setOnClickListener {
context.startActivity(
Intent(CHANGE_NAVIGATION_MODE_ACTION)
.setPackage(SETTINGS_PACKAGE_NAME)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
)
}
}
/** Orient object as usual and then center object horizontally. */