Loading core/java/android/accounts/AccountManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,15 @@ public class AccountManager { mMainHandler = new Handler(mContext.getMainLooper()); } /** * @hide used for testing only */ public AccountManager(Context context, IAccountManager service, Handler handler) { mContext = context; mService = service; mMainHandler = handler; } public static AccountManager get(Context context) { return (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE); } Loading core/java/android/net/WebAddress.java +1 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ public class WebAddress { static Pattern sAddressPattern = Pattern.compile( /* scheme */ "(?:(http|HTTP|https|HTTPS|file|FILE)\\:\\/\\/)?" + /* authority */ "(?:([-A-Za-z0-9$_.+!*'(),;?&=]+(?:\\:[-A-Za-z0-9$_.+!*'(),;?&=]+)?)@)?" + /* host */ "([-A-Za-z0-9%]+(?:\\.[-A-Za-z0-9%]+)*)?" + /* host */ "([-A-Za-z0-9%_]+(?:\\.[-A-Za-z0-9%_]+)*)?" + /* port */ "(?:\\:([0-9]+))?" + /* path */ "(\\/?.*)?"); Loading core/java/android/webkit/LoadListener.java +4 −18 Original line number Diff line number Diff line Loading @@ -324,13 +324,10 @@ class LoadListener extends Handler implements EventHandler { // As we don't support wml, render it as plain text mMimeType = "text/plain"; } else { // XXX: Until the servers send us either correct xhtml or // text/html, treat application/xhtml+xml as text/html. // It seems that xhtml+xml and vnd.wap.xhtml+xml mime // subtypes are used interchangeably. So treat them the same. if (mMimeType.equals("application/xhtml+xml") || mMimeType.equals("application/vnd.wap.xhtml+xml")) { mMimeType = "text/html"; if (mMimeType.equals("application/vnd.wap.xhtml+xml")) { mMimeType = "application/xhtml+xml"; } } } else { Loading Loading @@ -1396,19 +1393,8 @@ class LoadListener extends Handler implements EventHandler { Log.v(LOGTAG, "guessMimeTypeFromExtension: mURL = " + mUrl); } String mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension( return MimeTypeMap.getSingleton().getMimeTypeFromExtension( MimeTypeMap.getFileExtensionFromUrl(mUrl)); if (mimeType != null) { // XXX: Until the servers send us either correct xhtml or // text/html, treat application/xhtml+xml as text/html. if (mimeType.equals("application/xhtml+xml")) { mimeType = "text/html"; } } return mimeType; } /** Loading core/java/android/webkit/MimeTypeMap.java +1 −0 Original line number Diff line number Diff line Loading @@ -358,6 +358,7 @@ public /* package */ class MimeTypeMap { sMimeTypeMap.loadEntry("application/x-x509-ca-cert", "crt", false); sMimeTypeMap.loadEntry("application/x-xcf", "xcf", false); sMimeTypeMap.loadEntry("application/x-xfig", "fig", false); sMimeTypeMap.loadEntry("application/xhtml+xml", "xhtml", false); sMimeTypeMap.loadEntry("audio/basic", "snd", false); sMimeTypeMap.loadEntry("audio/midi", "mid", false); sMimeTypeMap.loadEntry("audio/midi", "midi", false); Loading core/java/android/webkit/WebView.java +10 −6 Original line number Diff line number Diff line Loading @@ -2959,19 +2959,16 @@ public class WebView extends AbsoluteLayout } private void updateTextEntry() { if (mTextEntry == null) { mTextEntry = new TextDialog(mContext, WebView.this); // Initialize our generation number. mTextGeneration = 0; } // If we do not have focus, do nothing until we gain focus. if (!hasFocus() && !mTextEntry.hasFocus() if (!hasFocus() && (null == mTextEntry || !mTextEntry.hasFocus()) || (mTouchMode >= FIRST_SCROLL_ZOOM && mTouchMode <= LAST_SCROLL_ZOOM)) { mNeedsUpdateTextEntry = true; return; } boolean alreadyThere = inEditingMode(); // inEditingMode can only return true if mTextEntry is non-null, // so we can safely call remove() if (alreadyThere) if (0 == mNativeClass || !nativeUpdateFocusNode()) { if (alreadyThere) { mTextEntry.remove(); Loading @@ -2985,6 +2982,13 @@ public class WebView extends AbsoluteLayout } return; } // At this point, we know we have found an input field, so go ahead // and create the TextDialog if necessary. if (mTextEntry == null) { mTextEntry = new TextDialog(mContext, WebView.this); // Initialize our generation number. mTextGeneration = 0; } mTextEntry.setTextSize(contentToView(node.mTextSize)); Rect visibleRect = sendOurVisibleRect(); // Note that sendOurVisibleRect calls viewToContent, so the coordinates Loading Loading
core/java/android/accounts/AccountManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,15 @@ public class AccountManager { mMainHandler = new Handler(mContext.getMainLooper()); } /** * @hide used for testing only */ public AccountManager(Context context, IAccountManager service, Handler handler) { mContext = context; mService = service; mMainHandler = handler; } public static AccountManager get(Context context) { return (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE); } Loading
core/java/android/net/WebAddress.java +1 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ public class WebAddress { static Pattern sAddressPattern = Pattern.compile( /* scheme */ "(?:(http|HTTP|https|HTTPS|file|FILE)\\:\\/\\/)?" + /* authority */ "(?:([-A-Za-z0-9$_.+!*'(),;?&=]+(?:\\:[-A-Za-z0-9$_.+!*'(),;?&=]+)?)@)?" + /* host */ "([-A-Za-z0-9%]+(?:\\.[-A-Za-z0-9%]+)*)?" + /* host */ "([-A-Za-z0-9%_]+(?:\\.[-A-Za-z0-9%_]+)*)?" + /* port */ "(?:\\:([0-9]+))?" + /* path */ "(\\/?.*)?"); Loading
core/java/android/webkit/LoadListener.java +4 −18 Original line number Diff line number Diff line Loading @@ -324,13 +324,10 @@ class LoadListener extends Handler implements EventHandler { // As we don't support wml, render it as plain text mMimeType = "text/plain"; } else { // XXX: Until the servers send us either correct xhtml or // text/html, treat application/xhtml+xml as text/html. // It seems that xhtml+xml and vnd.wap.xhtml+xml mime // subtypes are used interchangeably. So treat them the same. if (mMimeType.equals("application/xhtml+xml") || mMimeType.equals("application/vnd.wap.xhtml+xml")) { mMimeType = "text/html"; if (mMimeType.equals("application/vnd.wap.xhtml+xml")) { mMimeType = "application/xhtml+xml"; } } } else { Loading Loading @@ -1396,19 +1393,8 @@ class LoadListener extends Handler implements EventHandler { Log.v(LOGTAG, "guessMimeTypeFromExtension: mURL = " + mUrl); } String mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension( return MimeTypeMap.getSingleton().getMimeTypeFromExtension( MimeTypeMap.getFileExtensionFromUrl(mUrl)); if (mimeType != null) { // XXX: Until the servers send us either correct xhtml or // text/html, treat application/xhtml+xml as text/html. if (mimeType.equals("application/xhtml+xml")) { mimeType = "text/html"; } } return mimeType; } /** Loading
core/java/android/webkit/MimeTypeMap.java +1 −0 Original line number Diff line number Diff line Loading @@ -358,6 +358,7 @@ public /* package */ class MimeTypeMap { sMimeTypeMap.loadEntry("application/x-x509-ca-cert", "crt", false); sMimeTypeMap.loadEntry("application/x-xcf", "xcf", false); sMimeTypeMap.loadEntry("application/x-xfig", "fig", false); sMimeTypeMap.loadEntry("application/xhtml+xml", "xhtml", false); sMimeTypeMap.loadEntry("audio/basic", "snd", false); sMimeTypeMap.loadEntry("audio/midi", "mid", false); sMimeTypeMap.loadEntry("audio/midi", "midi", false); Loading
core/java/android/webkit/WebView.java +10 −6 Original line number Diff line number Diff line Loading @@ -2959,19 +2959,16 @@ public class WebView extends AbsoluteLayout } private void updateTextEntry() { if (mTextEntry == null) { mTextEntry = new TextDialog(mContext, WebView.this); // Initialize our generation number. mTextGeneration = 0; } // If we do not have focus, do nothing until we gain focus. if (!hasFocus() && !mTextEntry.hasFocus() if (!hasFocus() && (null == mTextEntry || !mTextEntry.hasFocus()) || (mTouchMode >= FIRST_SCROLL_ZOOM && mTouchMode <= LAST_SCROLL_ZOOM)) { mNeedsUpdateTextEntry = true; return; } boolean alreadyThere = inEditingMode(); // inEditingMode can only return true if mTextEntry is non-null, // so we can safely call remove() if (alreadyThere) if (0 == mNativeClass || !nativeUpdateFocusNode()) { if (alreadyThere) { mTextEntry.remove(); Loading @@ -2985,6 +2982,13 @@ public class WebView extends AbsoluteLayout } return; } // At this point, we know we have found an input field, so go ahead // and create the TextDialog if necessary. if (mTextEntry == null) { mTextEntry = new TextDialog(mContext, WebView.this); // Initialize our generation number. mTextGeneration = 0; } mTextEntry.setTextSize(contentToView(node.mTextSize)); Rect visibleRect = sendOurVisibleRect(); // Note that sendOurVisibleRect calls viewToContent, so the coordinates Loading