diff options
author | Steve McKay <smckay@google.com> | 2016-12-02 11:35:35 -0800 |
---|---|---|
committer | Steve McKay <smckay@google.com> | 2016-12-09 12:31:44 -0800 |
commit | ea93fe75396465b26429cfe1c1dcfadf7351354f (patch) | |
tree | cc979179513a34dc41035455d74ee10dba2d078a /cmds/uiautomator | |
parent | eddb8b0cf4abf12e662dd7032275d54485da1fe9 (diff) |
Replace ContentProvider SQL args w/ Bundle & Constants.
Test: cts-tradefed run cts-dev -m CtsContentTestCases
Bug: 30927484
Change-Id: Idb9dbc2b80896e9f8474a0db71353b7a3810d597
Diffstat (limited to 'cmds/uiautomator')
-rw-r--r-- | cmds/uiautomator/library/testrunner-src/com/android/uiautomator/core/ShellUiAutomatorBridge.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cmds/uiautomator/library/testrunner-src/com/android/uiautomator/core/ShellUiAutomatorBridge.java b/cmds/uiautomator/library/testrunner-src/com/android/uiautomator/core/ShellUiAutomatorBridge.java index 32b45953fc77..b0ab2355adb6 100644 --- a/cmds/uiautomator/library/testrunner-src/com/android/uiautomator/core/ShellUiAutomatorBridge.java +++ b/cmds/uiautomator/library/testrunner-src/com/android/uiautomator/core/ShellUiAutomatorBridge.java @@ -20,6 +20,7 @@ import android.app.ActivityManager; import android.app.ContentProviderHolder; import android.app.IActivityManager; import android.app.UiAutomation; +import android.content.ContentResolver; import android.content.Context; import android.content.IContentProvider; import android.database.Cursor; @@ -69,10 +70,12 @@ public class ShellUiAutomatorBridge extends UiAutomatorBridge { cursor = provider.query(null, Settings.Secure.CONTENT_URI, new String[] { Settings.Secure.VALUE - }, "name=?", - new String[] { - Settings.Secure.LONG_PRESS_TIMEOUT - }, null, null); + }, + ContentResolver.createSqlQueryBundle( + "name=?", + new String[] { Settings.Secure.LONG_PRESS_TIMEOUT }, + null), + null); if (cursor.moveToFirst()) { longPressTimeout = cursor.getInt(0); } |