diff options
| -rw-r--r-- | api/current.txt | 2 | ||||
| -rw-r--r-- | core/java/android/os/Looper.java | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/api/current.txt b/api/current.txt index 5404e1a633bd..397e8bdaf220 100644 --- a/api/current.txt +++ b/api/current.txt @@ -34678,7 +34678,7 @@ package android.os { method @Nullable public static android.os.Looper myLooper(); method @NonNull public static android.os.MessageQueue myQueue(); method public static void prepare(); - method public static void prepareMainLooper(); + method @Deprecated public static void prepareMainLooper(); method public void quit(); method public void quitSafely(); method public void setMessageLogging(@Nullable android.util.Printer); diff --git a/core/java/android/os/Looper.java b/core/java/android/os/Looper.java index 3222fc43b213..d468972df413 100644 --- a/core/java/android/os/Looper.java +++ b/core/java/android/os/Looper.java @@ -112,10 +112,12 @@ public final class Looper { /** * Initialize the current thread as a looper, marking it as an - * application's main looper. The main looper for your application - * is created by the Android environment, so you should never need - * to call this function yourself. See also: {@link #prepare()} + * application's main looper. See also: {@link #prepare()} + * + * @deprecated The main looper for your application is created by the Android environment, + * so you should never need to call this function yourself. */ + @Deprecated public static void prepareMainLooper() { prepare(false); synchronized (Looper.class) { |