diff options
Diffstat (limited to 'test-runner/android')
-rw-r--r-- | test-runner/android/test/SyncBaseInstrumentation.java | 2 | ||||
-rw-r--r-- | test-runner/android/test/TouchUtils.java | 4 | ||||
-rw-r--r-- | test-runner/android/test/mock/MockContext.java | 10 |
3 files changed, 13 insertions, 3 deletions
diff --git a/test-runner/android/test/SyncBaseInstrumentation.java b/test-runner/android/test/SyncBaseInstrumentation.java index e8d72d9..7d418f0 100644 --- a/test-runner/android/test/SyncBaseInstrumentation.java +++ b/test-runner/android/test/SyncBaseInstrumentation.java @@ -46,7 +46,7 @@ public class SyncBaseInstrumentation extends InstrumentationTestCase { */ protected void syncProvider(Uri uri, String accountName, String authority) throws Exception { Bundle extras = new Bundle(); - extras.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true); + extras.putBoolean(ContentResolver.SYNC_EXTRAS_IGNORE_SETTINGS, true); Account account = new Account(accountName, "com.google"); ContentResolver.requestSync(account, authority, extras); diff --git a/test-runner/android/test/TouchUtils.java b/test-runner/android/test/TouchUtils.java index 962b2f9..69c6d2d 100644 --- a/test-runner/android/test/TouchUtils.java +++ b/test-runner/android/test/TouchUtils.java @@ -773,7 +773,7 @@ public class TouchUtils { float xStep = (toX - fromX) / stepCount; MotionEvent event = MotionEvent.obtain(downTime, eventTime, - MotionEvent.ACTION_DOWN, fromX, y, 0); + MotionEvent.ACTION_DOWN, x, y, 0); inst.sendPointerSync(event); inst.waitForIdleSync(); @@ -787,7 +787,7 @@ public class TouchUtils { } eventTime = SystemClock.uptimeMillis(); - event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_UP, fromX, y, 0); + event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_UP, x, y, 0); inst.sendPointerSync(event); inst.waitForIdleSync(); } diff --git a/test-runner/android/test/mock/MockContext.java b/test-runner/android/test/mock/MockContext.java index 57b22f8..ffd757c 100644 --- a/test-runner/android/test/mock/MockContext.java +++ b/test-runner/android/test/mock/MockContext.java @@ -158,11 +158,21 @@ public class MockContext extends Context { } @Override + public File getExternalFilesDir(String type) { + throw new UnsupportedOperationException(); + } + + @Override public File getCacheDir() { throw new UnsupportedOperationException(); } @Override + public File getExternalCacheDir() { + throw new UnsupportedOperationException(); + } + + @Override public File getDir(String name, int mode) { throw new UnsupportedOperationException(); } |