diff options
208 files changed, 1396 insertions, 1291 deletions
diff --git a/api/current.txt b/api/current.txt index a6bdf5a..f4bfced 100644 --- a/api/current.txt +++ b/api/current.txt @@ -9065,6 +9065,7 @@ package android.graphics.drawable { method public int getMinimumWidth(); method public abstract int getOpacity(); method public boolean getPadding(android.graphics.Rect); + method public int getResolvedLayoutDirectionSelf(); method public int[] getState(); method public android.graphics.Region getTransparentRegion(); method public void inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; @@ -9099,6 +9100,10 @@ package android.graphics.drawable { method public abstract void unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable); } + public static abstract interface Drawable.Callback2 implements android.graphics.drawable.Drawable.Callback { + method public abstract int getResolvedLayoutDirection(android.graphics.drawable.Drawable); + } + public static abstract class Drawable.ConstantState { ctor public Drawable.ConstantState(); method public abstract int getChangingConfigurations(); @@ -23109,7 +23114,7 @@ package android.view { method public void recycle(); } - public class View implements android.view.accessibility.AccessibilityEventSource android.graphics.drawable.Drawable.Callback android.view.KeyEvent.Callback { + public class View implements android.view.accessibility.AccessibilityEventSource android.graphics.drawable.Drawable.Callback android.graphics.drawable.Drawable.Callback2 android.view.KeyEvent.Callback { ctor public View(android.content.Context); ctor public View(android.content.Context, android.util.AttributeSet); ctor public View(android.content.Context, android.util.AttributeSet, int); @@ -23119,6 +23124,7 @@ package android.view { method public void addOnLayoutChangeListener(android.view.View.OnLayoutChangeListener); method public void addTouchables(java.util.ArrayList<android.view.View>); method public android.view.ViewPropertyAnimator animate(); + method public void announceForAccessibility(java.lang.CharSequence); method protected boolean awakenScrollBars(); method protected boolean awakenScrollBars(int); method protected boolean awakenScrollBars(int, boolean); @@ -24343,6 +24349,7 @@ package android.view.accessibility { field public static final int INVALID_POSITION = -1; // 0xffffffff field public static final deprecated int MAX_TEXT_LENGTH = 500; // 0x1f4 field public static final int TYPES_ALL_MASK = -1; // 0xffffffff + field public static final int TYPE_ANNOUNCEMENT = 16384; // 0x4000 field public static final int TYPE_NOTIFICATION_STATE_CHANGED = 64; // 0x40 field public static final int TYPE_TOUCH_EXPLORATION_GESTURE_END = 1024; // 0x400 field public static final int TYPE_TOUCH_EXPLORATION_GESTURE_START = 512; // 0x200 diff --git a/cmds/stagefright/codec.cpp b/cmds/stagefright/codec.cpp index 0414b98..fea62cc 100644 --- a/cmds/stagefright/codec.cpp +++ b/cmds/stagefright/codec.cpp @@ -49,6 +49,7 @@ struct CodecState { size_t mCSDIndex; Vector<sp<ABuffer> > mInBuffers; Vector<sp<ABuffer> > mOutBuffers; + bool mSignalledInputEOS; bool mSawOutputEOS; int64_t mNumBuffersDecoded; int64_t mNumBytesDecoded; @@ -127,6 +128,7 @@ static int decode( } state->mCSDIndex = 0; + state->mSignalledInputEOS = false; state->mSawOutputEOS = false; ALOGV("got %d pieces of codec specific data.", state->mCSD.size()); @@ -180,33 +182,7 @@ static int decode( status_t err = extractor->getSampleTrackIndex(&trackIndex); if (err != OK) { - ALOGV("signalling EOS."); - - for (size_t i = 0; i < stateByTrack.size(); ++i) { - CodecState *state = &stateByTrack.editValueAt(i); - - for (;;) { - size_t index; - err = state->mCodec->dequeueInputBuffer(&index, kTimeout); - - if (err == -EAGAIN) { - continue; - } - - CHECK_EQ(err, (status_t)OK); - - err = state->mCodec->queueInputBuffer( - index, - 0 /* offset */, - 0 /* size */, - 0ll /* timeUs */, - MediaCodec::BUFFER_FLAG_EOS); - - CHECK_EQ(err, (status_t)OK); - break; - } - } - + ALOGV("saw input eos"); sawInputEOS = true; } else { CodecState *state = &stateByTrack.editValueFor(trackIndex); @@ -240,6 +216,33 @@ static int decode( CHECK_EQ(err, -EAGAIN); } } + } else { + for (size_t i = 0; i < stateByTrack.size(); ++i) { + CodecState *state = &stateByTrack.editValueAt(i); + + if (!state->mSignalledInputEOS) { + size_t index; + status_t err = + state->mCodec->dequeueInputBuffer(&index, kTimeout); + + if (err == OK) { + ALOGV("signalling input EOS on track %d", i); + + err = state->mCodec->queueInputBuffer( + index, + 0 /* offset */, + 0 /* size */, + 0ll /* timeUs */, + MediaCodec::BUFFER_FLAG_EOS); + + CHECK_EQ(err, (status_t)OK); + + state->mSignalledInputEOS = true; + } else { + CHECK_EQ(err, -EAGAIN); + } + } + } } bool sawOutputEOSOnAllTracks = true; diff --git a/core/java/android/accessibilityservice/AccessibilityService.java b/core/java/android/accessibilityservice/AccessibilityService.java index a463a62..9ebbe03 100644 --- a/core/java/android/accessibilityservice/AccessibilityService.java +++ b/core/java/android/accessibilityservice/AccessibilityService.java @@ -104,7 +104,7 @@ import com.android.internal.os.HandlerCaller; * </ul> * <h3>Retrieving window content</h3> * <p> - * An service can specify in its declaration that it can retrieve the active window + * A service can specify in its declaration that it can retrieve the active window * content which is represented as a tree of {@link AccessibilityNodeInfo}. Note that * declaring this capability requires that the service declares its configuration via * an XML resource referenced by {@link #SERVICE_META_DATA}. diff --git a/core/java/android/accessibilityservice/AccessibilityServiceInfo.java b/core/java/android/accessibilityservice/AccessibilityServiceInfo.java index eae0a4c..b55fda4 100644 --- a/core/java/android/accessibilityservice/AccessibilityServiceInfo.java +++ b/core/java/android/accessibilityservice/AccessibilityServiceInfo.java @@ -503,26 +503,38 @@ public class AccessibilityServiceInfo implements Parcelable { public static String feedbackTypeToString(int feedbackType) { StringBuilder builder = new StringBuilder(); builder.append("["); - while (feedbackType > 0) { + while (feedbackType != 0) { final int feedbackTypeFlag = 1 << Integer.numberOfTrailingZeros(feedbackType); feedbackType &= ~feedbackTypeFlag; - if (builder.length() > 1) { - builder.append(", "); - } switch (feedbackTypeFlag) { case FEEDBACK_AUDIBLE: + if (builder.length() > 1) { + builder.append(", "); + } builder.append("FEEDBACK_AUDIBLE"); break; case FEEDBACK_HAPTIC: + if (builder.length() > 1) { + builder.append(", "); + } builder.append("FEEDBACK_HAPTIC"); break; case FEEDBACK_GENERIC: + if (builder.length() > 1) { + builder.append(", "); + } builder.append("FEEDBACK_GENERIC"); break; case FEEDBACK_SPOKEN: + if (builder.length() > 1) { + builder.append(", "); + } builder.append("FEEDBACK_SPOKEN"); break; case FEEDBACK_VISUAL: + if (builder.length() > 1) { + builder.append(", "); + } builder.append("FEEDBACK_VISUAL"); break; } diff --git a/core/java/android/accounts/AbstractAccountAuthenticator.java b/core/java/android/accounts/AbstractAccountAuthenticator.java index 7183267..e9535ab 100644 --- a/core/java/android/accounts/AbstractAccountAuthenticator.java +++ b/core/java/android/accounts/AbstractAccountAuthenticator.java @@ -59,7 +59,7 @@ import java.util.Arrays; * "Account & Sync" settings page and one user of the android:smallIcon is the Contact Application's * tab panels. * <p> - * The preferences attribute points to an PreferenceScreen xml hierarchy that contains + * The preferences attribute points to a PreferenceScreen xml hierarchy that contains * a list of PreferenceScreens that can be invoked to manage the authenticator. An example is: * <pre> * <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> diff --git a/core/java/android/animation/Animator.java b/core/java/android/animation/Animator.java index e01fa1a..788765d 100644 --- a/core/java/android/animation/Animator.java +++ b/core/java/android/animation/Animator.java @@ -208,7 +208,7 @@ public abstract class Animator implements Cloneable { * this call to its child objects to tell them to set up the values. A * ObjectAnimator object will use the information it has about its target object * and PropertyValuesHolder objects to get the start values for its properties. - * An ValueAnimator object will ignore the request since it does not have enough + * A ValueAnimator object will ignore the request since it does not have enough * information (such as a target object) to gather these values. */ public void setupStartValues() { @@ -220,7 +220,7 @@ public abstract class Animator implements Cloneable { * this call to its child objects to tell them to set up the values. A * ObjectAnimator object will use the information it has about its target object * and PropertyValuesHolder objects to get the start values for its properties. - * An ValueAnimator object will ignore the request since it does not have enough + * A ValueAnimator object will ignore the request since it does not have enough * information (such as a target object) to gather these values. */ public void setupEndValues() { diff --git a/core/java/android/animation/ValueAnimator.java b/core/java/android/animation/ValueAnimator.java index 954ae66..f69120a 100755 --- a/core/java/android/animation/ValueAnimator.java +++ b/core/java/android/animation/ValueAnimator.java @@ -400,7 +400,7 @@ public class ValueAnimator extends Animator { /** * Sets the values, per property, being animated between. This function is called internally - * by the constructors of ValueAnimator that take a list of values. But an ValueAnimator can + * by the constructors of ValueAnimator that take a list of values. But a ValueAnimator can * be constructed without values and this method can be called to set the values manually * instead. * diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index f895431..599487d 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -203,8 +203,8 @@ import java.util.HashMap; * with the user. Between these two methods you can maintain resources that * are needed to show the activity to the user. For example, you can register * a {@link android.content.BroadcastReceiver} in onStart() to monitor for changes - * that impact your UI, and unregister it in onStop() when the user an no - * longer see what you are displaying. The onStart() and onStop() methods + * that impact your UI, and unregister it in onStop() when the user no + * longer sees what you are displaying. The onStart() and onStop() methods * can be called multiple times, as the activity becomes visible and hidden * to the user. * diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java index f1ce2bb..f04ff6a 100644 --- a/core/java/android/app/Dialog.java +++ b/core/java/android/app/Dialog.java @@ -591,7 +591,7 @@ public class Dialog implements DialogInterface, Window.Callback, } /** - * Called when an key shortcut event is not handled by any of the views in the Dialog. + * Called when a key shortcut event is not handled by any of the views in the Dialog. * Override this method to implement global key shortcuts for the Dialog. * Key shortcuts can also be implemented by setting the * {@link MenuItem#setShortcut(char, char) shortcut} property of menu items. diff --git a/core/java/android/app/PendingIntent.java b/core/java/android/app/PendingIntent.java index b0637a7..c95066c 100644 --- a/core/java/android/app/PendingIntent.java +++ b/core/java/android/app/PendingIntent.java @@ -351,7 +351,7 @@ public final class PendingIntent implements Parcelable { /** * Cancel a currently active PendingIntent. Only the original application - * owning an PendingIntent can cancel it. + * owning a PendingIntent can cancel it. */ public void cancel() { try { diff --git a/core/java/android/app/Service.java b/core/java/android/app/Service.java index be4b8af..207ae76 100644 --- a/core/java/android/app/Service.java +++ b/core/java/android/app/Service.java @@ -453,7 +453,7 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac /** * Called by the system to notify a Service that it is no longer used and is being removed. The - * service should clean up an resources it holds (threads, registered + * service should clean up any resources it holds (threads, registered * receivers, etc) at this point. Upon return, there will be no more calls * in to this Service object and it is effectively dead. Do not call this method directly. */ diff --git a/core/java/android/app/admin/DeviceAdminReceiver.java b/core/java/android/app/admin/DeviceAdminReceiver.java index 43cd330..30b65de 100644 --- a/core/java/android/app/admin/DeviceAdminReceiver.java +++ b/core/java/android/app/admin/DeviceAdminReceiver.java @@ -165,7 +165,7 @@ public class DeviceAdminReceiver extends BroadcastReceiver { = "android.app.action.ACTION_PASSWORD_EXPIRING"; /** - * Name under which an DevicePolicy component publishes information + * Name under which a DevicePolicy component publishes information * about itself. This meta-data must reference an XML resource containing * a device-admin tag. XXX TO DO: describe syntax. */ diff --git a/core/java/android/bluetooth/AtCommandResult.java b/core/java/android/bluetooth/AtCommandResult.java index 375a6dd..9675234 100644 --- a/core/java/android/bluetooth/AtCommandResult.java +++ b/core/java/android/bluetooth/AtCommandResult.java @@ -17,7 +17,7 @@ package android.bluetooth; /** - * The result of execution of an single AT command.<p> + * The result of execution of a single AT command.<p> * * * This class can represent the final response to an AT command line, and also diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java index 189e8fc..04af5f7 100644 --- a/core/java/android/bluetooth/BluetoothDevice.java +++ b/core/java/android/bluetooth/BluetoothDevice.java @@ -193,7 +193,7 @@ public final class BluetoothDevice implements Parcelable { public static final String EXTRA_RSSI = "android.bluetooth.device.extra.RSSI"; /** - * Used as an Parcelable {@link BluetoothClass} extra field in {@link + * Used as a Parcelable {@link BluetoothClass} extra field in {@link * #ACTION_FOUND} and {@link #ACTION_CLASS_CHANGED} intents. */ public static final String EXTRA_CLASS = "android.bluetooth.device.extra.CLASS"; diff --git a/core/java/android/bluetooth/BluetoothPbap.java b/core/java/android/bluetooth/BluetoothPbap.java index 2683bef..639ae1a 100644 --- a/core/java/android/bluetooth/BluetoothPbap.java +++ b/core/java/android/bluetooth/BluetoothPbap.java @@ -60,7 +60,7 @@ public class BluetoothPbap { public static final String PBAP_PREVIOUS_STATE = "android.bluetooth.pbap.intent.PBAP_PREVIOUS_STATE"; - /** Indicates the state of an pbap connection state has changed. + /** Indicates the state of a pbap connection state has changed. * This intent will always contain PBAP_STATE, PBAP_PREVIOUS_STATE and * BluetoothIntent.ADDRESS extras. */ diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java index 7a612bc..2930998 100644 --- a/core/java/android/content/ContentResolver.java +++ b/core/java/android/content/ContentResolver.java @@ -917,7 +917,7 @@ public abstract class ContentResolver { } /** - * Call an provider-defined method. This can be used to implement + * Call a provider-defined method. This can be used to implement * read or write interfaces which are cheaper than using a Cursor and/or * do not fit into the traditional table model. * diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index 111f45e..0e9e256 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -1270,7 +1270,7 @@ public abstract class Context { /** * Connect to an application service, creating it if needed. This defines * a dependency between your application and the service. The given - * <var>conn</var> will receive the service object when its created and be + * <var>conn</var> will receive the service object when it is created and be * told if it dies and restarts. The service will be considered required * by the system only for as long as the calling context exists. For * example, if this Context is an Activity that is stopped, the service will @@ -1279,15 +1279,15 @@ public abstract class Context { * <p>This function will throw {@link SecurityException} if you do not * have permission to bind to the given service. * - * <p class="note">Note: this method <em>can not be called from an + * <p class="note">Note: this method <em>can not be called from a * {@link BroadcastReceiver} component</em>. A pattern you can use to - * communicate from an BroadcastReceiver to a Service is to call + * communicate from a BroadcastReceiver to a Service is to call * {@link #startService} with the arguments containing the command to be * sent, with the service calling its * {@link android.app.Service#stopSelf(int)} method when done executing * that command. See the API demo App/Service/Service Start Arguments * Controller for an illustration of this. It is okay, however, to use - * this method from an BroadcastReceiver that has been registered with + * this method from a BroadcastReceiver that has been registered with * {@link #registerReceiver}, since the lifetime of this BroadcastReceiver * is tied to another object (the one that registered it).</p> * diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index 5739119..6cf5b43 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -843,10 +843,10 @@ public class Intent implements Parcelable, Cloneable { * just say what kind of data is desired, not a URI of existing data from * which the user can pick. A ACTION_GET_CONTENT could allow the user to * create the data as it runs (for example taking a picture or recording a - * sound), let them browser over the web and download the desired data, + * sound), let them browse over the web and download the desired data, * etc. * <p> - * There are two main ways to use this action: if you want an specific kind + * There are two main ways to use this action: if you want a specific kind * of data, such as a person contact, you set the MIME type to the kind of * data you want and launch it with {@link Context#startActivity(Intent)}. * The system will then launch the best application to select that kind @@ -864,12 +864,12 @@ public class Intent implements Parcelable, Cloneable { * broad MIME type (such as image/* or {@literal *}/*), resulting in a * broad range of content types the user can select from. * <p> - * When using such a broad GET_CONTENT action, it is often desireable to + * When using such a broad GET_CONTENT action, it is often desirable to * only pick from data that can be represented as a stream. This is * accomplished by requiring the {@link #CATEGORY_OPENABLE} in the Intent. * <p> * Callers can optionally specify {@link #EXTRA_LOCAL_ONLY} to request that - * the launched content chooser only return results representing data that + * the launched content chooser only returns results representing data that * is locally available on the device. For example, if this extra is set * to true then an image picker should not show any pictures that are available * from a remote server but not already on the local device (thus requiring @@ -1908,14 +1908,14 @@ public class Intent implements Parcelable, Cloneable { // location; they are not general-purpose actions. /** - * Broadcast Action: An GTalk connection has been established. + * Broadcast Action: A GTalk connection has been established. */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_GTALK_SERVICE_CONNECTED = "android.intent.action.GTALK_CONNECTED"; /** - * Broadcast Action: An GTalk connection has been disconnected. + * Broadcast Action: A GTalk connection has been disconnected. */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_GTALK_SERVICE_DISCONNECTED = @@ -2200,7 +2200,7 @@ public class Intent implements Parcelable, Cloneable { @SdkConstant(SdkConstantType.INTENT_CATEGORY) public static final String CATEGORY_SELECTED_ALTERNATIVE = "android.intent.category.SELECTED_ALTERNATIVE"; /** - * Intended to be used as a tab inside of an containing TabActivity. + * Intended to be used as a tab inside of a containing TabActivity. */ @SdkConstant(SdkConstantType.INTENT_CATEGORY) public static final String CATEGORY_TAB = "android.intent.category.TAB"; @@ -2256,7 +2256,7 @@ public class Intent implements Parcelable, Cloneable { */ public static final String CATEGORY_UNIT_TEST = "android.intent.category.UNIT_TEST"; /** - * To be used as an sample code example (not part of the normal user + * To be used as a sample code example (not part of the normal user * experience). */ public static final String CATEGORY_SAMPLE_CODE = "android.intent.category.SAMPLE_CODE"; @@ -2506,7 +2506,7 @@ public class Intent implements Parcelable, Cloneable { public static final String EXTRA_KEY_CONFIRM = "android.intent.extra.KEY_CONFIRM"; /** - * Used as an boolean extra field in {@link android.content.Intent#ACTION_PACKAGE_REMOVED} or + * Used as a boolean extra field in {@link android.content.Intent#ACTION_PACKAGE_REMOVED} or * {@link android.content.Intent#ACTION_PACKAGE_CHANGED} intents to override the default action * of restarting the application. */ @@ -3704,7 +3704,7 @@ public class Intent implements Parcelable, Cloneable { } /** - * Check if an category exists in the intent. + * Check if a category exists in the intent. * * @param category The category to check. * @@ -4623,7 +4623,7 @@ public class Intent implements Parcelable, Cloneable { /** * Add a new category to the intent. Categories provide additional detail - * about the action the intent is perform. When resolving an intent, only + * about the action the intent performs. When resolving an intent, only * activities that provide <em>all</em> of the requested categories will be * used. * @@ -4646,7 +4646,7 @@ public class Intent implements Parcelable, Cloneable { } /** - * Remove an category from an intent. + * Remove a category from an intent. * * @param category The category to remove. * diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java index f2133d8..544bd9c 100644 --- a/core/java/android/content/pm/PackageManager.java +++ b/core/java/android/content/pm/PackageManager.java @@ -119,7 +119,7 @@ public abstract class PackageManager { * {@link PackageInfo} flag: return the * {@link PackageInfo#gids group ids} that are associated with an * application. - * This applies for any API returning an PackageInfo class, either + * This applies for any API returning a PackageInfo class, either * directly or nested inside of another. */ public static final int GET_GIDS = 0x00000100; @@ -142,7 +142,7 @@ public abstract class PackageManager { * {@link ProviderInfo} flag: return the * {@link ProviderInfo#uriPermissionPatterns URI permission patterns} * that are associated with a content provider. - * This applies for any API returning an ProviderInfo class, either + * This applies for any API returning a ProviderInfo class, either * directly or nested inside of another. */ public static final int GET_URI_PERMISSION_PATTERNS = 0x00000800; diff --git a/core/java/android/emoji/EmojiFactory.java b/core/java/android/emoji/EmojiFactory.java index e0b12ae..8fd8695 100644 --- a/core/java/android/emoji/EmojiFactory.java +++ b/core/java/android/emoji/EmojiFactory.java @@ -33,7 +33,7 @@ public final class EmojiFactory { private int sCacheSize = 100; - // HashMap for caching Bitmap object. In order not to make an cache object + // HashMap for caching Bitmap object. In order not to make a cache object // blow up, we use LinkedHashMap with size limit. private class CustomLinkedHashMap<K, V> extends LinkedHashMap<K, V> { public CustomLinkedHashMap() { diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java index 573e6ea..2775c7b 100644 --- a/core/java/android/hardware/Camera.java +++ b/core/java/android/hardware/Camera.java @@ -1358,7 +1358,7 @@ public class Camera { /** * Returns an empty {@link Parameters} for testing purpose. * - * @return an Parameter object. + * @return a Parameter object. * * @hide */ @@ -3127,7 +3127,7 @@ public class Camera { public void getFocusDistances(float[] output) { if (output == null || output.length != 3) { throw new IllegalArgumentException( - "output must be an float array with three elements."); + "output must be a float array with three elements."); } splitFloat(get(KEY_FOCUS_DISTANCES), output); } diff --git a/core/java/android/hardware/Sensor.java b/core/java/android/hardware/Sensor.java index 68fc101..63fb32d 100644 --- a/core/java/android/hardware/Sensor.java +++ b/core/java/android/hardware/Sensor.java @@ -57,7 +57,7 @@ public class Sensor { public static final int TYPE_GYROSCOPE = 4; /** - * A constant describing an light sensor type. See + * A constant describing a light sensor type. See * {@link android.hardware.SensorEvent#values SensorEvent.values} for more * details. */ @@ -77,7 +77,7 @@ public class Sensor { public static final int TYPE_TEMPERATURE = 7; /** - * A constant describing an proximity sensor type. See + * A constant describing a proximity sensor type. See * {@link android.hardware.SensorEvent#values SensorEvent.values} for more * details. */ diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index 53cdf21..ba7dc4a 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -2173,7 +2173,7 @@ public class InputMethodService extends AbstractInputMethodService { * This is called when, while currently displayed in extract mode, the * current input target changes. The default implementation will * auto-hide the IME if the new target is not a full editor, since this - * can be an confusing experience for the user. + * can be a confusing experience for the user. */ public void onExtractingInputChanged(EditorInfo ei) { if (ei.inputType == InputType.TYPE_NULL) { diff --git a/core/java/android/net/NetworkPolicy.java b/core/java/android/net/NetworkPolicy.java index 04cf1a3..5b94784 100644 --- a/core/java/android/net/NetworkPolicy.java +++ b/core/java/android/net/NetworkPolicy.java @@ -36,6 +36,7 @@ public class NetworkPolicy implements Parcelable, Comparable<NetworkPolicy> { public final NetworkTemplate template; public int cycleDay; + public String cycleTimezone; public long warningBytes; public long limitBytes; public long lastWarningSnooze; @@ -44,15 +45,18 @@ public class NetworkPolicy implements Parcelable, Comparable<NetworkPolicy> { private static final long DEFAULT_MTU = 1500; - public NetworkPolicy(NetworkTemplate template, int cycleDay, long warningBytes, - long limitBytes, boolean metered) { - this(template, cycleDay, warningBytes, limitBytes, SNOOZE_NEVER, SNOOZE_NEVER, metered); + public NetworkPolicy(NetworkTemplate template, int cycleDay, String cycleTimezone, + long warningBytes, long limitBytes, boolean metered) { + this(template, cycleDay, cycleTimezone, warningBytes, limitBytes, SNOOZE_NEVER, + SNOOZE_NEVER, metered); } - public NetworkPolicy(NetworkTemplate template, int cycleDay, long warningBytes, - long limitBytes, long lastWarningSnooze, long lastLimitSnooze, boolean metered) { + public NetworkPolicy(NetworkTemplate template, int cycleDay, String cycleTimezone, + long warningBytes, long limitBytes, long lastWarningSnooze, long lastLimitSnooze, + boolean metered) { this.template = checkNotNull(template, "missing NetworkTemplate"); this.cycleDay = cycleDay; + this.cycleTimezone = checkNotNull(cycleTimezone, "missing cycleTimezone"); this.warningBytes = warningBytes; this.limitBytes = limitBytes; this.lastWarningSnooze = lastWarningSnooze; @@ -63,6 +67,7 @@ public class NetworkPolicy implements Parcelable, Comparable<NetworkPolicy> { public NetworkPolicy(Parcel in) { template = in.readParcelable(null); cycleDay = in.readInt(); + cycleTimezone = in.readString(); warningBytes = in.readLong(); limitBytes = in.readLong(); lastWarningSnooze = in.readLong(); @@ -70,10 +75,11 @@ public class NetworkPolicy implements Parcelable, Comparable<NetworkPolicy> { metered = in.readInt() != 0; } - /** {@inheritDoc} */ + @Override public void writeToParcel(Parcel dest, int flags) { dest.writeParcelable(template, flags); dest.writeInt(cycleDay); + dest.writeString(cycleTimezone); dest.writeLong(warningBytes); dest.writeLong(limitBytes); dest.writeLong(lastWarningSnooze); @@ -81,7 +87,7 @@ public class NetworkPolicy implements Parcelable, Comparable<NetworkPolicy> { dest.writeInt(metered ? 1 : 0); } - /** {@inheritDoc} */ + @Override public int describeContents() { return 0; } @@ -112,7 +118,7 @@ public class NetworkPolicy implements Parcelable, Comparable<NetworkPolicy> { lastLimitSnooze = SNOOZE_NEVER; } - /** {@inheritDoc} */ + @Override public int compareTo(NetworkPolicy another) { if (another == null || another.limitBytes == LIMIT_DISABLED) { // other value is missing or disabled; we win @@ -127,8 +133,8 @@ public class NetworkPolicy implements Parcelable, Comparable<NetworkPolicy> { @Override public int hashCode() { - return Objects.hashCode(template, cycleDay, warningBytes, limitBytes, lastWarningSnooze, - lastLimitSnooze, metered); + return Objects.hashCode(template, cycleDay, cycleTimezone, warningBytes, limitBytes, + lastWarningSnooze, lastLimitSnooze, metered); } @Override @@ -139,6 +145,7 @@ public class NetworkPolicy implements Parcelable, Comparable<NetworkPolicy> { && limitBytes == other.limitBytes && lastWarningSnooze == other.lastWarningSnooze && lastLimitSnooze == other.lastLimitSnooze && metered == other.metered + && Objects.equal(cycleTimezone, other.cycleTimezone) && Objects.equal(template, other.template); } return false; @@ -146,17 +153,19 @@ public class NetworkPolicy implements Parcelable, Comparable<NetworkPolicy> { @Override public String toString() { - return "NetworkPolicy[" + template + "]: cycleDay=" + cycleDay + ", warningBytes=" - + warningBytes + ", limitBytes=" + limitBytes + ", lastWarningSnooze=" - + lastWarningSnooze + ", lastLimitSnooze=" + lastLimitSnooze + ", metered=" - + metered; + return "NetworkPolicy[" + template + "]: cycleDay=" + cycleDay + ", cycleTimezone=" + + cycleTimezone + ", warningBytes=" + warningBytes + ", limitBytes=" + limitBytes + + ", lastWarningSnooze=" + lastWarningSnooze + ", lastLimitSnooze=" + + lastLimitSnooze + ", metered=" + metered; } public static final Creator<NetworkPolicy> CREATOR = new Creator<NetworkPolicy>() { + @Override public NetworkPolicy createFromParcel(Parcel in) { return new NetworkPolicy(in); } + @Override public NetworkPolicy[] newArray(int size) { return new NetworkPolicy[size]; } diff --git a/core/java/android/net/NetworkPolicyManager.java b/core/java/android/net/NetworkPolicyManager.java index 9d253c7..7173751 100644 --- a/core/java/android/net/NetworkPolicyManager.java +++ b/core/java/android/net/NetworkPolicyManager.java @@ -131,7 +131,7 @@ public class NetworkPolicyManager { * @hide */ public static long computeLastCycleBoundary(long currentTime, NetworkPolicy policy) { - final Time now = new Time(Time.TIMEZONE_UTC); + final Time now = new Time(policy.cycleTimezone); now.set(currentTime); // first, find cycle boundary for current month @@ -157,7 +157,7 @@ public class NetworkPolicyManager { /** {@hide} */ public static long computeNextCycleBoundary(long currentTime, NetworkPolicy policy) { - final Time now = new Time(Time.TIMEZONE_UTC); + final Time now = new Time(policy.cycleTimezone); now.set(currentTime); // first, find cycle boundary for current month @@ -183,7 +183,7 @@ public class NetworkPolicyManager { /** * Snap to the cycle day for the current month given; when cycle day doesn't - * exist, it snaps to 1st of following month. + * exist, it snaps to last second of current month. * * @hide */ diff --git a/core/java/android/net/http/SslError.java b/core/java/android/net/http/SslError.java index 863304c..1cd73d2 100644 --- a/core/java/android/net/http/SslError.java +++ b/core/java/android/net/http/SslError.java @@ -64,7 +64,7 @@ public class SslError { public static final int SSL_MAX_ERROR = 6; /** - * The SSL error set bitfield (each individual error is an bit index; + * The SSL error set bitfield (each individual error is a bit index; * multiple individual errors can be OR-ed) */ int mErrors; diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java index 1507387..788ab74 100644 --- a/core/java/android/os/Parcel.java +++ b/core/java/android/os/Parcel.java @@ -458,7 +458,7 @@ public final class Parcel { } /** - * Write an byte array into the parcel at the current {@link #dataPosition}, + * Write a byte array into the parcel at the current {@link #dataPosition}, * growing {@link #dataCapacity} if needed. * @param b Bytes to place into the parcel. * @param offset Index of first byte to be written. @@ -553,7 +553,7 @@ public final class Parcel { } /** - * Write an byte value into the parcel at the current dataPosition(), + * Write a byte value into the parcel at the current dataPosition(), * growing dataCapacity() if needed. */ public final void writeByte(byte val) { diff --git a/core/java/android/os/ParcelUuid.java b/core/java/android/os/ParcelUuid.java index 88fcfc5..2c68ddd 100644 --- a/core/java/android/os/ParcelUuid.java +++ b/core/java/android/os/ParcelUuid.java @@ -42,7 +42,7 @@ public final class ParcelUuid implements Parcelable { * * @param uuid * the UUID string to parse. - * @return an ParcelUuid instance. + * @return a ParcelUuid instance. * @throws NullPointerException * if {@code uuid} is {@code null}. * @throws IllegalArgumentException diff --git a/core/java/android/provider/Contacts.java b/core/java/android/provider/Contacts.java index a29ecb5..c7e3c08 100644 --- a/core/java/android/provider/Contacts.java +++ b/core/java/android/provider/Contacts.java @@ -84,7 +84,7 @@ public class Contacts { @Deprecated public static final int KIND_ORGANIZATION = 4; /** - * Signifies an Phone row that is stored in the Phones table + * Signifies a Phone row that is stored in the Phones table * @deprecated see {@link android.provider.ContactsContract} */ @Deprecated diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java index 6c6b118..38945c2 100644 --- a/core/java/android/provider/MediaStore.java +++ b/core/java/android/provider/MediaStore.java @@ -192,7 +192,7 @@ public final class MediaStore { /** * Standard Intent action that can be sent to have the camera application - * capture an video and return it. + * capture a video and return it. * <p> * The caller may pass in an extra EXTRA_VIDEO_QUALITY to control the video quality. * <p> @@ -441,12 +441,12 @@ public final class MediaStore { public static final int MEDIA_TYPE_AUDIO = 2; /** - * Constant for the {@link #MEDIA_TYPE} column indicating that file is an video file. + * Constant for the {@link #MEDIA_TYPE} column indicating that file is a video file. */ public static final int MEDIA_TYPE_VIDEO = 3; /** - * Constant for the {@link #MEDIA_TYPE} column indicating that file is an playlist file. + * Constant for the {@link #MEDIA_TYPE} column indicating that file is a playlist file. */ public static final int MEDIA_TYPE_PLAYLIST = 4; } diff --git a/core/java/android/server/BluetoothBondState.java b/core/java/android/server/BluetoothBondState.java index fbc1c27..0446f02 100644 --- a/core/java/android/server/BluetoothBondState.java +++ b/core/java/android/server/BluetoothBondState.java @@ -140,7 +140,7 @@ class BluetoothBondState { return; } - // Check if this was an pending outgoing bonding. + // Check if this was a pending outgoing bonding. // If yes, reset the state. if (oldState == BluetoothDevice.BOND_BONDING) { if (address.equals(mPendingOutgoingBonding)) { diff --git a/core/java/android/text/method/BaseMovementMethod.java b/core/java/android/text/method/BaseMovementMethod.java index f554b90..113a4be 100644 --- a/core/java/android/text/method/BaseMovementMethod.java +++ b/core/java/android/text/method/BaseMovementMethod.java @@ -350,7 +350,7 @@ public class BaseMovementMethod implements MovementMethod { } /** - * Performs an line-end movement action. + * Performs a line-end movement action. * Moves the cursor or scrolls to the end of the line. * * @param widget The text view. diff --git a/core/java/android/view/Choreographer.java b/core/java/android/view/Choreographer.java index 10edc06..d217cab 100644 --- a/core/java/android/view/Choreographer.java +++ b/core/java/android/view/Choreographer.java @@ -92,8 +92,8 @@ public final class Choreographer { private Callback mCallbackPool; - private Callback mAnimationCallbacks; - private Callback mDrawCallbacks; + private final CallbackQueue mAnimationCallbackQueue = new CallbackQueue(); + private final CallbackQueue mDrawCallbackQueue = new CallbackQueue(); private boolean mAnimationScheduled; private boolean mDrawScheduled; @@ -205,10 +205,15 @@ public final class Choreographer { throw new IllegalArgumentException("action must not be null"); } + if (DEBUG) { + Log.d(TAG, "PostAnimationCallback: " + action + ", token=" + token + + ", delayMillis=" + delayMillis); + } + synchronized (mLock) { final long now = SystemClock.uptimeMillis(); final long dueTime = now + delayMillis; - mAnimationCallbacks = addCallbackLocked(mAnimationCallbacks, dueTime, action, token); + mAnimationCallbackQueue.addCallbackLocked(dueTime, action, token); if (dueTime <= now) { scheduleAnimationLocked(now); @@ -231,8 +236,12 @@ public final class Choreographer { * @see #postAnimationCallbackDelayed */ public void removeAnimationCallbacks(Runnable action, Object token) { + if (DEBUG) { + Log.d(TAG, "RemoveAnimationCallbacks: " + action + ", token=" + token); + } + synchronized (mLock) { - mAnimationCallbacks = removeCallbacksLocked(mAnimationCallbacks, action, token); + mAnimationCallbackQueue.removeCallbacksLocked(action, token); if (action != null && token == null) { mHandler.removeMessages(MSG_DO_SCHEDULE_ANIMATION, action); } @@ -268,10 +277,15 @@ public final class Choreographer { throw new IllegalArgumentException("action must not be null"); } + if (DEBUG) { + Log.d(TAG, "PostDrawCallback: " + action + ", token=" + token + + ", delayMillis=" + delayMillis); + } + synchronized (mLock) { final long now = SystemClock.uptimeMillis(); final long dueTime = now + delayMillis; - mDrawCallbacks = addCallbackLocked(mDrawCallbacks, dueTime, action, token); + mDrawCallbackQueue.addCallbackLocked(dueTime, action, token); scheduleDrawLocked(now); if (dueTime <= now) { @@ -295,8 +309,12 @@ public final class Choreographer { * @see #postDrawCallbackDelayed */ public void removeDrawCallbacks(Runnable action, Object token) { + if (DEBUG) { + Log.d(TAG, "RemoveDrawCallbacks: " + action + ", token=" + token); + } + synchronized (mLock) { - mDrawCallbacks = removeCallbacksLocked(mDrawCallbacks, action, token); + mDrawCallbackQueue.removeCallbacksLocked(action, token); if (action != null && token == null) { mHandler.removeMessages(MSG_DO_SCHEDULE_DRAW, action); } @@ -373,24 +391,7 @@ public final class Choreographer { } mLastAnimationTime = start; - callbacks = mAnimationCallbacks; - if (callbacks != null) { - if (callbacks.dueTime > start) { - callbacks = null; - } else { - Callback predecessor = callbacks; - Callback successor = predecessor.next; - while (successor != null) { - if (successor.dueTime > start) { - predecessor.next = null; - break; - } - predecessor = successor; - successor = successor.next; - } - mAnimationCallbacks = successor; - } - } + callbacks = mAnimationCallbackQueue.extractDueCallbacksLocked(start); } if (callbacks != null) { @@ -421,24 +422,7 @@ public final class Choreographer { } mLastDrawTime = start; - callbacks = mDrawCallbacks; - if (callbacks != null) { - if (callbacks.dueTime > start) { - callbacks = null; - } else { - Callback predecessor = callbacks; - Callback successor = predecessor.next; - while (successor != null) { - if (successor.dueTime > start) { - predecessor.next = null; - break; - } - predecessor = successor; - successor = successor.next; - } - mDrawCallbacks = successor; - } - } + callbacks = mDrawCallbackQueue.extractDueCallbacksLocked(start); } if (callbacks != null) { @@ -464,7 +448,7 @@ public final class Choreographer { void doScheduleAnimation() { synchronized (mLock) { final long now = SystemClock.uptimeMillis(); - if (mAnimationCallbacks != null && mAnimationCallbacks.dueTime <= now) { + if (mAnimationCallbackQueue.hasDueCallbacksLocked(now)) { scheduleAnimationLocked(now); } } @@ -473,7 +457,7 @@ public final class Choreographer { void doScheduleDraw() { synchronized (mLock) { final long now = SystemClock.uptimeMillis(); - if (mDrawCallbacks != null && mDrawCallbacks.dueTime <= now) { + if (mDrawCallbackQueue.hasDueCallbacksLocked(now)) { scheduleDrawLocked(now); } } @@ -487,50 +471,12 @@ public final class Choreographer { return Looper.myLooper() == mLooper; } - private Callback addCallbackLocked(Callback head, - long dueTime, Runnable action, Object token) { - Callback callback = obtainCallbackLocked(dueTime, action, token); - if (head == null) { - return callback; - } - Callback entry = head; - if (dueTime < entry.dueTime) { - callback.next = entry; - return callback; - } - while (entry.next != null) { - if (dueTime < entry.next.dueTime) { - callback.next = entry.next; - break; - } - entry = entry.next; - } - entry.next = callback; - return head; - } - - private Callback removeCallbacksLocked(Callback head, Runnable action, Object token) { - Callback predecessor = null; - for (Callback callback = head; callback != null;) { - final Callback next = callback.next; - if ((action == null || callback.action == action) - && (token == null || callback.token == token)) { - if (predecessor != null) { - predecessor.next = next; - } else { - head = next; - } - recycleCallbackLocked(callback); - } else { - predecessor = callback; - } - callback = next; - } - return head; - } - private void runCallbacks(Callback head) { while (head != null) { + if (DEBUG) { + Log.d(TAG, "RunCallback: " + head.action + ", token=" + head.token + + ", waitMillis=" + (SystemClock.uptimeMillis() - head.dueTime)); + } head.action.run(); head = head.next; } @@ -609,4 +555,73 @@ public final class Choreographer { public Runnable action; public Object token; } + + private final class CallbackQueue { + private Callback mHead; + + public boolean hasDueCallbacksLocked(long now) { + return mHead != null && mHead.dueTime <= now; + } + + public Callback extractDueCallbacksLocked(long now) { + Callback callbacks = mHead; + if (callbacks == null || callbacks.dueTime > now) { + return null; + } + + Callback last = callbacks; + Callback next = last.next; + while (next != null) { + if (next.dueTime > now) { + last.next = null; + break; + } + last = next; + next = next.next; + } + mHead = next; + return callbacks; + } + + public void addCallbackLocked(long dueTime, Runnable action, Object token) { + Callback callback = obtainCallbackLocked(dueTime, action, token); + Callback entry = mHead; + if (entry == null) { + mHead = callback; + return; + } + if (dueTime < entry.dueTime) { + callback.next = entry; + mHead = callback; + return; + } + while (entry.next != null) { + if (dueTime < entry.next.dueTime) { + callback.next = entry.next; + break; + } + entry = entry.next; + } + entry.next = callback; + } + + public void removeCallbacksLocked(Runnable action, Object token) { + Callback predecessor = null; + for (Callback callback = mHead; callback != null;) { + final Callback next = callback.next; + if ((action == null || callback.action == action) + && (token == null || callback.token == token)) { + if (predecessor != null) { + predecessor.next = next; + } else { + mHead = next; + } + recycleCallbackLocked(callback); + } else { + predecessor = callback; + } + callback = next; + } + } + } } diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index a651362..7a1923b 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -3952,6 +3952,24 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } /** + * Convenience method for sending a {@link AccessibilityEvent#TYPE_ANNOUNCEMENT} + * {@link AccessibilityEvent} to make an announcement which is related to some + * sort of a context change for which none of the events representing UI transitions + * is a good fit. For example, announcing a new page in a book. If accessibility + * is not enabled this method does nothing. + * + * @param text The announcement text. + */ + public void announceForAccessibility(CharSequence text) { + if (AccessibilityManager.getInstance(mContext).isEnabled()) { + AccessibilityEvent event = AccessibilityEvent.obtain( + AccessibilityEvent.TYPE_ANNOUNCEMENT); + event.getText().add(text); + sendAccessibilityEventUnchecked(event); + } + } + + /** * @see #sendAccessibilityEvent(int) * * Note: Called from the default {@link AccessibilityDelegate}. @@ -8852,13 +8870,15 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * (for instance, if the Runnable was not in the queue already.) */ public boolean removeCallbacks(Runnable action) { - final AttachInfo attachInfo = mAttachInfo; - if (attachInfo != null) { - attachInfo.mHandler.removeCallbacks(action); - attachInfo.mViewRootImpl.mChoreographer.removeAnimationCallbacks(action, null); - } else { - // Assume that post will succeed later - ViewRootImpl.getRunQueue().removeCallbacks(action); + if (action != null) { + final AttachInfo attachInfo = mAttachInfo; + if (attachInfo != null) { + attachInfo.mHandler.removeCallbacks(action); + attachInfo.mViewRootImpl.mChoreographer.removeAnimationCallbacks(action, null); + } else { + // Assume that post will succeed later + ViewRootImpl.getRunQueue().removeCallbacks(action); + } } return true; } @@ -11056,13 +11076,13 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } /** - * <p>Indicates whether this view is attached to an hardware accelerated + * <p>Indicates whether this view is attached to a hardware accelerated * window or not.</p> * * <p>Even if this method returns true, it does not mean that every call * to {@link #draw(android.graphics.Canvas)} will be made with an hardware * accelerated {@link android.graphics.Canvas}. For instance, if this view - * is drawn onto an offscren {@link android.graphics.Bitmap} and its + * is drawn onto an offscreen {@link android.graphics.Bitmap} and its * window is hardware accelerated, * {@link android.graphics.Canvas#isHardwareAccelerated()} will likely * return false, and this method will return true.</p> @@ -11963,7 +11983,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * @see #drawableStateChanged */ public void unscheduleDrawable(Drawable who) { - if (mAttachInfo != null) { + if (mAttachInfo != null && who != null) { mAttachInfo.mViewRootImpl.mChoreographer.removeAnimationCallbacks(null, who); } } @@ -13125,7 +13145,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } /** - * Creates an string of whitespaces used for indentation. + * Creates a string of whitespaces used for indentation. * * @param depth the indentation level * @return a String containing (depth * 2 + 3) * 2 white spaces diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java index b455ad5..20183ee 100644 --- a/core/java/android/view/ViewConfiguration.java +++ b/core/java/android/view/ViewConfiguration.java @@ -305,8 +305,9 @@ public class ViewConfiguration { mScaledTouchExplorationTapSlop = (int) (density * TOUCH_EXPLORATION_TAP_SLOP + 0.5f); mWindowTouchSlop = (int) (sizeAndDensity * WINDOW_TOUCH_SLOP + 0.5f); + final Display display = WindowManagerImpl.getDefault().getDefaultDisplay(); // Size of the screen in bytes, in ARGB_8888 format - mMaximumDrawingCacheSize = 4 * metrics.widthPixels * metrics.heightPixels; + mMaximumDrawingCacheSize = 4 * display.getRawWidth() * display.getRawHeight(); mOverscrollDistance = (int) (sizeAndDensity * OVERSCROLL_DISTANCE + 0.5f); mOverflingDistance = (int) (sizeAndDensity * OVERFLING_DISTANCE + 0.5f); diff --git a/core/java/android/view/ViewDebug.java b/core/java/android/view/ViewDebug.java index 2a17845..8f6badf 100644 --- a/core/java/android/view/ViewDebug.java +++ b/core/java/android/view/ViewDebug.java @@ -264,7 +264,7 @@ public class ViewDebug { /** * Defines a mapping from an int value to a String. Such a mapping can be used - * in a @ExportedProperty to provide more meaningful values to the end user. + * in an @ExportedProperty to provide more meaningful values to the end user. * * @see android.view.ViewDebug.ExportedProperty */ @@ -287,8 +287,8 @@ public class ViewDebug { } /** - * Defines a mapping from an flag to a String. Such a mapping can be used - * in a @ExportedProperty to provide more meaningful values to the end user. + * Defines a mapping from a flag to a String. Such a mapping can be used + * in an @ExportedProperty to provide more meaningful values to the end user. * * @see android.view.ViewDebug.ExportedProperty */ diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index c0eb65b..f3ef329 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -787,10 +787,10 @@ public interface WindowManager extends ViewManager { * hardware accelerated. This is used for the starting preview windows * in the system process, which don't need to have the overhead of * hardware acceleration (they are just a static rendering), but should - * be rendered as much to match the actual window of the app even if it + * be rendered as such to match the actual window of the app even if it * is hardware accelerated. * Even if the window isn't hardware accelerated, still do its rendering - * as if it is. + * as if it was. * Like {@link #FLAG_HARDWARE_ACCELERATED} except for trusted system windows * that need hardware acceleration (e.g. LockScreen), where hardware acceleration * is generally disabled. This flag must be specified in addition to @@ -803,7 +803,7 @@ public interface WindowManager extends ViewManager { /** * In the system process, we globally do not use hardware acceleration - * because there are many threads doing UI there and they an conflict. + * because there are many threads doing UI there and they conflict. * If certain parts of the UI that really do want to use hardware * acceleration, this flag can be set to force it. This is basically * for the lock screen. Anyone else using it, you are probably wrong. @@ -814,7 +814,7 @@ public interface WindowManager extends ViewManager { /** * By default, wallpapers are sent new offsets when the wallpaper is scrolled. Wallpapers - * may elect to skp these notifications if they are no doing anything productive with + * may elect to skip these notifications if they are not doing anything productive with * them (they do not affect the wallpaper scrolling operation) by calling * {@link * android.service.wallpaper.WallpaperService.Engine#setOffsetNotificationsEnabled(boolean)}. diff --git a/core/java/android/view/accessibility/AccessibilityEvent.java b/core/java/android/view/accessibility/AccessibilityEvent.java index 75b875a..58844fc 100644 --- a/core/java/android/view/accessibility/AccessibilityEvent.java +++ b/core/java/android/view/accessibility/AccessibilityEvent.java @@ -429,6 +429,26 @@ import java.util.List; * view.</br> * </p> * <p> + * <b>MISCELLANEOUS TYPES</b></br> + * </p> + * <p> + * <b>Announcement</b> - represents the event of an application making an + * announcement. Usually this announcement is related to some sort of a context + * change for which none of the events representing UI transitions is a good fit. + * For example, announcing a new page in a book.</br> + * <em>Type:</em> {@link #TYPE_ANNOUNCEMENT}</br> + * <em>Properties:</em></br> + * <ul> + * <li>{@link #getEventType()} - The type of the event.</li> + * <li>{@link #getSource()} - The source info (for registered clients).</li> + * <li>{@link #getClassName()} - The class name of the source.</li> + * <li>{@link #getPackageName()} - The package name of the source.</li> + * <li>{@link #getEventTime()} - The event time.</li> + * <li>{@link #getText()} - The text of the announcement.</li> + * <li>{@link #isEnabled()} - Whether the source is enabled.</li> + * </ul> + * </p> + * <p> * <b>Security note</b> * <p> * Since an event contains the text of its source privacy can be compromised by leaking @@ -538,6 +558,11 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par public static final int TYPE_VIEW_TEXT_SELECTION_CHANGED = 0x00002000; /** + * Represents the event of an application making an announcement. + */ + public static final int TYPE_ANNOUNCEMENT = 0x00004000; + + /** * Mask for {@link AccessibilityEvent} all types. * * @see #TYPE_VIEW_CLICKED @@ -554,6 +579,7 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par * @see #TYPE_WINDOW_CONTENT_CHANGED * @see #TYPE_VIEW_SCROLLED * @see #TYPE_VIEW_TEXT_SELECTION_CHANGED + * @see #TYPE_ANNOUNCEMENT */ public static final int TYPES_ALL_MASK = 0xFFFFFFFF; @@ -984,6 +1010,8 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par return "TYPE_VIEW_TEXT_SELECTION_CHANGED"; case TYPE_VIEW_SCROLLED: return "TYPE_VIEW_SCROLLED"; + case TYPE_ANNOUNCEMENT: + return "TYPE_ANNOUNCEMENT"; default: return null; } diff --git a/core/java/android/view/accessibility/AccessibilityNodeInfo.java b/core/java/android/view/accessibility/AccessibilityNodeInfo.java index c094fda..03c6211 100644 --- a/core/java/android/view/accessibility/AccessibilityNodeInfo.java +++ b/core/java/android/view/accessibility/AccessibilityNodeInfo.java @@ -994,7 +994,7 @@ public class AccessibilityNodeInfo implements Parcelable { protected void enforceNotSealed() { if (isSealed()) { throw new IllegalStateException("Cannot perform this " - + "action on an sealed instance."); + + "action on a sealed instance."); } } diff --git a/core/java/android/view/accessibility/AccessibilityRecord.java b/core/java/android/view/accessibility/AccessibilityRecord.java index 23b235c..bc6074f 100644 --- a/core/java/android/view/accessibility/AccessibilityRecord.java +++ b/core/java/android/view/accessibility/AccessibilityRecord.java @@ -632,7 +632,7 @@ public class AccessibilityRecord { void enforceNotSealed() { if (isSealed()) { throw new IllegalStateException("Cannot perform this " - + "action on an sealed instance."); + + "action on a sealed instance."); } } diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java index 3b6ebbe..0e5ff20 100644 --- a/core/java/android/view/inputmethod/InputMethodManager.java +++ b/core/java/android/view/inputmethod/InputMethodManager.java @@ -62,6 +62,9 @@ import java.util.concurrent.TimeUnit; * <p>Topics covered here: * <ol> * <li><a href="#ArchitectureOverview">Architecture Overview</a> + * <li><a href="#Applications">Applications</a> + * <li><a href="#InputMethods">Input Methods</a> + * <li><a href="#Security">Security</a> * </ol> * * <a name="ArchitectureOverview"></a> diff --git a/core/java/android/view/textservice/SpellCheckerInfo.java b/core/java/android/view/textservice/SpellCheckerInfo.java index 9d8475d..137743a 100644 --- a/core/java/android/view/textservice/SpellCheckerInfo.java +++ b/core/java/android/view/textservice/SpellCheckerInfo.java @@ -38,7 +38,7 @@ import java.io.IOException; import java.util.ArrayList; /** - * This class is used to specify meta information of an spell checker. + * This class is used to specify meta information of a spell checker. */ public final class SpellCheckerInfo implements Parcelable { private static final String TAG = SpellCheckerInfo.class.getSimpleName(); @@ -53,7 +53,7 @@ public final class SpellCheckerInfo implements Parcelable { private final String mSettingsActivityName; /** - * The array of the subtypes. + * The array of subtypes. */ private final ArrayList<SpellCheckerSubtype> mSubtypes = new ArrayList<SpellCheckerSubtype>(); diff --git a/core/java/android/webkit/AutoCompletePopup.java b/core/java/android/webkit/AutoCompletePopup.java new file mode 100644 index 0000000..e0e5eca --- /dev/null +++ b/core/java/android/webkit/AutoCompletePopup.java @@ -0,0 +1,264 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.webkit; + +import android.content.Context; +import android.graphics.Rect; +import android.os.Handler; +import android.os.Message; +import android.text.Editable; +import android.util.Log; +import android.view.KeyEvent; +import android.view.View; +import android.widget.AbsoluteLayout; +import android.widget.AdapterView; +import android.widget.AdapterView.OnItemClickListener; +import android.widget.Filter; +import android.widget.Filterable; +import android.widget.ListAdapter; +import android.widget.ListPopupWindow; + +class AutoCompletePopup implements OnItemClickListener, Filter.FilterListener { + private static class AnchorView extends View { + AnchorView(Context context) { + super(context); + setFocusable(false); + } + } + private static final int AUTOFILL_FORM = 100; + private boolean mIsAutoFillProfileSet; + private Handler mHandler; + private int mQueryId; + private Rect mNodeBounds = new Rect(); + private int mNodeLayerId; + private ListPopupWindow mPopup; + private Filter mFilter; + private CharSequence mText; + private ListAdapter mAdapter; + private boolean mIsFocused; + private View mAnchor; + private WebViewClassic.WebViewInputConnection mInputConnection; + private WebViewClassic mWebView; + + public AutoCompletePopup(Context context, + WebViewClassic webView, + WebViewClassic.WebViewInputConnection inputConnection) { + mInputConnection = inputConnection; + mWebView = webView; + mPopup = new ListPopupWindow(context); + mAnchor = new AnchorView(context); + mWebView.getWebView().addView(mAnchor); + mPopup.setOnItemClickListener(this); + mPopup.setAnchorView(mAnchor); + mPopup.setPromptPosition(ListPopupWindow.POSITION_PROMPT_BELOW); + mHandler = new Handler() { + @Override + public void handleMessage(Message msg) { + switch (msg.what) { + case AUTOFILL_FORM: + mWebView.autoFillForm(mQueryId); + break; + } + } + }; + } + + public boolean onKeyPreIme(int keyCode, KeyEvent event) { + if (keyCode == KeyEvent.KEYCODE_BACK && mPopup.isShowing()) { + // special case for the back key, we do not even try to send it + // to the drop down list but instead, consume it immediately + if (event.getAction() == KeyEvent.ACTION_DOWN && event.getRepeatCount() == 0) { + KeyEvent.DispatcherState state = mAnchor.getKeyDispatcherState(); + if (state != null) { + state.startTracking(event, this); + } + return true; + } else if (event.getAction() == KeyEvent.ACTION_UP) { + KeyEvent.DispatcherState state = mAnchor.getKeyDispatcherState(); + if (state != null) { + state.handleUpEvent(event); + } + if (event.isTracking() && !event.isCanceled()) { + Log.v("AutoCompletePopup", "dismiss popup 2"); + mPopup.dismiss(); + return true; + } + } + } + if (mPopup.isShowing()) { + return mPopup.onKeyPreIme(keyCode, event); + } + return false; + } + + public void setFocused(boolean isFocused) { + mIsFocused = isFocused; + if (!mIsFocused) { + Log.v("AutoCompletePopup", "dismiss popup 3"); + mPopup.dismiss(); + } + } + + public void setText(CharSequence text) { + mText = text; + if (mFilter != null) { + mFilter.filter(text, this); + } + } + + public void setAutoFillQueryId(int queryId) { + mQueryId = queryId; + } + + public void clearAdapter() { + mAdapter = null; + mFilter = null; + Log.v("AutoCompletePopup", "dismiss popup 4"); + mPopup.dismiss(); + mPopup.setAdapter(null); + } + + public <T extends ListAdapter & Filterable> void setAdapter(T adapter) { + mPopup.setAdapter(adapter); + mAdapter = adapter; + if (adapter != null) { + mFilter = adapter.getFilter(); + mFilter.filter(mText, this); + } else { + mFilter = null; + } + resetRect(); + } + + public void setNodeBounds(Rect nodeBounds, int layerId) { + mNodeBounds.set(nodeBounds); + mNodeLayerId = layerId; + resetRect(); + } + + public void resetRect() { + Log.v("AutoCompletePopup", "resetRect: " + mNodeBounds); + int left = mWebView.contentToViewX(mNodeBounds.left); + int right = mWebView.contentToViewX(mNodeBounds.right); + int width = right - left; + mPopup.setWidth(width); + + int bottom = mWebView.contentToViewY(mNodeBounds.bottom); + int top = mWebView.contentToViewY(mNodeBounds.top); + int height = bottom - top; + + AbsoluteLayout.LayoutParams lp = + (AbsoluteLayout.LayoutParams) mAnchor.getLayoutParams(); + boolean needsUpdate = false; + if (null == lp) { + lp = new AbsoluteLayout.LayoutParams(width, height, left, top); + } else { + if ((lp.x != left) || (lp.y != top) || (lp.width != width) + || (lp.height != height)) { + needsUpdate = true; + lp.x = left; + lp.y = top; + lp.width = width; + lp.height = height; + } + } + Log.v("AutoCompletePopup", "resetRect layout " + lp.x + ", " + lp.y + + ", " + lp.width + ", " + lp.height); + if (needsUpdate) { + mAnchor.setLayoutParams(lp); + } + if (mPopup.isShowing()) { + Log.v("AutoCompletePopup", "showing popup again"); + mPopup.show(); // update its position + } + } + + public void scrollDelta(int layerId, int dx, int dy) { + if (layerId == mNodeLayerId) { + mNodeBounds.offset(dx, dy); + resetRect(); + } + } + + // AdapterView.OnItemClickListener implementation + @Override + public void onItemClick(AdapterView<?> parent, View view, int position, long id) { + if (id == 0 && position == 0 && mInputConnection.getIsAutoFillable()) { + mText = ""; + pushTextToInputConnection(); + // Blank out the text box while we wait for WebCore to fill the form. + if (mIsAutoFillProfileSet) { + // Call a webview method to tell WebCore to autofill the form. + mWebView.autoFillForm(mQueryId); + } else { + // There is no autofill profile setup yet and the user has + // elected to try and set one up. Call through to the + // embedder to action that. + mWebView.getWebChromeClient().setupAutoFill( + mHandler.obtainMessage(AUTOFILL_FORM)); + } + } else { + Object selectedItem; + if (position < 0) { + selectedItem = mPopup.getSelectedItem(); + } else { + selectedItem = mAdapter.getItem(position); + } + if (selectedItem != null) { + setText(mFilter.convertResultToString(selectedItem)); + pushTextToInputConnection(); + } + } + Log.v("AutoCompletePopup", "dismiss popup 5"); + mPopup.dismiss(); + } + + public void setIsAutoFillProfileSet(boolean isAutoFillProfileSet) { + mIsAutoFillProfileSet = isAutoFillProfileSet; + } + + private void pushTextToInputConnection() { + Editable oldText = mInputConnection.getEditable(); + mInputConnection.setSelection(0, oldText.length()); + mInputConnection.replaceSelection(mText); + mInputConnection.setSelection(mText.length(), mText.length()); + } + + @Override + public void onFilterComplete(int count) { + if (!mIsFocused) { + Log.v("AutoCompletePopup", "dismiss popup 1"); + mPopup.dismiss(); + return; + } + + boolean showDropDown = (count > 0) && + (mInputConnection.getIsAutoFillable() || mText.length() > 0); + if (showDropDown) { + if (!mPopup.isShowing()) { + // Make sure the list does not obscure the IME when shown for the first time. + mPopup.setInputMethodMode(ListPopupWindow.INPUT_METHOD_NEEDED); + } + Log.v("AutoCompletePopup", "showing popup"); + mPopup.show(); + mPopup.getListView().setOverScrollMode(View.OVER_SCROLL_ALWAYS); + } else { + Log.v("AutoCompletePopup", "dismiss popup"); + mPopup.dismiss(); + } + } +} + diff --git a/core/java/android/webkit/CallbackProxy.java b/core/java/android/webkit/CallbackProxy.java index 2afb841..800ebc8 100644 --- a/core/java/android/webkit/CallbackProxy.java +++ b/core/java/android/webkit/CallbackProxy.java @@ -76,6 +76,8 @@ class CallbackProxy extends Handler { private volatile WebBackForwardListClient mWebBackForwardListClient; // Used to call startActivity during url override. private final Context mContext; + // block messages flag for destroy + private boolean mBlockMessages; // Message IDs private static final int PAGE_STARTED = 100; @@ -155,10 +157,18 @@ class CallbackProxy extends Handler { mBackForwardList = new WebBackForwardList(this); } + protected synchronized void blockMessages() { + mBlockMessages = true; + } + + protected synchronized boolean messagesBlocked() { + return mBlockMessages; + } + protected void shutdown() { + removeCallbacksAndMessages(null); setWebViewClient(null); setWebChromeClient(null); - removeCallbacksAndMessages(null); } /** @@ -265,6 +275,7 @@ class CallbackProxy extends Handler { // in the UI thread. The WebViewClient and WebChromeClient functions // that check for a non-null callback are ok because java ensures atomic // 32-bit reads and writes. + if (messagesBlocked()) return; switch (msg.what) { case PAGE_STARTED: String startedUrl = msg.getData().getString("url"); diff --git a/core/java/android/webkit/URLUtil.java b/core/java/android/webkit/URLUtil.java index 542dd21..9970c93 100644 --- a/core/java/android/webkit/URLUtil.java +++ b/core/java/android/webkit/URLUtil.java @@ -182,7 +182,7 @@ public final class URLUtil { } /** - * @return True iff the url is an proxy url to allow cookieless network + * @return True iff the url is a proxy url to allow cookieless network * requests from a file url. * @deprecated Cookieless proxy is no longer supported. */ diff --git a/core/java/android/webkit/WebViewClassic.java b/core/java/android/webkit/WebViewClassic.java index 72aed4b..812d89a 100644 --- a/core/java/android/webkit/WebViewClassic.java +++ b/core/java/android/webkit/WebViewClassic.java @@ -375,7 +375,7 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc * InputConnection used for ContentEditable. This captures changes * to the text and sends them either as key strokes or text changes. */ - private class WebViewInputConnection extends BaseInputConnection { + class WebViewInputConnection extends BaseInputConnection { // Used for mapping characters to keys typed. private KeyCharacterMap mKeyCharacterMap; private boolean mIsKeySentByMe; @@ -383,11 +383,31 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc private int mImeOptions; private String mHint; private int mMaxLength; + private boolean mIsAutoFillable; + private boolean mIsAutoCompleteEnabled; + private String mName; public WebViewInputConnection() { super(mWebView, true); } + public void setAutoFillable(int queryId) { + mIsAutoFillable = getSettings().getAutoFillEnabled() + && (queryId != WebTextView.FORM_NOT_AUTOFILLABLE); + int variation = mInputType & EditorInfo.TYPE_MASK_VARIATION; + if (variation != EditorInfo.TYPE_TEXT_VARIATION_WEB_PASSWORD + && (mIsAutoFillable || mIsAutoCompleteEnabled)) { + if (mName != null && mName.length() > 0) { + requestFormData(mName, mFieldPointer, mIsAutoFillable, + mIsAutoCompleteEnabled); + } + } + } + + public boolean getIsAutoFillable() { + return mIsAutoFillable; + } + @Override public boolean sendKeyEvent(KeyEvent event) { // Some IMEs send key events directly using sendKeyEvents. @@ -582,6 +602,9 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc mInputType = inputType; mImeOptions = imeOptions; mMaxLength = initData.mMaxLength; + mIsAutoCompleteEnabled = initData.mIsAutoCompleteEnabled; + mName = initData.mName; + mAutoCompletePopup.clearAdapter(); } public void setupEditorInfo(EditorInfo outAttrs) { @@ -629,6 +652,13 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc REPLACE_TEXT, start, end, text.toString()); mPrivateHandler.sendMessage(replaceMessage); } + if (mAutoCompletePopup != null) { + StringBuilder newText = new StringBuilder(); + newText.append(editable.subSequence(0, start)); + newText.append(text); + newText.append(editable.subSequence(end, editable.length())); + mAutoCompletePopup.setText(newText.toString()); + } mIsKeySentByMe = false; } @@ -795,6 +825,7 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc WebViewInputConnection mInputConnection = null; private int mFieldPointer; private PastePopupWindow mPasteWindow; + AutoCompletePopup mAutoCompletePopup; private static class OnTrimMemoryListener implements ComponentCallbacks2 { private static OnTrimMemoryListener sInstance = null; @@ -1104,6 +1135,7 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc private static final int SWITCH_TO_SHORTPRESS = 3; private static final int SWITCH_TO_LONGPRESS = 4; private static final int RELEASE_SINGLE_TAP = 5; + private static final int REQUEST_FORM_DATA = 6; private static final int DRAG_HELD_MOTIONLESS = 8; private static final int AWAKEN_SCROLL_BARS = 9; private static final int PREVENT_DEFAULT_TIMEOUT = 10; @@ -1156,6 +1188,9 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc static final int REPLACE_TEXT = 143; static final int CLEAR_CARET_HANDLE = 144; static final int KEY_PRESS = 145; + static final int RELOCATE_AUTO_COMPLETE_POPUP = 146; + static final int FOCUS_NODE_CHANGED = 147; + static final int AUTOFILL_FORM = 148; private static final int FIRST_PACKAGE_MSG_ID = SCROLL_TO_MSG_ID; private static final int LAST_PACKAGE_MSG_ID = HIT_TEST_RESULT; @@ -2070,6 +2105,7 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc } private void destroyImpl() { + mCallbackProxy.blockMessages(); clearHelpers(); if (mListBoxDialog != null) { mListBoxDialog.dismiss(); @@ -3559,7 +3595,9 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc @Override public void clearFormData() { checkThread(); - // TODO: Implement b/6083041 + if (mAutoCompletePopup != null) { + mAutoCompletePopup.clearAdapter(); + } } /** @@ -3860,12 +3898,12 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc } private void scrollLayerTo(int x, int y) { - if (x == mScrollingLayerRect.left && y == mScrollingLayerRect.top) { + int dx = mScrollingLayerRect.left - x; + int dy = mScrollingLayerRect.top - y; + if (dx == 0 && y == 0) { return; } if (mSelectingText) { - int dx = mScrollingLayerRect.left - x; - int dy = mScrollingLayerRect.top - y; if (mSelectCursorBaseLayerId == mCurrentScrollingLayerId) { mSelectCursorBase.offset(dx, dy); } @@ -3873,6 +3911,9 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc mSelectCursorExtent.offset(dx, dy); } } + if (mAutoCompletePopup != null) { + mAutoCompletePopup.scrollDelta(mCurrentScrollingLayerId, dx, dy); + } nativeScrollLayer(mCurrentScrollingLayerId, x, y); mScrollingLayerRect.left = x; mScrollingLayerRect.top = y; @@ -3896,6 +3937,7 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc // helper to pin the scrollTo parameters (already in view coordinates) // returns true if the scroll was changed private boolean pinScrollTo(int x, int y, boolean animate, int animationDuration) { + abortAnimation(); x = pinLocX(x); y = pinLocY(y); int dx = x - getScrollX(); @@ -3904,7 +3946,6 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc if ((dx | dy) == 0) { return false; } - abortAnimation(); if (animate) { // Log.d(LOGTAG, "startScroll: " + dx + " " + dy); mScroller.startScroll(getScrollX(), getScrollY(), dx, dy, @@ -4176,9 +4217,9 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc // is used in the view system. return; } - int vx = contentToViewX(cx); - int vy = contentToViewY(cy); - pinScrollTo(vx, vy, true, 0); + int vx = contentToViewDimension(cx - mScrollOffset.x); + int vy = contentToViewDimension(cy - mScrollOffset.y); + pinScrollBy(vx, vy, true, 0); } /** @@ -4725,6 +4766,7 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc } private void onZoomAnimationEnd() { + mPrivateHandler.sendEmptyMessage(RELOCATE_AUTO_COMPLETE_POPUP); } void onFixedLengthZoomAnimationStart() { @@ -4879,11 +4921,20 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc public InputConnection onCreateInputConnection(EditorInfo outAttrs) { if (mInputConnection == null) { mInputConnection = new WebViewInputConnection(); + mAutoCompletePopup = new AutoCompletePopup(mContext, this, + mInputConnection); } mInputConnection.setupEditorInfo(outAttrs); return mInputConnection; } + private void relocateAutoCompletePopup() { + if (mAutoCompletePopup != null) { + mAutoCompletePopup.resetRect(); + mAutoCompletePopup.setText(mInputConnection.getEditable()); + } + } + /** * Called in response to a message from webkit telling us that the soft * keyboard should be launched. @@ -4915,6 +4966,91 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc } /** + * Called by AutoCompletePopup to find saved form data associated with the + * textfield + * @param name Name of the textfield. + * @param nodePointer Pointer to the node of the textfield, so it can be + * compared to the currently focused textfield when the data is + * retrieved. + * @param autoFillable true if WebKit has determined this field is part of + * a form that can be auto filled. + * @param autoComplete true if the attribute "autocomplete" is set to true + * on the textfield. + */ + /* package */ void requestFormData(String name, int nodePointer, + boolean autoFillable, boolean autoComplete) { + if (mWebViewCore.getSettings().getSaveFormData()) { + Message update = mPrivateHandler.obtainMessage(REQUEST_FORM_DATA); + update.arg1 = nodePointer; + RequestFormData updater = new RequestFormData(name, getUrl(), + update, autoFillable, autoComplete); + Thread t = new Thread(updater); + t.start(); + } + } + + /* + * This class requests an Adapter for the AutoCompletePopup which shows past + * entries stored in the database. It is a Runnable so that it can be done + * in its own thread, without slowing down the UI. + */ + private class RequestFormData implements Runnable { + private String mName; + private String mUrl; + private Message mUpdateMessage; + private boolean mAutoFillable; + private boolean mAutoComplete; + private WebSettingsClassic mWebSettings; + + public RequestFormData(String name, String url, Message msg, + boolean autoFillable, boolean autoComplete) { + mName = name; + mUrl = WebTextView.urlForAutoCompleteData(url); + mUpdateMessage = msg; + mAutoFillable = autoFillable; + mAutoComplete = autoComplete; + mWebSettings = getSettings(); + } + + @Override + public void run() { + ArrayList<String> pastEntries = new ArrayList<String>(); + + if (mAutoFillable) { + // Note that code inside the adapter click handler in AutoCompletePopup depends + // on the AutoFill item being at the top of the drop down list. If you change + // the order, make sure to do it there too! + if (mWebSettings != null && mWebSettings.getAutoFillProfile() != null) { + pastEntries.add(mWebView.getResources().getText( + com.android.internal.R.string.autofill_this_form).toString() + + " " + + mAutoFillData.getPreviewString()); + mAutoCompletePopup.setIsAutoFillProfileSet(true); + } else { + // There is no autofill profile set up yet, so add an option that + // will invite the user to set their profile up. + pastEntries.add(mWebView.getResources().getText( + com.android.internal.R.string.setup_autofill).toString()); + mAutoCompletePopup.setIsAutoFillProfileSet(false); + } + } + + if (mAutoComplete) { + pastEntries.addAll(mDatabase.getFormData(mUrl, mName)); + } + + if (pastEntries.size() > 0) { + ArrayAdapter<String> adapter = new ArrayAdapter<String>( + mContext, + com.android.internal.R.layout.web_text_view_dropdown, + pastEntries); + mUpdateMessage.obj = adapter; + mUpdateMessage.sendToTarget(); + } + } + } + + /** * Dump the display tree to "/sdcard/displayTree.txt" * * @hide debug only @@ -4989,6 +5125,13 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc || keyCode == KeyEvent.KEYCODE_NUMPAD_ENTER; } + public boolean onKeyPreIme(int keyCode, KeyEvent event) { + if (mAutoCompletePopup != null) { + return mAutoCompletePopup.onKeyPreIme(keyCode, event); + } + return false; + } + @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (DebugFlags.WEB_VIEW) { @@ -5592,6 +5735,7 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc // However, do not update the base layer as that hasn't changed setNewPicture(mLoadedPicture, false); } + relocateAutoCompletePopup(); } @Override @@ -7238,7 +7382,6 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc viewToContentX(getScrollX() + getWidth() - mWebView.getVerticalScrollbarWidth()), viewToContentY(getScrollY() + getViewHeightWithTitle())); - content = nativeSubtractLayers(content); int screenTop = contentToViewY(content.top); int screenBottom = contentToViewY(content.bottom); int height = screenBottom - screenTop; @@ -8020,6 +8163,12 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc } break; } + case REQUEST_FORM_DATA: + if (mFieldPointer == msg.arg1) { + ArrayAdapter<String> adapter = (ArrayAdapter<String>)msg.obj; + mAutoCompletePopup.setAdapter(adapter); + } + break; case LONG_PRESS_CENTER: // as this is shared by keydown and trackballdown, reset all @@ -8174,6 +8323,11 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc } break; + case FOCUS_NODE_CHANGED: + if (mAutoCompletePopup != null) { + mAutoCompletePopup.setFocused(msg.arg1 == mFieldPointer); + } + // fall through to HIT_TEST_RESULT case HIT_TEST_RESULT: WebKitHitTest hit = (WebKitHitTest) msg.obj; mFocusedNode = hit; @@ -8190,11 +8344,20 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc case SET_AUTOFILLABLE: mAutoFillData = (WebViewCore.AutoFillData) msg.obj; - // TODO: Support (b/6083041) + if (mInputConnection != null) { + mInputConnection.setAutoFillable(mAutoFillData.getQueryId()); + mAutoCompletePopup.setAutoFillQueryId(mAutoFillData.getQueryId()); + } break; case AUTOFILL_COMPLETE: - // TODO: Support (b/6083041) + if (mAutoCompletePopup != null) { + ArrayList<String> pastEntries = new ArrayList<String>(); + mAutoCompletePopup.setAdapter(new ArrayAdapter<String>( + mContext, + com.android.internal.R.layout.web_text_view_dropdown, + pastEntries)); + } break; case COPY_TO_CLIPBOARD: @@ -8208,6 +8371,11 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc mFieldPointer = initData.mFieldPointer; mInputConnection.initEditorInfo(initData); mInputConnection.setTextAndKeepSelection(initData.mText); + nativeMapLayerRect(mNativeClass, initData.mNodeLayerId, + initData.mNodeBounds); + mAutoCompletePopup.setNodeBounds(initData.mNodeBounds, + initData.mNodeLayerId); + mAutoCompletePopup.setText(mInputConnection.getEditable()); } break; @@ -8236,6 +8404,15 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc mWebViewCore.sendMessage(EventHub.KEY_PRESS, msg.arg1); break; + case RELOCATE_AUTO_COMPLETE_POPUP: + relocateAutoCompletePopup(); + break; + + case AUTOFILL_FORM: + mWebViewCore.sendMessage(EventHub.AUTOFILL_FORM, + msg.arg1, /* unused */0); + break; + default: super.handleMessage(msg); break; @@ -9019,7 +9196,8 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc } /*package*/ void autoFillForm(int autoFillQueryId) { - mWebViewCore.sendMessage(EventHub.AUTOFILL_FORM, autoFillQueryId, /* unused */0); + mPrivateHandler.obtainMessage(AUTOFILL_FORM, autoFillQueryId, 0) + .sendToTarget(); } /* package */ ViewManager getViewManager() { @@ -9134,7 +9312,6 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc private native void nativeCopyBaseContentToPicture(Picture pict); private native boolean nativeHasContent(); private native void nativeStopGL(); - private native Rect nativeSubtractLayers(Rect content); private native void nativeDiscardAllTextures(); private native void nativeTileProfilingStart(); private native float nativeTileProfilingStop(); @@ -9170,4 +9347,6 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc private static native int nativeGetHandleLayerId(int instance, int handle, Rect cursorLocation); private static native boolean nativeIsBaseFirst(int instance); + private static native void nativeMapLayerRect(int instance, int layerId, + Rect rect); } diff --git a/core/java/android/webkit/WebViewClient.java b/core/java/android/webkit/WebViewClient.java index 81de356..0c34037 100644 --- a/core/java/android/webkit/WebViewClient.java +++ b/core/java/android/webkit/WebViewClient.java @@ -204,7 +204,7 @@ public class WebViewClient { /** * Notify the host application that an SSL error occurred while loading a - * resource, but the WebView but chose to proceed anyway based on a + * resource, but the WebView chose to proceed anyway based on a * decision retained from a previous response to onReceivedSslError(). * @hide */ @@ -220,7 +220,7 @@ public class WebViewClient { * default behavior is to cancel, returning no client certificate. * * @param view The WebView that is initiating the callback. - * @param handler An ClientCertRequestHandler object that will + * @param handler A ClientCertRequestHandler object that will * handle the user's response. * @param host_and_port The host and port of the requesting server. * @@ -266,7 +266,7 @@ public class WebViewClient { * Notify the host application that a key was not handled by the WebView. * Except system keys, WebView always consumes the keys in the normal flow * or if shouldOverrideKeyEvent returns true. This is called asynchronously - * from where the key is dispatched. It gives the host application an chance + * from where the key is dispatched. It gives the host application a chance * to handle the unhandled key events. * * @param view The WebView that is initiating the callback. diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java index 09aa286..8def74b 100644 --- a/core/java/android/webkit/WebViewCore.java +++ b/core/java/android/webkit/WebViewCore.java @@ -339,10 +339,10 @@ public final class WebViewCore { /** * Called by JNI when the focus node changed. */ - private void focusNodeChanged(WebKitHitTest hitTest) { + private void focusNodeChanged(int nodePointer, WebKitHitTest hitTest) { if (mWebView == null) return; - mWebView.mPrivateHandler.obtainMessage(WebViewClassic.HIT_TEST_RESULT, hitTest) - .sendToTarget(); + mWebView.mPrivateHandler.obtainMessage(WebViewClassic.FOCUS_NODE_CHANGED, + nodePointer, 0, hitTest).sendToTarget(); } /** @@ -953,22 +953,32 @@ public final class WebViewCore { static class TextFieldInitData { public TextFieldInitData(int fieldPointer, String text, int type, boolean isSpellCheckEnabled, - boolean isTextFieldNext, String label, int maxLength) { + boolean autoComplete, boolean isTextFieldNext, + String name, String label, int maxLength, + Rect nodeBounds, int nodeLayerId) { mFieldPointer = fieldPointer; mText = text; mType = type; + mIsAutoCompleteEnabled = autoComplete; mIsSpellCheckEnabled = isSpellCheckEnabled; mIsTextFieldNext = isTextFieldNext; + mName = name; mLabel = label; mMaxLength = maxLength; + mNodeBounds = nodeBounds; + mNodeLayerId = nodeLayerId; } int mFieldPointer; String mText; int mType; boolean mIsSpellCheckEnabled; boolean mIsTextFieldNext; + boolean mIsAutoCompleteEnabled; + String mName; String mLabel; int mMaxLength; + Rect mNodeBounds; + int mNodeLayerId; } // mAction of TouchEventData can be MotionEvent.getAction() which uses the @@ -1244,6 +1254,23 @@ public final class WebViewCore { + " arg1=" + msg.arg1 + " arg2=" + msg.arg2 + " obj=" + msg.obj); } + switch (msg.what) { + case PAUSE_TIMERS: + mSavedPriority = Process.getThreadPriority(mTid); + Process.setThreadPriority(mTid, + Process.THREAD_PRIORITY_BACKGROUND); + pauseTimers(); + if (mNativeClass != 0) { + nativeCloseIdleConnections(mNativeClass); + } + return; + + case RESUME_TIMERS: + Process.setThreadPriority(mTid, mSavedPriority); + resumeTimers(); + return; + } + if (mWebView == null || mNativeClass == 0) { if (DebugFlags.WEB_VIEW_CORE) { Log.w(LOGTAG, "Rejecting message " + msg.what @@ -1252,8 +1279,6 @@ public final class WebViewCore { return; } if (mDestroying == true - && msg.what != EventHub.RESUME_TIMERS - && msg.what != EventHub.PAUSE_TIMERS && msg.what != EventHub.DESTROY) { if (DebugFlags.WEB_VIEW_CORE) { Log.v(LOGTAG, "Rejecting message " + msg.what @@ -1419,18 +1444,6 @@ public final class WebViewCore { restoreState(msg.arg1); break; - case PAUSE_TIMERS: - mSavedPriority = Process.getThreadPriority(mTid); - Process.setThreadPriority(mTid, - Process.THREAD_PRIORITY_BACKGROUND); - pauseTimers(); - nativeCloseIdleConnections(mNativeClass); - break; - - case RESUME_TIMERS: - Process.setThreadPriority(mTid, mSavedPriority); - resumeTimers(); - break; case ON_PAUSE: nativePause(mNativeClass); @@ -1961,12 +1974,10 @@ public final class WebViewCore { */ void destroy() { synchronized (mEventHub) { - // Do not call removeMessages as then we risk removing PAUSE_TIMERS - // or RESUME_TIMERS messages, which we must still handle as they - // are per process. DESTROY will instead trigger a white list in - // mEventHub, skipping any remaining messages in the queue + // send DESTROY to front of queue + // PAUSE/RESUME timers will still be processed even if they get handled later mEventHub.mDestroying = true; - mEventHub.sendMessage( + mEventHub.sendMessageAtFrontOfQueue( Message.obtain(null, EventHub.DESTROY)); mEventHub.blockMessages(); } @@ -2786,14 +2797,16 @@ public final class WebViewCore { // called by JNI private void initEditField(int pointer, String text, int inputType, - boolean isSpellCheckEnabled, boolean nextFieldIsText, - String label, int start, int end, int selectionPtr, int maxLength) { + boolean isSpellCheckEnabled, boolean isAutoCompleteEnabled, + boolean nextFieldIsText, String name, + String label, int start, int end, int selectionPtr, int maxLength, + Rect nodeRect, int nodeLayer) { if (mWebView == null) { return; } TextFieldInitData initData = new TextFieldInitData(pointer, - text, inputType, isSpellCheckEnabled, nextFieldIsText, label, - maxLength); + text, inputType, isSpellCheckEnabled, isAutoCompleteEnabled, + nextFieldIsText, name, label, maxLength, nodeRect, nodeLayer); Message.obtain(mWebView.mPrivateHandler, WebViewClassic.INIT_EDIT_FIELD, initData).sendToTarget(); Message.obtain(mWebView.mPrivateHandler, diff --git a/core/java/android/widget/CheckedTextView.java b/core/java/android/widget/CheckedTextView.java index 19fb7b1..233d892 100644 --- a/core/java/android/widget/CheckedTextView.java +++ b/core/java/android/widget/CheckedTextView.java @@ -227,16 +227,6 @@ public class CheckedTextView extends TextView implements Checkable { } @Override - public void onPopulateAccessibilityEvent(AccessibilityEvent event) { - super.onPopulateAccessibilityEvent(event); - if (isChecked()) { - event.getText().add(mContext.getString(R.string.radiobutton_selected)); - } else { - event.getText().add(mContext.getString(R.string.radiobutton_not_selected)); - } - } - - @Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); info.setClassName(CheckedTextView.class.getName()); diff --git a/core/java/android/widget/ExpandableListView.java b/core/java/android/widget/ExpandableListView.java index badfaa7..c2d8bda 100644 --- a/core/java/android/widget/ExpandableListView.java +++ b/core/java/android/widget/ExpandableListView.java @@ -740,7 +740,7 @@ public class ExpandableListView extends ListView { /** * Converts a flat list position (the raw position of an item (child or group) - * in the list) to an group and/or child position (represented in a + * in the list) to a group and/or child position (represented in a * packed position). This is useful in situations where the caller needs to * use the underlying {@link ListView}'s methods. Use * {@link ExpandableListView#getPackedPositionType} , diff --git a/core/java/android/widget/HorizontalScrollView.java b/core/java/android/widget/HorizontalScrollView.java index 0b4ebf4..0db6ef2 100644 --- a/core/java/android/widget/HorizontalScrollView.java +++ b/core/java/android/widget/HorizontalScrollView.java @@ -1389,7 +1389,7 @@ public class HorizontalScrollView extends FrameLayout { } mChildToScrollTo = null; - // Calling this with the present values causes it to re-clam them + // Calling this with the present values causes it to re-claim them scrollTo(mScrollX, mScrollY); } @@ -1412,7 +1412,7 @@ public class HorizontalScrollView extends FrameLayout { } /** - * Return true if child is an descendant of parent, (or equal to the parent). + * Return true if child is a descendant of parent, (or equal to the parent). */ private boolean isViewDescendantOf(View child, View parent) { if (child == parent) { @@ -1427,7 +1427,7 @@ public class HorizontalScrollView extends FrameLayout { * Fling the scroll view * * @param velocityX The initial velocity in the X direction. Positive - * numbers mean that the finger/curor is moving down the screen, + * numbers mean that the finger/cursor is moving down the screen, * which means we want to scroll towards the left. */ public void fling(int velocityX) { diff --git a/core/java/android/widget/ImageView.java b/core/java/android/widget/ImageView.java index 07ae93b..3001ea1 100644 --- a/core/java/android/widget/ImageView.java +++ b/core/java/android/widget/ImageView.java @@ -193,9 +193,6 @@ public class ImageView extends View { } } - /** - * @hide - */ @Override public int getResolvedLayoutDirection(Drawable dr) { return (dr == mDrawable) ? diff --git a/core/java/android/widget/ListPopupWindow.java b/core/java/android/widget/ListPopupWindow.java index f4d5d74..1d966b3 100644 --- a/core/java/android/widget/ListPopupWindow.java +++ b/core/java/android/widget/ListPopupWindow.java @@ -1017,7 +1017,7 @@ public class ListPopupWindow { View hintView = mPromptView; if (hintView != null) { - // if an hint has been specified, we accomodate more space for it and + // if a hint has been specified, we accomodate more space for it and // add a text view in the drop down menu, at the bottom of the list LinearLayout hintContainer = new LinearLayout(context); hintContainer.setOrientation(LinearLayout.VERTICAL); diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java index e298acb..3bc4f7f 100644 --- a/core/java/android/widget/ProgressBar.java +++ b/core/java/android/widget/ProgressBar.java @@ -910,9 +910,6 @@ public class ProgressBar extends View { } } - /** - * @hide - */ @Override public int getResolvedLayoutDirection(Drawable who) { return (who == mProgressDrawable || who == mIndeterminateDrawable) ? diff --git a/core/java/android/widget/RadioButton.java b/core/java/android/widget/RadioButton.java index b6dac3e..b1bb1c0 100644 --- a/core/java/android/widget/RadioButton.java +++ b/core/java/android/widget/RadioButton.java @@ -78,16 +78,6 @@ public class RadioButton extends CompoundButton { } @Override - public void onPopulateAccessibilityEvent(AccessibilityEvent event) { - super.onPopulateAccessibilityEvent(event); - if (isChecked()) { - event.getText().add(mContext.getString(R.string.radiobutton_selected)); - } else { - event.getText().add(mContext.getString(R.string.radiobutton_not_selected)); - } - } - - @Override public void onInitializeAccessibilityEvent(AccessibilityEvent event) { super.onInitializeAccessibilityEvent(event); event.setClassName(RadioButton.class.getName()); diff --git a/core/java/android/widget/ScrollView.java b/core/java/android/widget/ScrollView.java index 3ffc0fe..25dd438 100644 --- a/core/java/android/widget/ScrollView.java +++ b/core/java/android/widget/ScrollView.java @@ -1412,7 +1412,7 @@ public class ScrollView extends FrameLayout { } mChildToScrollTo = null; - // Calling this with the present values causes it to re-clam them + // Calling this with the present values causes it to re-claim them scrollTo(mScrollX, mScrollY); } @@ -1436,7 +1436,7 @@ public class ScrollView extends FrameLayout { } /** - * Return true if child is an descendant of parent, (or equal to the parent). + * Return true if child is a descendant of parent, (or equal to the parent). */ private boolean isViewDescendantOf(View child, View parent) { if (child == parent) { diff --git a/core/java/android/widget/SimpleAdapter.java b/core/java/android/widget/SimpleAdapter.java index 4b17a92..98bcfff 100644 --- a/core/java/android/widget/SimpleAdapter.java +++ b/core/java/android/widget/SimpleAdapter.java @@ -268,7 +268,7 @@ public class SimpleAdapter extends BaseAdapter implements Filterable { /** * Called by bindView() to set the text for a TextView but only if * there is no existing ViewBinder or if the existing ViewBinder cannot - * handle binding to an TextView. + * handle binding to a TextView. * * @param v TextView to receive text * @param text the text to be set for the TextView diff --git a/core/java/android/widget/SimpleCursorAdapter.java b/core/java/android/widget/SimpleCursorAdapter.java index c5c6c69..f74a314 100644 --- a/core/java/android/widget/SimpleCursorAdapter.java +++ b/core/java/android/widget/SimpleCursorAdapter.java @@ -216,7 +216,7 @@ public class SimpleCursorAdapter extends ResourceCursorAdapter { /** * Called by bindView() to set the text for a TextView but only if * there is no existing ViewBinder or if the existing ViewBinder cannot - * handle binding to an TextView. + * handle binding to a TextView. * * Intended to be overridden by Adapters that need to filter strings * retrieved from the database. diff --git a/core/java/android/widget/SimpleCursorTreeAdapter.java b/core/java/android/widget/SimpleCursorTreeAdapter.java index a033542..6babf3e 100644 --- a/core/java/android/widget/SimpleCursorTreeAdapter.java +++ b/core/java/android/widget/SimpleCursorTreeAdapter.java @@ -283,7 +283,7 @@ public abstract class SimpleCursorTreeAdapter extends ResourceCursorTreeAdapter /** * Called by bindView() to set the text for a TextView but only if * there is no existing ViewBinder or if the existing ViewBinder cannot - * handle binding to an TextView. + * handle binding to a TextView. * * Intended to be overridden by Adapters that need to filter strings * retrieved from the database. diff --git a/core/java/android/widget/Switch.java b/core/java/android/widget/Switch.java index 92ad88d..a897cc3 100644 --- a/core/java/android/widget/Switch.java +++ b/core/java/android/widget/Switch.java @@ -519,17 +519,8 @@ public class Switch extends CompoundButton { @Override public void onPopulateAccessibilityEvent(AccessibilityEvent event) { super.onPopulateAccessibilityEvent(event); - if (isChecked()) { - CharSequence text = mOnLayout.getText(); - if (TextUtils.isEmpty(text)) { - text = mContext.getString(R.string.switch_on); - } - event.getText().add(text); - } else { - CharSequence text = mOffLayout.getText(); - if (TextUtils.isEmpty(text)) { - text = mContext.getString(R.string.switch_off); - } + CharSequence text = isChecked() ? mOnLayout.getText() : mOffLayout.getText(); + if (!TextUtils.isEmpty(text)) { event.getText().add(text); } } diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 4c89218..b8db848 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -1214,7 +1214,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (imm != null) imm.restartInput(this); } - if (mEditor != null) getEditor().mTextDisplayListIsValid = false; + if (mEditor != null) getEditor().invalidateTextDisplayList(); prepareCursorControllers(); // start or stop the cursor blinking as appropriate @@ -2328,7 +2328,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener public void setHighlightColor(int color) { if (mHighlightColor != color) { mHighlightColor = color; - if (mEditor != null) getEditor().mTextDisplayListIsValid = false; + if (mEditor != null) getEditor().invalidateTextDisplayList(); invalidate(); } } @@ -2349,7 +2349,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener mShadowDx = dx; mShadowDy = dy; - if (mEditor != null) getEditor().mTextDisplayListIsValid = false; + if (mEditor != null) getEditor().invalidateTextDisplayList(); invalidate(); } @@ -2841,7 +2841,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } } if (inval) { - if (mEditor != null) getEditor().mTextDisplayListIsValid = false; + if (mEditor != null) getEditor().invalidateTextDisplayList(); invalidate(); } } @@ -3334,7 +3334,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener // Invalidate display list if hint will be used if (mEditor != null && mText.length() == 0 && mHint != null) { - getEditor().mTextDisplayListIsValid = false; + getEditor().invalidateTextDisplayList(); } } @@ -4396,9 +4396,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } } - /** - * @hide - */ @Override public int getResolvedLayoutDirection(Drawable who) { if (who == null) return View.LAYOUT_DIRECTION_LTR; @@ -4429,13 +4426,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (dr.mDrawableStart != null) dr.mDrawableStart.mutate().setAlpha(alpha); if (dr.mDrawableEnd != null) dr.mDrawableEnd.mutate().setAlpha(alpha); } - if (mEditor != null) getEditor().mTextDisplayListIsValid = false; + if (mEditor != null) getEditor().invalidateTextDisplayList(); } return true; } if (mCurrentAlpha != 255) { - if (mEditor != null) getEditor().mTextDisplayListIsValid = false; + if (mEditor != null) getEditor().invalidateTextDisplayList(); } mCurrentAlpha = 255; return false; @@ -6292,7 +6289,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); - if (changed && mEditor != null) getEditor().mTextDisplayListIsValid = false; + if (changed && mEditor != null) getEditor().invalidateTextDisplayList(); } private boolean isShowingHint() { @@ -7130,7 +7127,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } else { ims.mContentChanged = true; } - if (mEditor != null) getEditor().mTextDisplayListIsValid = false; + if (mEditor != null) getEditor().invalidateTextDisplayList(); } if (MetaKeyKeyListener.isMetaTracker(buf, what)) { @@ -8277,7 +8274,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (getEditor().mPositionListener != null) { getEditor().mPositionListener.onScrollChanged(); } - getEditor().mTextDisplayListIsValid = false; + getEditor().invalidateTextDisplayList(); } } @@ -11303,7 +11300,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener InputMethodState mInputMethodState; DisplayList mTextDisplayList; - boolean mTextDisplayListIsValid; boolean mFrozenWithFocus; boolean mSelectionMoved; @@ -11392,9 +11388,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener removeCallbacks(mShowSuggestionRunnable); } - if (mTextDisplayList != null) { - mTextDisplayList.invalidate(); - } + invalidateTextDisplayList(); if (mSpellChecker != null) { mSpellChecker.closeSession(); @@ -11551,7 +11545,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener void sendOnTextChanged(int start, int after) { updateSpellCheckSpans(start, start + after, false); - mTextDisplayListIsValid = false; + invalidateTextDisplayList(); // Hide the controllers as soon as text is modified (typing, procedural...) // We do not hide the span controllers, since they can be added when a new text is @@ -11708,8 +11702,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener layout.drawBackground(canvas, highlight, mHighlightPaint, cursorOffsetVertical, firstLine, lastLine); - if (mTextDisplayList == null || !mTextDisplayList.isValid() || - !mTextDisplayListIsValid) { + if (mTextDisplayList == null || !mTextDisplayList.isValid()) { if (mTextDisplayList == null) { mTextDisplayList = getHardwareRenderer().createDisplayList("Text"); } @@ -11726,7 +11719,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } finally { hardwareCanvas.onPostDraw(); mTextDisplayList.end(); - mTextDisplayListIsValid = true; } } canvas.translate(mScrollX, mScrollY); @@ -11744,6 +11736,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (translate) canvas.translate(0, -cursorOffsetVertical); } + private void invalidateTextDisplayList() { + if (mTextDisplayList != null) mTextDisplayList.invalidate(); + } + private void updateCursorsPositions() { if (mCursorDrawableRes == 0) { mCursorCount = 0; diff --git a/core/java/android/widget/ToggleButton.java b/core/java/android/widget/ToggleButton.java index a0edafe..4beee96 100644 --- a/core/java/android/widget/ToggleButton.java +++ b/core/java/android/widget/ToggleButton.java @@ -154,16 +154,6 @@ public class ToggleButton extends CompoundButton { } @Override - public void onPopulateAccessibilityEvent(AccessibilityEvent event) { - super.onPopulateAccessibilityEvent(event); - if (isChecked()) { - event.getText().add(mContext.getString(R.string.togglebutton_pressed)); - } else { - event.getText().add(mContext.getString(R.string.togglebutton_not_pressed)); - } - } - - @Override public void onInitializeAccessibilityEvent(AccessibilityEvent event) { super.onInitializeAccessibilityEvent(event); event.setClassName(ToggleButton.class.getName()); diff --git a/core/java/com/android/internal/util/AsyncService.java b/core/java/com/android/internal/util/AsyncService.java index 54d3c42..e39a2bf 100644 --- a/core/java/com/android/internal/util/AsyncService.java +++ b/core/java/com/android/internal/util/AsyncService.java @@ -106,7 +106,7 @@ abstract public class AsyncService extends Service { /** * Called when service is destroyed. After returning the - * service is dead an no more processing should be expected + * service is dead and no more processing should be expected * to occur. */ @Override diff --git a/core/java/com/android/internal/util/StateMachine.java b/core/java/com/android/internal/util/StateMachine.java index 61c0c8e..da189f1 100644 --- a/core/java/com/android/internal/util/StateMachine.java +++ b/core/java/com/android/internal/util/StateMachine.java @@ -1195,7 +1195,7 @@ public class StateMachine { } /** - * Constructor creates an StateMachine using the looper. + * Constructor creates a StateMachine using the looper. * * @param name of the state machine */ diff --git a/core/java/com/android/internal/widget/SlidingTab.java b/core/java/com/android/internal/widget/SlidingTab.java index 3865510..f535a08 100644 --- a/core/java/com/android/internal/widget/SlidingTab.java +++ b/core/java/com/android/internal/widget/SlidingTab.java @@ -416,7 +416,7 @@ public class SlidingTab extends ViewGroup { } /** - * Start animating the slider. Note we need two animations since an ValueAnimator + * Start animating the slider. Note we need two animations since a ValueAnimator * keeps internal state of the invalidation region which is just the view being animated. * * @param anim1 diff --git a/core/jni/android_media_AudioRecord.cpp b/core/jni/android_media_AudioRecord.cpp index 68a8de8..b34dbce 100644 --- a/core/jni/android_media_AudioRecord.cpp +++ b/core/jni/android_media_AudioRecord.cpp @@ -203,7 +203,7 @@ android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this, format, // word length, PCM channels, frameCount, - 0, // flags + (AudioRecord::record_flags) 0, // flags recorderCallback,// callback_t lpCallbackData,// void* user 0, // notificationFrames, diff --git a/core/jni/android_media_AudioTrack.cpp b/core/jni/android_media_AudioTrack.cpp index 26c9435..57f5d3d 100644 --- a/core/jni/android_media_AudioTrack.cpp +++ b/core/jni/android_media_AudioTrack.cpp @@ -279,7 +279,7 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th format,// word length, PCM nativeChannelMask, frameCount, - 0,// flags + AUDIO_POLICY_OUTPUT_FLAG_NONE, audioCallback, &(lpJniStorage->mCallbackData),//callback, callback data (user) 0,// notificationFrames == 0 since not using EVENT_MORE_DATA to feed the AudioTrack 0,// shared mem @@ -300,7 +300,7 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th format,// word length, PCM nativeChannelMask, frameCount, - 0,// flags + AUDIO_POLICY_OUTPUT_FLAG_NONE, audioCallback, &(lpJniStorage->mCallbackData),//callback, callback data (user)); 0,// notificationFrames == 0 since not using EVENT_MORE_DATA to feed the AudioTrack lpJniStorage->mMemBase,// shared mem diff --git a/core/res/res/anim/screen_rotate_180_enter.xml b/core/res/res/anim/screen_rotate_180_enter.xml index 688a8d5..e2f3ce2 100644 --- a/core/res/res/anim/screen_rotate_180_enter.xml +++ b/core/res/res/anim/screen_rotate_180_enter.xml @@ -24,5 +24,5 @@ android:interpolator="@interpolator/decelerate_quint" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" - android:duration="@android:integer/config_mediumAnimTime" /> + android:duration="@android:integer/config_longAnimTime" /> </set> diff --git a/core/res/res/anim/screen_rotate_180_exit.xml b/core/res/res/anim/screen_rotate_180_exit.xml index 58a1868..fe4a950 100644 --- a/core/res/res/anim/screen_rotate_180_exit.xml +++ b/core/res/res/anim/screen_rotate_180_exit.xml @@ -24,5 +24,5 @@ android:interpolator="@interpolator/decelerate_quint" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" - android:duration="@android:integer/config_mediumAnimTime" /> + android:duration="@android:integer/config_longAnimTime" /> </set>
\ No newline at end of file diff --git a/core/res/res/anim/screen_rotate_180_frame.xml b/core/res/res/anim/screen_rotate_180_frame.xml index 19dade1..1a3ee67 100644 --- a/core/res/res/anim/screen_rotate_180_frame.xml +++ b/core/res/res/anim/screen_rotate_180_frame.xml @@ -24,5 +24,5 @@ android:interpolator="@interpolator/decelerate_quint" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" - android:duration="@android:integer/config_mediumAnimTime" /> + android:duration="@android:integer/config_longAnimTime" /> </set> diff --git a/core/res/res/anim/screen_rotate_finish_enter.xml b/core/res/res/anim/screen_rotate_finish_enter.xml index 9d731e6..f12a1ae 100644 --- a/core/res/res/anim/screen_rotate_finish_enter.xml +++ b/core/res/res/anim/screen_rotate_finish_enter.xml @@ -26,7 +26,6 @@ android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" android:duration="@android:integer/config_shortAnimTime"/> - <!-- <scale android:fromXScale="100%p" android:toXScale="100%" android:fromYScale="100%p" android:toYScale="100%" android:pivotX="50%" android:pivotY="50%" @@ -34,5 +33,4 @@ android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" android:duration="@android:integer/config_mediumAnimTime" /> - --> </set> diff --git a/core/res/res/anim/screen_rotate_finish_exit.xml b/core/res/res/anim/screen_rotate_finish_exit.xml index 60daa18..3d9c569 100644 --- a/core/res/res/anim/screen_rotate_finish_exit.xml +++ b/core/res/res/anim/screen_rotate_finish_exit.xml @@ -19,8 +19,8 @@ <set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false"> - <scale android:fromXScale="1.0" android:toXScale="1.0" - android:fromYScale="1.0" android:toYScale="1.0" + <scale android:fromXScale="1.0" android:toXScale="1.1111111111111" + android:fromYScale="1.0" android:toYScale="1.1111111111111" android:pivotX="50%" android:pivotY="50%" android:interpolator="@interpolator/accelerate_decelerate" android:fillEnabled="true" diff --git a/core/res/res/anim/screen_rotate_minus_90_enter.xml b/core/res/res/anim/screen_rotate_minus_90_enter.xml index d2aebc9..38a674d 100644 --- a/core/res/res/anim/screen_rotate_minus_90_enter.xml +++ b/core/res/res/anim/screen_rotate_minus_90_enter.xml @@ -19,44 +19,10 @@ <set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false"> - <!-- - <scale android:fromXScale="1.0" android:toXScale="0.565" - android:fromYScale="1.0" android:toYScale="0.565" - android:pivotX="50%" android:pivotY="50%" - android:interpolator="@interpolator/decelerate_quint" - android:fillEnabled="true" - android:fillBefore="false" android:fillAfter="true" - android:duration="@android:integer/config_mediumAnimTime"/> - <scale android:fromXScale="1.0" android:toXScale="1.777777777" - android:fromYScale="1.0" android:toYScale="1.777777777" - android:pivotX="50%" android:pivotY="50%" - android:interpolator="@interpolator/decelerate_quint" - android:fillEnabled="true" - android:fillBefore="false" android:fillAfter="true" - android:startOffset="@android:integer/config_longAnimTime" - android:duration="@android:integer/config_mediumAnimTime"/> - <scale android:fromXScale="100%p" android:toXScale="100%" - android:fromYScale="100%p" android:toYScale="100%" - android:pivotX="50%" android:pivotY="50%" - android:interpolator="@interpolator/decelerate_quint" - android:fillEnabled="true" - android:fillBefore="true" android:fillAfter="true" - android:startOffset="@android:integer/config_longAnimTime" - android:duration="@android:integer/config_mediumAnimTime" /> - --> - <!-- - <scale android:fromXScale="100%p" android:toXScale="100%" - android:fromYScale="100%p" android:toYScale="100%" - android:pivotX="50%" android:pivotY="50%" - android:interpolator="@interpolator/decelerate_quint" - android:fillEnabled="true" - android:fillBefore="true" android:fillAfter="true" - android:duration="@android:integer/config_mediumAnimTime" /> - --> <rotate android:fromDegrees="-90" android:toDegrees="0" android:pivotX="50%" android:pivotY="50%" android:interpolator="@interpolator/decelerate_quint" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" - android:duration="@android:integer/config_mediumAnimTime" /> + android:duration="@android:integer/config_longAnimTime" /> </set> diff --git a/core/res/res/anim/screen_rotate_minus_90_exit.xml b/core/res/res/anim/screen_rotate_minus_90_exit.xml index c7c38cd..a75aca7 100644 --- a/core/res/res/anim/screen_rotate_minus_90_exit.xml +++ b/core/res/res/anim/screen_rotate_minus_90_exit.xml @@ -19,51 +19,10 @@ <set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false"> - <!-- - <scale android:fromXScale="1.0" android:toXScale="0.565" - android:fromYScale="1.0" android:toYScale="0.565" - android:pivotX="50%" android:pivotY="50%" - android:interpolator="@interpolator/decelerate_quint" - android:fillEnabled="true" - android:fillBefore="false" android:fillAfter="true" - android:duration="@android:integer/config_mediumAnimTime"/> - <scale android:fromXScale="1.0" android:toXScale="1.777777777" - android:fromYScale="1.0" android:toYScale="1.777777777" - android:pivotX="50%" android:pivotY="50%" - android:interpolator="@interpolator/decelerate_quint" - android:fillEnabled="true" - android:fillBefore="false" android:fillAfter="true" - android:startOffset="@android:integer/config_longAnimTime" - android:duration="@android:integer/config_mediumAnimTime"/> - <scale android:fromXScale="100%" android:toXScale="100%p" - android:fromYScale="100%" android:toYScale="100%p" - android:pivotX="50%" android:pivotY="50%" - android:interpolator="@interpolator/decelerate_quint" - android:startOffset="@android:integer/config_longAnimTime" - android:duration="@android:integer/config_mediumAnimTime" /> - <alpha android:fromAlpha="1.0" android:toAlpha="0" - android:interpolator="@interpolator/decelerate_quint" - android:fillEnabled="true" - android:fillBefore="false" android:fillAfter="true" - android:startOffset="@android:integer/config_longAnimTime" - android:duration="@android:integer/config_mediumAnimTime" /> - --> - <!-- - <scale android:fromXScale="100%" android:toXScale="100%p" - android:fromYScale="100%" android:toYScale="100%p" - android:pivotX="50%" android:pivotY="50%" - android:interpolator="@interpolator/decelerate_quint" - android:duration="@android:integer/config_mediumAnimTime" /> - <alpha android:fromAlpha="1.0" android:toAlpha="0" - android:interpolator="@interpolator/decelerate_quint" - android:fillEnabled="true" - android:fillBefore="false" android:fillAfter="true" - android:duration="@android:integer/config_mediumAnimTime" /> - --> <rotate android:fromDegrees="0" android:toDegrees="90" android:pivotX="50%" android:pivotY="50%" android:interpolator="@interpolator/decelerate_quint" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" - android:duration="@android:integer/config_mediumAnimTime" /> + android:duration="@android:integer/config_longAnimTime" /> </set> diff --git a/core/res/res/anim/screen_rotate_minus_90_frame.xml b/core/res/res/anim/screen_rotate_minus_90_frame.xml index 874f2e9..2d198f3 100644 --- a/core/res/res/anim/screen_rotate_minus_90_frame.xml +++ b/core/res/res/anim/screen_rotate_minus_90_frame.xml @@ -24,5 +24,5 @@ android:interpolator="@interpolator/decelerate_quint" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" - android:duration="@android:integer/config_mediumAnimTime" /> + android:duration="@android:integer/config_longAnimTime" /> </set> diff --git a/core/res/res/anim/screen_rotate_plus_90_enter.xml b/core/res/res/anim/screen_rotate_plus_90_enter.xml index 63d7043..583d2ba 100644 --- a/core/res/res/anim/screen_rotate_plus_90_enter.xml +++ b/core/res/res/anim/screen_rotate_plus_90_enter.xml @@ -19,44 +19,10 @@ <set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false"> - <!-- - <scale android:fromXScale="1.0" android:toXScale="0.565" - android:fromYScale="1.0" android:toYScale="0.565" - android:pivotX="50%" android:pivotY="50%" - android:interpolator="@interpolator/decelerate_quint" - android:fillEnabled="true" - android:fillBefore="false" android:fillAfter="true" - android:duration="@android:integer/config_mediumAnimTime"/> - <scale android:fromXScale="1.0" android:toXScale="1.777777777" - android:fromYScale="1.0" android:toYScale="1.777777777" - android:pivotX="50%" android:pivotY="50%" - android:interpolator="@interpolator/decelerate_quint" - android:fillEnabled="true" - android:fillBefore="false" android:fillAfter="true" - android:startOffset="75" - android:duration="@android:integer/config_mediumAnimTime"/> - <scale android:fromXScale="100%p" android:toXScale="100%" - android:fromYScale="100%p" android:toYScale="100%" - android:pivotX="50%" android:pivotY="50%" - android:interpolator="@interpolator/decelerate_quint" - android:fillEnabled="true" - android:fillBefore="true" android:fillAfter="true" - android:startOffset="75" - android:duration="@android:integer/config_mediumAnimTime" /> - --> - <!-- - <scale android:fromXScale="100%p" android:toXScale="100%" - android:fromYScale="100%p" android:toYScale="100%" - android:pivotX="50%" android:pivotY="50%" - android:interpolator="@interpolator/decelerate_quint" - android:fillEnabled="true" - android:fillBefore="true" android:fillAfter="true" - android:duration="@android:integer/config_mediumAnimTime" /> - --> <rotate android:fromDegrees="90" android:toDegrees="0" android:pivotX="50%" android:pivotY="50%" android:interpolator="@interpolator/decelerate_quint" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" - android:duration="@android:integer/config_mediumAnimTime" /> + android:duration="@android:integer/config_longAnimTime" /> </set> diff --git a/core/res/res/anim/screen_rotate_plus_90_exit.xml b/core/res/res/anim/screen_rotate_plus_90_exit.xml index ea48c81..a2bef41 100644 --- a/core/res/res/anim/screen_rotate_plus_90_exit.xml +++ b/core/res/res/anim/screen_rotate_plus_90_exit.xml @@ -19,51 +19,10 @@ <set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false"> - <!-- - <scale android:fromXScale="1.0" android:toXScale="0.565" - android:fromYScale="1.0" android:toYScale="0.565" - android:pivotX="50%" android:pivotY="50%" - android:interpolator="@interpolator/decelerate_quint" - android:fillEnabled="true" - android:fillBefore="false" android:fillAfter="true" - android:duration="@android:integer/config_mediumAnimTime"/> - <scale android:fromXScale="1.0" android:toXScale="1.777777777" - android:fromYScale="1.0" android:toYScale="1.777777777" - android:pivotX="50%" android:pivotY="50%" - android:interpolator="@interpolator/decelerate_quint" - android:fillEnabled="true" - android:fillBefore="false" android:fillAfter="true" - android:startOffset="75" - android:duration="@android:integer/config_mediumAnimTime"/> - <scale android:fromXScale="100%" android:toXScale="100%p" - android:fromYScale="100%" android:toYScale="100%p" - android:pivotX="50%" android:pivotY="50%" - android:interpolator="@interpolator/decelerate_quint" - android:startOffset="75" - android:duration="@android:integer/config_mediumAnimTime" /> - <alpha android:fromAlpha="1.0" android:toAlpha="0" - android:interpolator="@interpolator/decelerate_quint" - android:fillEnabled="true" - android:fillBefore="false" android:fillAfter="true" - android:startOffset="75" - android:duration="@android:integer/config_mediumAnimTime" /> - --> - <!-- - <scale android:fromXScale="100%" android:toXScale="100%p" - android:fromYScale="100%" android:toYScale="100%p" - android:pivotX="50%" android:pivotY="50%" - android:interpolator="@interpolator/decelerate_quint" - android:duration="@android:integer/config_mediumAnimTime" /> - <alpha android:fromAlpha="1.0" android:toAlpha="0" - android:interpolator="@interpolator/decelerate_quint" - android:fillEnabled="true" - android:fillBefore="false" android:fillAfter="true" - android:duration="@android:integer/config_mediumAnimTime" /> - --> <rotate android:fromDegrees="0" android:toDegrees="-90" android:pivotX="50%" android:pivotY="50%" android:interpolator="@interpolator/decelerate_quint" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" - android:duration="@android:integer/config_mediumAnimTime" /> + android:duration="@android:integer/config_longAnimTime" /> </set> diff --git a/core/res/res/anim/screen_rotate_plus_90_frame.xml b/core/res/res/anim/screen_rotate_plus_90_frame.xml index 03c6aa6..cd20050 100644 --- a/core/res/res/anim/screen_rotate_plus_90_frame.xml +++ b/core/res/res/anim/screen_rotate_plus_90_frame.xml @@ -24,5 +24,5 @@ android:interpolator="@interpolator/decelerate_quint" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" - android:duration="@android:integer/config_mediumAnimTime" /> + android:duration="@android:integer/config_longAnimTime" /> </set> diff --git a/core/res/res/layout/action_bar_title_item.xml b/core/res/res/layout/action_bar_title_item.xml index 4c74f6a..2e21383 100644 --- a/core/res/res/layout/action_bar_title_item.xml +++ b/core/res/res/layout/action_bar_title_item.xml @@ -18,7 +18,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" - android:paddingRight="16dip" + android:paddingRight="8dip" android:background="?android:attr/actionBarItemBackground" android:enabled="false"> diff --git a/core/res/res/layout/dialog_custom_title.xml b/core/res/res/layout/dialog_custom_title.xml index e52fba6..3784c59 100644 --- a/core/res/res/layout/dialog_custom_title.xml +++ b/core/res/res/layout/dialog_custom_title.xml @@ -15,7 +15,7 @@ --> <!-- -This is an custom layout for a dialog. +This is a custom layout for a dialog. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" diff --git a/core/res/res/layout/dialog_custom_title_holo.xml b/core/res/res/layout/dialog_custom_title_holo.xml index e2335a7..cf71197 100644 --- a/core/res/res/layout/dialog_custom_title_holo.xml +++ b/core/res/res/layout/dialog_custom_title_holo.xml @@ -15,7 +15,7 @@ --> <!-- -This is an custom layout for a dialog. +This is a custom layout for a dialog. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" diff --git a/core/res/res/layout/screen_custom_title.xml b/core/res/res/layout/screen_custom_title.xml index c62a06a..e3364d1 100644 --- a/core/res/res/layout/screen_custom_title.xml +++ b/core/res/res/layout/screen_custom_title.xml @@ -15,7 +15,7 @@ --> <!-- -This is an custom layout for a screen. +This is a custom layout for a screen. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml index 9ac20fa..6eb4b93 100644 --- a/core/res/res/values-af/strings.xml +++ b/core/res/res/values-af/strings.xml @@ -769,7 +769,7 @@ <string name="permlab_accessContentProvidersExternally" msgid="5077774297943409285">"verkry toegang tot inhoud ekstern"</string> <string name="permdesc_accessContentProvidersExternally" msgid="4544346486697853685">"Stel die houer in staat om toegang te verkry tot inhoudverskaffers vanuit die dop. Behoort nooit nodig te wees vir gewone programme nie."</string> <string name="permlab_updateLock" msgid="3527558366616680889">"ontmoedig outomatiese toestelopdaterings"</string> - <string name="permdesc_updateLock" msgid="1655625832166778492">"Laat die houer toe om inligting aan die stelsel te bied oor wanneer \'n goeie tyd vir \'n nie-interaktiewe herlaai sal wees om die toestel op te gradeer."</string> + <string name="permdesc_updateLock" msgid="1655625832166778492">"Laat die houer toe om inligting aan die stelsel te bied oor wanneer \'n goeie tyd vir \'n nie-interaktiewe herselflaai sal wees om die toestel op te gradeer."</string> <string name="save_password_message" msgid="767344687139195790">"Wil jy hê die blaaier moet hierdie wagwoord onthou?"</string> <string name="save_password_notnow" msgid="6389675316706699758">"Nie nou nie"</string> <string name="save_password_remember" msgid="6491879678996749466">"Onthou"</string> @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Trek \'n dag af."</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Tel \'n jaar by"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Trek \'n jaar af"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"gekontroleer"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"nie gekontroleer nie"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"gekies"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"nie gekies nie"</string> - <string name="switch_on" msgid="551417728476977311">"aan"</string> - <string name="switch_off" msgid="7249798614327155088">"af"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"gedruk"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"nie gedruk nie"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Kanselleer"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Vee uit"</string> diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml index dc74d94..1d1af5f 100644 --- a/core/res/res/values-am/strings.xml +++ b/core/res/res/values-am/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"ቀን ቀንስ"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"አመት ጨምር"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"አመት ቀንስ"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"ታይቷል"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"አልተፈተሸም"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"የተመረጠ"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"አልተመረጠም"</string> - <string name="switch_on" msgid="551417728476977311">"በ:"</string> - <string name="switch_off" msgid="7249798614327155088">"ውጪ"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"ተጭኗል"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"አልተጫነም።"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"ተወው"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"ሰርዝ"</string> diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml index 193157b..83c6f26 100644 --- a/core/res/res/values-ar/strings.xml +++ b/core/res/res/values-ar/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"إنقاص يوم"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"زيادة عام"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"إنقاص عام"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"تم التحديد"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"لم يتم التحديد"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"محدد"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"غير محدد"</string> - <string name="switch_on" msgid="551417728476977311">"تشغيل"</string> - <string name="switch_off" msgid="7249798614327155088">"إيقاف"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"مضغوط"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"غير مضغوط"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"إلغاء"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"حذف"</string> diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml index a37e231..fced14a 100644 --- a/core/res/res/values-be/strings.xml +++ b/core/res/res/values-be/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"На дзень менш."</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"На год больш"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"На год менш"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"пастаўлены"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"не пастаўлены"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"абрана"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"не абрана"</string> - <string name="switch_on" msgid="551417728476977311">"укл."</string> - <string name="switch_off" msgid="7249798614327155088">"адключаны"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"націснутая"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"не націснутая"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Адмена"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Выдаліць"</string> diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml index c277ee9..65fec6f 100644 --- a/core/res/res/values-bg/strings.xml +++ b/core/res/res/values-bg/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Намаляване на деня"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Увеличаване на годината"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Намаляване на годината"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"отметнато"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"не е отметнато"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"избрано"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"не е избрано"</string> - <string name="switch_on" msgid="551417728476977311">"включено"</string> - <string name="switch_off" msgid="7249798614327155088">"изключено"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"натиснато"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"не е натиснато"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Отказ"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Изтриване"</string> diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml index 189225e..779de15 100644 --- a/core/res/res/values-ca/strings.xml +++ b/core/res/res/values-ca/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Disminueix els dies"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Incrementa l\'any"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Disminueix l\'any"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"marcat"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"no marcat"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"seleccionat"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"no seleccionat"</string> - <string name="switch_on" msgid="551417728476977311">"activat"</string> - <string name="switch_off" msgid="7249798614327155088">"desactivat"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"premut"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"no premut"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Cancel·la"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Suprimeix"</string> diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml index 389a672..cc8278d 100644 --- a/core/res/res/values-cs/strings.xml +++ b/core/res/res/values-cs/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Odečíst den"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Přičíst rok"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Odečíst rok"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"zaškrtnuto"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"nezaškrtnuto"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"Vybráno"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"Nevybráno"</string> - <string name="switch_on" msgid="551417728476977311">"zapnuto"</string> - <string name="switch_off" msgid="7249798614327155088">"vypnuto"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"stisknuto"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"nestisknuto"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Zrušit"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Smazat"</string> diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml index 3ca0534..067b813 100644 --- a/core/res/res/values-da/strings.xml +++ b/core/res/res/values-da/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Fjern dag"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Tilføj år"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Fjern år"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"markeret"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"ikke markeret"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"udvalgt"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"ikke valgt"</string> - <string name="switch_on" msgid="551417728476977311">"tændt"</string> - <string name="switch_off" msgid="7249798614327155088">"slukket"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"trykket på"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"ikke trykket på"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Annuller"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Slet"</string> diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml index 72ac55f..5c46e66 100644 --- a/core/res/res/values-de/strings.xml +++ b/core/res/res/values-de/strings.xml @@ -1173,14 +1173,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Tag zurückstellen"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Jahr vorstellen"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Jahr zurückstellen"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"Aktiviert"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"Nicht aktiviert"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"Ausgewählt"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"Nicht ausgewählt"</string> - <string name="switch_on" msgid="551417728476977311">"An"</string> - <string name="switch_off" msgid="7249798614327155088">"Aus"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"Gedrückt"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"Nicht gedrückt"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Abbrechen"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Löschen"</string> diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml index 0e5dd10..75f0b51 100644 --- a/core/res/res/values-el/strings.xml +++ b/core/res/res/values-el/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Προηγούμενη μέρα"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Αύξηση έτους"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Προηγούμενο έτος"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"ελέγχθηκε"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"δεν επιλέχθηκε"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"επιλεγμένο"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"δεν έχει επιλεγεί"</string> - <string name="switch_on" msgid="551417728476977311">"ενεργοποίηση"</string> - <string name="switch_off" msgid="7249798614327155088">"απενεργοποιημένη"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"πατήθηκε"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"δεν πατήθηκε"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Ακύρωση"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Διαγραφή"</string> diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml index e7ff973..c7364e8 100644 --- a/core/res/res/values-en-rGB/strings.xml +++ b/core/res/res/values-en-rGB/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Decrement day"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Increment year"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Decrement year"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"ticked"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"not ticked"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"selected"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"not selected"</string> - <string name="switch_on" msgid="551417728476977311">"on"</string> - <string name="switch_off" msgid="7249798614327155088">"off"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"pressed"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"not pressed"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Cancel"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string> diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml index 8e36948..6cedde4 100644 --- a/core/res/res/values-es-rUS/strings.xml +++ b/core/res/res/values-es-rUS/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Disminuir día"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Aumentar año"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Disminuir año"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"marcado"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"no marcado"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"seleccionado"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"No se ha seleccionado."</string> - <string name="switch_on" msgid="551417728476977311">"Activado"</string> - <string name="switch_off" msgid="7249798614327155088">"Desactivado"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"presionado"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"sin presionar"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Cancelar"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Eliminar"</string> diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml index a4638fa..7f64b0c 100644 --- a/core/res/res/values-es/strings.xml +++ b/core/res/res/values-es/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Disminuir día"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Aumentar año"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Disminuir año"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"seleccionado"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"no seleccionado"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"seleccionado"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"no seleccionado"</string> - <string name="switch_on" msgid="551417728476977311">"activado"</string> - <string name="switch_off" msgid="7249798614327155088">"desactivado"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"pulsado"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"sin pulsar"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Cancelar"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Eliminar"</string> diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml index 697c8f1..fd24d76 100644 --- a/core/res/res/values-et/strings.xml +++ b/core/res/res/values-et/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Eelmine päev"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Aastaarvu suurendamine"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Aastaarvu vähendamine"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"märgitud"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"pole märgitud"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"valitud"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"pole valitud"</string> - <string name="switch_on" msgid="551417728476977311">"sees"</string> - <string name="switch_off" msgid="7249798614327155088">"väljas"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"vajutatud"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"pole vajutatud"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Tühista"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Kustuta"</string> diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml index a4a9bff..f135ec8 100644 --- a/core/res/res/values-fa/strings.xml +++ b/core/res/res/values-fa/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"کاهش روز"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"افزایش سال"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"کاهش سال"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"علامت زده"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"بدون علامت"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"انتخاب شد"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"انتخاب نشده"</string> - <string name="switch_on" msgid="551417728476977311">"روشن"</string> - <string name="switch_off" msgid="7249798614327155088">"خاموش"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"فشرده شد"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"فشرده نشد"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"لغو"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string> diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml index 1b8b18a..8c8b057 100644 --- a/core/res/res/values-fi/strings.xml +++ b/core/res/res/values-fi/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Pienennä päivää"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Kasvata vuotta"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Pienennä vuotta"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"valittu"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"ei valittu"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"valittu"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"ei valittu"</string> - <string name="switch_on" msgid="551417728476977311">"käytössä"</string> - <string name="switch_off" msgid="7249798614327155088">"pois käytöstä"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"painettu"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"ei painettu"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Peruuta"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Poista"</string> diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml index b19a7de..d748a26 100644 --- a/core/res/res/values-fr/strings.xml +++ b/core/res/res/values-fr/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Jour précédent"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Année suivante"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Année précédente"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"coché"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"non coché"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"sélectionné"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"non sélectionné"</string> - <string name="switch_on" msgid="551417728476977311">"activé"</string> - <string name="switch_off" msgid="7249798614327155088">"désactivé"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"sélectionné"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"non sélectionné"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Annuler"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Supprimer"</string> diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml index d4b921f..66d71c2 100644 --- a/core/res/res/values-hi/strings.xml +++ b/core/res/res/values-hi/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"घटते क्रम में दिन"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"बढ़ते क्रम में वर्ष"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"घटते क्रम में वर्ष"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"चेक किया गया"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"चेक नहीं किया गया"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"चयनित"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"चयनित नहीं"</string> - <string name="switch_on" msgid="551417728476977311">"चालू"</string> - <string name="switch_off" msgid="7249798614327155088">"बंद"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"दबाया गया"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"दबाया नहीं गया."</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"रद्द करें"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"हटाएं"</string> diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml index fbd3a3d..a726037 100644 --- a/core/res/res/values-hr/strings.xml +++ b/core/res/res/values-hr/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Pomak unatrag za jedan dan"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Pomak unaprijed za jednu godinu"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Pomak unatrag za jednu godinu"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"označeno"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"nije označeno"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"odabran"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"nije odabrano"</string> - <string name="switch_on" msgid="551417728476977311">"uključeno"</string> - <string name="switch_off" msgid="7249798614327155088">"isključeno"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"pritisnut"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"nije pritisnut"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Odustani"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Izbriši"</string> diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml index c6190fd..8b06ee7 100644 --- a/core/res/res/values-hu/strings.xml +++ b/core/res/res/values-hu/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Napok csökkentése"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Évek növelése"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Évek csökkentése"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"bejelölve"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"nincs bejelölve"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"bejelölve"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"nincs kiválasztva"</string> - <string name="switch_on" msgid="551417728476977311">"be"</string> - <string name="switch_off" msgid="7249798614327155088">"kikapcsolva"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"megnyomva"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"nincs megnyomva"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Mégse"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string> diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml index 7d08048..1b436e6 100644 --- a/core/res/res/values-in/strings.xml +++ b/core/res/res/values-in/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Hari pengurangan"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Tahun penambahan"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Tahun pengurangan"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"dicentang"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"tidak diperiksa"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"dipilih"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"tidak dipilih"</string> - <string name="switch_on" msgid="551417728476977311">"nyala"</string> - <string name="switch_off" msgid="7249798614327155088">"mati"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"ditekan"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"tidak ditekan"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Batal"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Hapus"</string> diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml index 96c6709..97bb399 100644 --- a/core/res/res/values-it/strings.xml +++ b/core/res/res/values-it/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Diminuisci giorno"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Aumenta anno"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Diminuisci anno"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"selezionata"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"non selezionato"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"selezionato"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"non selezionato"</string> - <string name="switch_on" msgid="551417728476977311">"attivo"</string> - <string name="switch_off" msgid="7249798614327155088">"disattivo"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"premuto"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"non premuto"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Annulla"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Canc"</string> diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml index 485e0b0..0a7320a 100644 --- a/core/res/res/values-iw/strings.xml +++ b/core/res/res/values-iw/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"הפחת יום."</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"הוסף שנה"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"הפחת שנה"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"מסומן"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"לא מסומן"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"נבחר"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"לא נבחר"</string> - <string name="switch_on" msgid="551417728476977311">"מופעל"</string> - <string name="switch_off" msgid="7249798614327155088">"כבוי"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"לחוץ"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"לא לחוץ"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"ביטול"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"מחק"</string> diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml index bc9840d..08ef8ce5 100644 --- a/core/res/res/values-ja/strings.xml +++ b/core/res/res/values-ja/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"1日戻す"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"1年進める"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"1年戻す"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"ON"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"OFF"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"ON"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"選択されていません"</string> - <string name="switch_on" msgid="551417728476977311">"ON"</string> - <string name="switch_off" msgid="7249798614327155088">"OFF"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"ON"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"OFF"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"キャンセル"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"削除"</string> diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml index c9801a3..ef673d2 100644 --- a/core/res/res/values-ko/strings.xml +++ b/core/res/res/values-ko/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"\'날짜\'를 줄입니다."</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"\'연도\'를 올립니다."</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"\'연도\'를 줄입니다."</string> - <string name="checkbox_checked" msgid="7222044992652711167">"확인"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"선택 안함"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"선택됨"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"선택 안함"</string> - <string name="switch_on" msgid="551417728476977311">"켜짐"</string> - <string name="switch_off" msgid="7249798614327155088">"꺼짐"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"누름"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"누르지 않음"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt 키"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"취소"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete 키"</string> diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml index 4424ad5..744df41 100644 --- a/core/res/res/values-lt/strings.xml +++ b/core/res/res/values-lt/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Sumažėjimo diena"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Padidėjimo metai"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Sumažėjimo metai"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"pažymėtas"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"nepatikrinta"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"pasirinkta"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"nepasirinkta"</string> - <string name="switch_on" msgid="551417728476977311">"įjungta"</string> - <string name="switch_off" msgid="7249798614327155088">"išjungta"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"paspausta"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"nepaspausta"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Atšaukti"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Ištrinti"</string> diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml index 89baaaa..4e7d63f 100644 --- a/core/res/res/values-lv/strings.xml +++ b/core/res/res/values-lv/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Samazināt datuma vērtību"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Palielināt gada vērtību"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Samazināt gada vērtību"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"atzīmēta"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"nav atzīmēta"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"atlasīta"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"nav atlasīta"</string> - <string name="switch_on" msgid="551417728476977311">"ieslēgts"</string> - <string name="switch_off" msgid="7249798614327155088">"izslēgts"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"nospiesta"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"nav nospiesta"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alternēšanas taustiņš"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Atcelt"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Dzēšanas taustiņš"</string> diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml index 385bebb..0b7973b 100644 --- a/core/res/res/values-ms/strings.xml +++ b/core/res/res/values-ms/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Hari penyusutan"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Tahun kenaikan"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Tahun penyusutan"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"ditandakan"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"tidak ditandakan"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"dipilih"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"tidak dipilih"</string> - <string name="switch_on" msgid="551417728476977311">"hidup"</string> - <string name="switch_off" msgid="7249798614327155088">"mati"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"ditekan."</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"tidak ditekan"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Batal"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Padam"</string> diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml index e70a664..dbe87e7 100644 --- a/core/res/res/values-nb/strings.xml +++ b/core/res/res/values-nb/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Endre dag (bakover)"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Endre år (fremover)"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Endre år (bakover)"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"valgt"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"ikke valgt"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"valgt"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"ikke valgt"</string> - <string name="switch_on" msgid="551417728476977311">"på"</string> - <string name="switch_off" msgid="7249798614327155088">"av"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"trykket"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"ikke trykket"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Avbryt"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Slett"</string> diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml index 6876c63..f2ea779 100644 --- a/core/res/res/values-nl/strings.xml +++ b/core/res/res/values-nl/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Dag verlagen"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Jaar verhogen"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Jaar verlagen"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"aangevinkt"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"niet aangevinkt"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"geselecteerd"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"niet geselecteerd"</string> - <string name="switch_on" msgid="551417728476977311">"aan"</string> - <string name="switch_off" msgid="7249798614327155088">"uit"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"ingedrukt"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"niet ingedrukt"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Annuleren"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string> diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml index 96dcfa0..a2c525c 100644 --- a/core/res/res/values-pl/strings.xml +++ b/core/res/res/values-pl/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Poprzedni dzień"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Następny rok"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Poprzedni rok"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"zaznaczono"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"nie zaznaczono"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"wybrano"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"nie wybrano"</string> - <string name="switch_on" msgid="551417728476977311">"włączono"</string> - <string name="switch_off" msgid="7249798614327155088">"wyłączono"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"naciśnięto"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"nie naciśnięto"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Anuluj"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string> diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml index 7f031fd..8f7e767 100644 --- a/core/res/res/values-pt-rPT/strings.xml +++ b/core/res/res/values-pt-rPT/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Diminuir dia"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Aumentar ano"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Diminuir ano"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"marcado"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"desmarcado"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"selecionado"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"não selecionado"</string> - <string name="switch_on" msgid="551417728476977311">"ativado"</string> - <string name="switch_off" msgid="7249798614327155088">"desativado"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"premido"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"não premido"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Cancelar"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string> diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml index fbfe88f..e5d68f3 100644 --- a/core/res/res/values-pt/strings.xml +++ b/core/res/res/values-pt/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Reduzir dia"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Aumentar ano"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Diminuir ano"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"verificado"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"não selecionado"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"selecionado"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"Não selecionado"</string> - <string name="switch_on" msgid="551417728476977311">"ativado"</string> - <string name="switch_off" msgid="7249798614327155088">"desativado"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"pressionado"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"não pressionado"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Cancelar"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Excluir"</string> diff --git a/core/res/res/values-rm/strings.xml b/core/res/res/values-rm/strings.xml index ff76f74..e03a7c3 100644 --- a/core/res/res/values-rm/strings.xml +++ b/core/res/res/values-rm/strings.xml @@ -1754,22 +1754,6 @@ <skip /> <!-- no translation found for date_picker_decrement_year_button (5193062846559743823) --> <skip /> - <!-- no translation found for checkbox_checked (7222044992652711167) --> - <skip /> - <!-- no translation found for checkbox_not_checked (5174639551134444056) --> - <skip /> - <!-- no translation found for radiobutton_selected (8603599808486581511) --> - <skip /> - <!-- no translation found for radiobutton_not_selected (2908760184307722393) --> - <skip /> - <!-- no translation found for switch_on (551417728476977311) --> - <skip /> - <!-- no translation found for switch_off (7249798614327155088) --> - <skip /> - <!-- no translation found for togglebutton_pressed (4180411746647422233) --> - <skip /> - <!-- no translation found for togglebutton_not_pressed (4495147725636134425) --> - <skip /> <!-- no translation found for keyboardview_keycode_alt (4856868820040051939) --> <skip /> <!-- no translation found for keyboardview_keycode_cancel (1203984017245783244) --> diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml index cac586e..ed95f36 100644 --- a/core/res/res/values-ro/strings.xml +++ b/core/res/res/values-ro/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Decrementaţi valoarea pentru zi"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Incrementaţi valoarea pentru an"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Decrementaţi valoarea pentru an"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"bifată"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"nebifată"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"selectat"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"neselectat"</string> - <string name="switch_on" msgid="551417728476977311">"activat"</string> - <string name="switch_off" msgid="7249798614327155088">"dezactivat"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"apăsat"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"neapăsat"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Anulaţi"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Ştergeţi"</string> diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml index 3a554d6..e753531 100644 --- a/core/res/res/values-ru/strings.xml +++ b/core/res/res/values-ru/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"На день назад"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"На год вперед"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"На год назад"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"установлено"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"не установлено"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"выбрано"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"не выбрано"</string> - <string name="switch_on" msgid="551417728476977311">"Включено"</string> - <string name="switch_off" msgid="7249798614327155088">"Выкл."</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"нажато"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"не нажато"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Клавиша ALT"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Отмена"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Клавиша удаления"</string> diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml index daa321d..246abcc 100644 --- a/core/res/res/values-sk/strings.xml +++ b/core/res/res/values-sk/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Odpočítať deň"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Pripočítať rok"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Odpočítať rok"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"začiarknuté"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"nezačiarknuté"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"vybratý"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"nie je vybraté"</string> - <string name="switch_on" msgid="551417728476977311">"zapnuté"</string> - <string name="switch_off" msgid="7249798614327155088">"vypnuté"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"stlačené"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"nestlačené"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Zrušiť"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Odstrániť"</string> diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml index 20ad59b..84e011e 100644 --- a/core/res/res/values-sl/strings.xml +++ b/core/res/res/values-sl/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Prejšnji dan"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Naslednje leto"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Prejšnje leto"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"potrjeno"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"ni odkljukano"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"izbrano"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"ni izbrano"</string> - <string name="switch_on" msgid="551417728476977311">"vklopljeno"</string> - <string name="switch_off" msgid="7249798614327155088">"izklopljeno"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"vklopljen"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"izklopljen"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Tipka Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Prekliči"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Tipka Delete"</string> diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml index 9fb8abf..faf73dc 100644 --- a/core/res/res/values-sr/strings.xml +++ b/core/res/res/values-sr/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Смањи дане"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Повећај године"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Смањи године"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"изабрано"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"није потврђено"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"изабрано"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"није изабрано"</string> - <string name="switch_on" msgid="551417728476977311">"укључено"</string> - <string name="switch_off" msgid="7249798614327155088">"искључено"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"притиснуто"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"није притиснуто"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Откажи"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Избриши"</string> diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml index 2c4189b..b48f9d5 100644 --- a/core/res/res/values-sv/strings.xml +++ b/core/res/res/values-sv/strings.xml @@ -1173,14 +1173,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Minska dag"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Öka år"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Minska år"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"markerat"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"inte markerat"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"markerade"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"ej vald"</string> - <string name="switch_on" msgid="551417728476977311">"på"</string> - <string name="switch_off" msgid="7249798614327155088">"av"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"intryckt"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"inte intryckt"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Avbryt"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string> diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml index 13053ab..376ec28 100644 --- a/core/res/res/values-sw/strings.xml +++ b/core/res/res/values-sw/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Siku pungufu"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Mwaka wa nyongeza"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Mwaka pungufu"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"imeangaliwa"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"haijakaguliwa"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"Iliyochaguliwa"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"Haijachaguliwa"</string> - <string name="switch_on" msgid="551417728476977311">"Washa"</string> - <string name="switch_off" msgid="7249798614327155088">"zima"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"iliyobonyezwa"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"Haijabonyezwa"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Ghairi"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Futa"</string> diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml index a9a196c..7464aea 100644 --- a/core/res/res/values-th/strings.xml +++ b/core/res/res/values-th/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"ลดวัน"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"เพิ่มปี"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"ลดปี"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"เลือกไว้"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"ไม่ได้ตรวจสอบ"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"เลือกแล้ว"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"ไม่ได้เลือก"</string> - <string name="switch_on" msgid="551417728476977311">"เปิด"</string> - <string name="switch_off" msgid="7249798614327155088">"ปิด"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"กดแล้ว"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"ไม่ได้กด"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"ยกเลิก"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"ลบ"</string> diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml index 2672083..ff62ab8 100644 --- a/core/res/res/values-tl/strings.xml +++ b/core/res/res/values-tl/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Araw ng pagbawas"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Taon ng pagdaragdag"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Taon ng pagbawas"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"nilagyan ng check"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"hindi nilagyan ng check"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"pinili"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"Hindi pinili"</string> - <string name="switch_on" msgid="551417728476977311">"naka-on"</string> - <string name="switch_off" msgid="7249798614327155088">"naka-off"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"pinindot"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"hindi pinindot"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Kanselahin"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Tanggalin"</string> diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml index 059ccea..0d89db1 100644 --- a/core/res/res/values-tr/strings.xml +++ b/core/res/res/values-tr/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Gün değerini azalt"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Yıl değerini artır"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Yıl değerini azalt"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"işaretli"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"işaretlenmedi"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"seçili"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"seçili değil"</string> - <string name="switch_on" msgid="551417728476977311">"açık"</string> - <string name="switch_off" msgid="7249798614327155088">"kapalı"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"basıldı"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"basılmadı"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"İptal"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Sil"</string> diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml index 42929ec..d85bed8 100644 --- a/core/res/res/values-uk/strings.xml +++ b/core/res/res/values-uk/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Відняти день"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Додати рік"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Відняти рік"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"перевірено"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"не перевірено"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"вибрано"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"не вибрано"</string> - <string name="switch_on" msgid="551417728476977311">"увімк."</string> - <string name="switch_off" msgid="7249798614327155088">"вимкн."</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"натиснуто"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"не натиснуто"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Скасувати"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string> diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml index 64469ab..c75bed2 100644 --- a/core/res/res/values-vi/strings.xml +++ b/core/res/res/values-vi/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Ngày giảm dần"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Năm tăng dần"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Năm giảm dần."</string> - <string name="checkbox_checked" msgid="7222044992652711167">"đã kiểm tra"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"chưa chọn"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"đã chọn"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"chưa được chọn"</string> - <string name="switch_on" msgid="551417728476977311">"bật"</string> - <string name="switch_off" msgid="7249798614327155088">"tắt"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"đã bấm"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"chưa được bấm"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Hủy"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Xóa"</string> diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml index 2664ad3..a9f14a7 100644 --- a/core/res/res/values-zh-rCN/strings.xml +++ b/core/res/res/values-zh-rCN/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"减少天数"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"增加年数"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"减少年份值"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"已选中"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"未选中"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"已选择"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"未选择"</string> - <string name="switch_on" msgid="551417728476977311">"已打开"</string> - <string name="switch_off" msgid="7249798614327155088">"已关闭"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"已按下"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"未按下"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"取消"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete"</string> diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml index 7c8617e..746f410 100644 --- a/core/res/res/values-zh-rTW/strings.xml +++ b/core/res/res/values-zh-rTW/strings.xml @@ -1173,14 +1173,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"減少天數"</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"增加年份"</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"減少年份"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"已勾選"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"尚未勾選"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"已選取"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"未選取"</string> - <string name="switch_on" msgid="551417728476977311">"開啟"</string> - <string name="switch_off" msgid="7249798614327155088">"關閉"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"已按下"</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"未按下"</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt 鍵"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"取消"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Delete 鍵"</string> diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml index 09777ab..1b30035 100644 --- a/core/res/res/values-zu/strings.xml +++ b/core/res/res/values-zu/strings.xml @@ -1172,14 +1172,6 @@ <string name="date_picker_decrement_day_button" msgid="2427816793443629131">"Usuku lokwehlisa."</string> <string name="date_picker_increment_year_button" msgid="3058553394722295105">"Unyaka wokwenyusa."</string> <string name="date_picker_decrement_year_button" msgid="5193062846559743823">"Unyaka wokwehlisa"</string> - <string name="checkbox_checked" msgid="7222044992652711167">"kuhloliwe"</string> - <string name="checkbox_not_checked" msgid="5174639551134444056">"akuhloliwe"</string> - <string name="radiobutton_selected" msgid="8603599808486581511">"Okukhethiwe"</string> - <string name="radiobutton_not_selected" msgid="2908760184307722393">"akukhethiwe"</string> - <string name="switch_on" msgid="551417728476977311">"vuliwe"</string> - <string name="switch_off" msgid="7249798614327155088">"valiwe"</string> - <string name="togglebutton_pressed" msgid="4180411746647422233">"kucindezelwe."</string> - <string name="togglebutton_not_pressed" msgid="4495147725636134425">"akucindezelwe."</string> <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"i-ALT"</string> <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Khansela"</string> <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Susa"</string> diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 49f2823..4d9b043 100755 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -77,7 +77,7 @@ </integer-array> <!-- Flag indicating whether the AUDIO_BECOMING_NOISY notification should - be sent during an change to the audio output device. --> + be sent during a change to the audio output device. --> <bool name="config_sendAudioBecomingNoisy">true</bool> <!-- The duration (in milliseconds) of a short animation. --> diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerStressTestRunner.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerStressTestRunner.java index 7233e7f..3ec9031 100644 --- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerStressTestRunner.java +++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerStressTestRunner.java @@ -42,17 +42,13 @@ public class ConnectivityManagerStressTestRunner extends InstrumentationTestRunn public int mSleepTime = 2 * 60 * 1000; public String mReconnectSsid = "securenetdhcp"; public String mReconnectPassword = "androidwifi"; + public boolean mWifiOnlyFlag = false; @Override public TestSuite getAllTests() { TestSuite suite = new InstrumentationTestSuite(this); - if (!UtilHelper.isWifiOnly(getContext())) { - suite.addTestSuite(WifiApStress.class); - suite.addTestSuite(WifiStressTest.class); - } else { - // only the wifi stress tests - suite.addTestSuite(WifiStressTest.class); - } + suite.addTestSuite(WifiApStress.class); + suite.addTestSuite(WifiStressTest.class); return suite; } @@ -64,13 +60,11 @@ public class ConnectivityManagerStressTestRunner extends InstrumentationTestRunn @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); - if (!UtilHelper.isWifiOnly(getContext())) { - String valueStr = (String) icicle.get("softap_iterations"); - if (valueStr != null) { - int iteration = Integer.parseInt(valueStr); - if (iteration > 0) { - mSoftapIterations = iteration; - } + String valueStr = (String) icicle.get("softap_iterations"); + if (valueStr != null) { + int iteration = Integer.parseInt(valueStr); + if (iteration > 0) { + mSoftapIterations = iteration; } } @@ -107,5 +101,10 @@ public class ConnectivityManagerStressTestRunner extends InstrumentationTestRunn mSleepTime = 1000 * sleepTime; } } + + String wifiOnlyFlag = (String) icicle.get("wifi-only"); + if (wifiOnlyFlag != null) { + mWifiOnlyFlag = true; + } } } diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java index 9c1922f..b94306a 100644 --- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java +++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java @@ -35,23 +35,13 @@ import junit.framework.TestSuite; */ public class ConnectivityManagerTestRunner extends InstrumentationTestRunner { - public String TEST_SSID = null; + public boolean mWifiOnlyFlag = false; + public String mTestSsid = null; @Override public TestSuite getAllTests() { TestSuite suite = new InstrumentationTestSuite(this); - if (!UtilHelper.isWifiOnly(getContext())) { - suite.addTestSuite(ConnectivityManagerMobileTest.class); - } else { - // create a new test suite - suite.setName("ConnectivityManagerWifiOnlyFunctionalTests"); - String[] methodNames = {"testConnectToWifi", "testConnectToWifWithKnownAP", - "testDisconnectWifi", "testWifiStateChange"}; - Class<ConnectivityManagerMobileTest> testClass = ConnectivityManagerMobileTest.class; - for (String method: methodNames) { - suite.addTest(TestSuite.createTest(testClass, method)); - } - } + suite.addTestSuite(ConnectivityManagerMobileTest.class); suite.addTestSuite(WifiConnectionTest.class); return suite; } @@ -66,7 +56,11 @@ public class ConnectivityManagerTestRunner extends InstrumentationTestRunner { super.onCreate(icicle); String testSSID = (String) icicle.get("ssid"); if (testSSID != null) { - TEST_SSID = testSSID; + mTestSsid = testSSID; + } + String wifiOnlyFlag = (String) icicle.get("wifi-only"); + if (wifiOnlyFlag != null) { + mWifiOnlyFlag = true; } } } diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/UtilHelper.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/UtilHelper.java deleted file mode 100644 index b9fe6ed..0000000 --- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/UtilHelper.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.connectivitymanagertest; - -import android.content.Context; -import android.content.pm.PackageManager; -import android.util.Log; - -public class UtilHelper { - - private static Boolean mIsWifiOnly = null; - private static final Object sLock = new Object(); - - /** - * Return true if device is a wifi only device. - */ - public static boolean isWifiOnly(Context context) { - synchronized (sLock) { - // cache the result from pkgMgr statically. It will never change, since its a - // device configuration setting - if (mIsWifiOnly == null) { - PackageManager pkgMgr = context.getPackageManager(); - mIsWifiOnly = Boolean.valueOf(!pkgMgr - .hasSystemFeature(PackageManager.FEATURE_TELEPHONY) - && pkgMgr.hasSystemFeature(PackageManager.FEATURE_WIFI)); - String deviceType = mIsWifiOnly ? "wifi-only" : "telephony"; - Log.d("ConnectivityManagerTest", String.format("detected a %s device", deviceType)); - } - } - return mIsWifiOnly; - } -} diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java index 52326d5..bf188d3 100644 --- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java +++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java @@ -31,16 +31,15 @@ import android.util.Log; import com.android.connectivitymanagertest.ConnectivityManagerTestActivity; import com.android.connectivitymanagertest.ConnectivityManagerTestRunner; import com.android.connectivitymanagertest.NetworkState; -import com.android.connectivitymanagertest.UtilHelper; public class ConnectivityManagerMobileTest extends ActivityInstrumentationTestCase2<ConnectivityManagerTestActivity> { private static final String LOG_TAG = "ConnectivityManagerMobileTest"; - private String TEST_ACCESS_POINT; + private String mTestAccessPoint; private ConnectivityManagerTestActivity cmActivity; private WakeLock wl; - private boolean mIsWifiOnlyDevice; + private boolean mWifiOnlyFlag; public ConnectivityManagerMobileTest() { super(ConnectivityManagerTestActivity.class); @@ -52,7 +51,9 @@ public class ConnectivityManagerMobileTest extends cmActivity = getActivity(); ConnectivityManagerTestRunner mRunner = (ConnectivityManagerTestRunner)getInstrumentation(); - TEST_ACCESS_POINT = mRunner.TEST_SSID; + mTestAccessPoint = mRunner.mTestSsid; + mWifiOnlyFlag = mRunner.mWifiOnlyFlag; + PowerManager pm = (PowerManager)getInstrumentation(). getContext().getSystemService(Context.POWER_SERVICE); wl = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "CMWakeLock"); @@ -63,8 +64,8 @@ public class ConnectivityManagerMobileTest extends log("airplane is not disabled, disable it."); cmActivity.setAirplaneMode(getInstrumentation().getContext(), false); } - mIsWifiOnlyDevice = UtilHelper.isWifiOnly(mRunner.getTargetContext()); - if (!mIsWifiOnlyDevice) { + + if (!mWifiOnlyFlag) { if (!cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT)) { // Note: When the test fails in setUp(), tearDown is not called. In that case, @@ -113,6 +114,10 @@ public class ConnectivityManagerMobileTest extends // event should be expected. @LargeTest public void test3GToWifiNotification() { + if (mWifiOnlyFlag) { + Log.v(LOG_TAG, this.getName() + " is excluded for wifi-only test"); + return; + } // Enable Wi-Fi to avoid initial UNKNOWN state cmActivity.enableWifi(); sleep(2 * ConnectivityManagerTestActivity.SHORT_TIMEOUT); @@ -159,9 +164,9 @@ public class ConnectivityManagerMobileTest extends // Test case 2: test connection to a given AP @LargeTest public void testConnectToWifi() { - assertNotNull("SSID is null", TEST_ACCESS_POINT); + assertNotNull("SSID is null", mTestAccessPoint); NetworkInfo networkInfo; - if (!mIsWifiOnlyDevice) { + if (!mWifiOnlyFlag) { //Prepare for connectivity verification networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE, @@ -172,15 +177,15 @@ public class ConnectivityManagerMobileTest extends NetworkState.TO_CONNECTION, State.CONNECTED); // Enable Wifi and connect to a test access point - assertTrue("failed to connect to " + TEST_ACCESS_POINT, - cmActivity.connectToWifi(TEST_ACCESS_POINT)); + assertTrue("failed to connect to " + mTestAccessPoint, + cmActivity.connectToWifi(mTestAccessPoint)); assertTrue(cmActivity.waitForWifiState(WifiManager.WIFI_STATE_ENABLED, ConnectivityManagerTestActivity.LONG_TIMEOUT)); log("wifi state is enabled"); assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT)); - if (!mIsWifiOnlyDevice) { + if (!mWifiOnlyFlag) { assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.DISCONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT)); } @@ -192,7 +197,7 @@ public class ConnectivityManagerMobileTest extends cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_WIFI)); assertTrue(false); } - if (!mIsWifiOnlyDevice) { + if (!mWifiOnlyFlag) { if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) { log("Mobile state transition validation failed."); log("reason: " + @@ -205,10 +210,10 @@ public class ConnectivityManagerMobileTest extends // Test case 3: connect to Wifi with known AP @LargeTest public void testConnectToWifWithKnownAP() { - assertNotNull("SSID is null", TEST_ACCESS_POINT); - // Connect to TEST_ACCESS_POINT - assertTrue("failed to connect to " + TEST_ACCESS_POINT, - cmActivity.connectToWifi(TEST_ACCESS_POINT)); + assertNotNull("SSID is null", mTestAccessPoint); + // Connect to mTestAccessPoint + assertTrue("failed to connect to " + mTestAccessPoint, + cmActivity.connectToWifi(mTestAccessPoint)); assertTrue(cmActivity.waitForWifiState(WifiManager.WIFI_STATE_ENABLED, ConnectivityManagerTestActivity.LONG_TIMEOUT)); assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED, @@ -227,13 +232,13 @@ public class ConnectivityManagerMobileTest extends ConnectivityManagerTestActivity.LONG_TIMEOUT)); assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.DISCONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT)); - if (!mIsWifiOnlyDevice) { + if (!mWifiOnlyFlag) { assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT)); } NetworkInfo networkInfo; - if (!mIsWifiOnlyDevice) { + if (!mWifiOnlyFlag) { //Prepare for connectivity state verification networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE, @@ -253,7 +258,7 @@ public class ConnectivityManagerMobileTest extends // Wait for Wifi to be connected and mobile to be disconnected assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT)); - if (!mIsWifiOnlyDevice) { + if (!mWifiOnlyFlag) { assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.DISCONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT)); } @@ -270,11 +275,11 @@ public class ConnectivityManagerMobileTest extends // Test case 4: test disconnect Wifi @LargeTest public void testDisconnectWifi() { - assertNotNull("SSID is null", TEST_ACCESS_POINT); + assertNotNull("SSID is null", mTestAccessPoint); // connect to Wifi - assertTrue("failed to connect to " + TEST_ACCESS_POINT, - cmActivity.connectToWifi(TEST_ACCESS_POINT)); + assertTrue("failed to connect to " + mTestAccessPoint, + cmActivity.connectToWifi(mTestAccessPoint)); assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT)); @@ -283,7 +288,7 @@ public class ConnectivityManagerMobileTest extends sleep(ConnectivityManagerTestActivity.SHORT_TIMEOUT); NetworkInfo networkInfo; - if (!mIsWifiOnlyDevice) { + if (!mWifiOnlyFlag) { networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE, networkInfo.getState(), @@ -299,7 +304,7 @@ public class ConnectivityManagerMobileTest extends assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.DISCONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT)); - if (!mIsWifiOnlyDevice) { + if (!mWifiOnlyFlag) { assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT)); } @@ -311,7 +316,7 @@ public class ConnectivityManagerMobileTest extends cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_WIFI)); assertTrue(false); } - if (!mIsWifiOnlyDevice) { + if (!mWifiOnlyFlag) { if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) { log("Mobile state transition validation failed."); log("reason: " + @@ -324,6 +329,10 @@ public class ConnectivityManagerMobileTest extends // Test case 5: test connectivity from 3G to airplane mode, then to 3G again @LargeTest public void testDataConnectionWith3GToAmTo3G() { + if (mWifiOnlyFlag) { + Log.v(LOG_TAG, this.getName() + " is excluded for wifi-only test"); + return; + } //Prepare for state verification NetworkInfo networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE, @@ -340,7 +349,9 @@ public class ConnectivityManagerMobileTest extends networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_WIFI); assertEquals(State.DISCONNECTED, networkInfo.getState()); - + // wait until mobile is turn off + assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, + State.DISCONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT)); if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) { log("Mobile state transition validation failed."); log("reason: " + @@ -382,13 +393,17 @@ public class ConnectivityManagerMobileTest extends // Test case 6: test connectivity with airplane mode Wifi connected @LargeTest public void testDataConnectionOverAMWithWifi() { - assertNotNull("SSID is null", TEST_ACCESS_POINT); + if (mWifiOnlyFlag) { + Log.v(LOG_TAG, this.getName() + " is excluded for wifi-only test"); + return; + } + assertNotNull("SSID is null", mTestAccessPoint); // Eanble airplane mode log("Enable airplane mode"); cmActivity.setAirplaneMode(getInstrumentation().getContext(), true); NetworkInfo networkInfo; - if (!mIsWifiOnlyDevice) { + if (!mWifiOnlyFlag) { assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.DISCONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT)); networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); @@ -402,8 +417,8 @@ public class ConnectivityManagerMobileTest extends NetworkState.TO_CONNECTION, State.CONNECTED); // Connect to Wifi - assertTrue("failed to connect to " + TEST_ACCESS_POINT, - cmActivity.connectToWifi(TEST_ACCESS_POINT)); + assertTrue("failed to connect to " + mTestAccessPoint, + cmActivity.connectToWifi(mTestAccessPoint)); assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT)); @@ -414,7 +429,7 @@ public class ConnectivityManagerMobileTest extends cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_WIFI)); assertTrue("State validation failed", false); } - if (!mIsWifiOnlyDevice) { + if (!mWifiOnlyFlag) { if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) { log("state validation for Mobile failed"); log("reason: " + @@ -428,11 +443,15 @@ public class ConnectivityManagerMobileTest extends // Test case 7: test connectivity while transit from Wifi->AM->Wifi @LargeTest public void testDataConnectionWithWifiToAMToWifi () { - // Connect to TEST_ACCESS_POINT - assertNotNull("SSID is null", TEST_ACCESS_POINT); + if (mWifiOnlyFlag) { + Log.v(LOG_TAG, this.getName() + " is excluded for wifi-only test"); + return; + } + // Connect to mTestAccessPoint + assertNotNull("SSID is null", mTestAccessPoint); // Connect to Wifi - assertTrue("failed to connect to " + TEST_ACCESS_POINT, - cmActivity.connectToWifi(TEST_ACCESS_POINT)); + assertTrue("failed to connect to " + mTestAccessPoint, + cmActivity.connectToWifi(mTestAccessPoint)); assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT)); @@ -466,7 +485,7 @@ public class ConnectivityManagerMobileTest extends assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT)); - if (!mIsWifiOnlyDevice) { + if (!mWifiOnlyFlag) { assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.DISCONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT)); } @@ -483,10 +502,10 @@ public class ConnectivityManagerMobileTest extends // Test case 8: test wifi state change while connecting/disconnecting to/from an AP @LargeTest public void testWifiStateChange () { - assertNotNull("SSID is null", TEST_ACCESS_POINT); - //Connect to TEST_ACCESS_POINT - assertTrue("failed to connect to " + TEST_ACCESS_POINT, - cmActivity.connectToWifi(TEST_ACCESS_POINT)); + assertNotNull("SSID is null", mTestAccessPoint); + //Connect to mTestAccessPoint + assertTrue("failed to connect to " + mTestAccessPoint, + cmActivity.connectToWifi(mTestAccessPoint)); assertTrue(cmActivity.waitForWifiState(WifiManager.WIFI_STATE_ENABLED, ConnectivityManagerTestActivity.LONG_TIMEOUT)); assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED, @@ -503,7 +522,7 @@ public class ConnectivityManagerMobileTest extends // Disconnect from the current AP log("disconnect from the AP"); if (!cmActivity.disconnectAP()) { - log("failed to disconnect from " + TEST_ACCESS_POINT); + log("failed to disconnect from " + mTestAccessPoint); } // Verify the connectivity state for Wifi is DISCONNECTED diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiApStress.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiApStress.java index 41104fe..7e136be 100644 --- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiApStress.java +++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiApStress.java @@ -51,6 +51,7 @@ public class WifiApStress private int iterations; private BufferedWriter mOutputWriter = null; private int mLastIteration = 0; + private boolean mWifiOnlyFlag; public WifiApStress() { super(ConnectivityManagerTestActivity.class); @@ -63,6 +64,7 @@ public class WifiApStress ConnectivityManagerStressTestRunner mRunner = (ConnectivityManagerStressTestRunner)getInstrumentation(); iterations = mRunner.mSoftapIterations; + mWifiOnlyFlag = mRunner.mWifiOnlyFlag; mAct.turnScreenOn(); } @@ -79,6 +81,10 @@ public class WifiApStress @LargeTest public void testWifiHotSpot() { + if (mWifiOnlyFlag) { + Log.v(TAG, this.getName() + " is excluded for wi-fi only test"); + return; + } WifiConfiguration config = new WifiConfiguration(); config.SSID = NETWORK_ID; config.allowedKeyManagement.set(KeyMgmt.WPA_PSK); diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java index feb63cd..f46546f 100644 --- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java +++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java @@ -34,7 +34,6 @@ import android.util.Log; import com.android.connectivitymanagertest.ConnectivityManagerStressTestRunner; import com.android.connectivitymanagertest.ConnectivityManagerTestActivity; -import com.android.connectivitymanagertest.UtilHelper; import java.io.BufferedWriter; import java.io.File; @@ -75,7 +74,7 @@ public class WifiStressTest private String mPassword; private ConnectivityManagerStressTestRunner mRunner; private BufferedWriter mOutputWriter = null; - private boolean mIsWifiOnlyDevice; + private boolean mWifiOnlyFlag; public WifiStressTest() { super(ConnectivityManagerTestActivity.class); @@ -91,13 +90,13 @@ public class WifiStressTest mPassword = mRunner.mReconnectPassword; mScanIterations = mRunner.mScanIterations; mWifiSleepTime = mRunner.mSleepTime; + mWifiOnlyFlag = mRunner.mWifiOnlyFlag; log(String.format("mReconnectIterations(%d), mSsid(%s), mPassword(%s)," + "mScanIterations(%d), mWifiSleepTime(%d)", mReconnectIterations, mSsid, mPassword, mScanIterations, mWifiSleepTime)); mOutputWriter = new BufferedWriter(new FileWriter(new File( Environment.getExternalStorageDirectory(), OUTPUT_FILE), true)); mAct.turnScreenOn(); - mIsWifiOnlyDevice = UtilHelper.isWifiOnly(mRunner.getTargetContext()); if (!mAct.mWifiManager.isWifiEnabled()) { log("Enable wi-fi before stress tests."); if (!mAct.enableWifi()) { @@ -269,7 +268,7 @@ public class WifiStressTest assertTrue("Wait for Wi-Fi to idle timeout", mAct.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.DISCONNECTED, 6 * ConnectivityManagerTestActivity.SHORT_TIMEOUT)); - if (!mIsWifiOnlyDevice) { + if (!mWifiOnlyFlag) { // use long timeout as the pppd startup may take several retries. assertTrue("Wait for cellular connection timeout", mAct.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED, @@ -280,7 +279,7 @@ public class WifiStressTest assertEquals("Wi-Fi is reconnected", State.DISCONNECTED, mAct.mCM.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState()); - if (!mIsWifiOnlyDevice) { + if (!mWifiOnlyFlag) { assertEquals("Cellular connection is down", State.CONNECTED, mAct.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState()); assertTrue("Mobile is connected, but no data connection.", mAct.pingTest(null)); diff --git a/core/tests/coretests/src/android/util/ListScenario.java b/core/tests/coretests/src/android/util/ListScenario.java index 22be4e7..fa088a3 100644 --- a/core/tests/coretests/src/android/util/ListScenario.java +++ b/core/tests/coretests/src/android/util/ListScenario.java @@ -590,7 +590,7 @@ public abstract class ListScenario extends Activity { } /** - * Return an the number of types created by the adapter. Override if your + * Return the number of types created by the adapter. Override if your * adapter creates more than one type. */ public int getViewTypeCount() { diff --git a/core/tests/coretests/src/android/view/ViewAttachTest.java b/core/tests/coretests/src/android/view/ViewAttachTest.java index cff66e4..a73f5a6 100644 --- a/core/tests/coretests/src/android/view/ViewAttachTest.java +++ b/core/tests/coretests/src/android/view/ViewAttachTest.java @@ -29,12 +29,12 @@ public class ViewAttachTest extends /** * Make sure that onAttachedToWindow and onDetachedToWindow is called in the - * correct order The ViewAttachTestActivity contains a view that will throw - * an RuntimeException if onDetachedToWindow and onAttachedToWindow is + * correct order. The ViewAttachTestActivity contains a view that will throw + * a RuntimeException if onDetachedToWindow and onAttachedToWindow are * called in the wrong order. * * 1. Initiate the activity 2. Perform a series of orientation changes to - * the activity (this will force the View hierarchy to be rebuild, + * the activity (this will force the View hierarchy to be rebuilt, * generating onAttachedToWindow and onDetachedToWindow) * * Expected result: No RuntimeException is thrown from the TestView in diff --git a/drm/libdrmframework/plugins/forward-lock/internal-format/decoder/FwdLockFile.c b/drm/libdrmframework/plugins/forward-lock/internal-format/decoder/FwdLockFile.c index dacf00e..365bdec 100644 --- a/drm/libdrmframework/plugins/forward-lock/internal-format/decoder/FwdLockFile.c +++ b/drm/libdrmframework/plugins/forward-lock/internal-format/decoder/FwdLockFile.c @@ -14,6 +14,7 @@ * limitations under the License. */ +#include <utils/Log.h> #include <assert.h> #include <errno.h> #include <fcntl.h> @@ -107,6 +108,7 @@ static int FwdLockFile_AcquireSession(int fileDesc) { } pthread_mutex_unlock(&sessionAcquisitionMutex); if (i == MAX_NUM_SESSIONS) { + ALOGE("Too many sessions opened at the same time"); errno = ENFILE; } } @@ -293,7 +295,12 @@ int FwdLockFile_attach(int fileDesc) { int FwdLockFile_open(const char *pFilename) { int fileDesc = open(pFilename, O_RDONLY); - if (fileDesc >= 0 && FwdLockFile_attach(fileDesc) < 0) { + if (fileDesc < 0) { + ALOGE("failed to open file '%s': %s", pFilename, strerror(errno)); + return fileDesc; + } + + if (FwdLockFile_attach(fileDesc) < 0) { (void)close(fileDesc); fileDesc = -1; } diff --git a/graphics/java/android/graphics/RectF.java b/graphics/java/android/graphics/RectF.java index 293dfcc..c633d84 100644 --- a/graphics/java/android/graphics/RectF.java +++ b/graphics/java/android/graphics/RectF.java @@ -84,7 +84,7 @@ public class RectF implements Parcelable { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; - Rect r = (Rect) o; + RectF r = (RectF) o; return left == r.left && top == r.top && right == r.right && bottom == r.bottom; } diff --git a/graphics/java/android/graphics/drawable/ClipDrawable.java b/graphics/java/android/graphics/drawable/ClipDrawable.java index 29edc04..c41dd07 100644 --- a/graphics/java/android/graphics/drawable/ClipDrawable.java +++ b/graphics/java/android/graphics/drawable/ClipDrawable.java @@ -24,7 +24,6 @@ import android.content.res.TypedArray; import android.graphics.*; import android.view.Gravity; import android.util.AttributeSet; -import android.view.View; import java.io.IOException; diff --git a/graphics/java/android/graphics/drawable/Drawable.java b/graphics/java/android/graphics/drawable/Drawable.java index 4b9c98f..043adae 100644 --- a/graphics/java/android/graphics/drawable/Drawable.java +++ b/graphics/java/android/graphics/drawable/Drawable.java @@ -296,8 +296,6 @@ public abstract class Drawable { /** * Implement this interface if you want to create an drawable that is RTL aware - * - * @hide */ public static interface Callback2 extends Callback { /** @@ -387,8 +385,6 @@ public abstract class Drawable { /** * Use the current {@link android.graphics.drawable.Drawable.Callback2} implementation to get * the resolved layout direction of this Drawable. - * - * @hide */ public int getResolvedLayoutDirectionSelf() { final Callback callback = getCallback(); diff --git a/graphics/java/android/graphics/drawable/ScaleDrawable.java b/graphics/java/android/graphics/drawable/ScaleDrawable.java index 5fd5a16..ccad250 100644 --- a/graphics/java/android/graphics/drawable/ScaleDrawable.java +++ b/graphics/java/android/graphics/drawable/ScaleDrawable.java @@ -24,7 +24,6 @@ import android.content.res.TypedArray; import android.graphics.*; import android.view.Gravity; import android.util.AttributeSet; -import android.view.View; import java.io.IOException; diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h index 4fbeb38..7df6668 100644 --- a/include/media/AudioRecord.h +++ b/include/media/AudioRecord.h @@ -143,6 +143,8 @@ public: * user Context for use by the callback receiver. */ + // FIXME consider removing this alias and replacing it by audio_in_acoustics_t + // or removing the parameter entirely if it is unused enum record_flags { RECORD_AGC_ENABLE = AUDIO_IN_ACOUSTICS_AGC_ENABLE, RECORD_NS_ENABLE = AUDIO_IN_ACOUSTICS_NS_ENABLE, @@ -154,7 +156,7 @@ public: audio_format_t format = AUDIO_FORMAT_DEFAULT, uint32_t channelMask = AUDIO_CHANNEL_IN_MONO, int frameCount = 0, - uint32_t flags = 0, + record_flags flags = (record_flags) 0, callback_t cbf = NULL, void* user = NULL, int notificationFrames = 0, @@ -180,7 +182,7 @@ public: audio_format_t format = AUDIO_FORMAT_DEFAULT, uint32_t channelMask = AUDIO_CHANNEL_IN_MONO, int frameCount = 0, - uint32_t flags = 0, + record_flags flags = (record_flags) 0, callback_t cbf = NULL, void* user = NULL, int notificationFrames = 0, @@ -383,7 +385,7 @@ private: bool mMarkerReached; uint32_t mNewPosition; uint32_t mUpdatePeriod; - uint32_t mFlags; + record_flags mFlags; uint32_t mChannelMask; audio_io_handle_t mInput; int mSessionId; diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h index 95b9d86..552e829 100644 --- a/include/media/AudioTrack.h +++ b/include/media/AudioTrack.h @@ -153,7 +153,7 @@ public: audio_format_t format = AUDIO_FORMAT_DEFAULT, int channelMask = 0, int frameCount = 0, - uint32_t flags = 0, + audio_policy_output_flags_t flags = AUDIO_POLICY_OUTPUT_FLAG_NONE, callback_t cbf = NULL, void* user = NULL, int notificationFrames = 0, @@ -165,7 +165,7 @@ public: int format = AUDIO_FORMAT_DEFAULT, int channelMask = 0, int frameCount = 0, - uint32_t flags = 0, + uint32_t flags = (uint32_t) AUDIO_POLICY_OUTPUT_FLAG_NONE, callback_t cbf = 0, void* user = 0, int notificationFrames = 0, @@ -185,7 +185,7 @@ public: audio_format_t format = AUDIO_FORMAT_DEFAULT, int channelMask = 0, const sp<IMemory>& sharedBuffer = 0, - uint32_t flags = 0, + audio_policy_output_flags_t flags = AUDIO_POLICY_OUTPUT_FLAG_NONE, callback_t cbf = NULL, void* user = NULL, int notificationFrames = 0, @@ -209,7 +209,7 @@ public: audio_format_t format = AUDIO_FORMAT_DEFAULT, int channelMask = 0, int frameCount = 0, - uint32_t flags = 0, + audio_policy_output_flags_t flags = AUDIO_POLICY_OUTPUT_FLAG_NONE, callback_t cbf = NULL, void* user = NULL, int notificationFrames = 0, @@ -473,7 +473,7 @@ protected: audio_format_t format, uint32_t channelMask, int frameCount, - uint32_t flags, + audio_policy_output_flags_t flags, const sp<IMemory>& sharedBuffer, audio_io_handle_t output, bool enforceFrameCount); @@ -515,7 +515,7 @@ protected: uint32_t mNewPosition; uint32_t mUpdatePeriod; bool mFlushed; // FIXME will be made obsolete by making flush() synchronous - uint32_t mFlags; + audio_policy_output_flags_t mFlags; int mSessionId; int mAuxEffectId; mutable Mutex mLock; diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h index 7a2ada0..c723b6d 100644 --- a/include/media/IAudioFlinger.h +++ b/include/media/IAudioFlinger.h @@ -28,6 +28,7 @@ #include <media/IAudioRecord.h> #include <media/IAudioFlingerClient.h> #include <system/audio.h> +#include <system/audio_policy.h> #include <hardware/audio_effect.h> #include <media/IEffect.h> #include <media/IEffectClient.h> @@ -121,7 +122,7 @@ public: audio_format_t *pFormat, uint32_t *pChannels, uint32_t *pLatencyMs, - uint32_t flags) = 0; + audio_policy_output_flags_t flags) = 0; virtual audio_io_handle_t openDuplicateOutput(audio_io_handle_t output1, audio_io_handle_t output2) = 0; virtual status_t closeOutput(audio_io_handle_t output) = 0; diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp index 07f3b16..f3a1d9a 100644 --- a/libs/androidfw/ResourceTypes.cpp +++ b/libs/androidfw/ResourceTypes.cpp @@ -1687,7 +1687,9 @@ bool ResTable_config::isBetterThan(const ResTable_config& o, // The configuration closest to the actual size is best. // We assume that larger configs have already been filtered // out at this point. That means we just want the largest one. - return smallestScreenWidthDp >= o.smallestScreenWidthDp; + if (smallestScreenWidthDp != o.smallestScreenWidthDp) { + return smallestScreenWidthDp > o.smallestScreenWidthDp; + } } if (screenSizeDp || o.screenSizeDp) { @@ -1711,7 +1713,9 @@ bool ResTable_config::isBetterThan(const ResTable_config& o, //ALOGI("Comparing this %dx%d to other %dx%d in %dx%d: myDelta=%d otherDelta=%d", // screenWidthDp, screenHeightDp, o.screenWidthDp, o.screenHeightDp, // requested->screenWidthDp, requested->screenHeightDp, myDelta, otherDelta); - return (myDelta <= otherDelta); + if (myDelta != otherDelta) { + return myDelta < otherDelta; + } } if (screenLayout || o.screenLayout) { @@ -1738,7 +1742,9 @@ bool ResTable_config::isBetterThan(const ResTable_config& o, if (mySL == 0) return false; return true; } - return fixedMySL >= fixedOSL; + if (fixedMySL != fixedOSL) { + return fixedMySL > fixedOSL; + } } if (((screenLayout^o.screenLayout) & MASK_SCREENLONG) != 0 && (requested->screenLayout & MASK_SCREENLONG)) { @@ -1857,7 +1863,9 @@ bool ResTable_config::isBetterThan(const ResTable_config& o, myDelta += requested->screenHeight - screenHeight; otherDelta += requested->screenHeight - o.screenHeight; } - return (myDelta <= otherDelta); + if (myDelta != otherDelta) { + return myDelta < otherDelta; + } } if (version || o.version) { @@ -2150,7 +2158,7 @@ String8 ResTable_config::toString() const { res.append("nodpi"); break; default: - res.appendFormat("density=%d", dtohs(density)); + res.appendFormat("%ddpi", dtohs(density)); break; } } @@ -2440,7 +2448,7 @@ status_t ResTable::Theme::applyStyle(uint32_t resID, bool force) uint32_t bagTypeSpecFlags = 0; mTable.lock(); const ssize_t N = mTable.getBagLocked(resID, &bag, &bagTypeSpecFlags); - TABLE_NOISY(LOGV("Applying style 0x%08x to theme %p, count=%d", resID, this, N)); + TABLE_NOISY(ALOGV("Applying style 0x%08x to theme %p, count=%d", resID, this, N)); if (N < 0) { mTable.unlock(); return N; @@ -2506,7 +2514,7 @@ status_t ResTable::Theme::applyStyle(uint32_t resID, bool force) continue; } theme_entry* curEntry = curEntries + e; - TABLE_NOISY(LOGV("Attr 0x%08x: type=0x%x, data=0x%08x; curType=0x%x", + TABLE_NOISY(ALOGV("Attr 0x%08x: type=0x%x, data=0x%08x; curType=0x%x", attrRes, bag->map.value.dataType, bag->map.value.data, curEntry->value.dataType)); if (force || curEntry->value.dataType == Res_value::TYPE_NULL) { @@ -2577,22 +2585,22 @@ ssize_t ResTable::Theme::getAttribute(uint32_t resID, Res_value* outValue, const uint32_t t = Res_GETTYPE(resID); const uint32_t e = Res_GETENTRY(resID); - TABLE_THEME(LOGI("Looking up attr 0x%08x in theme %p", resID, this)); + TABLE_THEME(ALOGI("Looking up attr 0x%08x in theme %p", resID, this)); if (p >= 0) { const package_info* const pi = mPackages[p]; - TABLE_THEME(LOGI("Found package: %p", pi)); + TABLE_THEME(ALOGI("Found package: %p", pi)); if (pi != NULL) { - TABLE_THEME(LOGI("Desired type index is %ld in avail %d", t, pi->numTypes)); + TABLE_THEME(ALOGI("Desired type index is %ld in avail %d", t, pi->numTypes)); if (t < pi->numTypes) { const type_info& ti = pi->types[t]; - TABLE_THEME(LOGI("Desired entry index is %ld in avail %d", e, ti.numEntries)); + TABLE_THEME(ALOGI("Desired entry index is %ld in avail %d", e, ti.numEntries)); if (e < ti.numEntries) { const theme_entry& te = ti.entries[e]; if (outTypeSpecFlags != NULL) { *outTypeSpecFlags |= te.typeSpecFlags; } - TABLE_THEME(LOGI("Theme value: type=0x%x, data=0x%08x", + TABLE_THEME(ALOGI("Theme value: type=0x%x, data=0x%08x", te.value.dataType, te.value.data)); const uint8_t type = te.value.dataType; if (type == Res_value::TYPE_ATTRIBUTE) { @@ -2627,7 +2635,7 @@ ssize_t ResTable::Theme::resolveAttributeReference(Res_value* inOutValue, if (inOutValue->dataType == Res_value::TYPE_ATTRIBUTE) { uint32_t newTypeSpecFlags; blockIndex = getAttribute(inOutValue->data, inOutValue, &newTypeSpecFlags); - TABLE_THEME(LOGI("Resolving attr reference: blockIndex=%d, type=0x%x, data=%p\n", + TABLE_THEME(ALOGI("Resolving attr reference: blockIndex=%d, type=0x%x, data=%p\n", (int)blockIndex, (int)inOutValue->dataType, (void*)inOutValue->data)); if (inoutTypeSpecFlags != NULL) *inoutTypeSpecFlags |= newTypeSpecFlags; //printf("Retrieved attribute new type=0x%x\n", inOutValue->dataType); @@ -2772,7 +2780,7 @@ status_t ResTable::add(const void* data, size_t size, void* cookie, header->size = dtohl(header->header->header.size); //ALOGI("Got size 0x%x, again size 0x%x, raw size 0x%x\n", header->size, // dtohl(header->header->header.size), header->header->header.size); - LOAD_TABLE_NOISY(LOGV("Loading ResTable @%p:\n", header->header)); + LOAD_TABLE_NOISY(ALOGV("Loading ResTable @%p:\n", header->header)); LOAD_TABLE_NOISY(printHexData(2, header->header, header->size < 256 ? header->size : 256, 16, 16, 0, false, printToLogFunc)); if (dtohs(header->header->header.headerSize) > header->size @@ -2802,7 +2810,7 @@ status_t ResTable::add(const void* data, size_t size, void* cookie, if (err != NO_ERROR) { return (mError=err); } - TABLE_NOISY(LOGV("Chunk: type=0x%x, headerSize=0x%x, size=0x%x, pos=%p\n", + TABLE_NOISY(ALOGV("Chunk: type=0x%x, headerSize=0x%x, size=0x%x, pos=%p\n", dtohs(chunk->type), dtohs(chunk->headerSize), dtohl(chunk->size), (void*)(((const uint8_t*)chunk) - ((const uint8_t*)header->header)))); const size_t csize = dtohl(chunk->size); @@ -2856,7 +2864,7 @@ status_t ResTable::add(const void* data, size_t size, void* cookie, ALOGW("No string values found in resource table!"); } - TABLE_NOISY(LOGV("Returning from add with mError=%d\n", mError)); + TABLE_NOISY(ALOGV("Returning from add with mError=%d\n", mError)); return mError; } @@ -3127,7 +3135,7 @@ ssize_t ResTable::resolveReference(Res_value* value, ssize_t blockIndex, if (newIndex == BAD_INDEX) { return BAD_INDEX; } - TABLE_THEME(LOGI("Resolving reference %p: newIndex=%d, type=0x%x, data=%p\n", + TABLE_THEME(ALOGI("Resolving reference %p: newIndex=%d, type=0x%x, data=%p\n", (void*)lastRef, (int)newIndex, (int)value->dataType, (void*)value->data)); //printf("Getting reference 0x%08x: newIndex=%d\n", value->data, newIndex); if (inoutTypeSpecFlags != NULL) *inoutTypeSpecFlags |= newFlags; @@ -3268,7 +3276,7 @@ ssize_t ResTable::getBagLocked(uint32_t resID, const bag_entry** outBag, // This is what we are building. bag_set* set = NULL; - TABLE_NOISY(LOGI("Building bag: %p\n", (void*)resID)); + TABLE_NOISY(ALOGI("Building bag: %p\n", (void*)resID)); ResTable_config bestConfig; memset(&bestConfig, 0, sizeof(bestConfig)); @@ -3338,7 +3346,7 @@ ssize_t ResTable::getBagLocked(uint32_t resID, const bag_entry** outBag, size_t N = count; - TABLE_NOISY(LOGI("Found map: size=%p parent=%p count=%d\n", + TABLE_NOISY(ALOGI("Found map: size=%p parent=%p count=%d\n", entrySize, parent, count)); // If this map inherits from another, we need to start @@ -3357,9 +3365,9 @@ ssize_t ResTable::getBagLocked(uint32_t resID, const bag_entry** outBag, if (NP > 0) { memcpy(set+1, parentBag, NP*sizeof(bag_entry)); set->numAttrs = NP; - TABLE_NOISY(LOGI("Initialized new bag with %d inherited attributes.\n", NP)); + TABLE_NOISY(ALOGI("Initialized new bag with %d inherited attributes.\n", NP)); } else { - TABLE_NOISY(LOGI("Initialized new bag with no inherited attributes.\n")); + TABLE_NOISY(ALOGI("Initialized new bag with no inherited attributes.\n")); set->numAttrs = 0; } set->availAttrs = NT; @@ -3386,7 +3394,7 @@ ssize_t ResTable::getBagLocked(uint32_t resID, const bag_entry** outBag, bag_entry* entries = (bag_entry*)(set+1); size_t curEntry = 0; uint32_t pos = 0; - TABLE_NOISY(LOGI("Starting with set %p, entries=%p, avail=%d\n", + TABLE_NOISY(ALOGI("Starting with set %p, entries=%p, avail=%d\n", set, entries, set->availAttrs)); while (pos < count) { TABLE_NOISY(printf("Now at %p\n", (void*)curOff)); @@ -3465,7 +3473,7 @@ ssize_t ResTable::getBagLocked(uint32_t resID, const bag_entry** outBag, *outTypeSpecFlags = set->typeSpecFlags; } *outBag = (bag_entry*)(set+1); - TABLE_NOISY(LOGI("Returning %d attrs\n", set->numAttrs)); + TABLE_NOISY(ALOGI("Returning %d attrs\n", set->numAttrs)); return set->numAttrs; } return BAD_INDEX; @@ -3474,27 +3482,10 @@ ssize_t ResTable::getBagLocked(uint32_t resID, const bag_entry** outBag, void ResTable::setParameters(const ResTable_config* params) { mLock.lock(); - TABLE_GETENTRY(LOGI("Setting parameters: imsi:%d/%d lang:%c%c cnt:%c%c " - "orien:%d touch:%d density:%d key:%d inp:%d nav:%d sz:%dx%d sw%ddp w%ddp h%ddp\n", - params->mcc, params->mnc, - params->language[0] ? params->language[0] : '-', - params->language[1] ? params->language[1] : '-', - params->country[0] ? params->country[0] : '-', - params->country[1] ? params->country[1] : '-', - params->orientation, - params->touchscreen, - params->density, - params->keyboard, - params->inputFlags, - params->navigation, - params->screenWidth, - params->screenHeight, - params->smallestScreenWidthDp, - params->screenWidthDp, - params->screenHeightDp)); + TABLE_GETENTRY(ALOGI("Setting parameters: %s\n", params->toString().string())); mParams = *params; for (size_t i=0; i<mPackageGroups.size(); i++) { - TABLE_NOISY(LOGI("CLEARING BAGS FOR GROUP %d!", i)); + TABLE_NOISY(ALOGI("CLEARING BAGS FOR GROUP %d!", i)); mPackageGroups[i]->clearBagCache(); } mLock.unlock(); @@ -4840,13 +4831,13 @@ ssize_t ResTable::getEntry( ResTable_config thisConfig; thisConfig.copyFromDtoH(thisType->config); - TABLE_GETENTRY(LOGI("Match entry 0x%x in type 0x%x (sz 0x%x): %s\n", + TABLE_GETENTRY(ALOGI("Match entry 0x%x in type 0x%x (sz 0x%x): %s\n", entryIndex, typeIndex+1, dtohl(thisType->config.size), thisConfig.toString().string())); // Check to make sure this one is valid for the current parameters. if (config && !thisConfig.match(*config)) { - TABLE_GETENTRY(LOGI("Does not match config!\n")); + TABLE_GETENTRY(ALOGI("Does not match config!\n")); continue; } @@ -4859,7 +4850,7 @@ ssize_t ResTable::getEntry( uint32_t thisOffset = dtohl(eindex[entryIndex]); if (thisOffset == ResTable_type::NO_ENTRY) { - TABLE_GETENTRY(LOGI("Skipping because it is not defined!\n")); + TABLE_GETENTRY(ALOGI("Skipping because it is not defined!\n")); continue; } @@ -4868,7 +4859,7 @@ ssize_t ResTable::getEntry( // we will skip it. We check starting with things we most care // about to those we least care about. if (!thisConfig.isBetterThan(bestConfig, config)) { - TABLE_GETENTRY(LOGI("This config is worse than last!\n")); + TABLE_GETENTRY(ALOGI("This config is worse than last!\n")); continue; } } @@ -4876,12 +4867,12 @@ ssize_t ResTable::getEntry( type = thisType; offset = thisOffset; bestConfig = thisConfig; - TABLE_GETENTRY(LOGI("Best entry so far -- using it!\n")); + TABLE_GETENTRY(ALOGI("Best entry so far -- using it!\n")); if (!config) break; } if (type == NULL) { - TABLE_GETENTRY(LOGI("No value found for requested entry!\n")); + TABLE_GETENTRY(ALOGI("No value found for requested entry!\n")); return BAD_INDEX; } @@ -5024,7 +5015,7 @@ status_t ResTable::parsePackage(const ResTable_package* const pkg, const uint8_t* endPos = ((const uint8_t*)pkg) + dtohs(pkg->header.size); while (((const uint8_t*)chunk) <= (endPos-sizeof(ResChunk_header)) && ((const uint8_t*)chunk) <= (endPos-dtohl(chunk->size))) { - TABLE_NOISY(LOGV("PackageChunk: type=0x%x, headerSize=0x%x, size=0x%x, pos=%p\n", + TABLE_NOISY(ALOGV("PackageChunk: type=0x%x, headerSize=0x%x, size=0x%x, pos=%p\n", dtohs(chunk->type), dtohs(chunk->headerSize), dtohl(chunk->size), (void*)(((const uint8_t*)chunk) - ((const uint8_t*)header->header)))); const size_t csize = dtohl(chunk->size); diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 339ae0a..b4310ea 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -1189,7 +1189,7 @@ void OpenGLRenderer::setupDrawPointUniforms() { } void OpenGLRenderer::setupDrawColorUniforms() { - if (mColorSet || (mShader && mSetShaderColor)) { + if ((mColorSet && !mShader) || (mShader && mSetShaderColor)) { mCaches.currentProgram->setColor(mColorR, mColorG, mColorB, mColorA); } } diff --git a/libs/rs/Android.mk b/libs/rs/Android.mk index 45ed453..f92741c 100644 --- a/libs/rs/Android.mk +++ b/libs/rs/Android.mk @@ -1,6 +1,41 @@ LOCAL_PATH:=$(call my-dir) +include $(CLEAR_VARS) +LOCAL_MODULE := libRSDriver + +LOCAL_SRC_FILES:= \ + driver/rsdAllocation.cpp \ + driver/rsdBcc.cpp \ + driver/rsdCore.cpp \ + driver/rsdFrameBuffer.cpp \ + driver/rsdFrameBufferObj.cpp \ + driver/rsdGL.cpp \ + driver/rsdMesh.cpp \ + driver/rsdMeshObj.cpp \ + driver/rsdPath.cpp \ + driver/rsdProgram.cpp \ + driver/rsdProgramRaster.cpp \ + driver/rsdProgramStore.cpp \ + driver/rsdRuntimeMath.cpp \ + driver/rsdRuntimeStubs.cpp \ + driver/rsdSampler.cpp \ + driver/rsdShader.cpp \ + driver/rsdShaderCache.cpp \ + driver/rsdVertexArray.cpp + +LOCAL_SHARED_LIBRARIES += libz libcutils libutils libEGL libGLESv1_CM libGLESv2 +LOCAL_SHARED_LIBRARIES += libbcc libbcinfo libgui + +LOCAL_C_INCLUDES += external/zlib dalvik +LOCAL_C_INCLUDES += frameworks/compile/libbcc/include + +LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable + +LOCAL_LDLIBS := -lpthread -ldl +LOCAL_MODULE_TAGS := optional + +include $(BUILD_STATIC_LIBRARY) # Build rsg-generator ==================== include $(CLEAR_VARS) @@ -23,19 +58,6 @@ include $(BUILD_HOST_EXECUTABLE) # TODO: This should go into build/core/config.mk RSG_GENERATOR:=$(LOCAL_BUILT_MODULE) -# include $(CLEAR_VARS) -# input_data_file := $(LOCAL_PATH)/rslib.bc -# slangdata_output_var_name := rs_runtime_lib_bc -# LOCAL_MODULE := librslib_rt - -# LOCAL_MODULE_CLASS := STATIC_LIBRARIES - -# LOCAL_MODULE_TAGS := optional -# include frameworks/compile/slang/SlangData.mk -# include $(BUILD_STATIC_LIBRARY) - -# Build render script lib ==================== - include $(CLEAR_VARS) LOCAL_MODULE := libRS @@ -110,24 +132,6 @@ LOCAL_SRC_FILES:= \ rsStream.cpp \ rsThreadIO.cpp \ rsType.cpp \ - driver/rsdAllocation.cpp \ - driver/rsdBcc.cpp \ - driver/rsdCore.cpp \ - driver/rsdFrameBuffer.cpp \ - driver/rsdFrameBufferObj.cpp \ - driver/rsdGL.cpp \ - driver/rsdMesh.cpp \ - driver/rsdMeshObj.cpp \ - driver/rsdPath.cpp \ - driver/rsdProgram.cpp \ - driver/rsdProgramRaster.cpp \ - driver/rsdProgramStore.cpp \ - driver/rsdRuntimeMath.cpp \ - driver/rsdRuntimeStubs.cpp \ - driver/rsdSampler.cpp \ - driver/rsdShader.cpp \ - driver/rsdShaderCache.cpp \ - driver/rsdVertexArray.cpp \ RenderScript.cpp \ BaseObj.cpp \ Element.cpp \ @@ -136,9 +140,10 @@ LOCAL_SRC_FILES:= \ Script.cpp \ ScriptC.cpp -LOCAL_SHARED_LIBRARIES += libz libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libbcc libbcinfo libgui +LOCAL_SHARED_LIBRARIES += libz libcutils libutils libEGL libGLESv1_CM libGLESv2 libbcc +LOCAL_SHARED_LIBRARIES += libui libbcinfo libgui -LOCAL_STATIC_LIBRARIES := libdex libft2 +LOCAL_STATIC_LIBRARIES := libdex libft2 libRSDriver LOCAL_C_INCLUDES += external/freetype/include external/zlib dalvik LOCAL_C_INCLUDES += frameworks/compile/libbcc/include diff --git a/libs/rs/RenderScript.cpp b/libs/rs/RenderScript.cpp index 0b42055..217b921 100644 --- a/libs/rs/RenderScript.cpp +++ b/libs/rs/RenderScript.cpp @@ -21,6 +21,7 @@ #include <string.h> #include "RenderScript.h" +#include "rs.h" bool RenderScript::gInitialized = false; pthread_mutex_t RenderScript::gInitMutex = PTHREAD_MUTEX_INITIALIZER; diff --git a/libs/rs/RenderScript.h b/libs/rs/RenderScript.h index 0eb6a6d..5ad76e2 100644 --- a/libs/rs/RenderScript.h +++ b/libs/rs/RenderScript.h @@ -22,7 +22,7 @@ #include <utils/String8.h> #include <utils/Vector.h> -#include "rs.h" +#include "rsDefines.h" class Element; class Type; diff --git a/libs/rs/driver/rsdGL.cpp b/libs/rs/driver/rsdGL.cpp index 63bf7cc..fae602c 100644 --- a/libs/rs/driver/rsdGL.cpp +++ b/libs/rs/driver/rsdGL.cpp @@ -37,6 +37,7 @@ #include <malloc.h> #include "rsContext.h" +#include "rsDevice.h" #include "rsdShaderCache.h" #include "rsdVertexArray.h" #include "rsdFrameBufferObj.h" diff --git a/libs/rs/rs.h b/libs/rs/rs.h index fbcaf4a..825b9b8 100644 --- a/libs/rs/rs.h +++ b/libs/rs/rs.h @@ -20,10 +20,6 @@ #include <stdint.h> #include <sys/types.h> -#ifdef __cplusplus -extern "C" { -#endif - #include "rsDefines.h" // @@ -61,10 +57,6 @@ RsContext rsContextCreateGL(RsDevice dev, uint32_t version, uint32_t sdkVersion, #include "rsgApiFuncDecl.h" -#ifdef __cplusplus -}; -#endif - #endif // RENDER_SCRIPT_H diff --git a/libs/rs/rsAdapter.cpp b/libs/rs/rsAdapter.cpp index 177fb60..41811ae 100644 --- a/libs/rs/rsAdapter.cpp +++ b/libs/rs/rsAdapter.cpp @@ -16,6 +16,7 @@ */ #include "rsContext.h" +#include "rsAdapter.h" using namespace android; using namespace android::renderscript; diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp index 83c88fd..a404c49 100644 --- a/libs/rs/rsAllocation.cpp +++ b/libs/rs/rsAllocation.cpp @@ -15,6 +15,8 @@ */ #include "rsContext.h" +#include "rsAllocation.h" +#include "rsAdapter.h" #include "rs_hal.h" #include "system/window.h" diff --git a/libs/rs/rsAnimation.h b/libs/rs/rsAnimation.h index bff8d6f..526a081 100644 --- a/libs/rs/rsAnimation.h +++ b/libs/rs/rsAnimation.h @@ -19,7 +19,7 @@ #include "rsUtils.h" #include "rsObjectBase.h" - +#include "rsDefines.h" // --------------------------------------------------------------------------- namespace android { namespace renderscript { diff --git a/libs/rs/rsComponent.h b/libs/rs/rsComponent.h index 8629d0d..a2e8c0f 100644 --- a/libs/rs/rsComponent.h +++ b/libs/rs/rsComponent.h @@ -18,6 +18,7 @@ #define ANDROID_COMPONENT_H #include "rsUtils.h" +#include "rsDefines.h" // --------------------------------------------------------------------------- namespace android { diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp index 0f3cea7..1b51872 100644 --- a/libs/rs/rsContext.cpp +++ b/libs/rs/rsContext.cpp @@ -14,9 +14,11 @@ * limitations under the License. */ +#include "rs.h" #include "rsDevice.h" #include "rsContext.h" #include "rsThreadIO.h" +#include "rsMesh.h" #include <ui/FramebufferNativeWindow.h> #include <gui/DisplayEventReceiver.h> diff --git a/libs/rs/rsContext.h b/libs/rs/rsContext.h index 05c799e..0f44267 100644 --- a/libs/rs/rsContext.h +++ b/libs/rs/rsContext.h @@ -18,18 +18,10 @@ #define ANDROID_RS_CONTEXT_H #include "rsUtils.h" -#include "rsType.h" -#include "rsAllocation.h" -#include "rsMesh.h" - #include "rs_hal.h" -#include "rsMutex.h" #include "rsThreadIO.h" -#include "rsMatrix4x4.h" -#include "rsDevice.h" #include "rsScriptC.h" -#include "rsAdapter.h" #include "rsSampler.h" #include "rsFont.h" #include "rsPath.h" @@ -39,13 +31,13 @@ #include "rsProgramVertex.h" #include "rsFBOCache.h" -#include "rsgApiStructs.h" - // --------------------------------------------------------------------------- namespace android { namespace renderscript { +class Device; + #if 0 #define CHECK_OBJ(o) { \ GET_TLS(); \ diff --git a/libs/rs/rsElement.h b/libs/rs/rsElement.h index 4b6b460..b86d3bc 100644 --- a/libs/rs/rsElement.h +++ b/libs/rs/rsElement.h @@ -19,6 +19,7 @@ #include "rsComponent.h" #include "rsUtils.h" +#include "rsDefines.h" #include "rsObjectBase.h" // --------------------------------------------------------------------------- diff --git a/libs/rs/rsFileA3D.cpp b/libs/rs/rsFileA3D.cpp index ac658c8..173b9a5 100644 --- a/libs/rs/rsFileA3D.cpp +++ b/libs/rs/rsFileA3D.cpp @@ -20,7 +20,7 @@ #include "rsMesh.h" #include "rsAnimation.h" - +#include "rs.h" using namespace android; using namespace android::renderscript; diff --git a/libs/rs/rsFileA3D.h b/libs/rs/rsFileA3D.h index baf81de..08062c6 100644 --- a/libs/rs/rsFileA3D.h +++ b/libs/rs/rsFileA3D.h @@ -17,7 +17,6 @@ #ifndef ANDROID_RS_FILE_A3D_H #define ANDROID_RS_FILE_A3D_H -#include "rs.h" #include "rsMesh.h" #include <androidfw/Asset.h> diff --git a/libs/rs/rsFont.cpp b/libs/rs/rsFont.cpp index c4276cf..1f53c79 100644 --- a/libs/rs/rsFont.cpp +++ b/libs/rs/rsFont.cpp @@ -16,9 +16,10 @@ */ #include "rsContext.h" - +#include "rs.h" #include "rsFont.h" #include "rsProgramFragment.h" +#include "rsMesh.h" #include <cutils/properties.h> #ifndef ANDROID_RS_SERIALIZE diff --git a/libs/rs/rsFont.h b/libs/rs/rsFont.h index 88c4795..2bd30b7 100644 --- a/libs/rs/rsFont.h +++ b/libs/rs/rsFont.h @@ -17,7 +17,6 @@ #ifndef ANDROID_RS_FONT_H #define ANDROID_RS_FONT_H -#include "rs.h" #include "rsStream.h" #include <utils/String8.h> #include <utils/Vector.h> diff --git a/libs/rs/rsMesh.cpp b/libs/rs/rsMesh.cpp index 67c7299..399a52b 100644 --- a/libs/rs/rsMesh.cpp +++ b/libs/rs/rsMesh.cpp @@ -15,6 +15,8 @@ */ #include "rsContext.h" +#include "rsMesh.h" +#include "rs.h" using namespace android; using namespace android::renderscript; diff --git a/libs/rs/rsMesh.h b/libs/rs/rsMesh.h index 8eea427..7ca63cf 100644 --- a/libs/rs/rsMesh.h +++ b/libs/rs/rsMesh.h @@ -18,7 +18,7 @@ #define ANDROID_RS_MESH_H -#include "rs.h" +#include "rsObjectBase.h" // --------------------------------------------------------------------------- namespace android { diff --git a/libs/rs/rsObjectBase.h b/libs/rs/rsObjectBase.h index d9f5f3b..586da19 100644 --- a/libs/rs/rsObjectBase.h +++ b/libs/rs/rsObjectBase.h @@ -18,6 +18,7 @@ #define ANDROID_RS_OBJECT_BASE_H #include "rsUtils.h" +#include "rsDefines.h" #define RS_OBJECT_DEBUG 0 diff --git a/libs/rs/rsPath.cpp b/libs/rs/rsPath.cpp index c4f4978..055bb86 100644 --- a/libs/rs/rsPath.cpp +++ b/libs/rs/rsPath.cpp @@ -15,6 +15,7 @@ */ #include "rsContext.h" +#include "rs.h" using namespace android; using namespace android::renderscript; diff --git a/libs/rs/rsPath.h b/libs/rs/rsPath.h index 7c05503..1abfc9a 100644 --- a/libs/rs/rsPath.h +++ b/libs/rs/rsPath.h @@ -18,7 +18,7 @@ #define ANDROID_RS_PATH_H -#include "rs.h" +#include "rsObjectBase.h" // --------------------------------------------------------------------------- namespace android { diff --git a/libs/rs/rsProgramVertex.cpp b/libs/rs/rsProgramVertex.cpp index c8a53ea..23fcbe7 100644 --- a/libs/rs/rsProgramVertex.cpp +++ b/libs/rs/rsProgramVertex.cpp @@ -16,6 +16,7 @@ #include "rsContext.h" #include "rsProgramVertex.h" +#include "rsMatrix4x4.h" using namespace android; using namespace android::renderscript; diff --git a/libs/rs/rsSampler.cpp b/libs/rs/rsSampler.cpp index 5fc64a4..c7180bd 100644 --- a/libs/rs/rsSampler.cpp +++ b/libs/rs/rsSampler.cpp @@ -16,7 +16,7 @@ #include "rsContext.h" #include "rsSampler.h" - +#include "rs.h" using namespace android; using namespace android::renderscript; diff --git a/libs/rs/rsSampler.h b/libs/rs/rsSampler.h index 013e4ca..dea4cb6 100644 --- a/libs/rs/rsSampler.h +++ b/libs/rs/rsSampler.h @@ -18,7 +18,6 @@ #define ANDROID_RS_SAMPLER_H #include "rsAllocation.h" -#include "rs.h" // --------------------------------------------------------------------------- namespace android { diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp index a5a0fae..749495d 100644 --- a/libs/rs/rsScriptC_Lib.cpp +++ b/libs/rs/rsScriptC_Lib.cpp @@ -19,6 +19,7 @@ #include "rsMatrix4x4.h" #include "rsMatrix3x3.h" #include "rsMatrix2x2.h" +#include "rsgApiStructs.h" #include "utils/Timers.h" diff --git a/libs/rs/rsScriptC_LibGL.cpp b/libs/rs/rsScriptC_LibGL.cpp index bda18fd..21b1c42 100644 --- a/libs/rs/rsScriptC_LibGL.cpp +++ b/libs/rs/rsScriptC_LibGL.cpp @@ -19,6 +19,8 @@ #include "rsMatrix4x4.h" #include "rsMatrix3x3.h" #include "rsMatrix2x2.h" +#include "rsMesh.h" +#include "rsgApiStructs.h" #include "utils/Timers.h" #include "driver/rsdVertexArray.h" diff --git a/libs/rs/rsThreadIO.cpp b/libs/rs/rsThreadIO.cpp index 7182f53..8a0a5dc 100644 --- a/libs/rs/rsThreadIO.cpp +++ b/libs/rs/rsThreadIO.cpp @@ -15,8 +15,8 @@ */ #include "rsContext.h" - #include "rsThreadIO.h" +#include "rsgApiStructs.h" #include <unistd.h> #include <sys/types.h> diff --git a/libs/rs/rsUtils.h b/libs/rs/rsUtils.h index a9a992a..cbbae6c 100644 --- a/libs/rs/rsUtils.h +++ b/libs/rs/rsUtils.h @@ -34,8 +34,6 @@ #include <math.h> -#include "rs.h" - namespace android { namespace renderscript { diff --git a/libs/rs/rsg_generator.c b/libs/rs/rsg_generator.c index 99c305e..c0f82dc 100644 --- a/libs/rs/rsg_generator.c +++ b/libs/rs/rsg_generator.c @@ -187,7 +187,7 @@ void printApiCpp(FILE *f) { fprintf(f, "#include \"rsDevice.h\"\n"); fprintf(f, "#include \"rsContext.h\"\n"); fprintf(f, "#include \"rsThreadIO.h\"\n"); - //fprintf(f, "#include \"rsgApiStructs.h\"\n"); + fprintf(f, "#include \"rsgApiStructs.h\"\n"); fprintf(f, "#include \"rsgApiFuncDecl.h\"\n"); fprintf(f, "#include \"rsFifo.h\"\n"); fprintf(f, "\n"); @@ -408,6 +408,7 @@ void printPlaybackCpp(FILE *f) { fprintf(f, "#include \"rsDevice.h\"\n"); fprintf(f, "#include \"rsContext.h\"\n"); fprintf(f, "#include \"rsThreadIO.h\"\n"); + fprintf(f, "#include \"rsgApiStructs.h\"\n"); fprintf(f, "#include \"rsgApiFuncDecl.h\"\n"); fprintf(f, "\n"); fprintf(f, "namespace android {\n"); diff --git a/media/jni/soundpool/SoundPool.cpp b/media/jni/soundpool/SoundPool.cpp index ceb87db..5aed8a1 100644 --- a/media/jni/soundpool/SoundPool.cpp +++ b/media/jni/soundpool/SoundPool.cpp @@ -608,10 +608,11 @@ void SoundChannel::play(const sp<Sample>& sample, int nextChannelID, float leftV // do not create a new audio track if current track is compatible with sample parameters #ifdef USE_SHARED_MEM_BUFFER newTrack = new AudioTrack(streamType, sampleRate, sample->format(), - channels, sample->getIMemory(), 0, callback, userData); + channels, sample->getIMemory(), AUDIO_POLICY_OUTPUT_FLAG_NONE, callback, userData); #else newTrack = new AudioTrack(streamType, sampleRate, sample->format(), - channels, frameCount, 0, callback, userData, bufferFrames); + channels, frameCount, AUDIO_POLICY_OUTPUT_FLAG_NONE, callback, userData, + bufferFrames); #endif oldTrack = mAudioTrack; status = newTrack->initCheck(); diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp index 943f3af..22c3a18 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -89,7 +89,7 @@ AudioRecord::AudioRecord( audio_format_t format, uint32_t channelMask, int frameCount, - uint32_t flags, + record_flags flags, callback_t cbf, void* user, int notificationFrames, @@ -124,7 +124,7 @@ status_t AudioRecord::set( audio_format_t format, uint32_t channelMask, int frameCount, - uint32_t flags, + record_flags flags, callback_t cbf, void* user, int notificationFrames, diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index a1c99e5..34563ca 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -92,7 +92,7 @@ AudioTrack::AudioTrack( audio_format_t format, int channelMask, int frameCount, - uint32_t flags, + audio_policy_output_flags_t flags, callback_t cbf, void* user, int notificationFrames, @@ -119,10 +119,11 @@ AudioTrack::AudioTrack( int notificationFrames, int sessionId) : mStatus(NO_INIT), + mIsTimed(false), mPreviousPriority(ANDROID_PRIORITY_NORMAL), mPreviousSchedulingGroup(ANDROID_TGROUP_DEFAULT) { mStatus = set((audio_stream_type_t)streamType, sampleRate, (audio_format_t)format, channelMask, - frameCount, flags, cbf, user, notificationFrames, + frameCount, (audio_policy_output_flags_t)flags, cbf, user, notificationFrames, 0, false, sessionId); } @@ -132,7 +133,7 @@ AudioTrack::AudioTrack( audio_format_t format, int channelMask, const sp<IMemory>& sharedBuffer, - uint32_t flags, + audio_policy_output_flags_t flags, callback_t cbf, void* user, int notificationFrames, @@ -172,7 +173,7 @@ status_t AudioTrack::set( audio_format_t format, int channelMask, int frameCount, - uint32_t flags, + audio_policy_output_flags_t flags, callback_t cbf, void* user, int notificationFrames, @@ -221,7 +222,7 @@ status_t AudioTrack::set( // force direct flag if format is not linear PCM if (!audio_is_linear_pcm(format)) { - flags |= AUDIO_POLICY_OUTPUT_FLAG_DIRECT; + flags = (audio_policy_output_flags_t) (flags | AUDIO_POLICY_OUTPUT_FLAG_DIRECT); } if (!audio_is_output_channel(channelMask)) { @@ -233,7 +234,7 @@ status_t AudioTrack::set( audio_io_handle_t output = AudioSystem::getOutput( streamType, sampleRate, format, channelMask, - (audio_policy_output_flags_t)flags); + flags); if (output == 0) { ALOGE("Could not get audio output for stream type %d", streamType); @@ -707,7 +708,7 @@ audio_io_handle_t AudioTrack::getOutput() audio_io_handle_t AudioTrack::getOutput_l() { return AudioSystem::getOutput(mStreamType, - mCblk->sampleRate, mFormat, mChannelMask, (audio_policy_output_flags_t)mFlags); + mCblk->sampleRate, mFormat, mChannelMask, mFlags); } int AudioTrack::getSessionId() const @@ -734,7 +735,7 @@ status_t AudioTrack::createTrack_l( audio_format_t format, uint32_t channelMask, int frameCount, - uint32_t flags, + audio_policy_output_flags_t flags, const sp<IMemory>& sharedBuffer, audio_io_handle_t output, bool enforceFrameCount) diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp index ebadbfa..47c261da 100644 --- a/media/libmedia/IAudioFlinger.cpp +++ b/media/libmedia/IAudioFlinger.cpp @@ -362,7 +362,7 @@ public: audio_format_t *pFormat, uint32_t *pChannels, uint32_t *pLatencyMs, - uint32_t flags) + audio_policy_output_flags_t flags) { Parcel data, reply; uint32_t devices = pDevices ? *pDevices : 0; @@ -377,7 +377,7 @@ public: data.writeInt32(format); data.writeInt32(channels); data.writeInt32(latency); - data.writeInt32(flags); + data.writeInt32((int32_t) flags); remote()->transact(OPEN_OUTPUT, data, &reply); audio_io_handle_t output = (audio_io_handle_t) reply.readInt32(); ALOGV("openOutput() returned output, %d", output); @@ -845,7 +845,7 @@ status_t BnAudioFlinger::onTransact( audio_format_t format = (audio_format_t) data.readInt32(); uint32_t channels = data.readInt32(); uint32_t latency = data.readInt32(); - uint32_t flags = data.readInt32(); + audio_policy_output_flags_t flags = (audio_policy_output_flags_t) data.readInt32(); audio_io_handle_t output = openOutput(&devices, &samplingRate, &format, diff --git a/media/libmedia/JetPlayer.cpp b/media/libmedia/JetPlayer.cpp index 6cb5b82..a85956c 100644 --- a/media/libmedia/JetPlayer.cpp +++ b/media/libmedia/JetPlayer.cpp @@ -94,7 +94,7 @@ int JetPlayer::init() AUDIO_FORMAT_PCM_16_BIT, (pLibConfig->numChannels == 2) ? AUDIO_CHANNEL_OUT_STEREO : AUDIO_CHANNEL_OUT_MONO, mTrackBufferSize, - 0); + AUDIO_POLICY_OUTPUT_FLAG_NONE); // create render and playback thread { diff --git a/media/libmedia/ToneGenerator.cpp b/media/libmedia/ToneGenerator.cpp index 54eb98a..9c3170c 100644 --- a/media/libmedia/ToneGenerator.cpp +++ b/media/libmedia/ToneGenerator.cpp @@ -1024,7 +1024,7 @@ bool ToneGenerator::initAudioTrack() { AUDIO_FORMAT_PCM_16_BIT, AUDIO_CHANNEL_OUT_MONO, 0, - 0, + AUDIO_POLICY_OUTPUT_FLAG_NONE, audioCallback, this, 0, diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index 1a85c9c..bbc53f3 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -1503,7 +1503,7 @@ status_t MediaPlayerService::AudioOutput::open( format, channelMask, frameCount, - 0 /* flags */, + AUDIO_POLICY_OUTPUT_FLAG_NONE, CallbackWrapper, this, 0, @@ -1515,7 +1515,7 @@ status_t MediaPlayerService::AudioOutput::open( format, channelMask, frameCount, - 0, + AUDIO_POLICY_OUTPUT_FLAG_NONE, NULL, NULL, 0, diff --git a/media/libstagefright/AudioPlayer.cpp b/media/libstagefright/AudioPlayer.cpp index 650b6c4..23c3c74 100644 --- a/media/libstagefright/AudioPlayer.cpp +++ b/media/libstagefright/AudioPlayer.cpp @@ -151,7 +151,7 @@ status_t AudioPlayer::start(bool sourceAlreadyStarted) { mAudioTrack = new AudioTrack( AUDIO_STREAM_MUSIC, mSampleRate, AUDIO_FORMAT_PCM_16_BIT, audioMask, - 0, 0, &AudioCallback, this, 0); + 0, AUDIO_POLICY_OUTPUT_FLAG_NONE, &AudioCallback, this, 0); if ((err = mAudioTrack->initCheck()) != OK) { delete mAudioTrack; @@ -437,8 +437,11 @@ size_t AudioPlayer::fillBuffer(void *data, size_t size) { kKeyTime, &mPositionTimeMediaUs)); mPositionTimeRealUs = - ((mNumFramesPlayed + size_done / mFrameSize) * 1000000) + -mLatencyUs + ((mNumFramesPlayed + size_done / mFrameSize) * 1000000) / mSampleRate; + if (mPositionTimeRealUs < 0) { + mPositionTimeRealUs = 0; + } ALOGV("buffer->size() = %d, " "mPositionTimeMediaUs=%.2f mPositionTimeRealUs=%.2f", @@ -493,7 +496,9 @@ int64_t AudioPlayer::getRealTimeUs() { int64_t AudioPlayer::getRealTimeUsLocked() const { CHECK(mStarted); CHECK_NE(mSampleRate, 0); - return -mLatencyUs + (mNumFramesPlayed * 1000000) / mSampleRate; + int64_t t = -mLatencyUs + (mNumFramesPlayed * 1000000) / mSampleRate; + if (t < 0) return 0; + return t; } int64_t AudioPlayer::getMediaTimeUs() { diff --git a/media/libstagefright/AudioSource.cpp b/media/libstagefright/AudioSource.cpp index 5b2ea1f..cbe709b 100644 --- a/media/libstagefright/AudioSource.cpp +++ b/media/libstagefright/AudioSource.cpp @@ -56,9 +56,10 @@ AudioSource::AudioSource( ALOGV("sampleRate: %d, channels: %d", sampleRate, channels); CHECK(channels == 1 || channels == 2); - uint32_t flags = AudioRecord::RECORD_AGC_ENABLE | + AudioRecord::record_flags flags = (AudioRecord::record_flags) + (AudioRecord::RECORD_AGC_ENABLE | AudioRecord::RECORD_NS_ENABLE | - AudioRecord::RECORD_IIR_ENABLE; + AudioRecord::RECORD_IIR_ENABLE); mRecord = new AudioRecord( inputSource, sampleRate, AUDIO_FORMAT_PCM_16_BIT, channels > 1? AUDIO_CHANNEL_IN_STEREO: AUDIO_CHANNEL_IN_MONO, diff --git a/media/libstagefright/codecs/aacenc/src/adj_thr.c b/media/libstagefright/codecs/aacenc/src/adj_thr.c index 373b063..07b33b7 100644 --- a/media/libstagefright/codecs/aacenc/src/adj_thr.c +++ b/media/libstagefright/codecs/aacenc/src/adj_thr.c @@ -438,7 +438,7 @@ static void correctThresh(PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS], for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++) { Word32 redThrExp = thrExp[ch][sfbGrp+sfb] + redVal; - if (((*pahFlag < AH_ACTIVE) || (deltaPe > 0)) && (redThrExp > 0) ) { + if (((*pahFlag < AH_ACTIVE) || (deltaPe > 0)) && (redThrExp > 0) && (redThrExp >= *psfbNActiveLines)) { *psfbPeFactors = (*psfbNActiveLines) * (0x7fffffff / redThrExp); normFactor = L_add(normFactor, *psfbPeFactors); @@ -466,7 +466,7 @@ static void correctThresh(PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS], deltaSfbPe = *psfbPeFactors * deltaPe; /* thr3(n) = thr2(n)*2^deltaSfbPe/b(n) */ - if (*psfbNActiveLines > 0) { + if (*psfbNActiveLines > 0 && (normFactor* (*psfbNActiveLines)) != 0) { /* new threshold */ Word32 thrFactor; sfbEn = psyOutChan->sfbEnergy[sfbGrp+sfb]; diff --git a/media/libstagefright/codecs/amrwbenc/inc/basic_op.h b/media/libstagefright/codecs/amrwbenc/inc/basic_op.h index c23dce6..f42a27c 100644 --- a/media/libstagefright/codecs/amrwbenc/inc/basic_op.h +++ b/media/libstagefright/codecs/amrwbenc/inc/basic_op.h @@ -29,11 +29,7 @@ #define MIN_16 (Word16)-32768 /* 0x8000 */ -#ifdef LINUX -#define static_vo static __inline__ -#else #define static_vo static __inline -#endif #define saturate(L_var1) (((L_var1) > 0X00007fffL) ? (MAX_16): (((L_var1) < (Word32) 0xffff8000L) ? (MIN_16): ((L_var1) & 0xffff))) diff --git a/media/libstagefright/foundation/AMessage.cpp b/media/libstagefright/foundation/AMessage.cpp index 9a00186..8b01ac6 100644 --- a/media/libstagefright/foundation/AMessage.cpp +++ b/media/libstagefright/foundation/AMessage.cpp @@ -74,6 +74,7 @@ void AMessage::freeItem(Item *item) { case kTypeObject: case kTypeMessage: + case kTypeBuffer: { if (item->u.refValue != NULL) { item->u.refValue->decStrong(this); @@ -292,6 +293,7 @@ sp<AMessage> AMessage::dup() const { } case kTypeObject: + case kTypeBuffer: { to->u.refValue = from->u.refValue; to->u.refValue->incStrong(msg.get()); @@ -396,6 +398,10 @@ AString AMessage::debugString(int32_t indent) const { tmp = StringPrintf( "RefBase *%s = %p", item.mName, item.u.refValue); break; + case kTypeBuffer: + tmp = StringPrintf( + "ABuffer *%s = %p", item.mName, item.u.refValue); + break; case kTypeMessage: tmp = StringPrintf( "AMessage %s = %s", diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar.xml b/packages/SystemUI/res/layout-sw600dp/status_bar.xml index b96c357..2308bf0 100644 --- a/packages/SystemUI/res/layout-sw600dp/status_bar.xml +++ b/packages/SystemUI/res/layout-sw600dp/status_bar.xml @@ -54,7 +54,7 @@ android:clipToPadding="false" > <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/back" - android:layout_width="80dip" + android:layout_width="@dimen/navigation_key_width" android:layout_height="match_parent" android:src="@drawable/ic_sysbar_back" systemui:keyCode="4" @@ -62,7 +62,7 @@ systemui:glowBackground="@drawable/ic_sysbar_highlight" /> <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/home" - android:layout_width="80dip" + android:layout_width="@dimen/navigation_key_width" android:layout_height="match_parent" android:src="@drawable/ic_sysbar_home" systemui:keyCode="3" @@ -70,14 +70,14 @@ systemui:glowBackground="@drawable/ic_sysbar_highlight" /> <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/recent_apps" - android:layout_width="80dip" + android:layout_width="@dimen/navigation_key_width" android:layout_height="match_parent" android:src="@drawable/ic_sysbar_recent" android:contentDescription="@string/accessibility_recent" systemui:glowBackground="@drawable/ic_sysbar_highlight" /> <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/menu" - android:layout_width="80dip" + android:layout_width="@dimen/navigation_menu_key_width" android:layout_height="match_parent" android:src="@drawable/ic_sysbar_menu" systemui:keyCode="82" diff --git a/packages/SystemUI/res/layout/navigation_bar.xml b/packages/SystemUI/res/layout/navigation_bar.xml index 82fcc88..bb80098 100644 --- a/packages/SystemUI/res/layout/navigation_bar.xml +++ b/packages/SystemUI/res/layout/navigation_bar.xml @@ -49,7 +49,7 @@ android:visibility="invisible" /> <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/back" - android:layout_width="80dp" + android:layout_width="@dimen/navigation_key_width" android:layout_height="match_parent" android:src="@drawable/ic_sysbar_back" systemui:keyCode="4" @@ -64,7 +64,7 @@ android:visibility="invisible" /> <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/home" - android:layout_width="80dp" + android:layout_width="@dimen/navigation_key_width" android:layout_height="match_parent" android:src="@drawable/ic_sysbar_home" systemui:keyCode="3" @@ -80,7 +80,7 @@ android:visibility="invisible" /> <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/recent_apps" - android:layout_width="80dp" + android:layout_width="@dimen/navigation_key_width" android:layout_height="match_parent" android:src="@drawable/ic_sysbar_recent" android:layout_weight="0" @@ -88,7 +88,7 @@ android:contentDescription="@string/accessibility_recent" /> <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/menu" - android:layout_width="40dp" + android:layout_width="@dimen/navigation_menu_key_width" android:layout_height="match_parent" android:src="@drawable/ic_sysbar_menu" systemui:keyCode="82" diff --git a/packages/SystemUI/res/values-sw600dp-port/dimens.xml b/packages/SystemUI/res/values-sw600dp-port/dimens.xml index b8a6cfe..39eade6 100644 --- a/packages/SystemUI/res/values-sw600dp-port/dimens.xml +++ b/packages/SystemUI/res/values-sw600dp-port/dimens.xml @@ -18,5 +18,11 @@ <resources> <!-- gap on either side of status bar notification icons --> <dimen name="status_bar_icon_padding">0dp</dimen> + + <!-- The width of the view containing non-menu status bar icons --> + <dimen name="navigation_key_width">70dip</dimen> + + <!-- The width of the view containing the menu status bar icon --> + <dimen name="navigation_menu_key_width">40dip</dimen> </resources> diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml index f522285..ba1cdfa 100644 --- a/packages/SystemUI/res/values-sw600dp/dimens.xml +++ b/packages/SystemUI/res/values-sw600dp/dimens.xml @@ -67,4 +67,10 @@ <!-- opacity at which Notification icons will be drawn in the status bar --> <item type="dimen" name="status_bar_icon_drawing_alpha">100%</item> + + <!-- The width of the view containing non-menu status bar icons --> + <dimen name="navigation_key_width">80dip</dimen> + + <!-- The width of the view containing the menu status bar icon --> + <dimen name="navigation_menu_key_width">40dip</dimen> </resources> diff --git a/packages/SystemUI/res/values-sw720dp/dimens.xml b/packages/SystemUI/res/values-sw720dp/dimens.xml index 6736c1a..b16b1e8 100644 --- a/packages/SystemUI/res/values-sw720dp/dimens.xml +++ b/packages/SystemUI/res/values-sw720dp/dimens.xml @@ -21,5 +21,11 @@ <!-- opacity at which Notification icons will be drawn in the status bar --> <item type="dimen" name="status_bar_icon_drawing_alpha">100%</item> + + <!-- The width of the view containing non-menu status bar icons --> + <dimen name="navigation_key_width">80dip</dimen> + + <!-- The width of the view containing the menu status bar icon --> + <dimen name="navigation_menu_key_width">80dip</dimen> </resources> diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 8fba86a..2c22e3c 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -91,4 +91,9 @@ <!-- The padding on the global screenshot background image --> <dimen name="global_screenshot_bg_padding">20dp</dimen> + <!-- The width of the view containing non-menu status bar icons --> + <dimen name="navigation_key_width">80dip</dimen> + + <!-- The width of the view containing the menu status bar icon --> + <dimen name="navigation_menu_key_width">40dip</dimen> </resources> diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java index eda52fc..87eb9cc 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java @@ -123,6 +123,8 @@ public class TabletStatusBar extends BaseStatusBar implements int mNaturalBarHeight = -1; int mIconSize = -1; int mIconHPadding = -1; + int mNavIconWidth = -1; + int mMenuNavIconWidth = -1; private int mMaxNotificationIcons = 5; H mHandler = new H(); @@ -462,6 +464,26 @@ public class TabletStatusBar extends BaseStatusBar implements com.android.internal.R.dimen.system_bar_icon_size); int newIconHPadding = res.getDimensionPixelSize( R.dimen.status_bar_icon_padding); + int newNavIconWidth = res.getDimensionPixelSize(R.dimen.navigation_key_width); + int newMenuNavIconWidth = res.getDimensionPixelSize(R.dimen.navigation_menu_key_width); + + if (mNavigationArea != null && newNavIconWidth != mNavIconWidth) { + mNavIconWidth = newNavIconWidth; + + LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams( + mNavIconWidth, ViewGroup.LayoutParams.MATCH_PARENT); + mBackButton.setLayoutParams(lp); + mHomeButton.setLayoutParams(lp); + mRecentButton.setLayoutParams(lp); + } + + if (mNavigationArea != null && newMenuNavIconWidth != mMenuNavIconWidth) { + mMenuNavIconWidth = newMenuNavIconWidth; + + LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams( + mMenuNavIconWidth, ViewGroup.LayoutParams.MATCH_PARENT); + mMenuButton.setLayoutParams(lp); + } if (newIconHPadding != mIconHPadding || newIconSize != mIconSize) { // Slog.d(TAG, "size=" + newIconSize + " padding=" + newIconHPadding); diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index f9b033b..f94ab84 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -5192,8 +5192,8 @@ bool AudioFlinger::RecordThread::checkForNewParameters_l() reqFormat == mInput->stream->common.get_format(&mInput->stream->common) && reqFormat == AUDIO_FORMAT_PCM_16_BIT && ((int)mInput->stream->common.get_sample_rate(&mInput->stream->common) <= (2 * reqSamplingRate)) && - (popcount(mInput->stream->common.get_channels(&mInput->stream->common)) < 3) && - (reqChannelCount < 3)) { + popcount(mInput->stream->common.get_channels(&mInput->stream->common)) <= FCC_2 && + (reqChannelCount <= FCC_2)) { status = NO_ERROR; } if (status == NO_ERROR) { @@ -5270,7 +5270,7 @@ void AudioFlinger::RecordThread::readInputParameters() mFrameCount = mInputBytes / mFrameSize; mRsmpInBuffer = new int16_t[mFrameCount * mChannelCount]; - if (mSampleRate != mReqSampleRate && mChannelCount < 3 && mReqChannelCount < 3) + if (mSampleRate != mReqSampleRate && mChannelCount <= FCC_2 && mReqChannelCount <= FCC_2) { int channelCount; // optmization: if mono to mono, use the resampler in stereo to stereo mode to avoid @@ -5356,7 +5356,7 @@ audio_io_handle_t AudioFlinger::openOutput(uint32_t *pDevices, audio_format_t *pFormat, uint32_t *pChannels, uint32_t *pLatencyMs, - uint32_t flags) + audio_policy_output_flags_t flags) { status_t status; PlaybackThread *thread = NULL; @@ -5559,7 +5559,7 @@ audio_io_handle_t AudioFlinger::openInput(uint32_t *pDevices, if (inStream == NULL && status == BAD_VALUE && reqFormat == format && format == AUDIO_FORMAT_PCM_16_BIT && (samplingRate <= 2 * reqSamplingRate) && - (popcount(channels) < 3) && (popcount(reqChannels) < 3)) { + (popcount(channels) <= FCC_2) && (popcount(reqChannels) <= FCC_2)) { ALOGV("openInput() reopening with proposed sampling rate and channels"); status = inHwDev->open_input_stream(inHwDev, *pDevices, &format, &channels, &samplingRate, diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h index 2e259c0..38fff8c 100644 --- a/services/audioflinger/AudioFlinger.h +++ b/services/audioflinger/AudioFlinger.h @@ -58,6 +58,15 @@ class AudioResampler; // ---------------------------------------------------------------------------- +// AudioFlinger has a hard-coded upper limit of 2 channels for capture and playback. +// There is support for > 2 channel tracks down-mixed to 2 channel output via a down-mix effect. +// Adding full support for > 2 channel capture or playback would require more than simply changing +// this #define. There is an independent hard-coded upper limit in AudioMixer; +// removing that AudioMixer limit would be necessary but insufficient to support > 2 channels. +// The macro FCC_2 highlights some (but not all) places where there is are 2-channel assumptions. +// Search also for "2", "left", "right", "[0]", "[1]", ">> 16", "<< 16", etc. +#define FCC_2 2 // FCC_2 = Fixed Channel Count 2 + static const nsecs_t kDefaultStandbyTimeInNsecs = seconds(3); class AudioFlinger : @@ -134,7 +143,7 @@ public: audio_format_t *pFormat, uint32_t *pChannels, uint32_t *pLatencyMs, - uint32_t flags); + audio_policy_output_flags_t flags); virtual audio_io_handle_t openDuplicateOutput(audio_io_handle_t output1, audio_io_handle_t output2); diff --git a/services/java/com/android/server/NetworkManagementService.java b/services/java/com/android/server/NetworkManagementService.java index 720b5fe..09d0698 100644 --- a/services/java/com/android/server/NetworkManagementService.java +++ b/services/java/com/android/server/NetworkManagementService.java @@ -880,7 +880,6 @@ public class NetworkManagementService extends INetworkManagementService.Stub mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); try { wifiFirmwareReload(wlanIface, "AP"); - mConnector.execute("softap", "start", wlanIface); if (wifiConfig == null) { mConnector.execute("softap", "set", wlanIface, softapIface); } else { diff --git a/services/java/com/android/server/net/NetworkPolicyManagerService.java b/services/java/com/android/server/net/NetworkPolicyManagerService.java index a890068..2ad24e2 100644 --- a/services/java/com/android/server/net/NetworkPolicyManagerService.java +++ b/services/java/com/android/server/net/NetworkPolicyManagerService.java @@ -156,6 +156,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { private static final int VERSION_ADDED_RESTRICT_BACKGROUND = 3; private static final int VERSION_ADDED_METERED = 4; private static final int VERSION_SPLIT_SNOOZE = 5; + private static final int VERSION_ADDED_TIMEZONE = 6; // @VisibleForTesting public static final int TYPE_WARNING = 0x1; @@ -171,6 +172,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { private static final String ATTR_NETWORK_TEMPLATE = "networkTemplate"; private static final String ATTR_SUBSCRIBER_ID = "subscriberId"; private static final String ATTR_CYCLE_DAY = "cycleDay"; + private static final String ATTR_CYCLE_TIMEZONE = "cycleTimezone"; private static final String ATTR_WARNING_BYTES = "warningBytes"; private static final String ATTR_LIMIT_BYTES = "limitBytes"; private static final String ATTR_LAST_SNOOZE = "lastSnooze"; @@ -922,13 +924,15 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { com.android.internal.R.integer.config_networkPolicyDefaultWarning) * MB_IN_BYTES; - final Time time = new Time(Time.TIMEZONE_UTC); + final Time time = new Time(); time.setToNow(); + final int cycleDay = time.monthDay; + final String cycleTimezone = time.timezone; final NetworkTemplate template = buildTemplateMobileAll(subscriberId); - mNetworkPolicy.put(template, new NetworkPolicy(template, cycleDay, warningBytes, - LIMIT_DISABLED, SNOOZE_NEVER, SNOOZE_NEVER, true)); + mNetworkPolicy.put(template, new NetworkPolicy(template, cycleDay, cycleTimezone, + warningBytes, LIMIT_DISABLED, SNOOZE_NEVER, SNOOZE_NEVER, true)); writePolicyLocked(); } } @@ -964,6 +968,12 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { final int networkTemplate = readIntAttribute(in, ATTR_NETWORK_TEMPLATE); final String subscriberId = in.getAttributeValue(null, ATTR_SUBSCRIBER_ID); final int cycleDay = readIntAttribute(in, ATTR_CYCLE_DAY); + final String cycleTimezone; + if (version >= VERSION_ADDED_TIMEZONE) { + cycleTimezone = in.getAttributeValue(null, ATTR_CYCLE_TIMEZONE); + } else { + cycleTimezone = Time.TIMEZONE_UTC; + } final long warningBytes = readLongAttribute(in, ATTR_WARNING_BYTES); final long limitBytes = readLongAttribute(in, ATTR_LIMIT_BYTES); final long lastLimitSnooze; @@ -998,8 +1008,8 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { final NetworkTemplate template = new NetworkTemplate( networkTemplate, subscriberId); mNetworkPolicy.put(template, new NetworkPolicy(template, cycleDay, - warningBytes, limitBytes, lastWarningSnooze, lastLimitSnooze, - metered)); + cycleTimezone, warningBytes, limitBytes, lastWarningSnooze, + lastLimitSnooze, metered)); } else if (TAG_UID_POLICY.equals(tag)) { final int uid = readIntAttribute(in, ATTR_UID); @@ -1054,7 +1064,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { out.startDocument(null, true); out.startTag(null, TAG_POLICY_LIST); - writeIntAttribute(out, ATTR_VERSION, VERSION_SPLIT_SNOOZE); + writeIntAttribute(out, ATTR_VERSION, VERSION_ADDED_TIMEZONE); writeBooleanAttribute(out, ATTR_RESTRICT_BACKGROUND, mRestrictBackground); // write all known network policies @@ -1068,6 +1078,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { out.attribute(null, ATTR_SUBSCRIBER_ID, subscriberId); } writeIntAttribute(out, ATTR_CYCLE_DAY, policy.cycleDay); + out.attribute(null, ATTR_CYCLE_TIMEZONE, policy.cycleTimezone); writeLongAttribute(out, ATTR_WARNING_BYTES, policy.warningBytes); writeLongAttribute(out, ATTR_LIMIT_BYTES, policy.limitBytes); writeLongAttribute(out, ATTR_LAST_WARNING_SNOOZE, policy.lastWarningSnooze); diff --git a/services/java/com/android/server/wm/ScreenRotationAnimation.java b/services/java/com/android/server/wm/ScreenRotationAnimation.java index 7ac67b6..7b5bf08 100644 --- a/services/java/com/android/server/wm/ScreenRotationAnimation.java +++ b/services/java/com/android/server/wm/ScreenRotationAnimation.java @@ -372,6 +372,12 @@ class ScreenRotationAnimation implements WindowManagerService.StepAnimator { break; } + // Compute partial steps between original and final sizes. These + // are used for the dimensions of the exiting and entering elements, + // so they are never stretched too significantly. + final int halfWidth = (finalWidth + mOriginalWidth) / 2; + final int halfHeight = (finalHeight + mOriginalHeight) / 2; + // Initialize the animations. This is a hack, redefining what "parent" // means to allow supplying the last and next size. In this definition // "%p" is the original (let's call it "previous") size, and "%" is the @@ -379,14 +385,14 @@ class ScreenRotationAnimation implements WindowManagerService.StepAnimator { if (firstStart) { if (DEBUG_STATE) Slog.v(TAG, "Initializing start and finish animations"); mStartEnterAnimation.initialize(finalWidth, finalHeight, - mOriginalWidth, mOriginalHeight); - mStartExitAnimation.initialize(finalWidth, finalHeight, + halfWidth, halfHeight); + mStartExitAnimation.initialize(halfWidth, halfHeight, mOriginalWidth, mOriginalHeight); mStartFrameAnimation.initialize(finalWidth, finalHeight, mOriginalWidth, mOriginalHeight); mFinishEnterAnimation.initialize(finalWidth, finalHeight, - mOriginalWidth, mOriginalHeight); - mFinishExitAnimation.initialize(finalWidth, finalHeight, + halfWidth, halfHeight); + mFinishExitAnimation.initialize(halfWidth, halfHeight, mOriginalWidth, mOriginalHeight); mFinishFrameAnimation.initialize(finalWidth, finalHeight, mOriginalWidth, mOriginalHeight); diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index 18b51a7..22949f3 100644 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -1535,7 +1535,7 @@ public class WindowManagerService extends IWindowManager.Stub } final boolean isWallpaperVisible(WindowState wallpaperTarget) { - if (DEBUG_WALLPAPER) Slog.v(TAG, "Wallpaper vis: target obscured=" + if (DEBUG_WALLPAPER) Slog.v(TAG, "Wallpaper vis: target " + wallpaperTarget + ", obscured=" + (wallpaperTarget != null ? Boolean.toString(wallpaperTarget.mObscured) : "??") + " anim=" + ((wallpaperTarget != null && wallpaperTarget.mAppToken != null) ? wallpaperTarget.mAppToken.animation : null) @@ -8239,6 +8239,7 @@ public class WindowManagerService extends IWindowManager.Stub if (!w.mAnimating) { // We set the animation above so it // is not yet running. + // TODO(cmautner): We lose the enter animation when this occurs. w.clearAnimation(); } } @@ -8342,9 +8343,6 @@ public class WindowManagerService extends IWindowManager.Stub // cases while they are hidden such as when first showing a // window. - if (mScreenRotationAnimation != null) { - mScreenRotationAnimation.updateSurfaces(); - } boolean displayed = false; w.computeShownFrameLocked(); @@ -8852,6 +8850,10 @@ public class WindowManagerService extends IWindowManager.Stub mInnerFields.mDimming = false; mInnerFields.mSyswin = false; + if (mScreenRotationAnimation != null) { + mScreenRotationAnimation.updateSurfaces(); + } + final int N = mWindows.size(); for (i=N-1; i>=0; i--) { diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java index b9ee660..167746f 100644 --- a/services/java/com/android/server/wm/WindowState.java +++ b/services/java/com/android/server/wm/WindowState.java @@ -304,6 +304,11 @@ final class WindowState implements WindowManagerPolicy.WindowState, int mAnimDw; int mAnimDh; + static final int ANIM_STATE_IDLE = 0; + static final int ANIM_STATE_RUNNING = 1; + static final int ANIM_STATE_STOPPING = 2; + int mAnimState = ANIM_STATE_IDLE; + WindowState(WindowManagerService service, Session s, IWindow c, WindowToken token, WindowState attachedWindow, int seq, WindowManager.LayoutParams a, int viewVisibility) { @@ -640,6 +645,7 @@ final class WindowState implements WindowManagerPolicy.WindowState, mLocalAnimating = false; mAnimation.cancel(); mAnimation = null; + mAnimState = ANIM_STATE_IDLE; } } @@ -651,6 +657,7 @@ final class WindowState implements WindowManagerPolicy.WindowState, mAnimation.cancel(); mAnimation = null; destroySurfaceLocked(); + mAnimState = ANIM_STATE_IDLE; } mExiting = false; } @@ -968,6 +975,7 @@ final class WindowState implements WindowManagerPolicy.WindowState, mAnimation = null; // Make sure we clean up the animation. mAnimating = true; + mAnimState = ANIM_STATE_IDLE; } mService.mFinishedStarting.add(mAppToken); mService.mH.sendEmptyMessage(H.FINISHED_STARTING); @@ -980,7 +988,7 @@ final class WindowState implements WindowManagerPolicy.WindowState, @Override public boolean stepAnimation(long currentTime) { - if ((mAnimation == null) || !mLocalAnimating) { + if ((mAnimation == null) || !mLocalAnimating || (mAnimState != ANIM_STATE_RUNNING)) { return false; } mTransformation.clear(); @@ -989,8 +997,7 @@ final class WindowState implements WindowManagerPolicy.WindowState, WindowManagerService.TAG, "Stepped animation in " + this + ": more=" + more + ", xform=" + mTransformation); if (!more) { - mAnimation.cancel(); - mAnimation = null; + mAnimState = ANIM_STATE_STOPPING; } return more; } @@ -1018,8 +1025,10 @@ final class WindowState implements WindowManagerPolicy.WindowState, mAnimation.setStartTime(currentTime); mLocalAnimating = true; mAnimating = true; + mAnimState = ANIM_STATE_RUNNING; } - if ((mAnimation != null) && mLocalAnimating) { + if ((mAnimation != null) && mLocalAnimating && + (mAnimState != ANIM_STATE_STOPPING)) { return true; } if (WindowManagerService.DEBUG_ANIM) Slog.v( @@ -1120,6 +1129,7 @@ final class WindowState implements WindowManagerPolicy.WindowState, mAppToken.updateReportedVisibilityLocked(); } + mAnimState = ANIM_STATE_IDLE; return false; } @@ -1305,12 +1315,15 @@ final class WindowState implements WindowManagerPolicy.WindowState, } if (WindowManagerService.localLOGV) Slog.v( - WindowManagerService.TAG, "Continuing animation in " + this + + WindowManagerService.TAG, "computeShownFrameLocked: Animating " + this + ": " + mShownFrame + - ", alpha=" + mTransformation.getAlpha()); + ", alpha=" + mTransformation.getAlpha() + ", mShownAlpha=" + mShownAlpha); return; } + if (WindowManagerService.localLOGV) Slog.v( + WindowManagerService.TAG, "computeShownFrameLocked: " + this + + " not attached, mAlpha=" + mAlpha); mShownFrame.set(mFrame); if (mXOffset != 0 || mYOffset != 0) { mShownFrame.offset(mXOffset, mYOffset); @@ -1428,13 +1441,11 @@ final class WindowState implements WindowManagerPolicy.WindowState, mService.mNextAppTransition != WindowManagerPolicy.TRANSIT_UNSET) { return false; } - final AppWindowToken atoken = mAppToken; - final boolean animating = atoken != null - ? (atoken.animation != null) : false; return mSurface != null && mPolicyVisibility && !mDestroying && ((!mAttachedHidden && mViewVisibility == View.VISIBLE && !mRootToken.hidden) - || mAnimation != null || animating); + || mAnimation != null + || ((mAppToken != null) && (mAppToken.animation != null))); } /** Is the window or its container currently animating? */ diff --git a/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java index e863f8b..b4fd55e 100644 --- a/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java @@ -32,6 +32,7 @@ import static android.net.TrafficStats.KB_IN_BYTES; import static android.net.TrafficStats.MB_IN_BYTES; import static android.text.format.DateUtils.DAY_IN_MILLIS; import static android.text.format.DateUtils.MINUTE_IN_MILLIS; +import static android.text.format.Time.TIMEZONE_UTC; import static com.android.server.net.NetworkPolicyManagerService.TYPE_LIMIT; import static com.android.server.net.NetworkPolicyManagerService.TYPE_LIMIT_SNOOZED; import static com.android.server.net.NetworkPolicyManagerService.TYPE_WARNING; @@ -439,7 +440,7 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { final long expectedCycle = parseTime("2007-11-05T00:00:00.000Z"); final NetworkPolicy policy = new NetworkPolicy( - sTemplateWifi, 5, 1024L, 1024L, false); + sTemplateWifi, 5, TIMEZONE_UTC, 1024L, 1024L, false); final long actualCycle = computeLastCycleBoundary(currentTime, policy); assertTimeEquals(expectedCycle, actualCycle); } @@ -450,7 +451,7 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { final long expectedCycle = parseTime("2007-10-20T00:00:00.000Z"); final NetworkPolicy policy = new NetworkPolicy( - sTemplateWifi, 20, 1024L, 1024L, false); + sTemplateWifi, 20, TIMEZONE_UTC, 1024L, 1024L, false); final long actualCycle = computeLastCycleBoundary(currentTime, policy); assertTimeEquals(expectedCycle, actualCycle); } @@ -461,7 +462,7 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { final long expectedCycle = parseTime("2007-01-30T00:00:00.000Z"); final NetworkPolicy policy = new NetworkPolicy( - sTemplateWifi, 30, 1024L, 1024L, false); + sTemplateWifi, 30, TIMEZONE_UTC, 1024L, 1024L, false); final long actualCycle = computeLastCycleBoundary(currentTime, policy); assertTimeEquals(expectedCycle, actualCycle); } @@ -472,14 +473,53 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { final long expectedCycle = parseTime("2007-02-28T23:59:59.000Z"); final NetworkPolicy policy = new NetworkPolicy( - sTemplateWifi, 30, 1024L, 1024L, false); + sTemplateWifi, 30, TIMEZONE_UTC, 1024L, 1024L, false); final long actualCycle = computeLastCycleBoundary(currentTime, policy); assertTimeEquals(expectedCycle, actualCycle); } + public void testCycleBoundaryLeapYear() throws Exception { + final NetworkPolicy policy = new NetworkPolicy( + sTemplateWifi, 29, TIMEZONE_UTC, 1024L, 1024L, false); + + assertTimeEquals(parseTime("2012-01-29T00:00:00.000Z"), + computeNextCycleBoundary(parseTime("2012-01-14T00:00:00.000Z"), policy)); + assertTimeEquals(parseTime("2012-02-29T00:00:00.000Z"), + computeNextCycleBoundary(parseTime("2012-02-14T00:00:00.000Z"), policy)); + assertTimeEquals(parseTime("2012-02-29T00:00:00.000Z"), + computeLastCycleBoundary(parseTime("2012-03-14T00:00:00.000Z"), policy)); + assertTimeEquals(parseTime("2012-03-29T00:00:00.000Z"), + computeNextCycleBoundary(parseTime("2012-03-14T00:00:00.000Z"), policy)); + + assertTimeEquals(parseTime("2007-01-29T00:00:00.000Z"), + computeNextCycleBoundary(parseTime("2007-01-14T00:00:00.000Z"), policy)); + assertTimeEquals(parseTime("2007-02-28T23:59:59.000Z"), + computeNextCycleBoundary(parseTime("2007-02-14T00:00:00.000Z"), policy)); + assertTimeEquals(parseTime("2007-02-28T23:59:59.000Z"), + computeLastCycleBoundary(parseTime("2007-03-14T00:00:00.000Z"), policy)); + assertTimeEquals(parseTime("2007-03-29T00:00:00.000Z"), + computeNextCycleBoundary(parseTime("2007-03-14T00:00:00.000Z"), policy)); + } + + public void testNextCycleTimezoneAfterUtc() throws Exception { + // US/Central is UTC-6 + final NetworkPolicy policy = new NetworkPolicy( + sTemplateWifi, 10, "US/Central", 1024L, 1024L, false); + assertTimeEquals(parseTime("2012-01-10T06:00:00.000Z"), + computeNextCycleBoundary(parseTime("2012-01-05T00:00:00.000Z"), policy)); + } + + public void testNextCycleTimezoneBeforeUtc() throws Exception { + // Israel is UTC+2 + final NetworkPolicy policy = new NetworkPolicy( + sTemplateWifi, 10, "Israel", 1024L, 1024L, false); + assertTimeEquals(parseTime("2012-01-09T22:00:00.000Z"), + computeNextCycleBoundary(parseTime("2012-01-05T00:00:00.000Z"), policy)); + } + public void testNextCycleSane() throws Exception { final NetworkPolicy policy = new NetworkPolicy( - sTemplateWifi, 31, WARNING_DISABLED, LIMIT_DISABLED, false); + sTemplateWifi, 31, TIMEZONE_UTC, WARNING_DISABLED, LIMIT_DISABLED, false); final LinkedHashSet<Long> seen = new LinkedHashSet<Long>(); // walk forwards, ensuring that cycle boundaries don't get stuck @@ -494,7 +534,7 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { public void testLastCycleSane() throws Exception { final NetworkPolicy policy = new NetworkPolicy( - sTemplateWifi, 31, WARNING_DISABLED, LIMIT_DISABLED, false); + sTemplateWifi, 31, TIMEZONE_UTC, WARNING_DISABLED, LIMIT_DISABLED, false); final LinkedHashSet<Long> seen = new LinkedHashSet<Long>(); // walk backwards, ensuring that cycle boundaries look sane @@ -552,7 +592,7 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { replay(); setNetworkPolicies(new NetworkPolicy( - sTemplateWifi, CYCLE_DAY, 1 * MB_IN_BYTES, 2 * MB_IN_BYTES, false)); + sTemplateWifi, CYCLE_DAY, TIMEZONE_UTC, 1 * MB_IN_BYTES, 2 * MB_IN_BYTES, false)); future.get(); verifyAndReset(); } @@ -609,8 +649,8 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { future = expectMeteredIfacesChanged(); replay(); - setNetworkPolicies(new NetworkPolicy(sTemplateWifi, CYCLE_DAY, 1 * MB_IN_BYTES, - 2 * MB_IN_BYTES, false)); + setNetworkPolicies(new NetworkPolicy(sTemplateWifi, CYCLE_DAY, TIMEZONE_UTC, 1 + * MB_IN_BYTES, 2 * MB_IN_BYTES, false)); future.get(); verifyAndReset(); } @@ -740,8 +780,9 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { future = expectMeteredIfacesChanged(TEST_IFACE); replay(); - setNetworkPolicies(new NetworkPolicy(sTemplateWifi, CYCLE_DAY, WARNING_DISABLED, - LIMIT_DISABLED, true)); + setNetworkPolicies(new NetworkPolicy( + sTemplateWifi, CYCLE_DAY, TIMEZONE_UTC, WARNING_DISABLED, LIMIT_DISABLED, + true)); future.get(); verifyAndReset(); } diff --git a/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java b/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java index 6f85c7d..983c349 100644 --- a/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java +++ b/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java @@ -39,30 +39,6 @@ import java.util.Locale; * The formatting will be restarted once the text is cleared. */ public class PhoneNumberFormattingTextWatcher implements TextWatcher { - /** - * One or more characters were removed from the end. - */ - private final static int STATE_REMOVE_LAST = 0; - - /** - * One or more characters were appended. - */ - private final static int STATE_APPEND = 1; - - /** - * One or more digits were changed in the beginning or the middle of text. - */ - private final static int STATE_MODIFY_DIGITS = 2; - - /** - * The changes other than the above. - */ - private final static int STATE_OTHER = 3; - - /** - * The state of this change could be one value of the above - */ - private int mState; /** * Indicates the change was caused by ourselves. @@ -97,46 +73,30 @@ public class PhoneNumberFormattingTextWatcher implements TextWatcher { mFormatter = PhoneNumberUtil.getInstance().getAsYouTypeFormatter(countryCode); } + @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { if (mSelfChange || mStopFormatting) { return; } - if (count == 0 && s.length() == start) { - // Append one or more new chars - mState = STATE_APPEND; - } else if (after == 0 && start + count == s.length() && count > 0) { - // Remove one or more chars from the end of string. - mState = STATE_REMOVE_LAST; - } else if (count > 0 && !hasSeparator(s, start, count)) { - // Remove the dialable chars in the begin or middle of text. - mState = STATE_MODIFY_DIGITS; - } else { - mState = STATE_OTHER; + // If the user manually deleted any non-dialable characters, stop formatting + if (count > 0 && hasSeparator(s, start, count)) { + stopFormatting(); } } + @Override public void onTextChanged(CharSequence s, int start, int before, int count) { if (mSelfChange || mStopFormatting) { return; } - if (mState == STATE_OTHER) { - if (count > 0 && !hasSeparator(s, start, count)) { - // User inserted the dialable characters in the middle of text. - mState = STATE_MODIFY_DIGITS; - } - } - // Check whether we should stop formatting. - if (mState == STATE_APPEND && count > 0 && hasSeparator(s, start, count)) { - // User appended the non-dialable character, stop formatting. - stopFormatting(); - } else if (mState == STATE_OTHER) { - // User must insert or remove the non-dialable characters in the begin or middle of - // number, stop formatting. + // If the user inserted any non-dialable characters, stop formatting + if (count > 0 && hasSeparator(s, start, count)) { stopFormatting(); } } + @Override public synchronized void afterTextChanged(Editable s) { if (mStopFormatting) { // Restart the formatting when all texts were clear. diff --git a/telephony/tests/telephonytests/src/com/android/internal/telephony/PhoneNumberWatcherTest.java b/telephony/tests/telephonytests/src/com/android/internal/telephony/PhoneNumberWatcherTest.java index 6f0175e..a6a0fce 100644 --- a/telephony/tests/telephonytests/src/com/android/internal/telephony/PhoneNumberWatcherTest.java +++ b/telephony/tests/telephonytests/src/com/android/internal/telephony/PhoneNumberWatcherTest.java @@ -182,14 +182,17 @@ public class PhoneNumberWatcherTest extends AndroidTestCase { public void testTextChangedByOtherTextWatcher() { final TextWatcher cleanupTextWatcher = new TextWatcher() { + @Override public void afterTextChanged(Editable s) { s.clear(); } + @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } + @Override public void onTextChanged(CharSequence s, int start, int before, int count) { } @@ -208,6 +211,81 @@ public class PhoneNumberWatcherTest extends AndroidTestCase { assertEquals(expected1, number.toString()); } + /** + * Test the case where some other component is auto-completing what the user is typing + */ + public void testAutoCompleteWithFormattedNumber() { + String init = "650-1"; + String expected = "+1-650-123-4567"; // Different formatting than ours + testReplacement(init, expected, expected); + } + + /** + * Test the case where some other component is auto-completing what the user is typing + */ + public void testAutoCompleteWithFormattedNameAndNumber() { + String init = "650-1"; + String expected = "Test User <650-123-4567>"; + testReplacement(init, expected, expected); + } + + /** + * Test the case where some other component is auto-completing what the user is typing + */ + public void testAutoCompleteWithNumericNameAndNumber() { + String init = "650"; + String expected = "2nd Test User <650-123-4567>"; + testReplacement(init, expected, expected); + } + + /** + * Test the case where some other component is auto-completing what the user is typing + */ + public void testAutoCompleteWithUnformattedNumber() { + String init = "650-1"; + String expected = "6501234567"; + testReplacement(init, expected, expected); + } + + /** + * Test the case where some other component is auto-completing what the user is typing, where + * the deleted text doesn't have any formatting and neither does the replacement text: in this + * case the replacement text should be formatted by the PhoneNumberFormattingTextWatcher. + */ + public void testAutoCompleteUnformattedWithUnformattedNumber() { + String init = "650"; + String replacement = "6501234567"; + String expected = "(650) 123-4567"; + testReplacement(init, replacement, expected); + + String init2 = "650"; + String replacement2 = "16501234567"; + String expected2 = "1 650-123-4567"; + testReplacement(init2, replacement2, expected2); + } + + /** + * Helper method for testing replacing the entire string with another string + * @param init The initial string + * @param expected + */ + private void testReplacement(String init, String replacement, String expected) { + TextWatcher textWatcher = getTextWatcher(); + + SpannableStringBuilder number = new SpannableStringBuilder(init); + + // Replace entire text with the given values + textWatcher.beforeTextChanged(number, 0, init.length(), replacement.length()); + number.replace(0, init.length(), replacement, 0, replacement.length()); + Selection.setSelection(number, replacement.length()); // move the cursor to the end + textWatcher.onTextChanged(number, 0, init.length(), replacement.length()); + textWatcher.afterTextChanged(number); + + assertEquals(expected, number.toString()); + // the cursor should be still at the end + assertEquals(expected.length(), Selection.getSelectionEnd(number)); + } + private TextWatcher getTextWatcher() { return new PhoneNumberFormattingTextWatcher("US"); } |