diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2019-01-22 20:41:00 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-01-22 20:41:00 +0000 |
| commit | 61217232ada455cdfd6ecfe863aaa4f9a9528f7f (patch) | |
| tree | 0a02cecce8ca91245d7a699888f777e7d905dd83 /core/java/android | |
| parent | a47310fde06c41a7b41ddb59db767993e195180d (diff) | |
| parent | fe6aeaf2a39ed957f23b0737d141ade6ba6035e5 (diff) | |
Merge "API Compatibility: Fix incompatible abstract methods on Context"
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/content/Context.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index cefc700d372a..280f1ac9c067 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -771,7 +771,9 @@ public abstract class Context { * <p> * This is not generally intended for third party application developers. */ - public abstract String getOpPackageName(); + public String getOpPackageName() { + throw new RuntimeException("Not implemented. Must override in a subclass."); + } /** Return the full application info for this context's package. */ public abstract ApplicationInfo getApplicationInfo(); @@ -2980,9 +2982,11 @@ public abstract class Context { * * @see #bindService */ - public abstract boolean bindIsolatedService(@RequiresPermission Intent service, + public boolean bindIsolatedService(@RequiresPermission Intent service, @NonNull ServiceConnection conn, @BindServiceFlags int flags, - @NonNull String instanceName); + @NonNull String instanceName) { + throw new RuntimeException("Not implemented. Must override in a subclass."); + } /** * Same as {@link #bindService(Intent, ServiceConnection, int)}, but with an explicit userHandle @@ -3037,8 +3041,10 @@ public abstract class Context { * a related groups -- higher importance values will be killed before * lower ones. */ - public abstract void updateServiceGroup(@NonNull ServiceConnection conn, int group, - int importance); + public void updateServiceGroup(@NonNull ServiceConnection conn, int group, + int importance) { + throw new RuntimeException("Not implemented. Must override in a subclass."); + } /** * Disconnect from an application service. You will no longer receive |
