From 6e53931f49f49245deef8622eb8e7dc6ccf04536 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Tue, 24 Feb 2015 18:53:21 -0800 Subject: Add Context.getSystemService(Class). Added an overload of getSystemService() that takes a class instead of a service name to eliminate the extra cast and provide more type safety. Cleaned up docs. Removed the default constructor of BatteryManager which should not have existed. Change-Id: I9da46b20641fc83ecd3342560e5b94cb721f289c --- test-runner/src/android/test/mock/MockContext.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test-runner') diff --git a/test-runner/src/android/test/mock/MockContext.java b/test-runner/src/android/test/mock/MockContext.java index 3378872..cfbebba 100644 --- a/test-runner/src/android/test/mock/MockContext.java +++ b/test-runner/src/android/test/mock/MockContext.java @@ -480,6 +480,11 @@ public class MockContext extends Context { } @Override + public String getSystemServiceName(Class serviceClass) { + throw new UnsupportedOperationException(); + } + + @Override public int checkPermission(String permission, int pid, int uid) { throw new UnsupportedOperationException(); } -- cgit v1.1