File tree Expand file tree Collapse file tree 3 files changed +8
-14
lines changed
Expand file tree Collapse file tree 3 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 1717package android .webkit ;
1818
1919import android .content .Context ;
20- import android .os .Message ;
21- import android .os .Build ;
2220
2321/**
2422 * Manages settings state for a WebView. When a WebView is first created, it
@@ -1248,7 +1246,7 @@ public synchronized String getUserAgentString() {
12481246 * @param context a Context object used to access application assets
12491247 */
12501248 public static String getDefaultUserAgent (Context context ) {
1251- return WebView . getFactory ().getDefaultUserAgent (context );
1249+ return WebViewFactory . getProvider (). getStatics ().getDefaultUserAgent (context );
12521250 }
12531251
12541252 /**
Original file line number Diff line number Diff line change @@ -1821,7 +1821,7 @@ private void ensureProviderCreated() {
18211821 }
18221822 }
18231823
1824- static synchronized WebViewFactoryProvider getFactory () {
1824+ private static synchronized WebViewFactoryProvider getFactory () {
18251825 // For now the main purpose of this function (and the factory abstration) is to keep
18261826 // us honest and minimize usage of WebViewClassic internals when binding the proxy.
18271827 checkThread ();
Original file line number Diff line number Diff line change @@ -42,6 +42,12 @@ interface Statics {
4242 * {@link android.webkit.WebView#disablePlatformNotifications()}
4343 */
4444 void setPlatformNotificationsEnabled (boolean enable );
45+
46+ /**
47+ * Implements the API method:
48+ * {@link android.webkit.WebSettings#getDefaultUserAgent(Context) }
49+ */
50+ String getDefaultUserAgent (Context context );
4551 }
4652
4753 Statics getStatics ();
@@ -93,14 +99,4 @@ interface Statics {
9399 * @return the singleton WebViewDatabase instance
94100 */
95101 WebViewDatabase getWebViewDatabase (Context context );
96-
97- /**
98- * Returns the default User-Agent used by a WebView.
99- * An instance of WebView could use a different User-Agent if a call
100- * is made to {@link WebSettings#setUserAgent(int)} or
101- * {@link WebSettings#setUserAgentString(String)}.
102- *
103- * @param context a Context object used to access application assets
104- */
105- String getDefaultUserAgent (Context context );
106102}
You can’t perform that action at this time.
0 commit comments