Add @UnsupportedAppUsage annotations

For packages:
  android.webkit

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: Ic22415d3e70a3b75a6418f96beb371d0445c7484
Merged-In: I41643e1e47391a12b0aed3058b3d9987a8e6ee2f
diff --git a/core/java/android/webkit/CacheManager.java b/core/java/android/webkit/CacheManager.java
index fc76029..563e00e 100644
--- a/core/java/android/webkit/CacheManager.java
+++ b/core/java/android/webkit/CacheManager.java
@@ -17,6 +17,7 @@
 package android.webkit;
 
 import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
 
 import java.io.File;
 import java.io.IOException;
@@ -50,22 +51,37 @@
     @Deprecated
     public static class CacheResult {
         // these fields are saved to the database
+        @UnsupportedAppUsage
         int httpStatusCode;
+        @UnsupportedAppUsage
         long contentLength;
+        @UnsupportedAppUsage
         long expires;
+        @UnsupportedAppUsage
         String expiresString;
+        @UnsupportedAppUsage
         String localPath;
+        @UnsupportedAppUsage
         String lastModified;
+        @UnsupportedAppUsage
         String etag;
+        @UnsupportedAppUsage
         String mimeType;
+        @UnsupportedAppUsage
         String location;
+        @UnsupportedAppUsage
         String encoding;
+        @UnsupportedAppUsage
         String contentdisposition;
+        @UnsupportedAppUsage
         String crossDomain;
 
         // these fields are NOT saved to the database
+        @UnsupportedAppUsage
         InputStream inStream;
+        @UnsupportedAppUsage
         OutputStream outStream;
+        @UnsupportedAppUsage
         File outFile;
 
         /**
@@ -73,6 +89,7 @@
          *
          * @return the status code of this cache entry
          */
+        @UnsupportedAppUsage
         public int getHttpStatusCode() {
             return httpStatusCode;
         }
@@ -82,6 +99,7 @@
          *
          * @return the content length of this cache entry
          */
+        @UnsupportedAppUsage
         public long getContentLength() {
             return contentLength;
         }
@@ -93,6 +111,7 @@
          *
          * @return the path of the file used to store this cache entry
          */
+        @UnsupportedAppUsage
         public String getLocalPath() {
             return localPath;
         }
@@ -103,6 +122,7 @@
          *
          * @return the expiry date of this cache entry
          */
+        @UnsupportedAppUsage
         public long getExpires() {
             return expires;
         }
@@ -113,6 +133,7 @@
          * @return the expiry date of this cache entry
          *
          */
+        @UnsupportedAppUsage
         public String getExpiresString() {
             return expiresString;
         }
@@ -123,6 +144,7 @@
          *
          * @return the date at which this cache entry was last modified
          */
+        @UnsupportedAppUsage
         public String getLastModified() {
             return lastModified;
         }
@@ -132,6 +154,7 @@
          *
          * @return the entity tag of this cache entry
          */
+        @UnsupportedAppUsage
         public String getETag() {
             return etag;
         }
@@ -141,6 +164,7 @@
          *
          * @return the MIME type of this cache entry
          */
+        @UnsupportedAppUsage
         public String getMimeType() {
             return mimeType;
         }
@@ -151,6 +175,7 @@
          *
          * @return the HTTP 'Location' header for this cache entry
          */
+        @UnsupportedAppUsage
         public String getLocation() {
             return location;
         }
@@ -160,6 +185,7 @@
          *
          * @return the encoding of this cache entry
          */
+        @UnsupportedAppUsage
         public String getEncoding() {
             return encoding;
         }
@@ -171,6 +197,7 @@
          * @return the HTTP 'Content-Disposition' header for this cache entry
          *
          */
+        @UnsupportedAppUsage
         public String getContentDisposition() {
             return contentdisposition;
         }
@@ -182,6 +209,7 @@
          *
          * @return an input stream to the content of this cache entry
          */
+        @UnsupportedAppUsage
         public InputStream getInputStream() {
             return inStream;
         }
@@ -194,6 +222,7 @@
          * @return an output stream to the content of this cache entry
          */
         // Note that this is always null for objects returned by getCacheFile()!
+        @UnsupportedAppUsage
         public OutputStream getOutputStream() {
             return outStream;
         }
@@ -204,6 +233,7 @@
          *
          * @param stream an input stream to the content of this cache entry
          */
+        @UnsupportedAppUsage
         public void setInputStream(InputStream stream) {
             this.inStream = stream;
         }
@@ -213,6 +243,7 @@
          *
          * @param encoding the encoding of this cache entry
          */
+        @UnsupportedAppUsage
         public void setEncoding(String encoding) {
             this.encoding = encoding;
         }
@@ -235,6 +266,7 @@
      */
     @Deprecated
     @Nullable
+    @UnsupportedAppUsage
     public static File getCacheFileBaseDir() {
         return null;
     }
@@ -246,6 +278,7 @@
      * @deprecated This method no longer has any effect and always returns {@code false}.
      */
     @Deprecated
+    @UnsupportedAppUsage
     public static boolean cacheDisabled() {
         return false;
     }
@@ -259,6 +292,7 @@
      * @deprecated This method no longer has any effect and always returns {@code false}.
      */
     @Deprecated
+    @UnsupportedAppUsage
     public static boolean startCacheTransaction() {
         return false;
     }
@@ -271,6 +305,7 @@
      * @deprecated This method no longer has any effect and always returns {@code false}.
      */
     @Deprecated
+    @UnsupportedAppUsage
     public static boolean endCacheTransaction() {
         return false;
     }
@@ -290,6 +325,7 @@
      */
     @Deprecated
     @Nullable
+    @UnsupportedAppUsage
     public static CacheResult getCacheFile(String url,
             Map<String, String> headers) {
         return null;
@@ -304,10 +340,12 @@
      * @deprecated Access to the HTTP cache will be removed in a future release.
      */
     @Deprecated
+    @UnsupportedAppUsage
     public static void saveCacheFile(String url, CacheResult cacheResult) {
         saveCacheFile(url, 0, cacheResult);
     }
 
+    @UnsupportedAppUsage
     static void saveCacheFile(String url, long postIdentifier,
             CacheResult cacheRet) {
         try {
diff --git a/core/java/android/webkit/ConsoleMessage.java b/core/java/android/webkit/ConsoleMessage.java
index a9c351a..6051956 100644
--- a/core/java/android/webkit/ConsoleMessage.java
+++ b/core/java/android/webkit/ConsoleMessage.java
@@ -16,6 +16,8 @@
 
 package android.webkit;
 
+import android.annotation.UnsupportedAppUsage;
+
 /**
  * Public class representing a JavaScript console message from WebCore. This could be a issued
  * by a call to one of the <code>console</code> logging functions (e.g.
@@ -34,9 +36,13 @@
         DEBUG
     };
 
+    @UnsupportedAppUsage
     private MessageLevel mLevel;
+    @UnsupportedAppUsage
     private String mMessage;
+    @UnsupportedAppUsage
     private String mSourceId;
+    @UnsupportedAppUsage
     private int mLineNumber;
 
     public ConsoleMessage(String message, String sourceId, int lineNumber, MessageLevel msgLevel) {
diff --git a/core/java/android/webkit/JsResult.java b/core/java/android/webkit/JsResult.java
index d36ab418..5bf6aab 100644
--- a/core/java/android/webkit/JsResult.java
+++ b/core/java/android/webkit/JsResult.java
@@ -17,6 +17,7 @@
 package android.webkit;
 
 import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
 
 /**
  * An instance of this class is passed as a parameter in various {@link WebChromeClient} action
@@ -34,6 +35,7 @@
         public void onJsResultComplete(JsResult result);
     }
     // This is the caller of the prompt and is the object that is waiting.
+    @UnsupportedAppUsage
     private final ResultReceiver mReceiver;
     // This is a basic result of a confirm or prompt dialog.
     private boolean mResult;
diff --git a/core/java/android/webkit/PluginData.java b/core/java/android/webkit/PluginData.java
index 88fc9b7..8aeeb1c 100644
--- a/core/java/android/webkit/PluginData.java
+++ b/core/java/android/webkit/PluginData.java
@@ -16,6 +16,7 @@
 
 package android.webkit;
 
+import android.annotation.UnsupportedAppUsage;
 import java.io.InputStream;
 import java.util.Map;
 
@@ -69,6 +70,7 @@
      * deprecated, so is this class.
      */
     @Deprecated
+    @UnsupportedAppUsage
     public PluginData(
             InputStream stream,
             long length,
@@ -90,6 +92,7 @@
      * deprecated, so is this class.
      */
     @Deprecated
+    @UnsupportedAppUsage
     public InputStream getInputStream() {
         return mStream;
     }
@@ -104,6 +107,7 @@
      * deprecated, so is this class.
      */
     @Deprecated
+    @UnsupportedAppUsage
     public long getContentLength() {
         return mContentLength;
     }
@@ -121,6 +125,7 @@
      * deprecated, so is this class.
      */
     @Deprecated
+    @UnsupportedAppUsage
     public Map<String, String[]> getHeaders() {
         return mHeaders;
     }
@@ -135,6 +140,7 @@
      * deprecated, so is this class.
      */
     @Deprecated
+    @UnsupportedAppUsage
     public int getStatusCode() {
         return mStatusCode;
     }
diff --git a/core/java/android/webkit/URLUtil.java b/core/java/android/webkit/URLUtil.java
index ed122a6..5d704cb0 100644
--- a/core/java/android/webkit/URLUtil.java
+++ b/core/java/android/webkit/URLUtil.java
@@ -17,6 +17,7 @@
 package android.webkit;
 
 import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
 import android.net.ParseException;
 import android.net.Uri;
 import android.net.WebAddress;
@@ -139,6 +140,7 @@
     /**
      * @return {@code true} if the url is correctly URL encoded
      */
+    @UnsupportedAppUsage
     static boolean verifyURLEncoding(String url) {
         int count = url.length();
         if (count == 0) {
@@ -181,6 +183,7 @@
      * @return {@code true} if the url is a resource file.
      * @hide
      */
+    @UnsupportedAppUsage
     public static boolean isResourceUrl(String url) {
         return (null != url) && url.startsWith(RESOURCE_BASE);
     }
@@ -398,6 +401,7 @@
      * Unfortunately some servers do not quote the value so to maintain
      * consistent behaviour with other browsers, we allow unquoted values too.
      */
+    @UnsupportedAppUsage
     static String parseContentDisposition(String contentDisposition) {
         try {
             Matcher m = CONTENT_DISPOSITION_PATTERN.matcher(contentDisposition);
diff --git a/core/java/android/webkit/UrlInterceptHandler.java b/core/java/android/webkit/UrlInterceptHandler.java
index 0a6e51f..f23aae6 100644
--- a/core/java/android/webkit/UrlInterceptHandler.java
+++ b/core/java/android/webkit/UrlInterceptHandler.java
@@ -17,6 +17,7 @@
 package android.webkit;
 
 import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
 import android.webkit.CacheManager.CacheResult;
 import android.webkit.PluginData;
 
@@ -44,6 +45,7 @@
      */
     @Deprecated
     @Nullable
+    @UnsupportedAppUsage
     CacheResult service(String url, @Nullable Map<String, String> headers);
 
     /**
@@ -60,5 +62,6 @@
      */
     @Deprecated
     @Nullable
+    @UnsupportedAppUsage
     PluginData getPluginData(String url, @Nullable Map<String, String> headers);
 }
diff --git a/core/java/android/webkit/UrlInterceptRegistry.java b/core/java/android/webkit/UrlInterceptRegistry.java
index 700d6d9..eeb28d7 100644
--- a/core/java/android/webkit/UrlInterceptRegistry.java
+++ b/core/java/android/webkit/UrlInterceptRegistry.java
@@ -17,6 +17,7 @@
 package android.webkit;
 
 import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
 import android.webkit.CacheManager.CacheResult;
 import android.webkit.PluginData;
 import android.webkit.UrlInterceptHandler;
@@ -55,6 +56,7 @@
      * deprecated, so is this class.
      */
     @Deprecated
+    @UnsupportedAppUsage
     public static synchronized void setUrlInterceptDisabled(boolean disabled) {
         mDisabled = disabled;
     }
@@ -85,6 +87,7 @@
      * deprecated, so is this class.
      */
     @Deprecated
+    @UnsupportedAppUsage
     public static synchronized boolean registerHandler(
             UrlInterceptHandler handler) {
         if (!getHandlers().contains(handler)) {
@@ -106,6 +109,7 @@
      * deprecated, so is this class.
      */
     @Deprecated
+    @UnsupportedAppUsage
     public static synchronized boolean unregisterHandler(
             UrlInterceptHandler handler) {
         return getHandlers().remove(handler);
@@ -152,6 +156,7 @@
      */
     @Deprecated
     @Nullable
+    @UnsupportedAppUsage
     public static synchronized PluginData getPluginData(
             String url, Map<String, String> headers) {
         if (urlInterceptDisabled()) {
diff --git a/core/java/android/webkit/WebResourceResponse.java b/core/java/android/webkit/WebResourceResponse.java
index 7bc7b07..aae3056 100644
--- a/core/java/android/webkit/WebResourceResponse.java
+++ b/core/java/android/webkit/WebResourceResponse.java
@@ -18,6 +18,7 @@
 
 import android.annotation.NonNull;
 import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
 
 import java.io.InputStream;
 import java.io.StringBufferInputStream;
@@ -29,9 +30,11 @@
  * response when the WebView requests a particular resource.
  */
 public class WebResourceResponse {
+    @UnsupportedAppUsage
     private boolean mImmutable;
     private String mMimeType;
     private String mEncoding;
+    @UnsupportedAppUsage
     private int mStatusCode;
     private String mReasonPhrase;
     private Map<String, String> mResponseHeaders;
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index cba11a8..66e079e 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -19,6 +19,7 @@
 import android.annotation.IntDef;
 import android.annotation.Nullable;
 import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
 import android.content.Context;
 
 import java.lang.annotation.ElementType;
@@ -92,6 +93,7 @@
         TextSize(int size) {
             value = size;
         }
+        @UnsupportedAppUsage
         int value;
     }
 
@@ -579,6 +581,7 @@
      * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
      */
     @Deprecated
+    @UnsupportedAppUsage
     public void setUseDoubleTree(boolean use) {
         // Specified to do nothing, so no need for derived classes to override.
     }
@@ -591,6 +594,7 @@
      * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
      */
     @Deprecated
+    @UnsupportedAppUsage
     public boolean getUseDoubleTree() {
         // Returns false unconditionally, so no need for derived classes to override.
         return false;
@@ -1002,6 +1006,7 @@
      * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}
      */
     @Deprecated
+    @UnsupportedAppUsage
     public void setPluginsPath(String pluginsPath) {
         // Specified to do nothing, so no need for derived classes to override.
     }
@@ -1197,6 +1202,7 @@
      * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}
      */
     @Deprecated
+    @UnsupportedAppUsage
     public String getPluginsPath() {
         // Unconditionally returns empty string, so no need for derived classes to override.
         return "";
diff --git a/core/java/android/webkit/WebSyncManager.java b/core/java/android/webkit/WebSyncManager.java
index 03b94e7..3fa1b01 100644
--- a/core/java/android/webkit/WebSyncManager.java
+++ b/core/java/android/webkit/WebSyncManager.java
@@ -16,6 +16,7 @@
 
 package android.webkit;
 
+import android.annotation.UnsupportedAppUsage;
 import android.content.Context;
 
 /**
@@ -65,5 +66,6 @@
     protected void onSyncInit() {
     }
 
+    @UnsupportedAppUsage
     abstract void syncFromRamToFlash();
 }
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index d7f1d6e..2c236a6 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -20,6 +20,7 @@
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
 import android.annotation.Widget;
 import android.content.Context;
 import android.content.Intent;
@@ -363,6 +364,7 @@
     // Throwing an exception for incorrect thread usage if the
     // build target is JB MR2 or newer. Defaults to false, and is
     // set in the WebView constructor.
+    @UnsupportedAppUsage
     private static volatile boolean sEnforceThreadChecking = false;
 
     /**
@@ -645,6 +647,7 @@
      * @hide This is used internally by dumprendertree, as it requires the JavaScript interfaces to
      *       be added synchronously, before a subsequent loadUrl call takes effect.
      */
+    @UnsupportedAppUsage
     protected WebView(Context context, AttributeSet attrs, int defStyleAttr,
             Map<String, Object> javaScriptInterfaces, boolean privateBrowsing) {
         this(context, attrs, defStyleAttr, 0, javaScriptInterfaces, privateBrowsing);
@@ -654,6 +657,7 @@
      * @hide
      */
     @SuppressWarnings("deprecation")  // for super() call into deprecated base class constructor.
+    @UnsupportedAppUsage
     protected WebView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes,
             Map<String, Object> javaScriptInterfaces, boolean privateBrowsing) {
         super(context, attrs, defStyleAttr, defStyleRes);
@@ -731,6 +735,7 @@
      * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
      */
     @Deprecated
+    @UnsupportedAppUsage
     public int getVisibleTitleHeight() {
         checkThread();
         return mProvider.getVisibleTitleHeight();
@@ -835,6 +840,7 @@
      * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
      */
     @Deprecated
+    @UnsupportedAppUsage
     public static void enablePlatformNotifications() {
         // noop
     }
@@ -847,6 +853,7 @@
      * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
      */
     @Deprecated
+    @UnsupportedAppUsage
     public static void disablePlatformNotifications() {
         // noop
     }
@@ -856,6 +863,7 @@
      *
      * @hide
      */
+    @UnsupportedAppUsage
     public static void freeMemoryForTests() {
         getFactory().getStatics().freeMemoryForTests();
     }
@@ -900,6 +908,7 @@
      * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
      */
     @Deprecated
+    @UnsupportedAppUsage
     public boolean savePicture(Bundle b, final File dest) {
         checkThread();
         return mProvider.savePicture(b, dest);
@@ -917,6 +926,7 @@
      * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
      */
     @Deprecated
+    @UnsupportedAppUsage
     public boolean restorePicture(Bundle b, File src) {
         checkThread();
         return mProvider.restorePicture(b, src);
@@ -1534,6 +1544,7 @@
      *
      * @hide
      */
+    @UnsupportedAppUsage
     public String getTouchIconUrl() {
         return mProvider.getTouchIconUrl();
     }
@@ -1566,6 +1577,7 @@
      * @hide
      */
     @ViewDebug.ExportedProperty(category = "webview")
+    @UnsupportedAppUsage
     public int getContentWidth() {
         return mProvider.getContentWidth();
     }
@@ -1616,6 +1628,7 @@
      *
      * @hide
      */
+    @UnsupportedAppUsage
     public boolean isPaused() {
         return mProvider.isPaused();
     }
@@ -2126,6 +2139,7 @@
      * @hide
      */
     @Deprecated
+    @UnsupportedAppUsage
     public static synchronized PluginList getPluginList() {
         return new PluginList();
     }
@@ -2193,6 +2207,7 @@
      * @hide
      */
     @Deprecated
+    @UnsupportedAppUsage
     public void refreshPlugins(boolean reloadOpenPages) {
         checkThread();
     }
@@ -2205,6 +2220,7 @@
      * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
      */
     @Deprecated
+    @UnsupportedAppUsage
     public void emulateShiftHeld() {
         checkThread();
     }
@@ -2265,6 +2281,7 @@
      * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN}
      */
     @Deprecated
+    @UnsupportedAppUsage
     public View getZoomControls() {
         checkThread();
         return mProvider.getZoomControls();
@@ -2340,6 +2357,7 @@
      * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
      */
     @Deprecated
+    @UnsupportedAppUsage
     public void debugDump() {
         checkThread();
     }
@@ -2625,6 +2643,7 @@
     }
 
     // Only used by android.webkit.FindActionModeCallback.
+    @UnsupportedAppUsage
     void notifyFindDialogDismissed() {
         checkThread();
         mProvider.notifyFindDialogDismissed();
@@ -2634,6 +2653,7 @@
     // Private internal stuff
     //-------------------------------------------------------------------------
 
+    @UnsupportedAppUsage
     private WebViewProvider mProvider;
 
     /**
@@ -2677,12 +2697,15 @@
         }
     }
 
+    @UnsupportedAppUsage
     private static WebViewFactoryProvider getFactory() {
         return WebViewFactory.getProvider();
     }
 
+    @UnsupportedAppUsage
     private final Looper mWebViewThread = Looper.myLooper();
 
+    @UnsupportedAppUsage
     private void checkThread() {
         // Ignore mWebViewThread == null because this can be called during in the super class
         // constructor, before this class's own constructor has even started.
@@ -2963,6 +2986,7 @@
 
     /** @hide */
     @Override
+    @UnsupportedAppUsage
     protected void onDrawVerticalScrollBar(Canvas canvas, Drawable scrollBar,
             int l, int t, int r, int b) {
         mProvider.getViewDelegate().onDrawVerticalScrollBar(canvas, scrollBar, l, t, r, b);
@@ -3034,6 +3058,7 @@
 
     /** @hide */
     @Override
+    @UnsupportedAppUsage
     protected boolean setFrame(int left, int top, int right, int bottom) {
         return mProvider.getViewDelegate().setFrame(left, top, right, bottom);
     }
diff --git a/core/java/android/webkit/WebViewDelegate.java b/core/java/android/webkit/WebViewDelegate.java
index f067091..ba66571 100644
--- a/core/java/android/webkit/WebViewDelegate.java
+++ b/core/java/android/webkit/WebViewDelegate.java
@@ -19,6 +19,7 @@
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
 import android.app.ActivityThread;
 import android.app.Application;
 import android.app.ResourcesManager;
@@ -45,6 +46,7 @@
 @SystemApi
 public final class WebViewDelegate {
 
+    @UnsupportedAppUsage
     /* package */ WebViewDelegate() { }
 
     /**
diff --git a/core/java/android/webkit/WebViewFactory.java b/core/java/android/webkit/WebViewFactory.java
index e0ccda9..e9a9e8f 100644
--- a/core/java/android/webkit/WebViewFactory.java
+++ b/core/java/android/webkit/WebViewFactory.java
@@ -17,6 +17,7 @@
 package android.webkit;
 
 import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
 import android.app.ActivityManager;
 import android.app.AppGlobals;
 import android.app.Application;
@@ -59,8 +60,10 @@
 
     // Cache the factory both for efficiency, and ensure any one process gets all webviews from the
     // same provider.
+    @UnsupportedAppUsage
     private static WebViewFactoryProvider sProviderInstance;
     private static final Object sProviderLock = new Object();
+    @UnsupportedAppUsage
     private static PackageInfo sPackageInfo;
     private static Boolean sWebViewSupported;
     private static boolean sWebViewDisabled;
@@ -222,6 +225,7 @@
         return loadNativeRet;
     }
 
+    @UnsupportedAppUsage
     static WebViewFactoryProvider getProvider() {
         synchronized (sProviderLock) {
             // For now the main purpose of this function (and the factory abstraction) is to keep
@@ -359,6 +363,7 @@
         }
     }
 
+    @UnsupportedAppUsage
     private static Context getWebViewContextAndSetProvider() throws MissingWebViewPackageException {
         Application initialApplication = AppGlobals.getInitialApplication();
         try {
@@ -428,6 +433,7 @@
         }
     }
 
+    @UnsupportedAppUsage
     private static Class<WebViewFactoryProvider> getProviderClass() {
         Context webViewContext = null;
         Application initialApplication = AppGlobals.getInitialApplication();
@@ -509,6 +515,7 @@
     private static String WEBVIEW_UPDATE_SERVICE_NAME = "webviewupdate";
 
     /** @hide */
+    @UnsupportedAppUsage
     public static IWebViewUpdateService getUpdateService() {
         if (isWebViewSupported()) {
             return getUpdateServiceUnchecked();
diff --git a/core/java/android/webkit/WebViewProviderInfo.java b/core/java/android/webkit/WebViewProviderInfo.java
index b0e9f01..1704757 100644
--- a/core/java/android/webkit/WebViewProviderInfo.java
+++ b/core/java/android/webkit/WebViewProviderInfo.java
@@ -17,6 +17,7 @@
 package android.webkit;
 
 import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
 import android.content.pm.Signature;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -56,6 +57,7 @@
             }
         };
 
+    @UnsupportedAppUsage
     private WebViewProviderInfo(Parcel in) {
         packageName = in.readString();
         description = in.readString();
diff --git a/core/java/android/webkit/WebViewProviderResponse.java b/core/java/android/webkit/WebViewProviderResponse.java
index c0aeb59..0edcb6f 100644
--- a/core/java/android/webkit/WebViewProviderResponse.java
+++ b/core/java/android/webkit/WebViewProviderResponse.java
@@ -16,6 +16,7 @@
 
 package android.webkit;
 
+import android.annotation.UnsupportedAppUsage;
 import android.content.pm.PackageInfo;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -56,6 +57,7 @@
         out.writeInt(status);
     }
 
+    @UnsupportedAppUsage
     public final PackageInfo packageInfo;
     public final int status;
 }
diff --git a/core/java/android/webkit/WebViewUpdateService.java b/core/java/android/webkit/WebViewUpdateService.java
index 629891c..12d3221 100644
--- a/core/java/android/webkit/WebViewUpdateService.java
+++ b/core/java/android/webkit/WebViewUpdateService.java
@@ -17,6 +17,7 @@
 package android.webkit;
 
 import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
 import android.os.RemoteException;
 
 /**
@@ -25,6 +26,7 @@
 @SystemApi
 public final class WebViewUpdateService {
 
+    @UnsupportedAppUsage
     private WebViewUpdateService () {}
 
     /**