Merge "Enforce kotlin warnings as errors in InputTests" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
bcdfa159c9
@@ -13,6 +13,9 @@ android_test {
|
|||||||
"src/**/*.java",
|
"src/**/*.java",
|
||||||
"src/**/*.kt",
|
"src/**/*.kt",
|
||||||
],
|
],
|
||||||
|
kotlincflags: [
|
||||||
|
"-Werror",
|
||||||
|
],
|
||||||
platform_apis: true,
|
platform_apis: true,
|
||||||
certificate: "platform",
|
certificate: "platform",
|
||||||
static_libs: [
|
static_libs: [
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ class AnrTest {
|
|||||||
val contentResolver = instrumentation.targetContext.contentResolver
|
val contentResolver = instrumentation.targetContext.contentResolver
|
||||||
hideErrorDialogs = Settings.Global.getInt(contentResolver, HIDE_ERROR_DIALOGS, 0)
|
hideErrorDialogs = Settings.Global.getInt(contentResolver, HIDE_ERROR_DIALOGS, 0)
|
||||||
Settings.Global.putInt(contentResolver, HIDE_ERROR_DIALOGS, 0)
|
Settings.Global.putInt(contentResolver, HIDE_ERROR_DIALOGS, 0)
|
||||||
PACKAGE_NAME = UnresponsiveGestureMonitorActivity::class.java.getPackage().getName()
|
PACKAGE_NAME = UnresponsiveGestureMonitorActivity::class.java.getPackage()!!.getName()
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
|
|||||||
@@ -45,7 +45,8 @@ class UnresponsiveGestureMonitorActivity : Activity() {
|
|||||||
private lateinit var mInputMonitor: InputMonitor
|
private lateinit var mInputMonitor: InputMonitor
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
mInputMonitor = InputManager.getInstance().monitorGestureInput(MONITOR_NAME, displayId)
|
val inputManager = getSystemService(InputManager::class.java)
|
||||||
|
mInputMonitor = inputManager.monitorGestureInput(MONITOR_NAME, displayId)
|
||||||
mInputEventReceiver = UnresponsiveReceiver(
|
mInputEventReceiver = UnresponsiveReceiver(
|
||||||
mInputMonitor.getInputChannel(), Looper.myLooper())
|
mInputMonitor.getInputChannel(), Looper.myLooper())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user