Merge "Add Intrsumentation#resetInTouchMode for instrumenting" into tm-dev
This commit is contained in:
@@ -5630,6 +5630,7 @@ package android.app {
|
||||
method public boolean onException(Object, Throwable);
|
||||
method public void onStart();
|
||||
method public void removeMonitor(android.app.Instrumentation.ActivityMonitor);
|
||||
method public void resetInTouchMode();
|
||||
method public void runOnMainSync(Runnable);
|
||||
method public void sendCharacterSync(int);
|
||||
method public void sendKeyDownUpSync(int);
|
||||
|
||||
@@ -392,6 +392,15 @@ public class Instrumentation {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the {@link #setInTouchMode touch mode} to the device default.
|
||||
*/
|
||||
public void resetInTouchMode() {
|
||||
final boolean defaultInTouchMode = getContext().getResources().getBoolean(
|
||||
com.android.internal.R.bool.config_defaultInTouchMode);
|
||||
setInTouchMode(defaultInTouchMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Schedule a callback for when the application's main thread goes idle
|
||||
* (has no more events to process).
|
||||
|
||||
Reference in New Issue
Block a user