diff options
Diffstat (limited to 'tests/testables/src/android/testing/ViewUtils.java')
-rw-r--r-- | tests/testables/src/android/testing/ViewUtils.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/testables/src/android/testing/ViewUtils.java b/tests/testables/src/android/testing/ViewUtils.java index 5a651aacc74f..fca44aed0447 100644 --- a/tests/testables/src/android/testing/ViewUtils.java +++ b/tests/testables/src/android/testing/ViewUtils.java @@ -31,12 +31,10 @@ public class ViewUtils { LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, LayoutParams.TYPE_APPLICATION_OVERLAY, 0, PixelFormat.TRANSLUCENT); - InstrumentationRegistry.getContext() - .getSystemService(WindowManager.class).addView(view, lp); + view.getContext().getSystemService(WindowManager.class).addView(view, lp); } public static void detachView(View view) { - InstrumentationRegistry.getContext() - .getSystemService(WindowManager.class).removeViewImmediate(view); + view.getContext().getSystemService(WindowManager.class).removeViewImmediate(view); } } |