diff options
Diffstat (limited to 'core')
19 files changed, 264 insertions, 68 deletions
diff --git a/core/java/android/content/ContentUris.java b/core/java/android/content/ContentUris.java index aa76034..dbe8a7c 100644 --- a/core/java/android/content/ContentUris.java +++ b/core/java/android/content/ContentUris.java @@ -19,9 +19,54 @@ package android.content; import android.net.Uri; /** - * Utility methods useful for working with content {@link android.net.Uri}s, - * those with a "content" scheme. - */ +* Utility methods useful for working with {@link android.net.Uri} objects +* that use the "content" (content://) scheme. +* +*<p> +* Content URIs have the syntax +*</p> +*<p> +* <code>content://<em>authority</em>/<em>path</em>/<em>id</em></code> +*</p> +*<dl> +* <dt> +* <code>content:</code> +* </dt> +* <dd> +* The scheme portion of the URI. This is always set to {@link +* android.content.ContentResolver#SCHEME_CONTENT ContentResolver.SCHEME_CONTENT} (value +* <code>content://</code>). +* </dd> +* <dt> +* <em>authority</em> +* </dt> +* <dd> +* A string that identifies the entire content provider. All the content URIs for the provider +* start with this string. To guarantee a unique authority, providers should consider +* using an authority that is the same as the provider class' package identifier. +* </dd> +* <dt> +* <em>path</em> +* </dt> +* <dd> +* Zero or more segments, separated by a forward slash (<code>/</code>), that identify +* some subset of the provider's data. Most providers use the path part to identify +* individual tables. Individual segments in the path are often called +* "directories" although they do not refer to file directories. The right-most +* segment in a path is often called a "twig" +* </dd> +* <dt> +* <em>id</em> +* </dt> +* <dd> +* A unique numeric identifier for a single row in the subset of data identified by the +* preceding path part. Most providers recognize content URIs that contain an id part +* and give them special handling. A table that contains a column named <code>_ID</code> +* often expects the id part to be a particular value for that column. +* </dd> +*</dl> +* +*/ public class ContentUris { /** diff --git a/core/java/android/net/NetworkUtils.java b/core/java/android/net/NetworkUtils.java index e289fc1..d39e741 100644 --- a/core/java/android/net/NetworkUtils.java +++ b/core/java/android/net/NetworkUtils.java @@ -250,4 +250,32 @@ public class NetworkUtils { } return result; } + + /** + * Trim leading zeros from IPv4 address strings + * Our base libraries will interpret that as octel.. + * Must leave non v4 addresses and host names alone. + * For example, 192.168.000.010 -> 192.168.0.10 + * TODO - fix base libraries and remove this function + * @param addr a string representing an ip addr + * @return a string propertly trimmed + */ + public static String trimV4AddrZeros(String addr) { + if (addr == null) return null; + String[] octets = addr.split("\\."); + if (octets.length != 4) return addr; + StringBuilder builder = new StringBuilder(16); + String result = null; + for (int i = 0; i < 4; i++) { + try { + if (octets[i].length() > 3) return addr; + builder.append(Integer.parseInt(octets[i])); + } catch (NumberFormatException e) { + return addr; + } + if (i < 3) builder.append('.'); + } + result = builder.toString(); + return result; + } } diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java index 7d03494..88fea91 100644 --- a/core/java/android/os/Build.java +++ b/core/java/android/os/Build.java @@ -311,7 +311,7 @@ public class Build { public static final int ICE_CREAM_SANDWICH = 14; /** - * Android 4.1. + * Android 4.0.3. */ public static final int ICE_CREAM_SANDWICH_MR1 = 15; } diff --git a/core/java/android/os/storage/package.html b/core/java/android/os/storage/package.html new file mode 100644 index 0000000..a5f1e1c --- /dev/null +++ b/core/java/android/os/storage/package.html @@ -0,0 +1,8 @@ +<HTML> +<BODY> +<p> +Contains classes for the system storage service, which manages binary asset filesystems +known as Opaque Binary Blobs (OBBs). +</p> +</BODY> +</HTML> diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 7b0e0ab..c44f23b 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -2779,10 +2779,10 @@ public final class Settings { public static final String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password"; /** - * If injection of accessibility enhancing JavaScript scripts + * If injection of accessibility enhancing JavaScript screen-reader * is enabled. * <p> - * Note: Accessibility injecting scripts are served by the + * Note: The JavaScript based screen-reader is served by the * Google infrastructure and enable users with disabilities to * efficiantly navigate in and explore web content. * </p> @@ -2795,6 +2795,22 @@ public final class Settings { "accessibility_script_injection"; /** + * The URL for the injected JavaScript based screen-reader used + * for providing accessiblity of content in WebView. + * <p> + * Note: The JavaScript based screen-reader is served by the + * Google infrastructure and enable users with disabilities to + * efficiently navigate in and explore web content. + * </p> + * <p> + * This property represents a string value. + * </p> + * @hide + */ + public static final String ACCESSIBILITY_SCREEN_READER_URL = + "accessibility_script_injection_url"; + + /** * Key bindings for navigation in built-in accessibility support for web content. * <p> * Note: These key bindings are for the built-in accessibility navigation for @@ -3132,6 +3148,14 @@ public final class Settings { "wifi_watchdog_blacklist_followup_interval_ms"; /** + * Setting to turn off poor network avoidance on Wi-Fi. Feature is disabled by default and + * the setting needs to be set to 1 to enable it. + * @hide + */ + public static final String WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED = + "wifi_watchdog_poor_network_test_enabled"; + + /** * Setting to turn off walled garden test on Wi-Fi. Feature is enabled by default and * the setting needs to be set to 0 to disable it. * @hide diff --git a/core/java/android/view/Choreographer.java b/core/java/android/view/Choreographer.java index 0fdd105..63de128 100644 --- a/core/java/android/view/Choreographer.java +++ b/core/java/android/view/Choreographer.java @@ -66,9 +66,11 @@ public final class Choreographer extends Handler { // System property to enable/disable the use of the vsync / animation timer // for drawing rather than drawing immediately. - // Enabled by default. + // Temporarily disabled by default because postponing performTraversals() violates + // assumptions about traversals happening in-order relative to other posted messages. + // Bug: 5721047 private static final boolean USE_ANIMATION_TIMER_FOR_DRAW = SystemProperties.getBoolean( - "debug.choreographer.animdraw", true); + "debug.choreographer.animdraw", false); private static final int MSG_DO_ANIMATION = 0; private static final int MSG_DO_DRAW = 1; diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index af8f8cb..5c93a42 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -12220,13 +12220,16 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * @param location an array of two integers in which to hold the coordinates */ public void getLocationInWindow(int[] location) { - // When the view is not attached to a window, this method does not make sense - if (mAttachInfo == null) return; - if (location == null || location.length < 2) { throw new IllegalArgumentException("location must be an array of two integers"); } + if (mAttachInfo == null) { + // When the view is not attached to a window, this method does not make sense + location[0] = location[1] = 0; + return; + } + float[] position = mAttachInfo.mTmpTransformLocation; position[0] = position[1] = 0.0f; diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java index 05c5daa..b455ad5 100644 --- a/core/java/android/view/ViewConfiguration.java +++ b/core/java/android/view/ViewConfiguration.java @@ -149,7 +149,7 @@ public class ViewConfiguration { * It may be appropriate to tweak this on a device-specific basis in an overlay based on * the characteristics of the touch panel and firmware. */ - private static final int TOUCH_SLOP = 4; + private static final int TOUCH_SLOP = 8; /** * Distance the first touch can wander before we stop considering this event a double tap diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 5035cae..1102a47 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -2719,13 +2719,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager return more; } - float alpha = child.getAlpha(); - // Bail out early if the view does not need to be drawn - if (alpha <= ViewConfiguration.ALPHA_THRESHOLD && (child.mPrivateFlags & ALPHA_SET) == 0 && - !(child instanceof SurfaceView)) { - return more; - } - if (hardwareAccelerated) { // Clear INVALIDATED flag to allow invalidation to occur during rendering, but // retain the flag's value temporarily in the mRecreateDisplayList flag @@ -2779,6 +2772,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } } + float alpha = child.getAlpha(); if (transformToApply != null || alpha < 1.0f || !child.hasIdentityMatrix()) { if (transformToApply != null || !childHasIdentityMatrix) { int transX = 0; diff --git a/core/java/android/webkit/WebTextView.java b/core/java/android/webkit/WebTextView.java index 3574a0d..2b59b80 100644 --- a/core/java/android/webkit/WebTextView.java +++ b/core/java/android/webkit/WebTextView.java @@ -19,10 +19,13 @@ package android.webkit; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; +import android.graphics.ColorFilter; import android.graphics.Paint; import android.graphics.Paint.Style; +import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.drawable.ColorDrawable; +import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.Handler; import android.os.Message; @@ -51,7 +54,6 @@ import android.view.ViewGroup; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputConnection; import android.view.inputmethod.InputMethodManager; -import android.widget.AbsoluteLayout; import android.widget.AbsoluteLayout.LayoutParams; import android.widget.AdapterView; import android.widget.ArrayAdapter; @@ -74,7 +76,6 @@ import java.util.ArrayList; static final String LOGTAG = "webtextview"; - private Paint mRingPaint; private int mRingInset; private WebView mWebView; @@ -207,13 +208,51 @@ import java.util.ArrayList; } } }; - float ringWidth = 4f * context.getResources().getDisplayMetrics().density; mReceiver = new MyResultReceiver(mHandler); - mRingPaint = new Paint(); - mRingPaint.setColor(0x6633b5e5); - mRingPaint.setStrokeWidth(ringWidth); - mRingPaint.setStyle(Style.FILL); + float ringWidth = 2f * context.getResources().getDisplayMetrics().density; mRingInset = (int) ringWidth; + setBackgroundDrawable(new BackgroundDrawable(mRingInset)); + setPadding(getPaddingLeft(), getPaddingTop(), getPaddingRight(), + getPaddingBottom()); + } + + private static class BackgroundDrawable extends Drawable { + + private Paint mPaint = new Paint(); + private int mBorderWidth; + private Rect mInsetRect = new Rect(); + + public BackgroundDrawable(int width) { + mPaint = new Paint(); + mPaint.setStrokeWidth(width); + mBorderWidth = width; + } + + @Override + public void draw(Canvas canvas) { + mPaint.setColor(0x6633b5e5); + canvas.drawRect(getBounds(), mPaint); + mInsetRect.left = getBounds().left + mBorderWidth; + mInsetRect.top = getBounds().top + mBorderWidth; + mInsetRect.right = getBounds().right - mBorderWidth; + mInsetRect.bottom = getBounds().bottom - mBorderWidth; + mPaint.setColor(Color.WHITE); + canvas.drawRect(mInsetRect, mPaint); + } + + @Override + public void setAlpha(int alpha) { + } + + @Override + public void setColorFilter(ColorFilter cf) { + } + + @Override + public int getOpacity() { + return PixelFormat.TRANSLUCENT; + } + } public void setAutoFillable(int queryId) { @@ -223,35 +262,9 @@ import java.util.ArrayList; } @Override - protected void onDraw(Canvas canvas) { - super.onDraw(canvas); - if (isFocused()) { - final int ib = getHeight() - mRingInset; - canvas.drawRect(0, 0, getWidth(), mRingInset, mRingPaint); - canvas.drawRect(0, ib, getWidth(), getHeight(), mRingPaint); - canvas.drawRect(0, mRingInset, mRingInset, ib, mRingPaint); - canvas.drawRect(getWidth() - mRingInset, mRingInset, getWidth(), ib, mRingPaint); - } - } - - private void growOrShrink(boolean grow) { - AbsoluteLayout.LayoutParams lp = (AbsoluteLayout.LayoutParams) getLayoutParams(); - if (grow) { - lp.x -= mRingInset; - lp.y -= mRingInset; - lp.width += 2 * mRingInset; - lp.height += 2 * mRingInset; - setPadding(getPaddingLeft() + mRingInset, getPaddingTop() + mRingInset, - getPaddingRight() + mRingInset, getPaddingBottom() + mRingInset); - } else { - lp.x += mRingInset; - lp.y += mRingInset; - lp.width -= 2 * mRingInset; - lp.height -= 2 * mRingInset; - setPadding(getPaddingLeft() - mRingInset, getPaddingTop() - mRingInset, - getPaddingRight() - mRingInset, getPaddingBottom() - mRingInset); - } - setLayoutParams(lp); + public void setPadding(int left, int top, int right, int bottom) { + super.setPadding(left + mRingInset, top + mRingInset, + right + mRingInset, bottom + mRingInset); } @Override @@ -555,7 +568,6 @@ import java.util.ArrayList; } else if (!mInsideRemove) { mWebView.setActive(false); } - growOrShrink(focused); mFromFocusChange = false; } @@ -966,6 +978,10 @@ import java.util.ArrayList; */ /* package */ void setRect(int x, int y, int width, int height) { LayoutParams lp = (LayoutParams) getLayoutParams(); + x -= mRingInset; + y -= mRingInset; + width += 2 * mRingInset; + height += 2 * mRingInset; boolean needsUpdate = false; if (null == lp) { lp = new LayoutParams(width, height, x, y); diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index b68dec9..40cb248 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -59,6 +59,7 @@ import android.os.Message; import android.os.StrictMode; import android.provider.Settings; import android.speech.tts.TextToSpeech; +import android.text.TextUtils; import android.util.AttributeSet; import android.util.EventLog; import android.util.Log; @@ -849,13 +850,12 @@ public class WebView extends AbsoluteLayout // the alias via which accessibility JavaScript interface is exposed private static final String ALIAS_ACCESSIBILITY_JS_INTERFACE = "accessibility"; - // JavaScript to inject the script chooser which will - // pick the right script for the current URL - private static final String ACCESSIBILITY_SCRIPT_CHOOSER_JAVASCRIPT = + // Template for JavaScript that injects a screen-reader. + private static final String ACCESSIBILITY_SCREEN_READER_JAVASCRIPT_TEMPLATE = "javascript:(function() {" + " var chooser = document.createElement('script');" + " chooser.type = 'text/javascript';" + - " chooser.src = 'https://ssl.gstatic.com/accessibility/javascript/android/AndroidScriptChooser.user.js';" + + " chooser.src = '%1s';" + " document.getElementsByTagName('head')[0].appendChild(chooser);" + " })();"; @@ -3818,7 +3818,7 @@ public class WebView extends AbsoluteLayout if (onDeviceScriptInjectionEnabled) { ensureAccessibilityScriptInjectorInstance(false); // neither script injected nor script injection opted out => we inject - loadUrl(ACCESSIBILITY_SCRIPT_CHOOSER_JAVASCRIPT); + loadUrl(getScreenReaderInjectingJs()); // TODO: Set this flag after successfull script injection. Maybe upon injection // the chooser should update the meta tag and we check it to declare success mAccessibilityScriptInjected = true; @@ -3832,7 +3832,7 @@ public class WebView extends AbsoluteLayout } else if (axsParameterValue == ACCESSIBILITY_SCRIPT_INJECTION_PROVIDED) { ensureAccessibilityScriptInjectorInstance(false); // the URL provides accessibility but we still need to add our generic script - loadUrl(ACCESSIBILITY_SCRIPT_CHOOSER_JAVASCRIPT); + loadUrl(getScreenReaderInjectingJs()); } else { Log.e(LOGTAG, "Unknown URL value for the \"axs\" URL parameter: " + axsParameterValue); } @@ -3854,6 +3854,17 @@ public class WebView extends AbsoluteLayout } /** + * Gets JavaScript that injects a screen-reader. + * + * @return The JavaScript snippet. + */ + private String getScreenReaderInjectingJs() { + String screenReaderUrl = Settings.Secure.getString(mContext.getContentResolver(), + Settings.Secure.ACCESSIBILITY_SCREEN_READER_URL); + return String.format(ACCESSIBILITY_SCREEN_READER_JAVASCRIPT_TEMPLATE, screenReaderUrl); + } + + /** * Gets the "axs" URL parameter value. * * @param url A url to fetch the paramter from. diff --git a/core/java/android/widget/RemoteViewsService.java b/core/java/android/widget/RemoteViewsService.java index 7ba4777..07bd918 100644 --- a/core/java/android/widget/RemoteViewsService.java +++ b/core/java/android/widget/RemoteViewsService.java @@ -145,6 +145,9 @@ public abstract class RemoteViewsService extends Service { Thread.getDefaultUncaughtExceptionHandler().uncaughtException(t, ex); } } + public synchronized void onDataSetChangedAsync() { + onDataSetChanged(); + } public synchronized int getCount() { int count = 0; try { diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 82bcd3e..babd8e7 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -9931,6 +9931,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (suggestionInfo.suggestionIndex == ADD_TO_DICTIONARY) { Intent intent = new Intent(Settings.ACTION_USER_DICTIONARY_INSERT); intent.putExtra("word", originalText); + intent.putExtra("locale", getTextServicesLocale().toString()); intent.setFlags(intent.getFlags() | Intent.FLAG_ACTIVITY_NEW_TASK); getContext().startActivity(intent); // There is no way to know if the word was indeed added. Re-check. diff --git a/core/java/com/android/internal/util/StateMachine.java b/core/java/com/android/internal/util/StateMachine.java index 72489a2..61c0c8e 100644 --- a/core/java/com/android/internal/util/StateMachine.java +++ b/core/java/com/android/internal/util/StateMachine.java @@ -1367,10 +1367,12 @@ public class StateMachine { /** * Get a message and set Message.target = this. * - * @return message + * @return message or null if SM has quit */ public final Message obtainMessage() { + if (mSmHandler == null) return null; + return Message.obtain(mSmHandler); } @@ -1378,9 +1380,11 @@ public class StateMachine { * Get a message and set Message.target = this and what * * @param what is the assigned to Message.what. - * @return message + * @return message or null if SM has quit */ public final Message obtainMessage(int what) { + if (mSmHandler == null) return null; + return Message.obtain(mSmHandler, what); } @@ -1390,10 +1394,12 @@ public class StateMachine { * * @param what is the assigned to Message.what. * @param obj is assigned to Message.obj. - * @return message + * @return message or null if SM has quit */ public final Message obtainMessage(int what, Object obj) { + if (mSmHandler == null) return null; + return Message.obtain(mSmHandler, what, obj); } @@ -1404,10 +1410,13 @@ public class StateMachine { * @param what is assigned to Message.what * @param arg1 is assigned to Message.arg1 * @param arg2 is assigned to Message.arg2 - * @return A Message object from the global pool. + * @return A Message object from the global pool or null if + * SM has quit */ public final Message obtainMessage(int what, int arg1, int arg2) { + if (mSmHandler == null) return null; + return Message.obtain(mSmHandler, what, arg1, arg2); } @@ -1419,10 +1428,13 @@ public class StateMachine { * @param arg1 is assigned to Message.arg1 * @param arg2 is assigned to Message.arg2 * @param obj is assigned to Message.obj - * @return A Message object from the global pool. + * @return A Message object from the global pool or null if + * SM has quit */ public final Message obtainMessage(int what, int arg1, int arg2, Object obj) { + if (mSmHandler == null) return null; + return Message.obtain(mSmHandler, what, arg1, arg2, obj); } @@ -1430,6 +1442,9 @@ public class StateMachine { * Enqueue a message to this state machine. */ public final void sendMessage(int what) { + // mSmHandler can be null if the state machine has quit. + if (mSmHandler == null) return; + mSmHandler.sendMessage(obtainMessage(what)); } @@ -1437,6 +1452,9 @@ public class StateMachine { * Enqueue a message to this state machine. */ public final void sendMessage(int what, Object obj) { + // mSmHandler can be null if the state machine has quit. + if (mSmHandler == null) return; + mSmHandler.sendMessage(obtainMessage(what,obj)); } @@ -1444,6 +1462,9 @@ public class StateMachine { * Enqueue a message to this state machine. */ public final void sendMessage(Message msg) { + // mSmHandler can be null if the state machine has quit. + if (mSmHandler == null) return; + mSmHandler.sendMessage(msg); } @@ -1451,6 +1472,9 @@ public class StateMachine { * Enqueue a message to this state machine after a delay. */ public final void sendMessageDelayed(int what, long delayMillis) { + // mSmHandler can be null if the state machine has quit. + if (mSmHandler == null) return; + mSmHandler.sendMessageDelayed(obtainMessage(what), delayMillis); } @@ -1458,6 +1482,9 @@ public class StateMachine { * Enqueue a message to this state machine after a delay. */ public final void sendMessageDelayed(int what, Object obj, long delayMillis) { + // mSmHandler can be null if the state machine has quit. + if (mSmHandler == null) return; + mSmHandler.sendMessageDelayed(obtainMessage(what, obj), delayMillis); } @@ -1465,6 +1492,9 @@ public class StateMachine { * Enqueue a message to this state machine after a delay. */ public final void sendMessageDelayed(Message msg, long delayMillis) { + // mSmHandler can be null if the state machine has quit. + if (mSmHandler == null) return; + mSmHandler.sendMessageDelayed(msg, delayMillis); } @@ -1509,6 +1539,9 @@ public class StateMachine { * will be processed. */ public final void quit() { + // mSmHandler can be null if the state machine has quit. + if (mSmHandler == null) return; + mSmHandler.quit(); } @@ -1523,6 +1556,9 @@ public class StateMachine { * @return if debugging is enabled */ public boolean isDbg() { + // mSmHandler can be null if the state machine has quit. + if (mSmHandler == null) return false; + return mSmHandler.isDbg(); } @@ -1532,6 +1568,9 @@ public class StateMachine { * @param dbg is true to enable debugging. */ public void setDbg(boolean dbg) { + // mSmHandler can be null if the state machine has quit. + if (mSmHandler == null) return; + mSmHandler.setDbg(dbg); } @@ -1539,6 +1578,9 @@ public class StateMachine { * Start the state machine. */ public void start() { + // mSmHandler can be null if the state machine has quit. + if (mSmHandler == null) return; + /** Send the complete construction message */ mSmHandler.completeConstruction(); } diff --git a/core/java/com/android/internal/widget/IRemoteViewsFactory.aidl b/core/java/com/android/internal/widget/IRemoteViewsFactory.aidl index 18076c4..7317ecf 100644 --- a/core/java/com/android/internal/widget/IRemoteViewsFactory.aidl +++ b/core/java/com/android/internal/widget/IRemoteViewsFactory.aidl @@ -22,6 +22,7 @@ import android.widget.RemoteViews; /** {@hide} */ interface IRemoteViewsFactory { void onDataSetChanged(); + oneway void onDataSetChangedAsync(); oneway void onDestroy(in Intent intent); int getCount(); RemoteViews getViewAt(int position); diff --git a/core/jni/android_view_DisplayEventReceiver.cpp b/core/jni/android_view_DisplayEventReceiver.cpp index 3b45ccd..f61795d 100644 --- a/core/jni/android_view_DisplayEventReceiver.cpp +++ b/core/jni/android_view_DisplayEventReceiver.cpp @@ -107,6 +107,12 @@ status_t NativeDisplayEventReceiver::scheduleVsync() { return status_t(n); } + status_t status = mReceiver.requestNextVsync(); + if (status) { + LOGW("Failed to request next vsync, status=%d", status); + return status; + } + if (!mFdCallbackRegistered) { int rc = mLooper->addFd(mReceiver.getFd(), 0, ALOOPER_EVENT_INPUT, handleReceiveCallback, this); diff --git a/core/res/res/layout/global_actions_silent_mode.xml b/core/res/res/layout/global_actions_silent_mode.xml index 09b4341..18b4715 100644 --- a/core/res/res/layout/global_actions_silent_mode.xml +++ b/core/res/res/layout/global_actions_silent_mode.xml @@ -26,6 +26,8 @@ android:layout_width="64dp" android:layout_height="match_parent" android:background="?android:attr/actionBarItemBackground" + android:contentDescription="@string/silent_mode_silent" + android:focusable="true" > <ImageView android:layout_width="48dp" @@ -52,6 +54,8 @@ android:layout_width="64dp" android:layout_height="match_parent" android:background="?android:attr/actionBarItemBackground" + android:contentDescription="@string/silent_mode_vibrate" + android:focusable="true" > <ImageView android:layout_width="48dp" @@ -79,6 +83,8 @@ android:layout_width="64dp" android:layout_height="match_parent" android:background="?android:attr/actionBarItemBackground" + android:contentDescription="@string/silent_mode_ring" + android:focusable="true" > <ImageView android:layout_width="48dp" diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index c342c20..3ab72f4 100755 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -750,6 +750,6 @@ <!-- Base "touch slop" value used by ViewConfiguration as a movement threshold where scrolling should begin. --> - <dimen name="config_viewConfigurationTouchSlop">4dp</dimen> + <dimen name="config_viewConfigurationTouchSlop">8dp</dimen> </resources> diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 7ad1d53..6f115b3 100755 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -286,6 +286,12 @@ <string name="screen_lock">Screen lock</string> <!-- Button to turn off the phone, within the Phone Options dialog --> <string name="power_off">Power off</string> + <!-- Spoken description for ringer silent option. [CHAR LIMIT=NONE] --> + <string name="silent_mode_silent">Ringer off</string> + <!-- Spoken description for ringer vibrate option. [CHAR LIMIT=NONE] --> + <string name="silent_mode_vibrate">Ringer vibrate</string> + <!-- Spoken description for ringer normal option. [CHAR LIMIT=NONE] --> + <string name="silent_mode_ring">Ringer on</string> <!-- Shutdown Progress Dialog. This is shown if the user chooses to power off the phone. --> <string name="shutdown_progress">Shutting down\u2026</string> |
