Merge "Long Click to show the settings page" into udc-dev am: 0c8442865e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21502533 Change-Id: Ie081ad88db5e86e0fd887327bf43d74ffe0af310 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -18,6 +18,7 @@ package com.android.systemui.qs.tiles
|
||||
import android.content.Intent
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.provider.Settings
|
||||
import android.view.View
|
||||
import com.android.internal.jank.InteractionJankMonitor
|
||||
import com.android.internal.logging.MetricsLogger
|
||||
@@ -72,9 +73,7 @@ constructor(
|
||||
}
|
||||
|
||||
override fun newTileState(): QSTile.State {
|
||||
val state = QSTile.State()
|
||||
state.handlesLongClick = false
|
||||
return state
|
||||
return QSTile.State()
|
||||
}
|
||||
|
||||
override fun handleClick(view: View?) {
|
||||
@@ -98,7 +97,7 @@ constructor(
|
||||
}
|
||||
|
||||
override fun getLongClickIntent(): Intent? {
|
||||
return null
|
||||
return Intent(Settings.ACTION_TEXT_READING_SETTINGS)
|
||||
}
|
||||
|
||||
override fun getTileLabel(): CharSequence {
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
*/
|
||||
package com.android.systemui.qs.tiles
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Handler
|
||||
import android.provider.Settings
|
||||
import android.testing.AndroidTestingRunner
|
||||
import android.testing.TestableLooper
|
||||
import android.view.View
|
||||
@@ -113,4 +115,11 @@ class FontScalingTileTest : SysuiTestCase() {
|
||||
|
||||
verify(dialogLaunchAnimator).showFromView(any(), eq(view), nullable(), anyBoolean())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun getLongClickIntent_getExpectedIntent() {
|
||||
val intent: Intent? = fontScalingTile.getLongClickIntent()
|
||||
|
||||
assertThat(intent!!.action).isEqualTo(Settings.ACTION_TEXT_READING_SETTINGS)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user