Merge "Do not turn safe volume on upon headset connection" into jb-mr1-dev
diff --git a/api/current.txt b/api/current.txt
index 90d79a4..ac27f03 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -3848,6 +3848,7 @@
method public android.app.Notification.Builder setOnlyAlertOnce(boolean);
method public android.app.Notification.Builder setPriority(int);
method public android.app.Notification.Builder setProgress(int, int, boolean);
+ method public android.app.Notification.Builder setShowWhen(boolean);
method public android.app.Notification.Builder setSmallIcon(int);
method public android.app.Notification.Builder setSmallIcon(int, int);
method public android.app.Notification.Builder setSound(android.net.Uri);
@@ -10654,7 +10655,7 @@
method public int describeContents();
method public static void distanceBetween(double, double, double, double, float[]);
method public float distanceTo(android.location.Location);
- method public deprecated void dump(android.util.Printer, java.lang.String);
+ method public void dump(android.util.Printer, java.lang.String);
method public float getAccuracy();
method public double getAltitude();
method public float getBearing();
@@ -16592,6 +16593,7 @@
public class UserManager {
method public java.lang.String getUserName();
+ method public boolean isUserAGoat();
}
public abstract class Vibrator {
@@ -18430,7 +18432,9 @@
field public static final deprecated java.lang.String INTENT_ACTION_MUSIC_PLAYER = "android.intent.action.MUSIC_PLAYER";
field public static final java.lang.String INTENT_ACTION_STILL_IMAGE_CAMERA = "android.media.action.STILL_IMAGE_CAMERA";
field public static final java.lang.String INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE = "android.media.action.STILL_IMAGE_CAMERA_SECURE";
+ field public static final java.lang.String INTENT_ACTION_TEXT_OPEN_FROM_SEARCH = "android.media.action.TEXT_OPEN_FROM_SEARCH";
field public static final java.lang.String INTENT_ACTION_VIDEO_CAMERA = "android.media.action.VIDEO_CAMERA";
+ field public static final java.lang.String INTENT_ACTION_VIDEO_PLAY_FROM_SEARCH = "android.media.action.VIDEO_PLAY_FROM_SEARCH";
field public static final java.lang.String MEDIA_IGNORE_FILENAME = ".nomedia";
field public static final java.lang.String MEDIA_SCANNER_VOLUME = "volume";
field public static final java.lang.String UNKNOWN_STRING = "<unknown>";
@@ -20270,8 +20274,11 @@
method public void finish();
method public android.view.Window getWindow();
method public android.view.WindowManager getWindowManager();
+ method public boolean isFullscreen();
method public boolean isInteractive();
- method protected void lightsOut();
+ method public boolean isLowProfile();
+ method public boolean isScreenBright();
+ method protected deprecated void lightsOut();
method public void onActionModeFinished(android.view.ActionMode);
method public void onActionModeStarted(android.view.ActionMode);
method public void onAttachedToWindow();
@@ -20292,11 +20299,14 @@
method public void setContentView(int);
method public void setContentView(android.view.View);
method public void setContentView(android.view.View, android.view.ViewGroup.LayoutParams);
+ method public void setFullscreen(boolean);
method public void setInteractive(boolean);
+ method public void setLowProfile(boolean);
+ method public void setScreenBright(boolean);
field public static final java.lang.String ACTION_DREAMING_STARTED = "android.intent.action.DREAMING_STARTED";
field public static final java.lang.String ACTION_DREAMING_STOPPED = "android.intent.action.DREAMING_STOPPED";
+ field public static final java.lang.String CATEGORY_DREAM = "android.intent.category.DREAM";
field public static final java.lang.String METADATA_NAME_CONFIG_ACTIVITY = "android.service.dreams.config_activity";
- field public static final java.lang.String SERVICE_INTERFACE = "android.service.dreams.Dream";
}
}
@@ -28958,6 +28968,7 @@
method public int describeContents();
method public int getLayoutId();
method public java.lang.String getPackage();
+ method public void mergeRemoteViews(android.widget.RemoteViews);
method public boolean onLoadClass(java.lang.Class);
method public void reapply(android.content.Context, android.view.View);
method public void removeAllViews(int);
diff --git a/cmds/pm/src/com/android/commands/pm/Pm.java b/cmds/pm/src/com/android/commands/pm/Pm.java
index e0f54fb..5f898c2 100644
--- a/cmds/pm/src/com/android/commands/pm/Pm.java
+++ b/cmds/pm/src/com/android/commands/pm/Pm.java
@@ -1025,7 +1025,7 @@
public void runListUsers() {
try {
- List<UserInfo> users = mUm.getUsers();
+ List<UserInfo> users = mUm.getUsers(false);
if (users == null) {
System.err.println("Error: couldn't get users");
} else {
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 7896450..17c2c6b 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -951,6 +951,7 @@
private ArrayList<Action> mActions = new ArrayList<Action>(MAX_ACTION_BUTTONS);
private boolean mUseChronometer;
private Style mStyle;
+ private boolean mShowWhen = true;
/**
* Constructs a new Builder with the defaults:
@@ -982,8 +983,9 @@
/**
* Add a timestamp pertaining to the notification (usually the time the event occurred).
+ * It will be shown in the notification content view by default; use
+ * {@link Builder#setShowWhen(boolean) setShowWhen} to control this.
*
-
* @see Notification#when
*/
public Builder setWhen(long when) {
@@ -992,6 +994,15 @@
}
/**
+ * Control whether the timestamp set with {@link Builder#setWhen(long) setWhen} is shown
+ * in the content view.
+ */
+ public Builder setShowWhen(boolean show) {
+ mShowWhen = show;
+ return this;
+ }
+
+ /**
* Show the {@link Notification#when} field as a stopwatch.
*
* Instead of presenting <code>when</code> as a timestamp, the notification will show an
@@ -1467,7 +1478,7 @@
contentView.setViewPadding(R.id.line1, 0, 0, 0, 0);
}
- if (mWhen != 0) {
+ if (mWhen != 0 && mShowWhen) {
if (mUseChronometer) {
contentView.setViewVisibility(R.id.chronometer, View.VISIBLE);
contentView.setLong(R.id.chronometer, "setBase",
@@ -1477,7 +1488,10 @@
contentView.setViewVisibility(R.id.time, View.VISIBLE);
contentView.setLong(R.id.time, "setTime", mWhen);
}
+ } else {
+ contentView.setViewVisibility(R.id.time, View.GONE);
}
+
contentView.setViewVisibility(R.id.line3, showLine3 ? View.VISIBLE : View.GONE);
contentView.setViewVisibility(R.id.overflow_divider, showLine3 ? View.VISIBLE : View.GONE);
return contentView;
diff --git a/core/java/android/app/Presentation.java b/core/java/android/app/Presentation.java
index eb5a652..b5e5244 100644
--- a/core/java/android/app/Presentation.java
+++ b/core/java/android/app/Presentation.java
@@ -32,24 +32,26 @@
/**
* Base class for presentations.
- *
+ * <p>
* A presentation is a special kind of dialog whose purpose is to present
* content on a secondary display. A {@link Presentation} is associated with
* the target {@link Display} at creation time and configures its context and
* resource configuration according to the display's metrics.
- *
+ * </p><p>
* Notably, the {@link Context} of a presentation is different from the context
* of its containing {@link Activity}. It is important to inflate the layout
* of a presentation and load other resources using the presentation's own context
* to ensure that assets of the correct size and density for the target display
* are loaded.
- *
+ * </p><p>
* A presentation is automatically canceled (see {@link Dialog#cancel()}) when
* the display to which it is attached is removed. An activity should take
* care of pausing and resuming whatever content is playing within the presentation
- * whenever the activity itself is paused or resume.
+ * whenever the activity itself is paused or resumed.
+ * </p>
*
- * @see {@link DisplayManager} for information on how to enumerate displays.
+ * @see DisplayManager for information on how to enumerate displays and receive
+ * notifications when displays are added or removed.
*/
public class Presentation extends Dialog {
private static final String TAG = "Presentation";
diff --git a/core/java/android/appwidget/AppWidgetManager.java b/core/java/android/appwidget/AppWidgetManager.java
index 6fb6dc4..888955c 100644
--- a/core/java/android/appwidget/AppWidgetManager.java
+++ b/core/java/android/appwidget/AppWidgetManager.java
@@ -436,10 +436,9 @@
*
* This update differs from {@link #updateAppWidget(int[], RemoteViews)} in that the
* RemoteViews object which is passed is understood to be an incomplete representation of the
- * widget, and hence is not cached by the AppWidgetService. Note that because these updates are
- * not cached, any state that they modify that is not restored by restoreInstanceState will not
- * persist in the case that the widgets are restored using the cached version in
- * AppWidgetService.
+ * widget, and hence does not replace the cached representation of the widget. As of API
+ * level 17, the new properties set within the views objects will be appended to the cached
+ * representation of the widget, and hence will persist.
*
* Use with {@link RemoteViews#showNext(int)}, {@link RemoteViews#showPrevious(int)},
* {@link RemoteViews#setScrollPosition(int, int)} and similar commands.
diff --git a/core/java/android/content/pm/UserInfo.java b/core/java/android/content/pm/UserInfo.java
index a06aba9..ab32523 100644
--- a/core/java/android/content/pm/UserInfo.java
+++ b/core/java/android/content/pm/UserInfo.java
@@ -68,6 +68,8 @@
public String name;
public String iconPath;
public int flags;
+ public long creationTime;
+ public long lastLoggedInTime;
public UserInfo(int id, String name, int flags) {
this(id, name, null, flags);
@@ -101,6 +103,8 @@
id = orig.id;
flags = orig.flags;
serialNumber = orig.serialNumber;
+ creationTime = orig.creationTime;
+ lastLoggedInTime = orig.lastLoggedInTime;
}
public UserHandle getUserHandle() {
@@ -122,6 +126,8 @@
dest.writeString(iconPath);
dest.writeInt(flags);
dest.writeInt(serialNumber);
+ dest.writeLong(creationTime);
+ dest.writeLong(lastLoggedInTime);
}
public static final Parcelable.Creator<UserInfo> CREATOR
@@ -140,5 +146,7 @@
iconPath = source.readString();
flags = source.readInt();
serialNumber = source.readInt();
+ creationTime = source.readLong();
+ lastLoggedInTime = source.readLong();
}
}
diff --git a/core/java/android/os/IUserManager.aidl b/core/java/android/os/IUserManager.aidl
index 0798913..ec02ae0 100644
--- a/core/java/android/os/IUserManager.aidl
+++ b/core/java/android/os/IUserManager.aidl
@@ -30,7 +30,7 @@
void setUserName(int userHandle, String name);
void setUserIcon(int userHandle, in Bitmap icon);
Bitmap getUserIcon(int userHandle);
- List<UserInfo> getUsers();
+ List<UserInfo> getUsers(boolean excludeDying);
UserInfo getUserInfo(int userHandle);
void setGuestEnabled(boolean enable);
boolean isGuestEnabled();
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index b532966..96c96d7 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -72,6 +72,15 @@
}
}
+ /**
+ * Used to determine whether the user making this call is subject to
+ * teleportations.
+ * @return whether the user making this call is a goat
+ */
+ public boolean isUserAGoat() {
+ return false;
+ }
+
/**
* Returns the UserInfo object describing a specific user.
* Requires {@link android.Manifest.permission#MANAGE_USERS} permission.
@@ -116,7 +125,23 @@
*/
public List<UserInfo> getUsers() {
try {
- return mService.getUsers();
+ return mService.getUsers(false);
+ } catch (RemoteException re) {
+ Log.w(TAG, "Could not get user list", re);
+ return null;
+ }
+ }
+
+ /**
+ * Returns information for all users on this device.
+ * Requires {@link android.Manifest.permission#MANAGE_USERS} permission.
+ * @param excludeDying specify if the list should exclude users being removed.
+ * @return the list of users that were created.
+ * @hide
+ */
+ public List<UserInfo> getUsers(boolean excludeDying) {
+ try {
+ return mService.getUsers(excludeDying);
} catch (RemoteException re) {
Log.w(TAG, "Could not get user list", re);
return null;
@@ -271,6 +296,4 @@
}
return -1;
}
-
-
}
diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java
index 3c2d164..3c90f1c 100644
--- a/core/java/android/provider/MediaStore.java
+++ b/core/java/android/provider/MediaStore.java
@@ -122,6 +122,38 @@
"android.media.action.MEDIA_PLAY_FROM_SEARCH";
/**
+ * An intent to perform a search for readable media and automatically play content from the
+ * result when possible. This can be fired, for example, by the result of a voice recognition
+ * command to read a book or magazine.
+ * <p>
+ * Contains the {@link android.app.SearchManager#QUERY} extra, which is a string that can
+ * contain any type of unstructured text search, like the name of a book or magazine, an author
+ * a genre, a publisher, or any combination of these.
+ * <p>
+ * Because this intent includes an open-ended unstructured search string, it makes the most
+ * sense for apps that can support large-scale search of text media, such as services connected
+ * to an online database of books and/or magazines which can be read on the device.
+ */
+ public static final String INTENT_ACTION_TEXT_OPEN_FROM_SEARCH =
+ "android.media.action.TEXT_OPEN_FROM_SEARCH";
+
+ /**
+ * An intent to perform a search for video media and automatically play content from the
+ * result when possible. This can be fired, for example, by the result of a voice recognition
+ * command to play movies.
+ * <p>
+ * Contains the {@link android.app.SearchManager#QUERY} extra, which is a string that can
+ * contain any type of unstructured video search, like the name of a movie, one or more actors,
+ * a genre, or any combination of these.
+ * <p>
+ * Because this intent includes an open-ended unstructured search string, it makes the most
+ * sense for apps that can support large-scale search of video, such as services connected to an
+ * online database of videos which can be streamed and played on the device.
+ */
+ public static final String INTENT_ACTION_VIDEO_PLAY_FROM_SEARCH =
+ "android.media.action.VIDEO_PLAY_FROM_SEARCH";
+
+ /**
* The name of the Intent-extra used to define the artist
*/
public static final String EXTRA_MEDIA_ARTIST = "android.intent.extra.artist";
@@ -206,6 +238,29 @@
public final static String ACTION_IMAGE_CAPTURE = "android.media.action.IMAGE_CAPTURE";
/**
+ * Intent action that can be sent to have the camera application capture an image and return
+ * it when the device is secured (e.g. with a pin, password, pattern, or face unlock).
+ * Applications responding to this intent must not expose any personal content like existing
+ * photos or videos on the device. The applications should be careful not to share any photo
+ * or video with other applications or internet. The activity should use {@link
+ * android.view.WindowManager.LayoutParams#FLAG_SHOW_WHEN_LOCKED} to display on top of the
+ * lock screen while secured. There is no activity stack when this flag is used, so
+ * launching more than one activity is strongly discouraged.
+ * <p>
+ * The caller may pass an extra EXTRA_OUTPUT to control where this image will be written.
+ * If the EXTRA_OUTPUT is not present, then a small sized image is returned as a Bitmap
+ * object in the extra field. This is useful for applications that only need a small image.
+ * If the EXTRA_OUTPUT is present, then the full-sized image will be written to the Uri
+ * value of EXTRA_OUTPUT.
+ *
+ * @see #ACTION_IMAGE_CAPTURE
+ * @see #EXTRA_OUTPUT
+ * @hide
+ */
+ public static final String ACTION_IMAGE_CAPTURE_SECURE =
+ "android.media.action.IMAGE_CAPTURE_SECURE";
+
+ /**
* Standard Intent action that can be sent to have the camera application
* capture a video and return it.
* <p>
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index cc9abff..7864302 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -3219,8 +3219,8 @@
* Id of the time appwidget on the lockscreen, or -1 if none
* @hide
*/
- public static final String LOCK_SCREEN_CLOCK_APPWIDGET_ID =
- "lock_screen_clock_appwidget_id";
+ public static final String LOCK_SCREEN_STATUS_APPWIDGET_ID =
+ "lock_screen_status_appwidget_id";
/**
* Id of the user-selected appwidget on the lockscreen, or -1 if none
@@ -5334,26 +5334,35 @@
* review apps prior to installation.
* 1 = request apps to be verified prior to installation, if a verifier exists.
* 0 = do not verify apps before installation
- * {@hide}
+ * @hide
*/
public static final String PACKAGE_VERIFIER_ENABLE = "package_verifier_enable";
/** Timeout for package verification.
- * {@hide} */
+ * @hide */
public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout";
/** Default response code for package verification.
- * {@hide} */
+ * @hide */
public static final String PACKAGE_VERIFIER_DEFAULT_RESPONSE = "verifier_default_response";
- /** Show package verification setting in the Settings app.
+ /**
+ * Show package verification setting in the Settings app.
* 1 = show (default)
* 0 = hide
- * {@hide}
+ * @hide
*/
public static final String PACKAGE_VERIFIER_SETTING_VISIBLE = "verifier_setting_visible";
/**
+ * Run package verificaiton on apps installed through ADB/ADT/USB
+ * 1 = perform package verification on ADB installs (default)
+ * 0 = bypass package verification on ADB installs
+ * @hide
+ */
+ public static final String PACKAGE_VERIFIER_INCLUDE_ADB = "verifier_verify_adb_installs";
+
+ /**
* The interval in milliseconds at which to check packet counts on the
* mobile data interface when screen is on, to detect possible data
* connection problems.
diff --git a/core/java/android/service/dreams/Dream.java b/core/java/android/service/dreams/Dream.java
index 4a23d39..dedfb0c 100644
--- a/core/java/android/service/dreams/Dream.java
+++ b/core/java/android/service/dreams/Dream.java
@@ -44,22 +44,47 @@
* <p>Dreams are interactive screensavers launched when a charging device is idle, or docked in a
* desk dock. Dreams provide another modality for apps to express themselves, tailored for
* an exhibition/lean-back experience.</p>
+ *
+ * <p>Dreams should be declared in the manifest as follows:</p>
+ * <pre>
+ * {@code
+ * <service
+ * android:name=".MyDream"
+ * android:exported="true"
+ * android:icon="@drawable/my_icon"
+ * android:label="@string/my_dream_label" >
+ *
+ * <intent-filter>
+ * <action android:name="android.intent.action.MAIN" />
+ * <category android:name="android.intent.category.DREAM" />
+ * </intent-filter>
+ *
+ * <!-- Point to configuration activity for this dream (optional) -->
+ * <meta-data
+ * android:name="android.service.dreams.config_activity"
+ * android:value="com.example.mypackage/com.example.mypackage.MyDreamSettingsActivity" />
+ * </service>
+ * }
+ * </pre>
*/
public class Dream extends Service implements Window.Callback {
private final static boolean DEBUG = true;
private final String TAG = Dream.class.getSimpleName() + "[" + getClass().getSimpleName() + "]";
/**
- * The {@link Intent} that must be declared as handled by the service.
- * To be supported, the service must also require the
- * {@link android.Manifest.permission#BIND_WALLPAPER} permission so
- * that other applications can not abuse it.
+ * Used with {@link Intent#ACTION_MAIN} to declare the necessary intent-filter for a dream.
+ *
+ * @see Dream
*/
- @SdkConstant(SdkConstantType.SERVICE_ACTION)
- public static final String SERVICE_INTERFACE =
- "android.service.dreams.Dream";
+ @SdkConstant(SdkConstantType.INTENT_CATEGORY)
+ public static final String CATEGORY_DREAM =
+ "android.intent.category.DREAM";
- /** Service meta-data key for declaring an optional configuration activity. */
+ /**
+ * Service meta-data key for declaring an optional configuration activity.
+ *
+ * @see Dream
+ * */
public static final String METADATA_NAME_CONFIG_ACTIVITY =
"android.service.dreams.config_activity";
@@ -86,10 +111,14 @@
private Window mWindow;
private WindowManager mWindowManager;
private IDreamManager mSandman;
- private boolean mInteractive;
+ private boolean mInteractive = false;
+ private boolean mLowProfile = true;
+ private boolean mFullscreen = false;
+ private boolean mScreenBright = false;
private boolean mFinished;
// begin Window.Callback methods
+ /** {@inheritDoc} */
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
// TODO: create more flexible version of mInteractive that allows use of KEYCODE_BACK
@@ -105,6 +134,7 @@
return mWindow.superDispatchKeyEvent(event);
}
+ /** {@inheritDoc} */
@Override
public boolean dispatchKeyShortcutEvent(KeyEvent event) {
if (!mInteractive) {
@@ -115,6 +145,7 @@
return mWindow.superDispatchKeyShortcutEvent(event);
}
+ /** {@inheritDoc} */
@Override
public boolean dispatchTouchEvent(MotionEvent event) {
// TODO: create more flexible version of mInteractive that allows clicks
@@ -127,6 +158,7 @@
return mWindow.superDispatchTouchEvent(event);
}
+ /** {@inheritDoc} */
@Override
public boolean dispatchTrackballEvent(MotionEvent event) {
if (!mInteractive) {
@@ -137,6 +169,7 @@
return mWindow.superDispatchTrackballEvent(event);
}
+ /** {@inheritDoc} */
@Override
public boolean dispatchGenericMotionEvent(MotionEvent event) {
if (!mInteractive) {
@@ -147,86 +180,112 @@
return mWindow.superDispatchGenericMotionEvent(event);
}
+ /** {@inheritDoc} */
@Override
public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
return false;
}
+ /** {@inheritDoc} */
@Override
public View onCreatePanelView(int featureId) {
return null;
}
+ /** {@inheritDoc} */
@Override
public boolean onCreatePanelMenu(int featureId, Menu menu) {
return false;
}
+ /** {@inheritDoc} */
@Override
public boolean onPreparePanel(int featureId, View view, Menu menu) {
return false;
}
+ /** {@inheritDoc} */
@Override
public boolean onMenuOpened(int featureId, Menu menu) {
return false;
}
+ /** {@inheritDoc} */
@Override
public boolean onMenuItemSelected(int featureId, MenuItem item) {
return false;
}
+ /** {@inheritDoc} */
@Override
public void onWindowAttributesChanged(LayoutParams attrs) {
-
}
+ /** {@inheritDoc} */
@Override
public void onContentChanged() {
-
}
+ /** {@inheritDoc} */
@Override
public void onWindowFocusChanged(boolean hasFocus) {
-
}
+ /** {@inheritDoc} */
@Override
public void onAttachedToWindow() {
}
+ /** {@inheritDoc} */
@Override
public void onDetachedFromWindow() {
}
+ /** {@inheritDoc} */
@Override
public void onPanelClosed(int featureId, Menu menu) {
}
+ /** {@inheritDoc} */
@Override
public boolean onSearchRequested() {
return false;
}
+ /** {@inheritDoc} */
@Override
public ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback callback) {
return null;
}
+ /** {@inheritDoc} */
@Override
public void onActionModeStarted(ActionMode mode) {
}
+ /** {@inheritDoc} */
@Override
public void onActionModeFinished(ActionMode mode) {
}
// end Window.Callback methods
+ // begin public api
+ /**
+ * Retrieves the current {@link android.view.WindowManager} for the dream.
+ * Behaves similarly to {@link android.app.Activity#getWindowManager()}.
+ *
+ * @return The current window manager, or null if the dream is not started.
+ */
public WindowManager getWindowManager() {
return mWindowManager;
}
+ /**
+ * Retrieves the current {@link android.view.Window} for the dream.
+ * Behaves similarly to {@link android.app.Activity#getWindow()}.
+ *
+ * @return The current window, or null if the dream is not started.
+ */
public Window getWindow() {
return mWindow;
}
@@ -235,6 +294,8 @@
* Inflates a layout resource and set it to be the content view for this Dream.
* Behaves similarly to {@link android.app.Activity#setContentView(int)}.
*
+ * <p>Note: Requires a window, do not call before {@link #onAttachedToWindow()}</p>
+ *
* @param layoutResID Resource ID to be inflated.
*
* @see #setContentView(android.view.View)
@@ -248,7 +309,8 @@
* Sets a view to be the content view for this Dream.
* Behaves similarly to {@link android.app.Activity#setContentView(android.view.View)},
* including using {@link ViewGroup.LayoutParams#MATCH_PARENT} as the layout height and width of the view.
- *
+ *
+ * <p>Note: Requires a window, do not call before {@link #onAttachedToWindow()}</p>
* @param view The desired content to display.
*
* @see #setContentView(int)
@@ -263,6 +325,8 @@
* Behaves similarly to
* {@link android.app.Activity#setContentView(android.view.View, android.view.ViewGroup.LayoutParams)}.
*
+ * <p>Note: Requires a window, do not call before {@link #onAttachedToWindow()}</p>
+ *
* @param view The desired content to display.
* @param params Layout parameters for the view.
*
@@ -275,7 +339,9 @@
/**
* Adds a view to the Dream's window, leaving other content views in place.
- *
+ *
+ * <p>Note: Requires a window, do not call before {@link #onAttachedToWindow()}</p>
+ *
* @param view The desired content to display.
* @param params Layout parameters for the view.
*/
@@ -284,6 +350,25 @@
}
/**
+ * Finds a view that was identified by the id attribute from the XML that
+ * was processed in {@link #onCreate}.
+ *
+ * <p>Note: Requires a window, do not call before {@link #onAttachedToWindow()}</p>
+ *
+ * @return The view if found or null otherwise.
+ */
+ public View findViewById(int id) {
+ return getWindow().findViewById(id);
+ }
+
+ /** FIXME remove once platform dreams are updated */
+ @Deprecated
+ protected void lightsOut() {
+ setLowProfile(true);
+ setFullscreen(true);
+ }
+
+ /**
* Marks this dream as interactive to receive input events.
*
* <p>Non-interactive dreams (default) will dismiss on the first input event.</p>
@@ -297,36 +382,79 @@
}
/**
- * Returns whether or not this dream is interactive.
+ * Returns whether or not this dream is interactive. Defaults to false.
+ *
+ * @see #setInteractive(boolean)
*/
public boolean isInteractive() {
return mInteractive;
}
- /** Convenience method for setting View.SYSTEM_UI_FLAG_LOW_PROFILE on the content view. */
- protected void lightsOut() {
- // turn the lights down low
- final View v = mWindow.getDecorView();
- if (v != null) {
- v.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE
- | View.SYSTEM_UI_FLAG_FULLSCREEN);
- }
+ /**
+ * Sets View.SYSTEM_UI_FLAG_LOW_PROFILE on the content view.
+ *
+ * @param lowProfile True to set View.SYSTEM_UI_FLAG_LOW_PROFILE
+ */
+ public void setLowProfile(boolean lowProfile) {
+ mLowProfile = lowProfile;
+ int flag = View.SYSTEM_UI_FLAG_LOW_PROFILE;
+ applySystemUiVisibilityFlags(mLowProfile ? flag : 0, flag);
}
/**
- * Finds a view that was identified by the id attribute from the XML that
- * was processed in {@link #onCreate}.
+ * Returns whether or not this dream is in low profile mode. Defaults to true.
*
- * @return The view if found or null otherwise.
+ * @see #setLowProfile(boolean)
*/
- public View findViewById(int id) {
- return getWindow().findViewById(id);
+ public boolean isLowProfile() {
+ return getSystemUiVisibilityFlagValue(View.SYSTEM_UI_FLAG_LOW_PROFILE, mLowProfile);
+ }
+
+ /**
+ * Sets View.SYSTEM_UI_FLAG_FULLSCREEN on the content view.
+ *
+ * @param fullscreen True to set View.SYSTEM_UI_FLAG_FULLSCREEN
+ */
+ public void setFullscreen(boolean fullscreen) {
+ mFullscreen = fullscreen;
+ int flag = View.SYSTEM_UI_FLAG_FULLSCREEN;
+ applySystemUiVisibilityFlags(mFullscreen ? flag : 0, flag);
+ }
+
+ /**
+ * Returns whether or not this dream is in fullscreen mode. Defaults to false.
+ *
+ * @see #setFullscreen(boolean)
+ */
+ public boolean isFullscreen() {
+ return getSystemUiVisibilityFlagValue(View.SYSTEM_UI_FLAG_FULLSCREEN, mFullscreen);
+ }
+
+ /**
+ * Marks this dream as keeping the screen bright while dreaming.
+ *
+ * @param screenBright True to keep the screen bright while dreaming.
+ */
+ public void setScreenBright(boolean screenBright) {
+ mScreenBright = screenBright;
+ int flag = WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
+ applyWindowFlags(mScreenBright ? flag : 0, flag);
+ }
+
+ /**
+ * Returns whether or not this dream keeps the screen bright while dreaming. Defaults to false,
+ * allowing the screen to dim if necessary.
+ *
+ * @see #setScreenBright(boolean)
+ */
+ public boolean isScreenBright() {
+ return getWindowFlagValue(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, mScreenBright);
}
/**
* Called when this Dream is constructed. Place your initialization here.
*
- * Subclasses must call through to the superclass implementation.
+ * <p>Subclasses must call through to the superclass implementation.</p>
*/
@Override
public void onCreate() {
@@ -336,23 +464,51 @@
}
/**
- * Called when this Dream is started.
+ * Called when this Dream is started. The window is created and visible at this point.
*/
public void onStart() {
+ if (DEBUG) Slog.v(TAG, "onStart()");
// hook for subclasses
- Slog.v(TAG, "called Dream.onStart()");
}
+ /** {@inheritDoc} */
+ @Override
+ public final IBinder onBind(Intent intent) {
+ if (DEBUG) Slog.v(TAG, "onBind() intent = " + intent);
+ return new DreamServiceWrapper();
+ }
+
+ /**
+ * Stops the dream, detaches from the window, and wakes up.
+ *
+ * <p>Subclasses must call through to the superclass implementation.</p>
+ *
+ * <p>After this method is called, the service will be stopped.</p>
+ */
+ public void finish() {
+ if (DEBUG) Slog.v(TAG, "finish()");
+ finishInternal();
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void onDestroy() {
+ if (DEBUG) Slog.v(TAG, "onDestroy()");
+ super.onDestroy();
+
+ if (DEBUG) Slog.v(TAG, "Removing window");
+ try {
+ mWindowManager.removeView(mWindow.getDecorView());
+ } catch (Throwable t) {
+ Slog.w(TAG, "Crashed removing window view", t);
+ }
+ }
+ // end public api
+
private void loadSandman() {
mSandman = IDreamManager.Stub.asInterface(ServiceManager.getService("dreams"));
}
- /**
- * Creates a new dream window, attaches the current content view, and shows it.
- *
- * @param windowToken Binder to attach to the window to allow access to the correct window type.
- * @hide
- */
private final void attach(IBinder windowToken) {
if (DEBUG) Slog.v(TAG, "Attached on thread " + Thread.currentThread().getId());
@@ -375,7 +531,8 @@
lp.windowAnimations = com.android.internal.R.style.Animation_Dream;
lp.flags |= ( WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
| WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD
- | WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON
+ | WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON
+ | (mScreenBright ? WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON : 0)
);
mWindow.setAttributes(lp);
@@ -389,8 +546,11 @@
@Override
public void run() {
if (DEBUG) Slog.v(TAG, "Window added on thread " + Thread.currentThread().getId());
-
try {
+ applySystemUiVisibilityFlags(
+ (mLowProfile ? View.SYSTEM_UI_FLAG_LOW_PROFILE : 0)
+ | (mFullscreen ? View.SYSTEM_UI_FLAG_FULLSCREEN : 0),
+ View.SYSTEM_UI_FLAG_LOW_PROFILE | View.SYSTEM_UI_FLAG_FULLSCREEN);
getWindowManager().addView(mWindow.getDecorView(), mWindow.getAttributes());
} catch (Throwable t) {
Slog.w("Crashed adding window view", t);
@@ -424,18 +584,6 @@
}
}
- /**
- * Stops the dream, detaches from the window, and wakes up.
- *
- * Subclasses must call through to the superclass implementation.
- *
- * <p>After this method is called, the service will be stopped.</p>
- */
- public void finish() {
- if (DEBUG) Slog.v(TAG, "finish()");
- finishInternal();
- }
-
private void finishInternal() {
if (DEBUG) Slog.v(TAG, "finishInternal() mFinished = " + mFinished);
if (mFinished) return;
@@ -454,23 +602,33 @@
}
}
- @Override
- public void onDestroy() {
- if (DEBUG) Slog.v(TAG, "onDestroy()");
- super.onDestroy();
+ private boolean getWindowFlagValue(int flag, boolean defaultValue) {
+ return mWindow == null ? defaultValue : (mWindow.getAttributes().flags & flag) != 0;
+ }
- if (DEBUG) Slog.v(TAG, "Removing window");
- try {
- mWindowManager.removeView(mWindow.getDecorView());
- } catch (Throwable t) {
- Slog.w(TAG, "Crashed removing window view", t);
+ private void applyWindowFlags(int flags, int mask) {
+ if (mWindow != null) {
+ WindowManager.LayoutParams lp = mWindow.getAttributes();
+ lp.flags = applyFlags(lp.flags, flags, mask);
+ mWindow.setAttributes(lp);
+ mWindowManager.updateViewLayout(mWindow.getDecorView(), lp);
}
}
- @Override
- public final IBinder onBind(Intent intent) {
- if (DEBUG) Slog.v(TAG, "onBind() intent = " + intent);
- return new DreamServiceWrapper();
+ private boolean getSystemUiVisibilityFlagValue(int flag, boolean defaultValue) {
+ View v = mWindow == null ? null : mWindow.getDecorView();
+ return v == null ? defaultValue : (v.getSystemUiVisibility() & flag) != 0;
+ }
+
+ private void applySystemUiVisibilityFlags(int flags, int mask) {
+ View v = mWindow == null ? null : mWindow.getDecorView();
+ if (v != null) {
+ v.setSystemUiVisibility(applyFlags(v.getSystemUiVisibility(), flags, mask));
+ }
+ }
+
+ private int applyFlags(int oldFlags, int flags, int mask) {
+ return (oldFlags&~mask) | (flags&mask);
}
private class DreamServiceWrapper extends IDreamService.Stub {
diff --git a/core/java/android/view/GLES20Canvas.java b/core/java/android/view/GLES20Canvas.java
index 032ff7bc..c703aaf 100644
--- a/core/java/android/view/GLES20Canvas.java
+++ b/core/java/android/view/GLES20Canvas.java
@@ -147,7 +147,17 @@
///////////////////////////////////////////////////////////////////////////
// Hardware layers
///////////////////////////////////////////////////////////////////////////
-
+
+ @Override
+ void pushLayerUpdate(HardwareLayer layer) {
+ nPushLayerUpdate(mRenderer, ((GLES20RenderLayer) layer).mLayer);
+ }
+
+ @Override
+ void clearLayerUpdates() {
+ nClearLayerUpdates(mRenderer);
+ }
+
static native int nCreateTextureLayer(boolean opaque, int[] layerInfo);
static native int nCreateLayer(int width, int height, boolean isOpaque, int[] layerInfo);
static native boolean nResizeLayer(int layerId, int width, int height, int[] layerInfo);
@@ -163,6 +173,9 @@
int left, int top, int right, int bottom);
static native boolean nCopyLayer(int layerId, int bitmap);
+ private static native void nClearLayerUpdates(int renderer);
+ private static native void nPushLayerUpdate(int renderer, int layer);
+
///////////////////////////////////////////////////////////////////////////
// Canvas management
///////////////////////////////////////////////////////////////////////////
diff --git a/core/java/android/view/GLES20RenderLayer.java b/core/java/android/view/GLES20RenderLayer.java
index fcfc8e1..44d4719 100644
--- a/core/java/android/view/GLES20RenderLayer.java
+++ b/core/java/android/view/GLES20RenderLayer.java
@@ -110,7 +110,7 @@
}
@Override
- void redraw(DisplayList displayList, Rect dirtyRect) {
+ void redrawLater(DisplayList displayList, Rect dirtyRect) {
GLES20Canvas.nUpdateRenderLayer(mLayer, mCanvas.getRenderer(),
((GLES20DisplayList) displayList).getNativeDisplayList(),
dirtyRect.left, dirtyRect.top, dirtyRect.right, dirtyRect.bottom);
diff --git a/core/java/android/view/GLES20TextureLayer.java b/core/java/android/view/GLES20TextureLayer.java
index b0ee2aa..797c734 100644
--- a/core/java/android/view/GLES20TextureLayer.java
+++ b/core/java/android/view/GLES20TextureLayer.java
@@ -98,6 +98,6 @@
}
@Override
- void redraw(DisplayList displayList, Rect dirtyRect) {
+ void redrawLater(DisplayList displayList, Rect dirtyRect) {
}
}
diff --git a/core/java/android/view/HardwareCanvas.java b/core/java/android/view/HardwareCanvas.java
index 777552a..eeae3ed 100644
--- a/core/java/android/view/HardwareCanvas.java
+++ b/core/java/android/view/HardwareCanvas.java
@@ -132,4 +132,20 @@
* @see #detachFunctor(int)
*/
abstract void attachFunctor(int functor);
+
+ /**
+ * Indicates that the specified layer must be updated as soon as possible.
+ *
+ * @param layer The layer to update
+ *
+ * @see #clearLayerUpdates()
+ */
+ abstract void pushLayerUpdate(HardwareLayer layer);
+
+ /**
+ * Removes all enqueued layer updates.
+ *
+ * @see #pushLayerUpdate(HardwareLayer)
+ */
+ abstract void clearLayerUpdates();
}
diff --git a/core/java/android/view/HardwareLayer.java b/core/java/android/view/HardwareLayer.java
index d798e73..d6868ca 100644
--- a/core/java/android/view/HardwareLayer.java
+++ b/core/java/android/view/HardwareLayer.java
@@ -203,5 +203,5 @@
* execute in this layer
* @param dirtyRect The dirty region of the layer that needs to be redrawn
*/
- abstract void redraw(DisplayList displayList, Rect dirtyRect);
+ abstract void redrawLater(DisplayList displayList, Rect dirtyRect);
}
diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java
index ef5dc56..e0e8de3 100644
--- a/core/java/android/view/HardwareRenderer.java
+++ b/core/java/android/view/HardwareRenderer.java
@@ -370,6 +370,14 @@
private static native void nDisableVsync();
/**
+ * Indicates that the specified hardware layer needs to be updated
+ * as soon as possible.
+ *
+ * @param layer The hardware layer that needs an update
+ */
+ abstract void pushLayerUpdate(HardwareLayer layer);
+
+ /**
* Interface used to receive callbacks whenever a view is drawn by
* a hardware renderer instance.
*/
@@ -1154,8 +1162,9 @@
getDisplayListStartTime = System.nanoTime();
}
- DisplayList displayList;
+ canvas.clearLayerUpdates();
+ DisplayList displayList;
Trace.traceBegin(Trace.TRACE_TAG_VIEW, "getDisplayList");
try {
displayList = view.getDisplayList();
@@ -1452,6 +1461,11 @@
}
@Override
+ void pushLayerUpdate(HardwareLayer layer) {
+ mGlCanvas.pushLayerUpdate(layer);
+ }
+
+ @Override
public DisplayList createDisplayList(String name) {
return new GLES20DisplayList(name);
}
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 87221e0..31bbc6a 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -2773,14 +2773,14 @@
* {@hide}
*/
@ViewDebug.ExportedProperty(category = "padding")
- protected int mPaddingLeft;
+ protected int mPaddingLeft = UNDEFINED_PADDING;
/**
* The right padding in pixels, that is the distance in pixels between the
* right edge of this view and the right edge of its content.
* {@hide}
*/
@ViewDebug.ExportedProperty(category = "padding")
- protected int mPaddingRight;
+ protected int mPaddingRight = UNDEFINED_PADDING;
/**
* The top padding in pixels, that is the distance in pixels between the
* top edge of this view and the top edge of its content.
@@ -3620,9 +3620,10 @@
// (stored at this point in mPadding*)
mUserPaddingLeftInitial = leftPadding >= 0 ? leftPadding : mPaddingLeft;
mUserPaddingRightInitial = rightPadding >= 0 ? rightPadding : mPaddingRight;
- internalSetPadding(mUserPaddingLeftInitial,
+ internalSetPadding(
+ mUserPaddingLeftInitial != UNDEFINED_PADDING ? mUserPaddingLeftInitial : 0,
topPadding >= 0 ? topPadding : mPaddingTop,
- mUserPaddingRightInitial,
+ mUserPaddingRightInitial != UNDEFINED_PADDING ? mUserPaddingRightInitial : 0,
bottomPadding >= 0 ? bottomPadding : mPaddingBottom);
if (viewFlagMasks != 0) {
@@ -11597,8 +11598,8 @@
mUserPaddingStart != UNDEFINED_PADDING) {
mUserPaddingLeft = mUserPaddingStart;
}
- if (mUserPaddingRightInitial == UNDEFINED_PADDING
- && mUserPaddingEnd != UNDEFINED_PADDING) {
+ if (mUserPaddingRightInitial == UNDEFINED_PADDING &&
+ mUserPaddingEnd != UNDEFINED_PADDING) {
mUserPaddingRight = mUserPaddingEnd;
}
@@ -12285,9 +12286,12 @@
if (!mHardwareLayer.isValid()) {
return null;
}
- mHardwareLayer.setLayerPaint(mLayerPaint);
- mHardwareLayer.redraw(getHardwareLayerDisplayList(mHardwareLayer), mLocalDirtyRect);
+ mHardwareLayer.setLayerPaint(mLayerPaint);
+ mHardwareLayer.redrawLater(getHardwareLayerDisplayList(mHardwareLayer), mLocalDirtyRect);
+ ViewRootImpl viewRoot = getViewRootImpl();
+ if (viewRoot != null) viewRoot.pushHardwareLayerUpdate(mHardwareLayer);
+
mLocalDirtyRect.setEmpty();
}
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 27fd374..6bb8697 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -653,6 +653,12 @@
}
}
+ void pushHardwareLayerUpdate(HardwareLayer layer) {
+ if (mAttachInfo.mHardwareRenderer != null && mAttachInfo.mHardwareRenderer.isEnabled()) {
+ mAttachInfo.mHardwareRenderer.pushLayerUpdate(layer);
+ }
+ }
+
public boolean attachFunctor(int functor) {
//noinspection SimplifiableIfStatement
if (mAttachInfo.mHardwareRenderer != null && mAttachInfo.mHardwareRenderer.isEnabled()) {
diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java
index c65a67b..87ef23f 100644
--- a/core/java/android/widget/RemoteViews.java
+++ b/core/java/android/widget/RemoteViews.java
@@ -52,6 +52,7 @@
import java.lang.annotation.Target;
import java.lang.reflect.Method;
import java.util.ArrayList;
+import java.util.HashMap;
/**
@@ -187,6 +188,10 @@
public abstract void apply(View root, ViewGroup rootParent,
OnClickHandler handler) throws ActionException;
+ public static final int MERGE_REPLACE = 0;
+ public static final int MERGE_APPEND = 1;
+ public static final int MERGE_IGNORE = 2;
+
public int describeContents() {
return 0;
}
@@ -203,6 +208,60 @@
public void setBitmapCache(BitmapCache bitmapCache) {
// Do nothing
}
+
+ public int mergeBehavior() {
+ return MERGE_REPLACE;
+ }
+
+ public abstract String getActionName();
+
+ public String getUniqueKey() {
+ return (getActionName() + viewId);
+ }
+
+ int viewId;
+ }
+
+ public void mergeRemoteViews(RemoteViews newRv) {
+ // We first copy the new RemoteViews, as the process of merging modifies the way the actions
+ // reference the bitmap cache. We don't want to modify the object as it may need to
+ // be merged and applied multiple times.
+ Parcel p = Parcel.obtain();
+ newRv.writeToParcel(p, 0);
+ RemoteViews copy = new RemoteViews(p);
+
+ HashMap<String, Action> map = new HashMap<String, Action>();
+ if (mActions == null) {
+ mActions = new ArrayList<Action>();
+ }
+
+ int count = mActions.size();
+ for (int i = 0; i < count; i++) {
+ Action a = mActions.get(i);
+ map.put(a.getUniqueKey(), a);
+ }
+
+ ArrayList<Action> newActions = copy.mActions;
+ if (newActions == null) return;
+ count = newActions.size();
+ for (int i = 0; i < count; i++) {
+ Action a = newActions.get(i);
+ String key = newActions.get(i).getUniqueKey();
+ int mergeBehavior = map.get(key).mergeBehavior();
+ if (map.containsKey(key) && mergeBehavior == Action.MERGE_REPLACE) {
+ mActions.remove(map.get(key));
+ map.remove(key);
+ }
+
+ // If the merge behavior is ignore, we don't bother keeping the extra action
+ if (mergeBehavior == Action.MERGE_REPLACE || mergeBehavior == Action.MERGE_APPEND) {
+ mActions.add(a);
+ }
+ }
+
+ // Because pruning can remove the need for bitmaps, we reconstruct the bitmap cache
+ mBitmapCache = new BitmapCache();
+ setBitmapCache(mBitmapCache);
}
private class SetEmptyView extends Action {
@@ -239,6 +298,10 @@
adapterView.setEmptyView(emptyView);
}
+
+ public String getActionName() {
+ return "SetEmptyView";
+ }
}
private class SetOnClickFillInIntent extends Action {
@@ -316,7 +379,10 @@
}
}
- int viewId;
+ public String getActionName() {
+ return "SetOnClickFillInIntent";
+ }
+
Intent fillInIntent;
public final static int TAG = 9;
@@ -399,7 +465,10 @@
}
}
- int viewId;
+ public String getActionName() {
+ return "SetPendingIntentTemplate";
+ }
+
PendingIntent pendingIntentTemplate;
public final static int TAG = 8;
@@ -453,7 +522,10 @@
}
}
- int viewId;
+ public String getActionName() {
+ return "SetRemoteViewsAdapterIntent";
+ }
+
Intent intent;
public final static int TAG = 10;
@@ -539,7 +611,10 @@
}
}
- int viewId;
+ public String getActionName() {
+ return "SetOnClickPendingIntent";
+ }
+
PendingIntent pendingIntent;
public final static int TAG = 1;
@@ -625,7 +700,10 @@
}
}
- int viewId;
+ public String getActionName() {
+ return "SetDrawableParameters";
+ }
+
boolean targetBackground;
int alpha;
int colorFilter;
@@ -636,7 +714,6 @@
}
private class ReflectionActionWithoutParams extends Action {
- int viewId;
String methodName;
public final static int TAG = 5;
@@ -688,6 +765,19 @@
throw new ActionException(ex);
}
}
+
+ public int mergeBehavior() {
+ // we don't need to build up showNext or showPrevious calls
+ if (methodName.equals("showNext") || methodName.equals("showPrevious")) {
+ return MERGE_IGNORE;
+ } else {
+ return MERGE_REPLACE;
+ }
+ }
+
+ public String getActionName() {
+ return "ReflectionActionWithoutParams";
+ }
}
private static class BitmapCache {
@@ -755,7 +845,6 @@
private class BitmapReflectionAction extends Action {
int bitmapId;
- int viewId;
Bitmap bitmap;
String methodName;
@@ -794,6 +883,10 @@
bitmapId = bitmapCache.getBitmapId(bitmap);
}
+ public String getActionName() {
+ return "BitmapReflectionAction";
+ }
+
public final static int TAG = 12;
}
@@ -814,11 +907,12 @@
static final int STRING = 9;
static final int CHAR_SEQUENCE = 10;
static final int URI = 11;
+ // BITMAP actions are never stored in the list of actions. They are only used locally
+ // to implement BitmapReflectionAction, which eliminates duplicates using BitmapCache.
static final int BITMAP = 12;
static final int BUNDLE = 13;
static final int INTENT = 14;
- int viewId;
String methodName;
int type;
Object value;
@@ -1041,20 +1135,20 @@
}
}
- @Override
- public void updateMemoryUsageEstimate(MemoryUsageCounter counter) {
- // We currently only calculate Bitmap memory usage
- switch (this.type) {
- case BITMAP:
- if (this.value != null) {
- final Bitmap b = (Bitmap) this.value;
- counter.addBitmapMemory(b);
- }
- break;
- default:
- break;
+ public int mergeBehavior() {
+ // smoothScrollBy is cumulative, everything else overwites.
+ if (methodName.equals("smoothScrollBy")) {
+ return MERGE_APPEND;
+ } else {
+ return MERGE_REPLACE;
}
}
+
+ public String getActionName() {
+ // Each type of reflection action corresponds to a setter, so each should be seen as
+ // unique from the standpoint of merging.
+ return "ReflectionAction" + this.methodName + this.type;
+ }
}
private void configureRemoteViewsAsChild(RemoteViews rv) {
@@ -1131,7 +1225,14 @@
}
}
- int viewId;
+ public String getActionName() {
+ return "ViewGroupAction" + this.nestedViews == null ? "Remove" : "Add";
+ }
+
+ public int mergeBehavior() {
+ return MERGE_APPEND;
+ }
+
RemoteViews nestedViews;
public final static int TAG = 4;
@@ -1182,7 +1283,10 @@
}
}
- int viewId;
+ public String getActionName() {
+ return "TextViewDrawableAction";
+ }
+
boolean isRelative = false;
int d1, d2, d3, d4;
@@ -1220,7 +1324,10 @@
target.setTextSize(units, size);
}
- int viewId;
+ public String getActionName() {
+ return "TextViewSizeAction";
+ }
+
int units;
float size;
@@ -1264,7 +1371,10 @@
target.setPadding(left, top, right, bottom);
}
- int viewId;
+ public String getActionName() {
+ return "ViewPaddingAction";
+ }
+
int left, top, right, bottom;
public final static int TAG = 14;
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index 8756950..f3bef08 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -1044,6 +1044,17 @@
return new int[] { appWidgetId };
}
+ public int getStatusWidget() {
+ int appWidgetId = -1;
+ String appWidgetIdString = Settings.Secure.getString(
+ mContentResolver, Settings.Secure.LOCK_SCREEN_STATUS_APPWIDGET_ID);
+ if (appWidgetIdString != null) {
+ appWidgetId = (int) Integer.decode(appWidgetIdString);
+ }
+
+ return appWidgetId;
+ }
+
private long getLong(String secureSettingKey, long defaultValue) {
try {
return getLockSettings().getLong(secureSettingKey, defaultValue,
diff --git a/core/jni/android/graphics/BitmapFactory.cpp b/core/jni/android/graphics/BitmapFactory.cpp
index 69ef080..8823328 100644
--- a/core/jni/android/graphics/BitmapFactory.cpp
+++ b/core/jni/android/graphics/BitmapFactory.cpp
@@ -340,7 +340,9 @@
bitmap->setConfig(config, scaledWidth, scaledHeight);
bitmap->setIsOpaque(decoded->isOpaque());
- bitmap->allocPixels(&javaAllocator, NULL);
+ if (!bitmap->allocPixels(&javaAllocator, NULL)) {
+ return nullObjectReturn("allocation failed for scaled bitmap");
+ }
bitmap->eraseColor(0);
SkPaint paint;
diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp
index 2ff886e..b91eb28 100644
--- a/core/jni/android_view_GLES20Canvas.cpp
+++ b/core/jni/android_view_GLES20Canvas.cpp
@@ -843,6 +843,16 @@
return LayerRenderer::copyLayer(layer, bitmap);
}
+static void android_view_GLES20Canvas_pushLayerUpdate(JNIEnv* env, jobject clazz,
+ OpenGLRenderer* renderer, Layer* layer) {
+ renderer->pushLayerUpdate(layer);
+}
+
+static void android_view_GLES20Canvas_clearLayerUpdates(JNIEnv* env, jobject clazz,
+ OpenGLRenderer* renderer) {
+ renderer->clearLayerUpdates();
+}
+
#endif // USE_OPENGL_RENDERER
// ----------------------------------------------------------------------------
@@ -1006,6 +1016,8 @@
{ "nDestroyLayerDeferred", "(I)V", (void*) android_view_GLES20Canvas_destroyLayerDeferred },
{ "nDrawLayer", "(IIFFI)V", (void*) android_view_GLES20Canvas_drawLayer },
{ "nCopyLayer", "(II)Z", (void*) android_view_GLES20Canvas_copyLayer },
+ { "nClearLayerUpdates", "(I)V", (void*) android_view_GLES20Canvas_clearLayerUpdates },
+ { "nPushLayerUpdate", "(II)V", (void*) android_view_GLES20Canvas_pushLayerUpdate },
{ "nSetTextureLayerTransform", "(II)V", (void*) android_view_GLES20Canvas_setTextureLayerTransform },
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 7209e4e..0775040 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -708,11 +708,11 @@
backup and restore of the application's data on external storage. -->
<attr name="backupAgent" format="string" />
- <!-- Whether to allow the application to participate in backup
- infrastructure. If this attribute is set to <code>false</code>, no backup
- of the application will ever be performed, even by a full-system backup that
- would otherwise cause all application data to be saved via adb. The
- default value of this attribute is <code>true</code>. -->
+ <!-- Whether to allow the application to participate in the backup
+ and restore infrastructure. If this attribute is set to <code>false</code>,
+ no backup or restore of the application will ever be performed, even by a
+ full-system backup that would otherwise cause all application data to be saved
+ via adb. The default value of this attribute is <code>true</code>. -->
<attr name="allowBackup" format="boolean" />
<!-- Whether the application in question should be terminated after its
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 761bfba..a7afbc0 100755
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -3141,7 +3141,7 @@
<!-- Security Permissions strings-->
<!-- Text that is placed at the front of a permission name that is being added to an app [CHAR LIMIT=NONE] -->
- <string name="perms_new_perm_prefix"><font size="12" fgcolor="#ff900000">NEW: </font></string>
+ <string name="perms_new_perm_prefix"><font size="12" fgcolor="#ff33b5e5">NEW: </font></string>
<!-- Text that is placed at the front of a permission name that is being added to an app [CHAR LIMIT=NONE] -->
<string name="perms_description_app">Provided by <xliff:g id="app_name">%1$s</xliff:g>.</string>
<!-- Shown for an application when it doesn't require any permission grants. -->
diff --git a/docs/html/images/systrace/display-rhythm.png b/docs/html/images/systrace/display-rhythm.png
new file mode 100644
index 0000000..a249161
--- /dev/null
+++ b/docs/html/images/systrace/display-rhythm.png
Binary files differ
diff --git a/docs/html/images/systrace/process-rhythm.png b/docs/html/images/systrace/process-rhythm.png
new file mode 100644
index 0000000..7498cc7
--- /dev/null
+++ b/docs/html/images/systrace/process-rhythm.png
Binary files differ
diff --git a/docs/html/images/systrace/report.png b/docs/html/images/systrace/report.png
new file mode 100644
index 0000000..a642960
--- /dev/null
+++ b/docs/html/images/systrace/report.png
Binary files differ
diff --git a/docs/html/tools/debugging/systrace.jd b/docs/html/tools/debugging/systrace.jd
new file mode 100644
index 0000000..287abe6
--- /dev/null
+++ b/docs/html/tools/debugging/systrace.jd
@@ -0,0 +1,239 @@
+page.title=Analyzing Display and Performance with Systrace
+parent.title=Debugging
+parent.link=index.html
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#overview">Overview</a>
+ </li>
+ <li><a href="#generate">Generating Traces</a>
+ <ol>
+ <li><a href="#limit-trace">Limiting trace data</a></li>
+ <li><a href="#config-categories">Configuring trace data categories</a></li>
+ <li><a href="#running">Running a trace</a></li>
+ </ol>
+ </li>
+ <li><a href="#analysis">Analyzing Traces</a>
+ <ol>
+ <li><a href="#long-processes">Long running processes</a></li>
+ <li><a href="#display-interupts">Interruptions in display execution</a></li>
+ </ol>
+ </li>
+ </ol>
+ <h2>See also</h2>
+ <ol>
+ <li><a href="{@docRoot}tools/help/systrace.html">Systrace</a>
+ </li>
+ </ol>
+ </div>
+</div>
+
+<p>After building features, eliminating bugs and cleaning up your code, you should spend some
+ time looking at the performance of your application. The speed and smoothness with which your
+ application draws pixels and performs operations has an significant impact on your users'
+ experience.</p>
+
+<p>Android applications operate within a shared resource environment, and the performance of
+ your application can be impacted by how efficiently it interacts with those resources in
+ the larger system. Applications also operate in a multithreaded environment, competing with other
+ threaded processes for resources, which can cause performance problems that are hard to diagnose.
+</p>
+
+<p>The {@code systrace} tool allows you to collect and review code execution data for your
+ application and the Android system. You can use this data to diagnose execution problems and
+ improve the performance of your application.</p>
+
+
+<h2 id="overview">Overview</h2>
+
+<p>{@code systrace} helps you analyze how the execution of your application fits into the larger
+ Android environment, letting you see system and applications process execution on a common
+ timeline. The tool allows you to generate highly detailed, interactive reports from devices
+ running Android 4.1 and higher, such as the report in figure 1.</p>
+
+<img src="{@docRoot}images/systrace/report.png" alt="Systrace example report" id="figure1" />
+<p class="img-caption">
+ <strong>Figure 1.</strong> An example {@code systrace} report on 5 seconds of process execution
+ for a running application and related Android system processes.
+</p>
+
+
+<h2 id="generate">Generating Traces</h2>
+
+<p>In order to create a trace of your application, you must perform a few setup steps. First, you
+ must have a device running Android 4.1 or higher. Setup the device for
+ <a href="{@docRoot}tools/device.html#setting-up">debugging</a>, connect it to your development
+ system and install your application. Some types of trace information, specifically disk activity
+ and kernel work queues, require root access to the device, but most {@code systrace} log data
+ only requires that the device be enabled for developer debugging.</p>
+
+
+<h3 id="limit-trace">Limiting trace data</h3>
+
+<p>The {@code systrace} tool can generate a potentially huge amount of data from applications
+ and system sources. To limit the amount of data the tool collects and make the data more relevant
+ to your analysis, use the following options:</p>
+
+<ul>
+ <li>Limit the amount of time covered by the trace with the {@code -t, --time} option. The default
+ length of a trace is 5 seconds.</li>
+ <li>Limit the size of the data collected by the trace with the {@code -b, --buf-size} option.</li>
+ <li>Specify what types of processes are traced using the {@code --set-tags} option and the
+ {@code --disk}, {@code --cpu-freq}, {@code --cpu-idle}, {@code --cpu-load} options.</li>
+</ul>
+
+
+<h3 id="config-categories">Configuring trace data categories</h3>
+
+<p>To use {@code systrace} effectively, you must specify the types of processes you want to trace.
+ The tool can gather the following types of process information:</p>
+
+<ul>
+ <li>General system processes such as graphics, audio and input processes (selected using trace
+ <a href="{@docRoot}tools/help/systrace.html#tags">Tags</a>).</li>
+ <li>Low level system information such as CPU, kernel and disk activity (selected using
+ <a href="{@docRoot}tools/help/systrace.html#options">Options</a>).</li>
+</ul>
+
+<p>To set trace tags for {@code systrace} using the command-line:</p>
+
+<ol>
+ <li>Use the {@code --set-tags} option:
+<pre>
+$> python systrace.py --set-tags=gfx,view,wm
+</pre>
+ </li>
+ <li>Stop and restart the {@code adb} shell to enable tracing of these processes.
+<pre>
+$> adb shell stop
+$> adb shell start
+</pre></li>
+</ol>
+
+<p>To set trace tags for {@code systrace} using the device user interface:</p>
+
+<ol>
+ <li>On the device connected for tracing, navigate to: <strong>Settings >
+ Developer options > Monitoring > Enable traces</strong>.</li>
+ <li>Select the categories of processes to be traced and click <strong>OK</strong>.</li>
+</ol>
+
+<p class="note">
+ <strong>Note:</strong> The {@code adb} shell does not have to be stopped and restarted when
+ selecting trace tags using this method.
+</p>
+
+
+<h3 id="running">Running a trace</h3>
+
+<p>After you have configured the category tags for your trace, you can start collecting
+ information for analysis.</p>
+
+<p>To run a trace using the current trace tag settings:</p>
+
+<ol>
+ <li>Make sure the device is connected through a USB cable and is
+ <a href="{@docRoot}tools/device.html#setting-up">enabled for debugging</a>.</li>
+ <li>Run the trace with the low-level system trace options and limits you want, for example:
+<pre>
+$> python systrace.py --cpu-freq --cpu-load --time=10 -o mytracefile.html
+</pre>
+ </li>
+ <li>On the device, execute any user actions you want be included in the trace.</li>
+</ol>
+
+
+<h2 id="analysis">Analyzing Traces</h2>
+
+<p>After you have generated a trace using {@code systrace}, it lists the location of the output
+ file and you can open the report using a web browser.
+ How you use the trace data depends on the performance issues you are investigating. However,
+ this section provides some general instructions on how to analyze a trace.</p>
+
+<p>The reports generated by {@code systrace} are interactive, allowing you to zoom into and out of
+ the process execution details. Use the <em>W</em> key to zoom in, the <em>S</em>
+ key to zoom out, the <em>A</em> key to pan left and the <em>D</em> key to pan
+ right. Select a task in timeline using your mouse to get more information about the task.
+ For more information about the using the keyboard navigation shortcuts and navigation, see the
+ <a href="{@docRoot}tools/help/systrace.html#viewing-options">Systrace</a> reference
+ documentation.</p>
+
+<h3 id="long-processes">Long running processes</h3>
+
+<p>A well-behaved application executes many small operations quickly and with a regular rhythm,
+ with individual operations completing within few milliseconds, depending on the device
+ and the processes being performed, as shown in figure 2:</p>
+
+<img src="{@docRoot}images/systrace/process-rhythm.png" alt="Systrace exerpt of app processing"
+id="figure2" />
+<p class="img-caption">
+ <strong>Figure 2.</strong> Excerpt from a trace of a smoothly running application with a regular
+ execution rhythm.
+</p>
+
+<p>The trace excerpt in figure 2 shows a well-behaved application with
+ a regular process rhythm (1). The lower section of figure 2 shows a magnified section of
+ the trace indicated by the dotted outline, which reveals some irregularity in the process
+ execution. In particular, one of the wider task bars, indicated by (2), is taking slightly
+ longer (14 milliseconds) than other, similar tasks on this thread, which are averaging between
+ 9 and 12 milliseconds to complete. This particular task execution length is likely not noticeable
+ to a user, unless it impacts another process with specific timing, such as a screen update.</p>
+
+<p>Long running processes show up as thicker than usual execution bars in a trace. These thicker
+ bars can indicate a problem in your application performance. When they show up in your
+ trace, zoom in on the process using the
+ <a href="{@docRoot}tools/help/systrace.html#viewing-options">keyboard navigation</a> shortcuts to
+ identify the task causing the problem, and click on the task to get more information. You should
+ also look at other processes running at the same time, looking for a thread in one process that is
+ being blocked by another process.</p>
+
+
+<h3 id="display-interupts">Interruptions in display execution</h3>
+
+<p>The {@code systrace} tool is particularly useful in analyzing application display slowness,
+ or pauses in animations, because it shows you the execution of your application across multiple
+ system processes. With display execution, drawing screen frames with a regular rhythm is essential
+ for good performance. Having a regular rhythm for display ensures that animations and motion are
+ smooth on screen. If an application drops out of this rhythm, the display can become jerky or slow
+ from the users perspective.</p>
+
+<p>If you are analyzing an application for this type of problem, examine the
+ <strong>SurfaceFlinger</strong> process in the {@code systrace} report where your application is
+ also executing to look for places where it drops out of its regular rhythm.</p>
+
+<img src="{@docRoot}images/systrace/display-rhythm.png" alt="Systrace exerpt of display processing"
+id="figure3" />
+<p class="img-caption">
+ <strong>Figure 3.</strong> Excerpt from a trace of an application showing interruptions in
+ display processing.
+</p>
+
+<p>The trace excerpt in figure 3 shows an section of a trace that indicates an interruption in the
+ device display. The section of the <strong>SurfaceFlinger</strong> process in top excerpt,
+ indicated by (1), shows that display frames are being missed. These
+ dropped frames are potentially causing the display to stutter or halt. Zooming into this problem
+ area in the lower trace, shows that a memory operation (image buffer dequeuing and allocation) in
+ the <strong>surfaceflinger</strong> secondary thread is taking a long time (2). This delay
+ causes the application to miss the display update window, indicated by the dotted
+ line. As the developer of this application, you should investigate other threads in your
+ application that may also be trying to allocate memory at the same time or otherwise blocking
+ memory allocation with another request or task.</p>
+
+<p>Regular, rhythmic execution of the <strong>SurfaceFlinger</strong> process is essential to smooth
+ display of screen content, particularly for animations and motion. Interruptions in the regular
+ execution pattern of this thread is not always an indication of a display problem with your
+ application. Further testing is required to determine if this is actually a performance problem
+ from a user perspective. Being able to identify display execution patterns like the example above
+ can help you detect display problems and build a smooth-running, high-performance application.
+</p>
+
+<p class="note">
+ <strong>Note:</strong> When using {@code systrace} to analyze display problems, make sure
+ you activate the tracing tags for <strong>Graphics</strong> and <strong>Views</strong>.
+</p>
+
+<p>For more information on the command line options and keyboard controls for {@code systrace},
+see the <a href="{@docRoot}tools/help/systrace.html">Systrace</a> reference page.</p>
\ No newline at end of file
diff --git a/docs/html/tools/help/index.jd b/docs/html/tools/help/index.jd
index 447d39c..0f94395 100644
--- a/docs/html/tools/help/index.jd
+++ b/docs/html/tools/help/index.jd
@@ -55,6 +55,9 @@
<dt><a href="proguard.html">ProGuard</a></dt>
<dd>Shrinks, optimizes, and obfuscates your code by removing unused code and renaming
classes, fields, and methods with semantically obscure names.</dd>
+ <dt><a href="systrace.html">Systrace</a></dt>
+ <dd>Lets you analyze the execution of your application in the context of system processes,
+ to help diagnose display and performance issues.</dd>
<dt><a href="sqlite3.html">sqlite3</a></dt>
<dd>Lets you access the SQLite data files created and used by Android applications.</dd>
<dt><a href="traceview.html">traceview</a></dt>
diff --git a/docs/html/tools/help/systrace.jd b/docs/html/tools/help/systrace.jd
new file mode 100644
index 0000000..010cc78
--- /dev/null
+++ b/docs/html/tools/help/systrace.jd
@@ -0,0 +1,234 @@
+page.title=Systrace
+parent.title=Tools
+parent.link=index.html
+@jd:body
+
+
+<p>The {@code systrace} tool helps analyze the performance of your application by capturing and
+ displaying execution times of your applications processes and other Android system processes. The
+ tool combines data from the Android kernel such as the CPU scheduler, disk activity and
+ application threads to generate an HTML report that shows an overall picture of an Android
+ device’s system processes for a given period of time.</p>
+
+<p>The {@code systrace} tool is particularly useful in diagnosing display problems where an
+ application is slow to draw or stutters while displaying motion or animation. For more information
+ on how to use {@code systrace}, see <a href="{@docRoot}tools/debugging/systrace.html">Analyzing
+ Display and Performance with Systrace</a>.</p>
+
+
+<h2 id="usage">Usage</h2>
+
+<p>In order to run {@code systrace}, the {@code adb} tool and
+<a href="http://www.python.org/">Python</a> must be installed and included in your development
+computer's execution path. In order to generate a trace, you must connect a device running Android
+4.1 (API Level 16) or higher to your development system using a USB debugging connection.</p>
+
+<p>The syntax for running {@code systrace} is as follows.</p>
+
+<pre>
+$> python systrace.py [options]
+</pre>
+
+<p>Here is an example execution run that sets trace tags and generates a trace from a connected
+Android device.</p>
+
+<pre>
+$> cd <em>android-sdk</em>/tools/systrace
+$> python systrace.py --set-tags gfx,view,wm
+$> adb shell stop
+$> adb shell start
+$> python systrace.py --disk --time=10 -o mynewtrace.html
+</pre>
+
+
+
+<h2 id="options">Options</h2>
+
+<p>The table below lists the command line options for {@code systrace}.</p>
+
+<table>
+ <tr>
+ <th>Option</th>
+
+ <th>Description</th>
+ </tr>
+
+ <tr>
+ <td><code>-o <<em>FILE</em>></code></td>
+
+ <td>Write the HTML trace report to the specified file.</td>
+ </tr>
+
+ <tr>
+ <td><code>-t N, --time=N</code></td>
+
+ <td>Trace activity for N seconds. Default value is 5 seconds.</td>
+ </tr>
+
+ <tr>
+ <td><code>-b N, --buf-size=N</code></td>
+
+ <td>Use a trace buffer size of N kilobytes. This option lets you limit the total size of the
+ data collected during a trace.</td>
+ </tr>
+
+ <tr>
+ <td><code>-d, --disk</code></td>
+
+ <td>Trace disk input and output activity. This option requires root access on the device.</td>
+ </tr>
+
+ <tr>
+ <td><code>-f, --cpu-freq</code></td>
+
+ <td>Trace CPU frequency changes. Only changes to the CPU frequency are logged, so the initial
+ frequency of the CPU when tracing starts is not shown.</td>
+ </tr>
+
+ <tr>
+ <td><code>-i, --cpu-idle</code></td>
+
+ <td>Trace CPU idle events.</td>
+ </tr>
+
+ <tr>
+ <td><code>-l, --cpu-load</code></td>
+
+ <td>Trace CPU load. This value is a percentage determined by the interactive CPU frequency
+ governor.</td>
+ </tr>
+
+ <tr>
+ <td><nobr><code>-s, --no-cpu-sched</code></nobr></td>
+
+ <td>Prevent tracing of the CPU scheduler. This option allows for longer trace times by reducing
+ the rate of data flowing into the trace buffer.</td>
+ </tr>
+
+ <tr>
+ <td><code>-w, --workqueue</code></td>
+
+ <td>Trace kernel work queues. This option requires root access on the device.</td>
+ </tr>
+
+ <tr>
+ <td id="tags"><code>--set-tags=<<em>TAGS</em>></code></td>
+
+ <td>Set the enabled trace tags in a comma separated list. The available tags are:
+ <ul>
+ <li><code>gfx</code> - Graphics</li>
+ <li><code>input</code> - Input</li>
+ <li><code>view</code> - View</li>
+ <li><code>webview</code> - WebView</li>
+ <li><code>wm</code> - Window Manager</li>
+ <li><code>am</code> - Activity Manager</li>
+ <li><code>sync</code> - Sync Manager</li>
+ <li><code>audio</code> - Audio</li>
+ <li><code>video</code> - Video</li>
+ <li><code>camera</code> - Camera</li>
+ </ul>
+ <p class="note"><strong>Note:</strong> When setting trace tags from the command line, you
+ must stop and restart the framework ({@code $> adb shell stop; adb shell start}) for the
+ tag tracing changes to take effect.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td><code>--link-assets</code></td>
+
+ <td>Link to the original CSS or JS resources instead of embedding them in the HTML trace
+ report.</td>
+ </tr>
+
+ <tr>
+ <td><nobr><code>-h, --help</code></nobr></td>
+
+ <td>Show the help message.</td>
+ </tr>
+
+</table>
+
+<p>You can set the trace <a href="#tags">tags</a> for {@code systrace} with your device's user
+interface, by navigating to <strong>Settings > Developer options > Monitoring > Enable
+traces</strong>.</p>
+
+
+<h2 id="viewing-options">Trace Viewing Shortcuts</h2>
+
+<p>The table below lists the keyboard shortcuts that are available while viewing a {@code systrace}
+trace HTML report.</p>
+
+<table>
+ <tr>
+ <th>Key</th>
+
+ <th>Description</th>
+ </tr>
+
+ <tr>
+ <td><strong>w</strong></td>
+
+ <td>Zoom into the trace timeline.</td>
+ </tr>
+
+ <tr>
+ <td><strong>s</strong></td>
+
+ <td>Zoom out of the trace timeline.</td>
+ </tr>
+
+ <tr>
+ <td><strong>a</strong></td>
+
+ <td>Pan left on the trace timeline.</td>
+ </tr>
+
+ <tr>
+ <td><strong>d</strong></td>
+
+ <td>Pan right on the trace timeline.</td>
+ </tr>
+
+ <tr>
+ <td><strong>e</strong></td>
+
+ <td>Center the trace timeline on the current mouse location.</td>
+ </tr>
+
+ <tr>
+ <td><strong>g</strong></td>
+
+ <td>Show grid at the start of the currently selected task.</td>
+ </tr>
+
+ <tr>
+ <td><strong>Shift+g</strong></td>
+
+ <td>Show grid at the end of the currently selected task.</td>
+ </tr>
+
+ <tr>
+ <td><strong>Right Arrow</strong></td>
+
+ <td>Select the next event on the currently selected timeline.</td>
+ </tr>
+
+ <tr>
+ <td><strong>Left Arrow</strong></td>
+
+ <td>Select the previous event on the currently selected timeline.</td>
+ </tr>
+
+ <tr>
+ <td><strong>Double Click</strong></td>
+
+ <td>Zoom into the trace timeline.</td>
+ </tr>
+
+ <tr>
+ <td><strong>Shift+Double Click</strong></td>
+
+ <td>Zoom out of the trace timeline.</td>
+ </tr>
+
+</table>
diff --git a/docs/html/tools/tools_toc.cs b/docs/html/tools/tools_toc.cs
index f3936b8..5e2b9f7 100644
--- a/docs/html/tools/tools_toc.cs
+++ b/docs/html/tools/tools_toc.cs
@@ -114,6 +114,7 @@
<li><a href="<?cs var:toroot ?>tools/debugging/improving-w-lint.html"><span class="en">Improving Your Code with lint</span></a></li>
<li><a href="<?cs var:toroot ?>tools/debugging/debugging-ui.html"><span class="en">Optimizing your UI</span></a></li>
<li><a href="<?cs var:toroot ?>tools/debugging/debugging-tracing.html"><span class="en">Profiling with Traceview and dmtracedump</span></a></li>
+ <li><a href="<?cs var:toroot ?>tools/debugging/systrace.html"><span class="en">Analysing Display and Performance with Systrace</span></a></li>
<li><a href="<?cs var:toroot ?>tools/debugging/debugging-devtools.html"><span class="en">Using the Dev Tools App</span></a></li>
</ul>
</li>
@@ -159,6 +160,7 @@
</ul>
</li>
<li><a href="<?cs var:toroot ?>tools/help/proguard.html">ProGuard</a></li>
+ <li><a href="<?cs var:toroot ?>tools/help/systrace.html">Systrace</a></li>
<li><a href="<?cs var:toroot ?>tools/help/gltracer.html">Tracer for OpenGL ES</a></li>
<li><a href="<?cs var:toroot ?>tools/help/traceview.html">Traceview</a></li>
<li><a href="<?cs var:toroot ?>tools/help/zipalign.html">zipalign</a></li>
diff --git a/graphics/java/android/graphics/BitmapRegionDecoder.java b/graphics/java/android/graphics/BitmapRegionDecoder.java
index c1d3407..b38d107 100644
--- a/graphics/java/android/graphics/BitmapRegionDecoder.java
+++ b/graphics/java/android/graphics/BitmapRegionDecoder.java
@@ -36,6 +36,9 @@
public final class BitmapRegionDecoder {
private int mNativeBitmapRegionDecoder;
private boolean mRecycled;
+ // ensures that the native decoder object exists and that only one decode can
+ // occur at a time.
+ private final Object mNativeLock = new Object();
/**
* Create a BitmapRegionDecoder from the specified byte array.
@@ -179,24 +182,30 @@
* decoded.
*/
public Bitmap decodeRegion(Rect rect, BitmapFactory.Options options) {
- checkRecycled("decodeRegion called on recycled region decoder");
- if (rect.right <= 0 || rect.bottom <= 0 || rect.left >= getWidth()
- || rect.top >= getHeight())
- throw new IllegalArgumentException("rectangle is outside the image");
- return nativeDecodeRegion(mNativeBitmapRegionDecoder, rect.left, rect.top,
- rect.right - rect.left, rect.bottom - rect.top, options);
+ synchronized (mNativeLock) {
+ checkRecycled("decodeRegion called on recycled region decoder");
+ if (rect.right <= 0 || rect.bottom <= 0 || rect.left >= getWidth()
+ || rect.top >= getHeight())
+ throw new IllegalArgumentException("rectangle is outside the image");
+ return nativeDecodeRegion(mNativeBitmapRegionDecoder, rect.left, rect.top,
+ rect.right - rect.left, rect.bottom - rect.top, options);
+ }
}
/** Returns the original image's width */
public int getWidth() {
- checkRecycled("getWidth called on recycled region decoder");
- return nativeGetWidth(mNativeBitmapRegionDecoder);
+ synchronized (mNativeLock) {
+ checkRecycled("getWidth called on recycled region decoder");
+ return nativeGetWidth(mNativeBitmapRegionDecoder);
+ }
}
/** Returns the original image's height */
public int getHeight() {
- checkRecycled("getHeight called on recycled region decoder");
- return nativeGetHeight(mNativeBitmapRegionDecoder);
+ synchronized (mNativeLock) {
+ checkRecycled("getHeight called on recycled region decoder");
+ return nativeGetHeight(mNativeBitmapRegionDecoder);
+ }
}
/**
@@ -210,9 +219,11 @@
* memory when there are no more references to this region decoder.
*/
public void recycle() {
- if (!mRecycled) {
- nativeClean(mNativeBitmapRegionDecoder);
- mRecycled = true;
+ synchronized (mNativeLock) {
+ if (!mRecycled) {
+ nativeClean(mNativeBitmapRegionDecoder);
+ mRecycled = true;
+ }
}
}
diff --git a/libs/hwui/Android.mk b/libs/hwui/Android.mk
index e032ae4..549edd2 100644
--- a/libs/hwui/Android.mk
+++ b/libs/hwui/Android.mk
@@ -21,6 +21,7 @@
LayerRenderer.cpp \
Matrix.cpp \
OpenGLRenderer.cpp \
+ PathRenderer.cpp \
Patch.cpp \
PatchCache.cpp \
PathCache.cpp \
@@ -34,7 +35,7 @@
Stencil.cpp \
TextureCache.cpp \
TextDropShadowCache.cpp
-
+
LOCAL_C_INCLUDES += \
$(JNI_H_INCLUDE) \
$(LOCAL_PATH)/../../include/utils \
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp
index b149bb9..068eb9e 100644
--- a/libs/hwui/Caches.cpp
+++ b/libs/hwui/Caches.cpp
@@ -429,7 +429,7 @@
void Caches::startTiling(GLuint x, GLuint y, GLuint width, GLuint height, bool opaque) {
if (extensions.hasTiledRendering()) {
- glStartTilingQCOM(x, y, width, height, GL_COLOR_BUFFER_BIT0_QCOM);
+ glStartTilingQCOM(x, y, width, height, opaque ? GL_NONE : GL_COLOR_BUFFER_BIT0_QCOM);
}
}
diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp
index 5d59a4c..799aea3 100644
--- a/libs/hwui/LayerRenderer.cpp
+++ b/libs/hwui/LayerRenderer.cpp
@@ -78,6 +78,10 @@
return mLayer->getFbo();
}
+bool LayerRenderer::suppressErrorChecks() {
+ return true;
+}
+
///////////////////////////////////////////////////////////////////////////////
// Dirty region tracking
///////////////////////////////////////////////////////////////////////////////
@@ -345,7 +349,7 @@
bool LayerRenderer::copyLayer(Layer* layer, SkBitmap* bitmap) {
Caches& caches = Caches::getInstance();
- if (layer && layer->isTextureLayer() && bitmap->width() <= caches.maxTextureSize &&
+ if (layer && bitmap->width() <= caches.maxTextureSize &&
bitmap->height() <= caches.maxTextureSize) {
GLuint fbo = caches.fboCache.get();
@@ -358,6 +362,7 @@
GLuint texture;
GLuint previousFbo;
+ GLuint previousViewport[4];
GLenum format;
GLenum type;
@@ -387,11 +392,13 @@
float alpha = layer->getAlpha();
SkXfermode::Mode mode = layer->getMode();
+ GLuint previousLayerFbo = layer->getFbo();
layer->setAlpha(255, SkXfermode::kSrc_Mode);
layer->setFbo(fbo);
glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint*) &previousFbo);
+ glGetIntegerv(GL_VIEWPORT, (GLint*) &previousViewport);
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
glGenTextures(1, &texture);
@@ -459,9 +466,11 @@
glBindFramebuffer(GL_FRAMEBUFFER, previousFbo);
layer->setAlpha(alpha, mode);
- layer->setFbo(0);
+ layer->setFbo(previousLayerFbo);
glDeleteTextures(1, &texture);
caches.fboCache.put(fbo);
+ glViewport(previousViewport[0], previousViewport[1],
+ previousViewport[2], previousViewport[3]);
return status;
}
diff --git a/libs/hwui/LayerRenderer.h b/libs/hwui/LayerRenderer.h
index 8d42f7f..392f863 100644
--- a/libs/hwui/LayerRenderer.h
+++ b/libs/hwui/LayerRenderer.h
@@ -51,10 +51,6 @@
virtual int prepareDirty(float left, float top, float right, float bottom, bool opaque);
virtual void finish();
- virtual bool hasLayer();
- virtual Region* getRegion();
- virtual GLint getTargetFbo();
-
ANDROID_API static Layer* createTextureLayer(bool isOpaque);
ANDROID_API static Layer* createLayer(uint32_t width, uint32_t height, bool isOpaque = false);
ANDROID_API static bool resizeLayer(Layer* layer, uint32_t width, uint32_t height);
@@ -64,6 +60,12 @@
ANDROID_API static void destroyLayerDeferred(Layer* layer);
ANDROID_API static bool copyLayer(Layer* layer, SkBitmap* bitmap);
+protected:
+ virtual bool hasLayer();
+ virtual Region* getRegion();
+ virtual GLint getTargetFbo();
+ virtual bool suppressErrorChecks();
+
private:
void generateMesh();
diff --git a/libs/hwui/Matrix.cpp b/libs/hwui/Matrix.cpp
index 7348f4d..87add17 100644
--- a/libs/hwui/Matrix.cpp
+++ b/libs/hwui/Matrix.cpp
@@ -55,21 +55,21 @@
mSimpleMatrix = true;
}
-bool Matrix4::changesBounds() {
+bool Matrix4::changesBounds() const {
return !(data[0] == 1.0f && data[1] == 0.0f && data[2] == 0.0f && data[4] == 0.0f &&
data[5] == 1.0f && data[6] == 0.0f && data[8] == 0.0f && data[9] == 0.0f &&
data[10] == 1.0f);
}
-bool Matrix4::isPureTranslate() {
+bool Matrix4::isPureTranslate() const {
return mSimpleMatrix && data[kScaleX] == 1.0f && data[kScaleY] == 1.0f;
}
-bool Matrix4::isSimple() {
+bool Matrix4::isSimple() const {
return mSimpleMatrix;
}
-bool Matrix4::isIdentity() {
+bool Matrix4::isIdentity() const {
return mIsIdentity;
}
diff --git a/libs/hwui/Matrix.h b/libs/hwui/Matrix.h
index 22220a9..02b781e 100644
--- a/libs/hwui/Matrix.h
+++ b/libs/hwui/Matrix.h
@@ -112,11 +112,11 @@
multiply(u);
}
- bool isPureTranslate();
- bool isSimple();
- bool isIdentity();
+ bool isPureTranslate() const;
+ bool isSimple() const;
+ bool isIdentity() const;
- bool changesBounds();
+ bool changesBounds() const;
void copyTo(float* v) const;
void copyTo(SkMatrix& v) const;
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 9b9ca12..bdf1229b 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -33,6 +33,7 @@
#include "OpenGLRenderer.h"
#include "DisplayListRenderer.h"
+#include "PathRenderer.h"
#include "Vector.h"
namespace android {
@@ -175,7 +176,9 @@
mSaveCount = 1;
mSnapshot->setClip(left, top, right, bottom);
- mDirtyClip = mOpaqueFrame = opaque;
+ mDirtyClip = opaque;
+
+ updateLayers();
// If we know that we are going to redraw the entire framebuffer,
// perform a discard to let the driver know we don't need to preserve
@@ -189,7 +192,7 @@
syncState();
mTilingSnapshot = mSnapshot;
- startTiling();
+ startTiling(mTilingSnapshot, true);
if (!opaque) {
mCaches.enableScissor();
@@ -213,16 +216,9 @@
}
}
-void OpenGLRenderer::startTiling() {
- startTiling(mTilingSnapshot);
-}
-
-void OpenGLRenderer::startTiling(const sp<Snapshot>& s) {
- bool opaque = mOpaqueFrame;
+void OpenGLRenderer::startTiling(const sp<Snapshot>& s, bool opaque) {
Rect* clip = mTilingSnapshot->clipRect;
-
if (s->flags & Snapshot::kFlagIsFboLayer) {
- opaque = !s->layer->isBlend();
clip = s->clipRect;
}
@@ -237,33 +233,36 @@
void OpenGLRenderer::finish() {
endTiling();
+ if (!suppressErrorChecks()) {
#if DEBUG_OPENGL
- GLenum status = GL_NO_ERROR;
- while ((status = glGetError()) != GL_NO_ERROR) {
- ALOGD("GL error from OpenGLRenderer: 0x%x", status);
- switch (status) {
- case GL_INVALID_ENUM:
- ALOGE(" GL_INVALID_ENUM");
- break;
- case GL_INVALID_VALUE:
- ALOGE(" GL_INVALID_VALUE");
- break;
- case GL_INVALID_OPERATION:
- ALOGE(" GL_INVALID_OPERATION");
- break;
- case GL_OUT_OF_MEMORY:
- ALOGE(" Out of memory!");
- break;
+ GLenum status = GL_NO_ERROR;
+ while ((status = glGetError()) != GL_NO_ERROR) {
+ ALOGD("GL error from OpenGLRenderer: 0x%x", status);
+ switch (status) {
+ case GL_INVALID_ENUM:
+ ALOGE(" GL_INVALID_ENUM");
+ break;
+ case GL_INVALID_VALUE:
+ ALOGE(" GL_INVALID_VALUE");
+ break;
+ case GL_INVALID_OPERATION:
+ ALOGE(" GL_INVALID_OPERATION");
+ break;
+ case GL_OUT_OF_MEMORY:
+ ALOGE(" Out of memory!");
+ break;
+ }
}
- }
#endif
+
#if DEBUG_MEMORY_USAGE
- mCaches.dumpMemoryUsage();
-#else
- if (mCaches.getDebugLevel() & kDebugMemory) {
mCaches.dumpMemoryUsage();
- }
+#else
+ if (mCaches.getDebugLevel() & kDebugMemory) {
+ mCaches.dumpMemoryUsage();
+ }
#endif
+ }
}
void OpenGLRenderer::interrupt() {
@@ -400,6 +399,75 @@
}
///////////////////////////////////////////////////////////////////////////////
+// Layers
+///////////////////////////////////////////////////////////////////////////////
+
+bool OpenGLRenderer::updateLayer(Layer* layer, bool inFrame) {
+ if (layer->deferredUpdateScheduled && layer->renderer && layer->displayList) {
+ OpenGLRenderer* renderer = layer->renderer;
+ Rect& dirty = layer->dirtyRect;
+
+ if (inFrame) endTiling();
+
+ renderer->setViewport(layer->layer.getWidth(), layer->layer.getHeight());
+ renderer->prepareDirty(dirty.left, dirty.top, dirty.right, dirty.bottom, !layer->isBlend());
+ renderer->drawDisplayList(layer->displayList, dirty, DisplayList::kReplayFlag_ClipChildren);
+ renderer->finish();
+
+ if (inFrame) {
+ resumeAfterLayer();
+ startTiling(mSnapshot);
+ }
+
+ dirty.setEmpty();
+ layer->deferredUpdateScheduled = false;
+ layer->renderer = NULL;
+ layer->displayList = NULL;
+
+ return true;
+ }
+
+ return false;
+}
+
+void OpenGLRenderer::updateLayers() {
+ int count = mLayerUpdates.size();
+ if (count > 0) {
+ startMark("Layer Updates");
+
+ // Note: it is very important to update the layers in reverse order
+ for (int i = count - 1; i >= 0; i--) {
+ Layer* layer = mLayerUpdates.itemAt(i);
+ updateLayer(layer, false);
+ mCaches.resourceCache.decrementRefcount(layer);
+ }
+ mLayerUpdates.clear();
+
+ glBindFramebuffer(GL_FRAMEBUFFER, getTargetFbo());
+ endMark();
+ }
+}
+
+void OpenGLRenderer::pushLayerUpdate(Layer* layer) {
+ if (layer) {
+ mLayerUpdates.push_back(layer);
+ mCaches.resourceCache.incrementRefcount(layer);
+ }
+}
+
+void OpenGLRenderer::clearLayerUpdates() {
+ size_t count = mLayerUpdates.size();
+ if (count > 0) {
+ mCaches.resourceCache.lock();
+ for (size_t i = 0; i < count; i++) {
+ mCaches.resourceCache.decrementRefcountLocked(mLayerUpdates.itemAt(i));
+ }
+ mCaches.resourceCache.unlock();
+ mLayerUpdates.clear();
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
// State management
///////////////////////////////////////////////////////////////////////////////
@@ -473,15 +541,7 @@
if (p) {
alpha = p->getAlpha();
- if (!mCaches.extensions.hasFramebufferFetch()) {
- const bool isMode = SkXfermode::IsMode(p->getXfermode(), &mode);
- if (!isMode) {
- // Assume SRC_OVER
- mode = SkXfermode::kSrcOver_Mode;
- }
- } else {
- mode = getXfermode(p->getXfermode());
- }
+ mode = getXfermode(p->getXfermode());
} else {
mode = SkXfermode::kSrcOver_Mode;
}
@@ -1193,12 +1253,12 @@
mCaches.disbaleTexCoordsVertexArray();
}
-void OpenGLRenderer::setupDrawAALine() {
+void OpenGLRenderer::setupDrawAA() {
mDescription.isAA = true;
}
-void OpenGLRenderer::setupDrawAARect() {
- mDescription.isAARect = true;
+void OpenGLRenderer::setupDrawVertexShape() {
+ mDescription.isVertexShape = true;
}
void OpenGLRenderer::setupDrawPoint(float pointSize) {
@@ -1805,97 +1865,48 @@
* a fragment shader to compute the translucency of the color from its position, we simply use a
* varying parameter to define how far a given pixel is into the region.
*/
-void OpenGLRenderer::drawAARect(float left, float top, float right, float bottom,
- int color, SkXfermode::Mode mode) {
- float inverseScaleX = 1.0f;
- float inverseScaleY = 1.0f;
+void OpenGLRenderer::drawConvexPath(const SkPath& path, int color, SkXfermode::Mode mode, bool isAA) {
+ VertexBuffer vertexBuffer;
+ // TODO: try clipping large paths to viewport
+ PathRenderer::convexPathFillVertices(path, mSnapshot->transform, vertexBuffer, isAA);
- // The quad that we use needs to account for scaling.
- if (CC_UNLIKELY(!mSnapshot->transform->isPureTranslate())) {
- Matrix4 *mat = mSnapshot->transform;
- float m00 = mat->data[Matrix4::kScaleX];
- float m01 = mat->data[Matrix4::kSkewY];
- float m10 = mat->data[Matrix4::kSkewX];
- float m11 = mat->data[Matrix4::kScaleY];
- float scaleX = sqrt(m00 * m00 + m01 * m01);
- float scaleY = sqrt(m10 * m10 + m11 * m11);
- inverseScaleX = (scaleX != 0) ? (inverseScaleX / scaleX) : 0;
- inverseScaleY = (scaleY != 0) ? (inverseScaleY / scaleY) : 0;
- }
+ setupDraw();
+ setupDrawNoTexture();
+ if (isAA) setupDrawAA();
+ setupDrawVertexShape();
+ setupDrawColor(color, ((color >> 24) & 0xFF) * mSnapshot->alpha);
+ setupDrawColorFilter();
+ setupDrawShader();
+ setupDrawBlending(isAA, mode);
+ setupDrawProgram();
+ setupDrawModelViewIdentity(true);
+ setupDrawColorUniforms();
+ setupDrawColorFilterUniforms();
+ setupDrawShaderIdentityUniforms();
- float boundarySizeX = .5 * inverseScaleX;
- float boundarySizeY = .5 * inverseScaleY;
+ void* vertices = vertexBuffer.getBuffer();
+ bool force = mCaches.unbindMeshBuffer();
+ mCaches.bindPositionVertexPointer(force, mCaches.currentProgram->position,
+ vertices, isAA ? gAlphaVertexStride : gVertexStride);
+ mCaches.resetTexCoordsVertexPointer();
+ mCaches.unbindIndicesBuffer();
- float innerLeft = left + boundarySizeX;
- float innerRight = right - boundarySizeX;
- float innerTop = top + boundarySizeY;
- float innerBottom = bottom - boundarySizeY;
+ int alphaSlot = -1;
+ if (isAA) {
+ void* alphaCoords = ((GLbyte*) vertices) + gVertexAlphaOffset;
+ alphaSlot = mCaches.currentProgram->getAttrib("vtxAlpha");
- // Adjust the rect by the AA boundary padding
- left -= boundarySizeX;
- right += boundarySizeX;
- top -= boundarySizeY;
- bottom += boundarySizeY;
-
- if (!quickReject(left, top, right, bottom)) {
- setupDraw();
- setupDrawNoTexture();
- setupDrawAARect();
- setupDrawColor(color, ((color >> 24) & 0xFF) * mSnapshot->alpha);
- setupDrawColorFilter();
- setupDrawShader();
- setupDrawBlending(true, mode);
- setupDrawProgram();
- setupDrawModelViewIdentity(true);
- setupDrawColorUniforms();
- setupDrawColorFilterUniforms();
- setupDrawShaderIdentityUniforms();
-
- AlphaVertex rects[14];
- AlphaVertex* aVertices = &rects[0];
- void* alphaCoords = ((GLbyte*) aVertices) + gVertexAlphaOffset;
-
- bool force = mCaches.unbindMeshBuffer();
- mCaches.bindPositionVertexPointer(force, mCaches.currentProgram->position,
- aVertices, gAlphaVertexStride);
- mCaches.resetTexCoordsVertexPointer();
- mCaches.unbindIndicesBuffer();
-
- int alphaSlot = mCaches.currentProgram->getAttrib("vtxAlpha");
+ // TODO: avoid enable/disable in back to back uses of the alpha attribute
glEnableVertexAttribArray(alphaSlot);
glVertexAttribPointer(alphaSlot, 1, GL_FLOAT, GL_FALSE, gAlphaVertexStride, alphaCoords);
+ }
- // draw left
- AlphaVertex::set(aVertices++, left, bottom, 0);
- AlphaVertex::set(aVertices++, innerLeft, innerBottom, 1);
- AlphaVertex::set(aVertices++, left, top, 0);
- AlphaVertex::set(aVertices++, innerLeft, innerTop, 1);
+ SkRect bounds = path.getBounds();
+ dirtyLayer(bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom, *mSnapshot->transform);
- // draw top
- AlphaVertex::set(aVertices++, right, top, 0);
- AlphaVertex::set(aVertices++, innerRight, innerTop, 1);
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, vertexBuffer.getSize());
- // draw right
- AlphaVertex::set(aVertices++, right, bottom, 0);
- AlphaVertex::set(aVertices++, innerRight, innerBottom, 1);
-
- // draw bottom
- AlphaVertex::set(aVertices++, left, bottom, 0);
- AlphaVertex::set(aVertices++, innerLeft, innerBottom, 1);
-
- // draw inner rect (repeating last vertex to create degenerate bridge triangles)
- // TODO: also consider drawing the inner rect without the blending-forced shader, if
- // blending is expensive. Note: can't use drawColorRect() since it doesn't use vertex
- // buffers like below, resulting in slightly different transformed coordinates.
- AlphaVertex::set(aVertices++, innerLeft, innerBottom, 1);
- AlphaVertex::set(aVertices++, innerLeft, innerTop, 1);
- AlphaVertex::set(aVertices++, innerRight, innerBottom, 1);
- AlphaVertex::set(aVertices++, innerRight, innerTop, 1);
-
- dirtyLayer(left, top, right, bottom, *mSnapshot->transform);
-
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 14);
-
+ if (isAA) {
glDisableVertexAttribArray(alphaSlot);
}
}
@@ -1973,7 +1984,7 @@
setupDraw();
setupDrawNoTexture();
if (isAA) {
- setupDrawAALine();
+ setupDrawAA();
}
setupDrawColor(paint->getColor(), alpha);
setupDrawColorFilter();
@@ -2259,30 +2270,62 @@
}
status_t OpenGLRenderer::drawRoundRect(float left, float top, float right, float bottom,
- float rx, float ry, SkPaint* paint) {
- if (mSnapshot->isIgnored()) return DrawGlInfo::kStatusDone;
+ float rx, float ry, SkPaint* p) {
+ if (mSnapshot->isIgnored() || quickReject(left, top, right, bottom)) {
+ return DrawGlInfo::kStatusDone;
+ }
- mCaches.activeTexture(0);
- const PathTexture* texture = mCaches.roundRectShapeCache.getRoundRect(
- right - left, bottom - top, rx, ry, paint);
- return drawShape(left, top, texture, paint);
+ if (p->getStyle() != SkPaint::kFill_Style) {
+ mCaches.activeTexture(0);
+ const PathTexture* texture = mCaches.roundRectShapeCache.getRoundRect(
+ right - left, bottom - top, rx, ry, p);
+ return drawShape(left, top, texture, p);
+ }
+
+ SkPath path;
+ SkRect rect = SkRect::MakeLTRB(left, top, right, bottom);
+ path.addRoundRect(rect, rx, ry);
+ drawConvexPath(path, p->getColor(), getXfermode(p->getXfermode()), p->isAntiAlias());
+
+ return DrawGlInfo::kStatusDrew;
}
-status_t OpenGLRenderer::drawCircle(float x, float y, float radius, SkPaint* paint) {
- if (mSnapshot->isIgnored()) return DrawGlInfo::kStatusDone;
+status_t OpenGLRenderer::drawCircle(float x, float y, float radius, SkPaint* p) {
+ if (mSnapshot->isIgnored() || quickReject(x - radius, y - radius, x + radius, y + radius)) {
+ return DrawGlInfo::kStatusDone;
+ }
- mCaches.activeTexture(0);
- const PathTexture* texture = mCaches.circleShapeCache.getCircle(radius, paint);
- return drawShape(x - radius, y - radius, texture, paint);
+ if (p->getStyle() != SkPaint::kFill_Style) {
+ mCaches.activeTexture(0);
+ const PathTexture* texture = mCaches.circleShapeCache.getCircle(radius, p);
+ return drawShape(x - radius, y - radius, texture, p);
+ }
+
+ SkPath path;
+ path.addCircle(x, y, radius);
+ drawConvexPath(path, p->getColor(), getXfermode(p->getXfermode()), p->isAntiAlias());
+
+ return DrawGlInfo::kStatusDrew;
}
status_t OpenGLRenderer::drawOval(float left, float top, float right, float bottom,
- SkPaint* paint) {
- if (mSnapshot->isIgnored()) return DrawGlInfo::kStatusDone;
+ SkPaint* p) {
+ if (mSnapshot->isIgnored() || quickReject(left, top, right, bottom)) {
+ return DrawGlInfo::kStatusDone;
+ }
- mCaches.activeTexture(0);
- const PathTexture* texture = mCaches.ovalShapeCache.getOval(right - left, bottom - top, paint);
- return drawShape(left, top, texture, paint);
+ if (p->getStyle() != SkPaint::kFill_Style) {
+ mCaches.activeTexture(0);
+ const PathTexture* texture = mCaches.ovalShapeCache.getOval(right - left, bottom - top, p);
+ return drawShape(left, top, texture, p);
+ }
+
+ SkPath path;
+ SkRect rect = SkRect::MakeLTRB(left, top, right, bottom);
+ path.addOval(rect);
+ drawConvexPath(path, p->getColor(), getXfermode(p->getXfermode()), p->isAntiAlias());
+
+ return DrawGlInfo::kStatusDrew;
}
status_t OpenGLRenderer::drawArc(float left, float top, float right, float bottom,
@@ -2299,40 +2342,23 @@
return drawShape(left, top, texture, paint);
}
-status_t OpenGLRenderer::drawRectAsShape(float left, float top, float right, float bottom,
- SkPaint* paint) {
- if (mSnapshot->isIgnored()) return DrawGlInfo::kStatusDone;
-
- mCaches.activeTexture(0);
- const PathTexture* texture = mCaches.rectShapeCache.getRect(right - left, bottom - top, paint);
- return drawShape(left, top, texture, paint);
-}
-
status_t OpenGLRenderer::drawRect(float left, float top, float right, float bottom, SkPaint* p) {
- if (p->getStyle() != SkPaint::kFill_Style) {
- return drawRectAsShape(left, top, right, bottom, p);
- }
-
- if (quickReject(left, top, right, bottom)) {
+ if (mSnapshot->isIgnored() || quickReject(left, top, right, bottom)) {
return DrawGlInfo::kStatusDone;
}
- SkXfermode::Mode mode;
- if (!mCaches.extensions.hasFramebufferFetch()) {
- const bool isMode = SkXfermode::IsMode(p->getXfermode(), &mode);
- if (!isMode) {
- // Assume SRC_OVER
- mode = SkXfermode::kSrcOver_Mode;
- }
- } else {
- mode = getXfermode(p->getXfermode());
+ if (p->getStyle() != SkPaint::kFill_Style) {
+ mCaches.activeTexture(0);
+ const PathTexture* texture = mCaches.rectShapeCache.getRect(right - left, bottom - top, p);
+ return drawShape(left, top, texture, p);
}
- int color = p->getColor();
if (p->isAntiAlias() && !mSnapshot->transform->isSimple()) {
- drawAARect(left, top, right, bottom, color, mode);
+ SkPath path;
+ path.addRect(left, top, right, bottom);
+ drawConvexPath(path, p->getColor(), getXfermode(p->getXfermode()), true);
} else {
- drawColorRect(left, top, right, bottom, color, mode);
+ drawColorRect(left, top, right, bottom, p->getColor(), getXfermode(p->getXfermode()));
}
return DrawGlInfo::kStatusDrew;
@@ -2636,25 +2662,7 @@
}
bool debugLayerUpdate = false;
- if (layer->deferredUpdateScheduled && layer->renderer && layer->displayList) {
- OpenGLRenderer* renderer = layer->renderer;
- Rect& dirty = layer->dirtyRect;
-
- endTiling();
-
- renderer->setViewport(layer->layer.getWidth(), layer->layer.getHeight());
- renderer->prepareDirty(dirty.left, dirty.top, dirty.right, dirty.bottom, !layer->isBlend());
- renderer->drawDisplayList(layer->displayList, dirty, DisplayList::kReplayFlag_ClipChildren);
- renderer->finish();
-
- resumeAfterLayer();
- startTiling(mSnapshot);
-
- dirty.setEmpty();
- layer->deferredUpdateScheduled = false;
- layer->renderer = NULL;
- layer->displayList = NULL;
-
+ if (updateLayer(layer, true)) {
debugLayerUpdate = mCaches.debugLayersUpdates;
}
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 10ba86e..7d5da68 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -132,6 +132,9 @@
ANDROID_API void attachFunctor(Functor* functor);
virtual status_t callDrawGLFunction(Functor* functor, Rect& dirty);
+ ANDROID_API void pushLayerUpdate(Layer* layer);
+ ANDROID_API void clearLayerUpdates();
+
ANDROID_API int getSaveCount() const;
virtual int save(int flags);
virtual void restore();
@@ -339,6 +342,13 @@
return resultMode;
}
+ /**
+ * Set to true to suppress error checks at the end of a frame.
+ */
+ virtual bool suppressErrorChecks() {
+ return false;
+ }
+
private:
/**
* Ensures the state of the renderer is the same as the state of
@@ -351,8 +361,7 @@
* This method needs to be invoked every time getTargetFbo() is
* bound again.
*/
- void startTiling();
- void startTiling(const sp<Snapshot>& snapshot);
+ void startTiling(const sp<Snapshot>& snapshot, bool opaque = false);
/**
* Tells the GPU that we are done drawing the frame or that we
@@ -484,19 +493,6 @@
status_t drawShape(float left, float top, const PathTexture* texture, SkPaint* paint);
/**
- * Renders the rect defined by the specified bounds as a shape.
- * This will render the rect using a path texture, which is used to render
- * rects with stroke effects.
- *
- * @param left The left coordinate of the rect to draw
- * @param top The top coordinate of the rect to draw
- * @param right The right coordinate of the rect to draw
- * @param bottom The bottom coordinate of the rect to draw
- * @param p The paint to draw the rect with
- */
- status_t drawRectAsShape(float left, float top, float right, float bottom, SkPaint* p);
-
- /**
* Draws the specified texture as an alpha bitmap. Alpha bitmaps obey
* different compositing rules.
*
@@ -508,17 +504,14 @@
void drawAlphaBitmap(Texture* texture, float left, float top, SkPaint* paint);
/**
- * Renders the rect defined by the specified bounds as an anti-aliased rect.
+ * Renders the convex hull defined by the specified path as a strip of polygons.
*
- * @param left The left coordinate of the rect to draw
- * @param top The top coordinate of the rect to draw
- * @param right The right coordinate of the rect to draw
- * @param bottom The bottom coordinate of the rect to draw
+ * @param path The hull of the path to draw
* @param color The color of the rect
- * @param mode The blending mode to draw the rect
+ * @param mode The blending mode to draw the path
+ * @param isAA True if the drawing should be anti-aliased
*/
- void drawAARect(float left, float top, float right, float bottom,
- int color, SkXfermode::Mode mode);
+ void drawConvexPath(const SkPath& path, int color, SkXfermode::Mode mode, bool isAA);
/**
* Draws a textured rectangle with the specified texture. The specified coordinates
@@ -679,8 +672,8 @@
void setupDrawWithTexture(bool isAlpha8 = false);
void setupDrawWithExternalTexture();
void setupDrawNoTexture();
- void setupDrawAALine();
- void setupDrawAARect();
+ void setupDrawAA();
+ void setupDrawVertexShape();
void setupDrawPoint(float pointSize);
void setupDrawColor(int color);
void setupDrawColor(int color, int alpha);
@@ -721,6 +714,9 @@
void finishDrawTexture();
void accountForClear(SkXfermode::Mode mode);
+ bool updateLayer(Layer* layer, bool inFrame);
+ void updateLayers();
+
/**
* Renders the specified region as a series of rectangles. This method
* is used for debugging only.
@@ -781,6 +777,8 @@
Vector<Rect*> mLayers;
// List of functors to invoke after a frame is drawn
SortedVector<Functor*> mFunctors;
+ // List of layers to update at the beginning of a frame
+ Vector<Layer*> mLayerUpdates;
// Indentity matrix
const mat4 mIdentity;
diff --git a/libs/hwui/PathRenderer.cpp b/libs/hwui/PathRenderer.cpp
new file mode 100644
index 0000000..d222009
--- /dev/null
+++ b/libs/hwui/PathRenderer.cpp
@@ -0,0 +1,304 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "PathRenderer"
+#define LOG_NDEBUG 1
+#define ATRACE_TAG ATRACE_TAG_GRAPHICS
+
+#define VERTEX_DEBUG 0
+
+#include <SkPath.h>
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/Log.h>
+#include <utils/Trace.h>
+
+#include "PathRenderer.h"
+#include "Matrix.h"
+#include "Vector.h"
+#include "Vertex.h"
+
+namespace android {
+namespace uirenderer {
+
+#define THRESHOLD 0.5f
+
+void PathRenderer::computeInverseScales(const mat4 *transform,
+ float &inverseScaleX, float& inverseScaleY) {
+ inverseScaleX = 1.0f;
+ inverseScaleY = 1.0f;
+ if (CC_UNLIKELY(!transform->isPureTranslate())) {
+ float m00 = transform->data[Matrix4::kScaleX];
+ float m01 = transform->data[Matrix4::kSkewY];
+ float m10 = transform->data[Matrix4::kSkewX];
+ float m11 = transform->data[Matrix4::kScaleY];
+ float scaleX = sqrt(m00 * m00 + m01 * m01);
+ float scaleY = sqrt(m10 * m10 + m11 * m11);
+ inverseScaleX = (scaleX != 0) ? (inverseScaleX / scaleX) : 0;
+ inverseScaleY = (scaleY != 0) ? (inverseScaleY / scaleY) : 0;
+ }
+}
+
+void PathRenderer::convexPathFillVertices(const SkPath &path, const mat4 *transform,
+ VertexBuffer &vertexBuffer, bool isAA) {
+ ATRACE_CALL();
+ float inverseScaleX;
+ float inverseScaleY;
+ computeInverseScales(transform, inverseScaleX, inverseScaleY);
+
+ Vector<Vertex> tempVertices;
+ float thresholdx = THRESHOLD * inverseScaleX;
+ float thresholdy = THRESHOLD * inverseScaleY;
+ convexPathVertices(path,
+ thresholdx * thresholdx,
+ thresholdy * thresholdy,
+ tempVertices);
+
+#if VERTEX_DEBUG
+ for (unsigned int i = 0; i < tempVertices.size(); i++) {
+ ALOGD("orig path: point at %f %f",
+ tempVertices[i].position[0],
+ tempVertices[i].position[1]);
+ }
+#endif
+ int currentIndex = 0;
+ if (!isAA) {
+ Vertex* buffer = vertexBuffer.alloc<Vertex>(tempVertices.size());
+
+ // zig zag between all previous points on the inside of the hull to create a
+ // triangle strip that fills the hull
+ int srcAindex = 0;
+ int srcBindex = tempVertices.size() - 1;
+ while (srcAindex <= srcBindex) {
+ Vertex::set(&buffer[currentIndex++],
+ tempVertices.editArray()[srcAindex].position[0],
+ tempVertices.editArray()[srcAindex].position[1]);
+ if (srcAindex == srcBindex) break;
+ Vertex::set(&buffer[currentIndex++],
+ tempVertices.editArray()[srcBindex].position[0],
+ tempVertices.editArray()[srcBindex].position[1]);
+ srcAindex++;
+ srcBindex--;
+ }
+ return;
+ }
+ AlphaVertex* buffer = vertexBuffer.alloc<AlphaVertex>(tempVertices.size() * 3 + 2);
+
+ // generate alpha points - fill Alpha vertex gaps in between each point with
+ // alpha 0 vertex, offset by a scaled normal.
+ Vertex* last = &(tempVertices.editArray()[tempVertices.size()-1]);
+
+ for (unsigned int i = 0; i<tempVertices.size(); i++) {
+ Vertex* current = &(tempVertices.editArray()[i]);
+ Vertex* next = &(tempVertices.editArray()[i + 1 >= tempVertices.size() ? 0 : i + 1]);
+
+ vec2 lastNormal(current->position[1] - last->position[1],
+ last->position[0] - current->position[0]);
+ lastNormal.normalize();
+ vec2 nextNormal(next->position[1] - current->position[1],
+ current->position[0] - next->position[0]);
+ nextNormal.normalize();
+
+ // AA point offset from original point is that point's normal, such that
+ // each side is offset by .5 pixels
+ vec2 totalOffset = (lastNormal + nextNormal) / (2 * (1 + lastNormal.dot(nextNormal)));
+ totalOffset.x *= inverseScaleX;
+ totalOffset.y *= inverseScaleY;
+
+ AlphaVertex::set(&buffer[currentIndex++],
+ current->position[0] + totalOffset.x,
+ current->position[1] + totalOffset.y,
+ 0.0f);
+ AlphaVertex::set(&buffer[currentIndex++],
+ current->position[0] - totalOffset.x,
+ current->position[1] - totalOffset.y,
+ 1.0f);
+ last = current;
+ }
+
+ // wrap around to beginning
+ AlphaVertex::set(&buffer[currentIndex++],
+ buffer[0].position[0],
+ buffer[0].position[1], 0.0f);
+ AlphaVertex::set(&buffer[currentIndex++],
+ buffer[1].position[0],
+ buffer[1].position[1], 1.0f);
+
+ // zig zag between all previous points on the inside of the hull to create a
+ // triangle strip that fills the hull, repeating the first inner point to
+ // create degenerate tris to start inside path
+ int srcAindex = 0;
+ int srcBindex = tempVertices.size() - 1;
+ while (srcAindex <= srcBindex) {
+ AlphaVertex::set(&buffer[currentIndex++],
+ buffer[srcAindex * 2 + 1].position[0],
+ buffer[srcAindex * 2 + 1].position[1],
+ 1.0f);
+ if (srcAindex == srcBindex) break;
+ AlphaVertex::set(&buffer[currentIndex++],
+ buffer[srcBindex * 2 + 1].position[0],
+ buffer[srcBindex * 2 + 1].position[1],
+ 1.0f);
+ srcAindex++;
+ srcBindex--;
+ }
+
+#if VERTEX_DEBUG
+ for (unsigned int i = 0; i < vertexBuffer.mSize; i++) {
+ ALOGD("point at %f %f",
+ buffer[i].position[0],
+ buffer[i].position[1]);
+ }
+#endif
+}
+
+
+void PathRenderer::convexPathVertices(const SkPath &path, float thresholdx, float thresholdy,
+ Vector<Vertex> &outputVertices) {
+ ATRACE_CALL();
+
+ SkPath::Iter iter(path, true);
+ SkPoint pos;
+ SkPoint pts[4];
+ SkPath::Verb v;
+ Vertex* newVertex = 0;
+ while (SkPath::kDone_Verb != (v = iter.next(pts))) {
+ switch (v) {
+ case SkPath::kMove_Verb:
+ pos = pts[0];
+ ALOGV("Move to pos %f %f", pts[0].x(), pts[0].y());
+ break;
+ case SkPath::kClose_Verb:
+ ALOGV("Close at pos %f %f", pts[0].x(), pts[0].y());
+ break;
+ case SkPath::kLine_Verb:
+ ALOGV("kLine_Verb %f %f -> %f %f",
+ pts[0].x(), pts[0].y(),
+ pts[1].x(), pts[1].y());
+
+ // TODO: make this not yuck
+ outputVertices.push();
+ newVertex = &(outputVertices.editArray()[outputVertices.size()-1]);
+ Vertex::set(newVertex, pts[1].x(), pts[1].y());
+ break;
+ case SkPath::kQuad_Verb:
+ ALOGV("kQuad_Verb");
+ recursiveQuadraticBezierVertices(
+ pts[0].x(), pts[0].y(),
+ pts[2].x(), pts[2].y(),
+ pts[1].x(), pts[1].y(),
+ thresholdx, thresholdy,
+ outputVertices);
+ break;
+ case SkPath::kCubic_Verb:
+ ALOGV("kCubic_Verb");
+ recursiveCubicBezierVertices(
+ pts[0].x(), pts[0].y(),
+ pts[1].x(), pts[1].y(),
+ pts[3].x(), pts[3].y(),
+ pts[2].x(), pts[2].y(),
+ thresholdx, thresholdy, outputVertices);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+void PathRenderer::recursiveCubicBezierVertices(
+ float p1x, float p1y, float c1x, float c1y,
+ float p2x, float p2y, float c2x, float c2y,
+ float thresholdx, float thresholdy, Vector<Vertex> &outputVertices) {
+ float dx = p2x - p1x;
+ float dy = p2y - p1y;
+ float d1 = fabs((c1x - p2x) * dy - (c1y - p2y) * dx);
+ float d2 = fabs((c2x - p2x) * dy - (c2y - p2y) * dx);
+ float d = d1 + d2;
+
+ if (d * d < (thresholdx * (dx * dx) + thresholdy * (dy * dy))) {
+ // below thresh, draw line by adding endpoint
+ // TODO: make this not yuck
+ outputVertices.push();
+ Vertex* newVertex = &(outputVertices.editArray()[outputVertices.size()-1]);
+ Vertex::set(newVertex, p2x, p2y);
+ } else {
+ float p1c1x = (p1x + c1x) * 0.5f;
+ float p1c1y = (p1y + c1y) * 0.5f;
+ float p2c2x = (p2x + c2x) * 0.5f;
+ float p2c2y = (p2y + c2y) * 0.5f;
+
+ float c1c2x = (c1x + c2x) * 0.5f;
+ float c1c2y = (c1y + c2y) * 0.5f;
+
+ float p1c1c2x = (p1c1x + c1c2x) * 0.5f;
+ float p1c1c2y = (p1c1y + c1c2y) * 0.5f;
+
+ float p2c1c2x = (p2c2x + c1c2x) * 0.5f;
+ float p2c1c2y = (p2c2y + c1c2y) * 0.5f;
+
+ float mx = (p1c1c2x + p2c1c2x) * 0.5f;
+ float my = (p1c1c2y + p2c1c2y) * 0.5f;
+
+ recursiveCubicBezierVertices(
+ p1x, p1y, p1c1x, p1c1y,
+ mx, my, p1c1c2x, p1c1c2y,
+ thresholdx, thresholdy,
+ outputVertices);
+ recursiveCubicBezierVertices(
+ mx, my, p2c1c2x, p2c1c2y,
+ p2x, p2y, p2c2x, p2c2y,
+ thresholdx, thresholdy,
+ outputVertices);
+ }
+}
+
+void PathRenderer::recursiveQuadraticBezierVertices(
+ float ax, float ay,
+ float bx, float by,
+ float cx, float cy,
+ float thresholdx, float thresholdy, Vector<Vertex> &outputVertices) {
+ float dx = bx - ax;
+ float dy = by - ay;
+ float d = (cx - bx) * dy - (cy - by) * dx;
+
+ if (d * d < (thresholdx * (dx * dx) + thresholdy * (dy * dy))) {
+ // below thresh, draw line by adding endpoint
+ // TODO: make this not yuck
+ outputVertices.push();
+ Vertex* newVertex = &(outputVertices.editArray()[outputVertices.size()-1]);
+ Vertex::set(newVertex, bx, by);
+ } else {
+ float acx = (ax + cx) * 0.5f;
+ float bcx = (bx + cx) * 0.5f;
+ float acy = (ay + cy) * 0.5f;
+ float bcy = (by + cy) * 0.5f;
+
+ // midpoint
+ float mx = (acx + bcx) * 0.5f;
+ float my = (acy + bcy) * 0.5f;
+
+ recursiveQuadraticBezierVertices(ax, ay, mx, my, acx, acy,
+ thresholdx, thresholdy, outputVertices);
+ recursiveQuadraticBezierVertices(mx, my, bx, by, bcx, bcy,
+ thresholdx, thresholdy, outputVertices);
+ }
+}
+
+}; // namespace uirenderer
+}; // namespace android
diff --git a/libs/hwui/PathRenderer.h b/libs/hwui/PathRenderer.h
new file mode 100644
index 0000000..1354f16
--- /dev/null
+++ b/libs/hwui/PathRenderer.h
@@ -0,0 +1,111 @@
+/*
+ * 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.
+ */
+
+#ifndef ANDROID_HWUI_PATH_RENDERER_H
+#define ANDROID_HWUI_PATH_RENDERER_H
+
+#include <utils/Vector.h>
+
+#include "Vertex.h"
+
+namespace android {
+namespace uirenderer {
+
+class Matrix4;
+typedef Matrix4 mat4;
+
+class VertexBuffer {
+public:
+ VertexBuffer():
+ mBuffer(0),
+ mSize(0),
+ mCleanupMethod(0)
+ {}
+
+ ~VertexBuffer()
+ {
+ if (mCleanupMethod)
+ mCleanupMethod(mBuffer);
+ }
+
+ template <class TYPE>
+ TYPE* alloc(int size)
+ {
+ mSize = size;
+ mBuffer = (void*)new TYPE[size];
+ mCleanupMethod = &(cleanup<TYPE>);
+
+ return (TYPE*)mBuffer;
+ }
+
+ void* getBuffer() { return mBuffer; }
+ unsigned int getSize() { return mSize; }
+
+private:
+ template <class TYPE>
+ static void cleanup(void* buffer)
+ {
+ delete[] (TYPE*)buffer;
+ }
+
+ void* mBuffer;
+ unsigned int mSize;
+ void (*mCleanupMethod)(void*);
+};
+
+class PathRenderer {
+public:
+ static void computeInverseScales(
+ const mat4 *transform, float &inverseScaleX, float& inverseScaleY);
+
+ static void convexPathFillVertices(
+ const SkPath &path, const mat4 *transform,
+ VertexBuffer &vertexBuffer, bool isAA);
+
+private:
+ static void convexPathVertices(
+ const SkPath &path,
+ float thresholdx, float thresholdy,
+ Vector<Vertex> &outputVertices);
+
+/*
+ endpoints a & b,
+ control c
+ */
+ static void recursiveQuadraticBezierVertices(
+ float ax, float ay,
+ float bx, float by,
+ float cx, float cy,
+ float thresholdx, float thresholdy,
+ Vector<Vertex> &outputVertices);
+
+/*
+ endpoints p1, p2
+ control c1, c2
+ */
+ static void recursiveCubicBezierVertices(
+ float p1x, float p1y,
+ float c1x, float c1y,
+ float p2x, float p2y,
+ float c2x, float c2y,
+ float thresholdx, float thresholdy,
+ Vector<Vertex> &outputVertices);
+};
+
+}; // namespace uirenderer
+}; // namespace android
+
+#endif // ANDROID_HWUI_PATH_RENDERER_H
diff --git a/libs/hwui/Program.h b/libs/hwui/Program.h
index a821a9c..b1cb446 100644
--- a/libs/hwui/Program.h
+++ b/libs/hwui/Program.h
@@ -81,7 +81,7 @@
#define PROGRAM_IS_SIMPLE_GRADIENT 41
-#define PROGRAM_IS_AA_RECT_SHIFT 42
+#define PROGRAM_IS_VERTEX_SHAPE_SHIFT 42
///////////////////////////////////////////////////////////////////////////////
// Types
@@ -130,7 +130,7 @@
bool isBitmapNpot;
bool isAA;
- bool isAARect;
+ bool isVertexShape;
bool hasGradient;
Gradient gradientType;
@@ -168,7 +168,7 @@
hasTextureTransform = false;
isAA = false;
- isAARect = false;
+ isVertexShape = false;
modulate = false;
@@ -263,7 +263,7 @@
if (hasTextureTransform) key |= programid(0x1) << PROGRAM_HAS_TEXTURE_TRANSFORM_SHIFT;
if (hasGammaCorrection) key |= programid(0x1) << PROGRAM_HAS_GAMMA_CORRECTION;
if (isSimpleGradient) key |= programid(0x1) << PROGRAM_IS_SIMPLE_GRADIENT;
- if (isAARect) key |= programid(0x1) << PROGRAM_IS_AA_RECT_SHIFT;
+ if (isVertexShape) key |= programid(0x1) << PROGRAM_IS_VERTEX_SHAPE_SHIFT;
return key;
}
diff --git a/libs/hwui/ProgramCache.cpp b/libs/hwui/ProgramCache.cpp
index 6baf448..de7afed 100644
--- a/libs/hwui/ProgramCache.cpp
+++ b/libs/hwui/ProgramCache.cpp
@@ -40,10 +40,10 @@
"attribute vec4 position;\n";
const char* gVS_Header_Attributes_TexCoords =
"attribute vec2 texCoords;\n";
-const char* gVS_Header_Attributes_AAParameters =
+const char* gVS_Header_Attributes_AALineParameters =
"attribute float vtxWidth;\n"
"attribute float vtxLength;\n";
-const char* gVS_Header_Attributes_AARectParameters =
+const char* gVS_Header_Attributes_AAVertexShapeParameters =
"attribute float vtxAlpha;\n";
const char* gVS_Header_Uniforms_TextureTransform =
"uniform mat4 mainTextureTransform;\n";
@@ -64,10 +64,10 @@
"uniform mediump vec2 textureDimension;\n";
const char* gVS_Header_Varyings_HasTexture =
"varying vec2 outTexCoords;\n";
-const char* gVS_Header_Varyings_IsAA =
+const char* gVS_Header_Varyings_IsAALine =
"varying float widthProportion;\n"
"varying float lengthProportion;\n";
-const char* gVS_Header_Varyings_IsAARect =
+const char* gVS_Header_Varyings_IsAAVertexShape =
"varying float alpha;\n";
const char* gVS_Header_Varyings_HasBitmap =
"varying highp vec2 outBitmapTexCoords;\n";
@@ -113,10 +113,10 @@
" gl_Position = transform * position;\n";
const char* gVS_Main_PointSize =
" gl_PointSize = pointSize;\n";
-const char* gVS_Main_AA =
+const char* gVS_Main_AALine =
" widthProportion = vtxWidth;\n"
" lengthProportion = vtxLength;\n";
-const char* gVS_Main_AARect =
+const char* gVS_Main_AAVertexShape =
" alpha = vtxAlpha;\n";
const char* gVS_Footer =
"}\n\n";
@@ -133,7 +133,7 @@
"precision mediump float;\n\n";
const char* gFS_Uniforms_Color =
"uniform vec4 color;\n";
-const char* gFS_Uniforms_AA =
+const char* gFS_Uniforms_AALine =
"uniform float boundaryWidth;\n"
"uniform float boundaryLength;\n";
const char* gFS_Header_Uniforms_PointHasBitmap =
@@ -243,10 +243,10 @@
" fragColor = color;\n";
const char* gFS_Main_ModulateColor =
" fragColor *= color.a;\n";
-const char* gFS_Main_AccountForAA =
+const char* gFS_Main_AccountForAALine =
" fragColor *= (1.0 - smoothstep(boundaryWidth, 0.5, abs(0.5 - widthProportion)))\n"
" * (1.0 - smoothstep(boundaryLength, 0.5, abs(0.5 - lengthProportion)));\n";
-const char* gFS_Main_AccountForAARect =
+const char* gFS_Main_AccountForAAVertexShape =
" fragColor *= alpha;\n";
const char* gFS_Main_FetchTexture[2] = {
@@ -456,10 +456,12 @@
if (description.hasTexture || description.hasExternalTexture) {
shader.append(gVS_Header_Attributes_TexCoords);
}
- if (description.isAARect) {
- shader.append(gVS_Header_Attributes_AARectParameters);
- } else if (description.isAA) {
- shader.append(gVS_Header_Attributes_AAParameters);
+ if (description.isAA) {
+ if (description.isVertexShape) {
+ shader.append(gVS_Header_Attributes_AAVertexShapeParameters);
+ } else {
+ shader.append(gVS_Header_Attributes_AALineParameters);
+ }
}
// Uniforms
shader.append(gVS_Header_Uniforms);
@@ -479,10 +481,12 @@
if (description.hasTexture || description.hasExternalTexture) {
shader.append(gVS_Header_Varyings_HasTexture);
}
- if (description.isAARect) {
- shader.append(gVS_Header_Varyings_IsAARect);
- } else if (description.isAA) {
- shader.append(gVS_Header_Varyings_IsAA);
+ if (description.isAA) {
+ if (description.isVertexShape) {
+ shader.append(gVS_Header_Varyings_IsAAVertexShape);
+ } else {
+ shader.append(gVS_Header_Varyings_IsAALine);
+ }
}
if (description.hasGradient) {
shader.append(gVS_Header_Varyings_HasGradient[gradientIndex(description)]);
@@ -500,10 +504,12 @@
} else if (description.hasTexture || description.hasExternalTexture) {
shader.append(gVS_Main_OutTexCoords);
}
- if (description.isAARect) {
- shader.append(gVS_Main_AARect);
- } else if (description.isAA) {
- shader.append(gVS_Main_AA);
+ if (description.isAA) {
+ if (description.isVertexShape) {
+ shader.append(gVS_Main_AAVertexShape);
+ } else {
+ shader.append(gVS_Main_AALine);
+ }
}
if (description.hasGradient) {
shader.append(gVS_Main_OutGradient[gradientIndex(description)]);
@@ -552,10 +558,12 @@
if (description.hasTexture || description.hasExternalTexture) {
shader.append(gVS_Header_Varyings_HasTexture);
}
- if (description.isAARect) {
- shader.append(gVS_Header_Varyings_IsAARect);
- } else if (description.isAA) {
- shader.append(gVS_Header_Varyings_IsAA);
+ if (description.isAA) {
+ if (description.isVertexShape) {
+ shader.append(gVS_Header_Varyings_IsAAVertexShape);
+ } else {
+ shader.append(gVS_Header_Varyings_IsAALine);
+ }
}
if (description.hasGradient) {
shader.append(gVS_Header_Varyings_HasGradient[gradientIndex(description)]);
@@ -580,8 +588,8 @@
} else if (description.hasExternalTexture) {
shader.append(gFS_Uniforms_ExternalTextureSampler);
}
- if (description.isAA) {
- shader.append(gFS_Uniforms_AA);
+ if (description.isAA && !description.isVertexShape) {
+ shader.append(gFS_Uniforms_AALine);
}
if (description.hasGradient) {
shader.append(gFS_Uniforms_GradientSampler[gradientIndex(description)]);
@@ -596,7 +604,7 @@
// Optimization for common cases
if (!description.isAA && !blendFramebuffer &&
description.colorOp == ProgramDescription::kColorNone &&
- !description.isPoint && !description.isAARect) {
+ !description.isPoint && !description.isVertexShape) {
bool fast = false;
const bool noShader = !description.hasGradient && !description.hasBitmap;
@@ -730,10 +738,12 @@
// Apply the color op if needed
shader.append(gFS_Main_ApplyColorOp[description.colorOp]);
- if (description.isAARect) {
- shader.append(gFS_Main_AccountForAARect);
- } else if (description.isAA) {
- shader.append(gFS_Main_AccountForAA);
+ if (description.isAA) {
+ if (description.isVertexShape) {
+ shader.append(gFS_Main_AccountForAAVertexShape);
+ } else {
+ shader.append(gFS_Main_AccountForAALine);
+ }
}
// Output the fragment
diff --git a/location/java/android/location/Location.java b/location/java/android/location/Location.java
index 40cb1a8..2d94ddc 100644
--- a/location/java/android/location/Location.java
+++ b/location/java/android/location/Location.java
@@ -83,7 +83,7 @@
private float mDistance = 0.0f;
private float mInitialBearing = 0.0f;
// Scratchpad
- private float[] mResults = new float[2];
+ private final float[] mResults = new float[2];
/**
* Construct a new Location with a named provider.
@@ -839,10 +839,6 @@
return s.toString();
}
- /**
- * @deprecated Use {@link #toString} instead
- */
- @Deprecated
public void dump(Printer pw, String prefix) {
pw.println(prefix + toString());
}
diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java
index 8acbae3..54dcaaa 100644
--- a/opengl/java/android/opengl/GLSurfaceView.java
+++ b/opengl/java/android/opengl/GLSurfaceView.java
@@ -83,7 +83,7 @@
* </ul>
* <p>
* <h4>Specifying the android.view.Surface</h4>
- * By default GLSurfaceView will create a PixelFormat.RGB_565 format surface. If a translucent
+ * By default GLSurfaceView will create a PixelFormat.RGB_888 format surface. If a translucent
* surface is required, call getHolder().setFormat(PixelFormat.TRANSLUCENT).
* The exact format of a TRANSLUCENT surface is device dependent, but it will be
* a 32-bit-per-pixel surface with 8 bits per component.
@@ -94,7 +94,7 @@
* well as how many bits are allocated to each channel. Therefore, the first thing
* GLSurfaceView has to do when starting to render is choose what EGLConfig to use.
* <p>
- * By default GLSurfaceView chooses a EGLConfig that has an RGB_565 pixel format,
+ * By default GLSurfaceView chooses a EGLConfig that has an RGB_888 pixel format,
* with at least a 16-bit depth buffer and no stencil.
* <p>
* If you would prefer a different EGLConfig
@@ -414,7 +414,7 @@
* is called.
* <p>
* If no setEGLConfigChooser method is called, then by default the
- * view will choose an RGB_565 surface with a depth buffer depth of
+ * view will choose an RGB_888 surface with a depth buffer depth of
* at least 16 bits.
*
* @param needDepth
@@ -432,7 +432,7 @@
* is called.
* <p>
* If no setEGLConfigChooser method is called, then by default the
- * view will choose an RGB_565 surface with a depth buffer depth of
+ * view will choose an RGB_888 surface with a depth buffer depth of
* at least 16 bits.
*
*/
@@ -968,13 +968,13 @@
}
/**
- * This class will choose a RGB_565 surface with
+ * This class will choose a RGB_888 surface with
* or without a depth buffer.
*
*/
private class SimpleEGLConfigChooser extends ComponentSizeChooser {
public SimpleEGLConfigChooser(boolean withDepthBuffer) {
- super(5, 6, 5, 0, withDepthBuffer ? 16 : 0, 0);
+ super(8, 8, 8, 0, withDepthBuffer ? 16 : 0, 0);
}
}
diff --git a/packages/SystemUI/res/layout/quick_settings.xml b/packages/SystemUI/res/layout/quick_settings.xml
index 2dd3b9f..da4b133 100644
--- a/packages/SystemUI/res/layout/quick_settings.xml
+++ b/packages/SystemUI/res/layout/quick_settings.xml
@@ -29,9 +29,6 @@
android:id="@+id/quick_settings_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingBottom="@dimen/quick_settings_container_padding"
- android:paddingLeft="@dimen/quick_settings_container_padding"
- android:paddingRight="@dimen/quick_settings_container_padding"
android:animateLayoutChanges="true"
android:columnCount="@integer/quick_settings_num_columns"
/>
diff --git a/packages/SystemUI/res/layout/quick_settings_brightness_dialog.xml b/packages/SystemUI/res/layout/quick_settings_brightness_dialog.xml
index 5f46e96..5a5769b 100644
--- a/packages/SystemUI/res/layout/quick_settings_brightness_dialog.xml
+++ b/packages/SystemUI/res/layout/quick_settings_brightness_dialog.xml
@@ -17,16 +17,13 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:padding="16dp">
+ style="@style/BrightnessDialogContainer">
<ImageView
android:id="@+id/brightness_icon"
- style="@style/SystemBarPanelSettingsIcon"
android:layout_gravity="center_vertical"
android:paddingRight="10dp"
- android:src="@drawable/ic_sysbar_brightness"
+ android:src="@drawable/ic_qs_brightness_auto_off"
/>
<com.android.systemui.statusbar.policy.ToggleSlider
android:id="@+id/brightness_slider"
diff --git a/packages/SystemUI/res/layout/quick_settings_tile_bugreport.xml b/packages/SystemUI/res/layout/quick_settings_tile_bugreport.xml
new file mode 100644
index 0000000..0b6a614
--- /dev/null
+++ b/packages/SystemUI/res/layout/quick_settings_tile_bugreport.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<TextView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ style="@style/TextAppearance.QuickSettings.TileView"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:gravity="center"
+ android:drawableTop="@*android:drawable/stat_sys_adb"
+ android:text="@*android:string/bugreport_title"
+ />
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index b462c00..da766f5 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -60,7 +60,7 @@
<string name="always_use_accessory" msgid="1210954576979621596">"Gebruik by verstek vir hierdie USB-toebehoorsel"</string>
<string name="usb_debugging_title" msgid="4513918393387141949">"Laat USB-ontfouting toe?"</string>
<string name="usb_debugging_message" msgid="2220143855912376496">"Die rekenaar se RSA-sleutel-vingerafdruk is:"\n"<xliff:g id="FINGERPRINT">%1$s</xliff:g>"</string>
- <string name="usb_debugging_always" msgid="303335496705863070">"Altyd laat toe uit hierdie rekenaar"</string>
+ <string name="usb_debugging_always" msgid="303335496705863070">"Laat altyd toe van hierdie rekenaar af"</string>
<string name="compat_mode_on" msgid="6623839244840638213">"Zoem om skerm te vul"</string>
<string name="compat_mode_off" msgid="4434467572461327898">"Strek om skerm te vul"</string>
<string name="compat_mode_help_header" msgid="7969493989397529910">"Versoenbaarheidszoem"</string>
@@ -177,10 +177,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Geen Wi-Fi-skerm-verbinding nie"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Helderheid"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"OUTO"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Skandeer"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Ontkoppel"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Wi-Fi-skerm"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Beskikbaar"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Om te koppel"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Gekoppel"</string>
</resources>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index f33b469..2abd458 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -151,18 +151,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"ህልሞችን ጀምር"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"የአውሮፕላን ሁነታ"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"ባትሪ በመሙላት ላይ፣ <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"ባትሪ ሞልቷል።"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"ብሉቱዝ"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"ብሉቱዝ (<xliff:g id="NUMBER">%d</xliff:g> መሣሪያዎች)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"ብሩህነት"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"ራስ-አዙር"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"አዙሪት ተቆልፏል"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"የግቤት ዘዴ"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"በስራ ላይ ያለው አካባቢ"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"የሚዲያ መሣሪያ"</string>
@@ -177,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"ምንም የWifi ማሳያ ግንኙነት የለም"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"ብሩህነት"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"ራስ-ሰር"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"ቃኝ"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"አለያይ"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"የWifi ማሳያ"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"የሚገኝ"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"በመገናኘት ላይ"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"ተገናኝቷል"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index bae41b0..3d19afe 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -151,18 +151,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"بدء Dreams"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"وضع الطائرة"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"جارٍ الشحن، <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"تم الشحن"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"بلوتوث"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"بلوتوث (<xliff:g id="NUMBER">%d</xliff:g> من الأجهزة)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"السطوع"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"تدوير تلقائي"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"تم قفل التدوير"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"أسلوب الإدخال"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"الموقع المستخدم"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"جهاز الوسائط"</string>
@@ -177,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"لا يتوفر اتصال بشاشة Wifi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"السطوع"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"تلقائي"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"فحص"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"قطع الاتصال"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"شاشة Wifi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"متوفرة"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"جارٍ الاتصال"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"متصلة"</string>
</resources>
diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml
index c448ba2..50bda312 100644
--- a/packages/SystemUI/res/values-be/strings.xml
+++ b/packages/SystemUI/res/values-be/strings.xml
@@ -179,10 +179,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Няма падключэння да дысплея Wi-Fi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Яркасць"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АЎТА"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Сканiраваць"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Адключыцца"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Дысплей Wi-Fi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Даступна"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Падключэнне"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Падключана"</string>
</resources>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index d13ed1a..c11ba77 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -177,10 +177,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Няма връзка с дисплея през WiFi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Яркост"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АВТ."</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Сканиране"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Изключване"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Дисплей през WiFi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Налице"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Установява се връзка"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Установена е връзка"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index c23b23a..154c5c2 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -179,10 +179,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"No hi ha cap connexió de pantalla Wi-Fi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brillantor"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMÀTICA"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Explora"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Desconnecta"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Pantalla Wi-Fi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Disponible"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"S\'està connectant"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Connectada"</string>
</resources>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index 25002ca..e56b591 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -179,10 +179,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Žádné připojení k displeji přes Wi-Fi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Jas"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATICKY"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Vyhledat"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Odpojit"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Displej přes Wi-Fi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Dostupné"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Připojování"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Připojeno"</string>
</resources>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index 76a070c..7fb2d26 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -151,18 +151,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"Start Dreams"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Flytilstand"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Oplader, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Opladet"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> enheder)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Lysstyrke"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automatisk rotation"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotation er låst"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Inputmetode"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"Placering i brug"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Medieenhed"</string>
@@ -177,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Ingen forbindelse til Wi-Fi-skærm"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Lysstyrke"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Scan"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Afbryd forbindelsen"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Wi-Fi-skærm"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Tilgængelig"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Tilslutter"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Tilsluttet"</string>
</resources>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index fd1ef1e..6916d56 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -153,18 +153,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"Träume starten"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Flugmodus"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Akku wird aufgeladen (<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>)"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Aufgeladen"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> Geräte)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Helligkeit"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automatisch drehen"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Drehung gesperrt"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Eingabemethode"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"Verwendeter Standort"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Mediengerät"</string>
@@ -179,10 +174,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Keine Verbindung zur WLAN-Anzeige"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Helligkeit"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Scannen"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Trennen"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"WLAN-Anzeige"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Verfügbar"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Verbinden"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Verbunden"</string>
</resources>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index fd8be33..922d957 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -174,10 +174,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Δεν υπάρχει σύνδεση οθόνης Wifi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Φωτεινότητα"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"ΑΥΤΟΜΑΤΗ"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Σάρωση"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Αποσύνδεση"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Οθόνη Wifi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Διαθέσιμη"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Σύνδεση"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Έχει συνδεθεί"</string>
</resources>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index 8ff3b0e..8670d49 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -172,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"No Wifi Display Connection"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brightness"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Scan"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Disconnect"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Wifi Display"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Available"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Connecting"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Connected"</string>
</resources>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index daf2119..1c3c3c3 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -179,10 +179,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Sin conexión a pantalla de Wi-Fi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brillo"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMÁTICO"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Explorar"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Desconectar"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Pantalla Wi-Fi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Disponible"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Conectando"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Conectado"</string>
</resources>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index 3a1b781..e7c4b3e 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -151,18 +151,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"Iniciar Dreams"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Modo avión"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Cargando (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Cargada"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> dispositivos)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brillo"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Girar automáticamente"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotación bloqueada"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Método de entrada"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"Ubicación en uso"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Dispositivo multimedia"</string>
@@ -177,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Sin conexión a pantalla Wi-Fi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brillo"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Escanear"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Desconectar"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Pantalla Wi-Fi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Disponible"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Conectando..."</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Conectada"</string>
</resources>
diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml
index a545b46..7c83bf7 100644
--- a/packages/SystemUI/res/values-et/strings.xml
+++ b/packages/SystemUI/res/values-et/strings.xml
@@ -177,10 +177,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"WiFi-ekraani ühendus puudub"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Heledus"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMAATNE"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Skannimine"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Katkesta ühendus"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"WiFi-ekraan"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Saadaval"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Ühendamine"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Ühendatud"</string>
</resources>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index 67687b6..bd6e194 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -177,10 +177,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"اتصال صفحه نمایش Wifi وجود ندارد"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"روشنایی"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"خودکار"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"اسکن"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"قطع اتصال"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"صفحه نمایش Wifi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"در دسترس"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"در حال اتصال"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"متصل"</string>
</resources>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index 248abc7..727b42f 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -151,18 +151,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"Aloita unelmointi"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Lentokonetila"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Ladataan (<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>)"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Täynnä"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> laitetta)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Kirkkaus"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automaattinen kääntö"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Kääntö lukittu"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Syöttötapa"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"Sijainti käytössä"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Medialaite"</string>
@@ -177,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Ei yhteyttä wifi-näyttöön"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Kirkkaus"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Etsi"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Katkaise yhteys"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Wifi-näyttö"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Käytettävissä"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Yhdistetään"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Yhdistetty"</string>
</resources>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index cd2aef8..b87f18c 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -179,10 +179,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Aucune connexion à un écran Wi-Fi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Luminosité"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATIQUE"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Rechercher"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Déconnecter"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Écran Wi-Fi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Disponible"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Connexion en cours…"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Connecté"</string>
</resources>
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index e0279be..81bc85a 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -177,10 +177,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"कोई Wifi डिस्प्ले कनेक्शन नहीं"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"चमक"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"स्वत:"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"स्कैन करें"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"डिस्कनेक्ट करें"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Wifi डिस्प्ले"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"उपलब्ध"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"कनेक्ट हो रहा है"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"कनेक्ट किया गया"</string>
</resources>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index 79b2952..21dabce 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -151,18 +151,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"Počni sanjati"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Način rada u zrakoplovu"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Puni se, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Napunjena"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (broj uređaja: <xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Svjetlina"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automatska rotacija"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotacija zaključana"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Način unosa"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"Lokacija u uporabi"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Medijski uređaj"</string>
@@ -177,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Nema veze s Wifi zaslonom"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Svjetlina"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATSKI"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Skeniraj"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Isključi"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"WiFi zaslon"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Dostupan"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Povezivanje"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Povezan"</string>
</resources>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 3d2c771..58764df 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -177,10 +177,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Nincs kapcsolat Wi-Fi kijelzővel"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Fényerő"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"automatikus"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Keresés"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Szétkapcsol"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Wi-Fi kijelző"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Rendelkezésre álló"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Kapcsolódás"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Kapcsolatban"</string>
</resources>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index 8909c3c..1ebb0bd 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -177,10 +177,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Tidak Ada Koneksi Tampilan Wifi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Kecerahan"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"OTOMATIS"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Pindai"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Putuskan"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Tampilan Wifi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Tersedia"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Menghubungkan"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Terhubung"</string>
</resources>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index 6d7f451..cb086c7 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -153,18 +153,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"Avvia Dreams"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Modalità aereo"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"In carica (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Carica"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> dispositivi)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Luminosità"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Rotazione automatica"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotazione bloccata"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Metodo di immissione"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"Posizione in uso"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Dispositivo multimediale"</string>
@@ -179,10 +174,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Nessun collegamento a schermi Wi-Fi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Luminosità"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Scansione"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Disconnetti"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Schermo Wi-Fi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Disponibile"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Collegamento"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Collegato"</string>
</resources>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index 506f6c5..7a859cd 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -151,18 +151,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"הפעל את Dreams"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"מצב טיסה"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"טוען (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"מלאה"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> מכשירים)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"בהירות"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"סיבוב אוטומטי"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"סיבוב נעול"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"שיטת קלט"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"מיקום בשימוש"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"מכשיר מדיה"</string>
@@ -177,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"אין חיבור תצוגת Wifi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"בהירות"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"אוטומטי"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"סרוק"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"נתק"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"תצוגת Wifi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"זמין"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"מתחבר"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"מחובר"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index 8d6f69e..003a333 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -179,10 +179,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Wi-Fiディスプレイ接続なし"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"画面の明るさ"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"自動"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"スキャン"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"切断"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Wi-Fiディスプレイ"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"使用可能"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"接続中"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"接続"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index dad038e..e7e55c8 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -177,10 +177,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Wi-Fi 디스플레이가 연결되지 않음"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"밝기"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"자동"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"검색"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"연결 해제"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Wi-Fi 디스플레이"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"사용 가능"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"연결 중"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"연결됨"</string>
</resources>
diff --git a/packages/SystemUI/res/values-land/styles.xml b/packages/SystemUI/res/values-land/styles.xml
new file mode 100644
index 0000000..8919198
--- /dev/null
+++ b/packages/SystemUI/res/values-land/styles.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2006 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.
+-->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+ <style name="BrightnessDialogContainer" parent="@style/BaseBrightnessDialogContainer">
+ <item name="android:layout_width">360dp</item>
+ </style>
+</resources>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index ba989a5..494db0c 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -151,18 +151,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"Paleisti vizijas"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Lėktuvo režimas"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Įkraunama, <xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Įkrauta"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"„Bluetooth“ (<xliff:g id="NUMBER">%d</xliff:g> įreng.)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Skaistis"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automatiškai sukti"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Sukimas užrakintas"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Įvesties metodas"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"Naudojama vieta"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Medijos įrenginys"</string>
@@ -177,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Nėra „Wi-Fi“ pateikties ryšio"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Skaistis"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATINIS"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Nuskaityti"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Atjungti"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"„Wi-Fi“ pateiktis"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Pasiekiama"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Jungiama"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Prijungta"</string>
</resources>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index f931d0e..47e917d 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -177,10 +177,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Nav Wi-Fi displeja savienojuma"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Spilgtums"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMĀTISKI"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Meklēt"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Atvienot"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Wi-Fi displejs"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Pieejams"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Notiek savienojuma izveide"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Savienots"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ms/strings.xml b/packages/SystemUI/res/values-ms/strings.xml
index 9c02c08..f79ab5c 100644
--- a/packages/SystemUI/res/values-ms/strings.xml
+++ b/packages/SystemUI/res/values-ms/strings.xml
@@ -177,10 +177,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Tiada Sambungan Paparan Wifi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Kecerahan"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Imbas"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Nyahsambung"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Paparan Wifi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Ada"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Menyambung"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Bersambung"</string>
</resources>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index 0baf48b..2670832 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -177,10 +177,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Ingen tilkobling for Wi-Fi-skjermer"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Lysstyrke"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Skann"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Koble fra"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Wi-Fi-skjerm"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Tilgjengelig"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Kobler til"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Tilkoblet"</string>
</resources>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index 239ef18..b3d36fa 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -172,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Geen wifi-displayverbinding"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Helderheid"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATISCH"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Scannen"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Verbinding verbreken"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Wifi-display"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Beschikbaar"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Verbinding maken"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Verbonden"</string>
</resources>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index 6385e33..d07c0b68 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -151,18 +151,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"Zacznij śnić"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Tryb samolotowy"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Ładowanie (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Naładowana"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (urządzenia: <xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Jasność"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Autoobracanie"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Obracanie jest zablokowane"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Metoda wprowadzania"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"Lokalizacja w użyciu"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Urządzenie multimedialne"</string>
@@ -177,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Brak połączenia z wyświetlaczem Wi-Fi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Jasność"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATYCZNA"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Skanuj"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Rozłącz"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Wyświetlacz Wi-Fi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Dostępny"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Łączenie"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Połączony"</string>
</resources>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index fd8a414..5bbbd99 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -151,18 +151,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"Iniciar sonhos"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Modo de avião"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"A carregar, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Carregada"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> Dispositivos)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brilho"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Rodar Automaticamente"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotação Bloqueada"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Método de Introdução"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"Localização em utilização"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Dispositivo multimédia"</string>
@@ -177,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Sem Ligação ao Visor Wi-Fi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brilho"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMÁTICO"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Procurar"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Desligar"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Visor Wi-Fi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Disponível"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"A ligar"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Ligado"</string>
</resources>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index d3bdfed..5766db6 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -179,10 +179,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Sem conexão Wi-Fi Display"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brilho"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Verificar"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Desconectar"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Wi-Fi Display"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Disponível"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Conectando"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Conectado"</string>
</resources>
diff --git a/packages/SystemUI/res/values-rm/strings.xml b/packages/SystemUI/res/values-rm/strings.xml
index ffca1ab..9838d2a 100644
--- a/packages/SystemUI/res/values-rm/strings.xml
+++ b/packages/SystemUI/res/values-rm/strings.xml
@@ -314,16 +314,4 @@
<skip />
<!-- no translation found for quick_settings_brightness_dialog_auto_brightness_label (5064982743784071218) -->
<skip />
- <!-- no translation found for wifi_display_scan (8453135922233546097) -->
- <skip />
- <!-- no translation found for wifi_display_disconnect (5450214362789378584) -->
- <skip />
- <!-- no translation found for wifi_display_dialog_title (2817993038700218900) -->
- <skip />
- <!-- no translation found for wifi_display_state_available (980373281442607096) -->
- <skip />
- <!-- no translation found for wifi_display_state_connecting (1677010908036241940) -->
- <skip />
- <!-- no translation found for wifi_display_state_connected (9154375061719151149) -->
- <skip />
</resources>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index 26d5745..0132c44 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -177,10 +177,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Nu există conexiune pentru afişajul Wi-Fi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Luminozitate"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMAT"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Scanaţi"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Deconectaţi-vă"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Afişaj Wi-Fi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Disponibil"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Se conectează"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Conectat"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 7c063cb..57ed927 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -153,18 +153,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"Включить заставку"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Режим полета"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Идет зарядка (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Заряжено"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Устройства Bluetooth (<xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Яркость"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Автоповорот"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Поворот экрана заблокирован"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Способ ввода"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"Текущее местоположение"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Медиаустройство"</string>
@@ -179,10 +174,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Экран не подключен"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Яркость"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АВТОНАСТРОЙКА"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Искать"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Отключить"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Подключенный экран"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Доступен"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Подключение…"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Подключен"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index 9bd131d..f9c3bbe 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -179,10 +179,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Žiadne pripojenie k displeju cez sieť Wi-Fi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Jas"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATICKY"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Vyhľadať"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Odpojiť"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Displej cez sieť Wi-Fi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"K dispozícii"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Pripájanie"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Pripojené"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index 4f5a0cb..7c1b06b 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -151,18 +151,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"Začni sanje"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Način za letalo"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Polnjenje, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Napolnjeno"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (št. naprav: <xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Svetlost"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Samodejno vrtenje"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Zaklenjeno vrtenje"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Način vnosa"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"Mesto uporabe"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Predstavnostna naprava"</string>
@@ -177,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Ni povezav z zaslonom Wi-Fi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Svetlost"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"SAMODEJNO"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Išči"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Prek. povezavo"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Zaslon Wi-Fi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Na voljo"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Vzpostavljanje povezave"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Povezava vzpostavljena"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index d896e5b..b13255d 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -151,18 +151,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"Покрени Dreams"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Режим рада у авиону"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Пуњење, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Напуњено"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> уређаја)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Осветљеност"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Аутоматско ротирање"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Ротирање је закључано"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Метод уноса"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"Локација која се користи"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Медијски уређај"</string>
@@ -177,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Нема везе са Wi-Fi екраном"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Осветљеност"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АУТОМАТСКА"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Скенирај"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Прекини везу"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Wi-Fi екран"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Доступан"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Повезивање"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Повезан"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index 086c49f..779c870 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -172,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Ingen anslutning till Wi-Fi-skärm"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Ljusstyrka"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Skanna"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Koppla från"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Wi-Fi-skärm"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Tillgänglig"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Ansluter"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Ansluten"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index 04c8db3..97b25e2 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -58,7 +58,7 @@
<string name="always_use_accessory" msgid="1210954576979621596">"Tumia kama chaguo-msingi ya kifuasi hiki cha USB"</string>
<string name="usb_debugging_title" msgid="4513918393387141949">"Ruhusu utatuaji wa USB?"</string>
<string name="usb_debugging_message" msgid="2220143855912376496">"Alama ya kidole ya kitufe cha RSA ya kompyuta ni:"\n"<xliff:g id="FINGERPRINT">%1$s</xliff:g>"</string>
- <string name="usb_debugging_always" msgid="303335496705863070">"Kila wakati ruhusu kutoka kwenye kompyuta hii"</string>
+ <string name="usb_debugging_always" msgid="303335496705863070">"Ruhusu kutoka kwenye kompyuta hii kila wakati"</string>
<string name="compat_mode_on" msgid="6623839244840638213">"Kuza ili kujaza skrini"</string>
<string name="compat_mode_off" msgid="4434467572461327898">"Tanua ili kujaza skrini"</string>
<string name="compat_mode_help_header" msgid="7969493989397529910">"Kukuza kwa Utangamanifu"</string>
@@ -149,19 +149,14 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"Anza ndoto"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Modi ya ndege"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Inachaji, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Imechajiwa"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (Vifaa <xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Ung\'avu"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
- <string name="quick_settings_ime_label" msgid="7073463064369468429">"Mbinu Ingizo"</string>
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Zungusha Otomatiki"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Mzunguko Umefungwa"</string>
+ <string name="quick_settings_ime_label" msgid="7073463064369468429">"Mbinu ya uingizaji"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"Eneo linalotumika"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Kifaa cha midia"</string>
<string name="quick_settings_rssi_label" msgid="7725671335550695589">"RSSI"</string>
@@ -175,10 +170,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Hakuna Muunganisho wa Onyesho la Wifi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Ung\'avu"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"KIOTOMATIKI"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Changanua"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Kata muunganisho"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Onyesho la Wifi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Inapatikana"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Inaunganisha"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Umeunganishwa"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sw600dp/styles.xml b/packages/SystemUI/res/values-sw600dp/styles.xml
new file mode 100644
index 0000000..fc1cd88
--- /dev/null
+++ b/packages/SystemUI/res/values-sw600dp/styles.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2006 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.
+-->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+ <style name="BrightnessDialogContainer" parent="@style/BaseBrightnessDialogContainer">
+ <item name="android:layout_width">560dp</item>
+ </style>
+</resources>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index f15b2c7..72c4eee 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -151,18 +151,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"เริ่ม Dreams"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"โหมดใช้งานบนเครื่องบิน"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"กำลังชาร์จ, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"ชาร์จแล้ว"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"บลูทูธ"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"บลูทูธ (<xliff:g id="NUMBER">%d</xliff:g> อุปกรณ์)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"ความสว่าง"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"หมุนอัตโนมัติ"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"ล็อกการหมุนแล้ว"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"วิธีป้อนข้อมูล"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"สถานที่ที่ใช้งาน"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"อุปกรณ์สื่อ"</string>
@@ -177,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"ไม่มีการเชื่อมต่อการแสดงผลด้วย WiFi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"ความสว่าง"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"อัตโนมัติ"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"สแกน"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"เลิกต่อ"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"การแสดงผลด้วย WiFi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"มีอยู่"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"กำลังเชื่อมต่อ"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"เชื่อมต่อแล้ว"</string>
</resources>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index ddf8ec5..131d0b9 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -151,18 +151,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"Simulan panaginip"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Airplane mode"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Nagcha-charge, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Na-charge"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> (na) Device)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brightness"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"I-auto Rotate"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Naka-lock ang Pag-rotate"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Pamamaraan ng Pag-input"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"Lokasyong ginagamit"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Device ng media"</string>
@@ -177,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Walang Koneksyon sa Wifi Display"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brightness"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"I-scan"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Idiskonekta"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Wifi Display"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Available"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Kumukonekta"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Nakakonekta"</string>
</resources>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index 66194b0..ce6fb0c 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -177,10 +177,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Kablosuz Ekran Bağlantısı Yok"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Parlaklık"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"OTOMATİK"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Tara"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Bağlantıyı kes"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Kablosuz Ekran"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Uygun"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Bağlanılıyor"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Bağlandı"</string>
</resources>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index b22c12d..1bf529f 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -172,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Немає з’єднання з екраном Wi-Fi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Яскравість"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АВТО"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Сканувати"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Від’єднати"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Екран Wi-Fi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Доступний"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Під’єднання"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Під’єднаний"</string>
</resources>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index ea0a35a..5f25602 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -151,18 +151,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"Bắt đầu giấc mơ"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Chế độ trên máy bay"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Đang sạc, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Đã sạc"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> thiết bị)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Độ sáng"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Tự động xoay"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Khóa xoay"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Phương thức nhập"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"Vị trí đang được sử dụng"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Thiết bị phương tiện"</string>
@@ -177,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Không kết nối màn hình Wifi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Độ sáng"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"TỰ ĐỘNG"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Quét"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Ngắt kết nối"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Màn hình Wifi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Khả dụng"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Đang kết nối"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Đã kết nối"</string>
</resources>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index a408b2d..09637c8 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -150,39 +150,28 @@
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"屏幕会自动旋转。"</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"屏幕锁定为横向模式。"</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"屏幕锁定为纵向模式。"</string>
- <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
- <string name="start_dreams" msgid="870400522982252717">"启动 Dream"</string>
+ <string name="jelly_bean_dream_name" msgid="5992026543636816792">"果冻豆大乱舞"</string>
+ <string name="start_dreams" msgid="870400522982252717">"入梦"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"飞行模式"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"正在充电 (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"充电完成"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"蓝牙"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"蓝牙(<xliff:g id="NUMBER">%d</xliff:g> 台设备)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"亮度"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"自动旋转"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"已锁定旋转功能"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"输入法"</string>
- <string name="quick_settings_location_label" msgid="3292451598267467545">"正在使用的位置"</string>
+ <string name="quick_settings_location_label" msgid="3292451598267467545">"位置信息"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"媒体设备"</string>
<string name="quick_settings_rssi_label" msgid="7725671335550695589">"RSSI"</string>
- <string name="quick_settings_rssi_emergency_only" msgid="2713774041672886750">"只能使用紧急呼救"</string>
+ <string name="quick_settings_rssi_emergency_only" msgid="2713774041672886750">"只能拨打紧急呼救电话"</string>
<string name="quick_settings_settings_label" msgid="5326556592578065401">"设置"</string>
<string name="quick_settings_time_label" msgid="4635969182239736408">"时间"</string>
<string name="quick_settings_user_label" msgid="5238995632130897840">"我"</string>
<string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"无网络"</string>
- <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"W-Fi 显示"</string>
- <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"没有 Wi-Fi 显示连接"</string>
+ <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"W-Fi 显示设备"</string>
+ <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"没有 Wi-Fi 显示设备连接"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"亮度"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"自动"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"扫描"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"断开连接"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"W-Fi 显示"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"可用"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"正在连接"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"已连接"</string>
</resources>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index 82f87ab..dffe46f 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -153,18 +153,13 @@
<string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
<string name="start_dreams" msgid="870400522982252717">"啟動 Dream"</string>
<string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"飛航模式"</string>
- <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
- <skip />
- <!-- no translation found for quick_settings_battery_charged_label (8865413079414246081) -->
- <skip />
+ <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"充電中 (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
+ <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"充電完成"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"藍牙"</string>
- <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
- <skip />
+ <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"藍牙 (<xliff:g id="NUMBER">%d</xliff:g> 個裝置)"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"亮度"</string>
- <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
- <skip />
- <!-- no translation found for quick_settings_rotation_locked_label (8058646447242565486) -->
- <skip />
+ <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"自動旋轉"</string>
+ <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"已鎖定螢幕旋轉功能"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"輸入法"</string>
<string name="quick_settings_location_label" msgid="3292451598267467545">"使用位置"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"媒體裝置"</string>
@@ -179,10 +174,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"未連接 WiFi Display"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"亮度"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"自動"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"掃描"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"中斷連線"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"WiFi Display"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"可以使用"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"連線中"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"已連線"</string>
</resources>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index f7da7a9..bfaf8a0 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -172,10 +172,4 @@
<string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Alukho uxhumo lokubonisa le-Wifi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Ukugqama"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"OKUZENZAKALELAYO"</string>
- <string name="wifi_display_scan" msgid="8453135922233546097">"Skena"</string>
- <string name="wifi_display_disconnect" msgid="5450214362789378584">"Nqamula"</string>
- <string name="wifi_display_dialog_title" msgid="2817993038700218900">"Ukubuka kwe-Wifi"</string>
- <string name="wifi_display_state_available" msgid="980373281442607096">"Kuyatholakala"</string>
- <string name="wifi_display_state_connecting" msgid="1677010908036241940">"Iyaxhuma"</string>
- <string name="wifi_display_state_connected" msgid="9154375061719151149">"Ixhunyiwe"</string>
</resources>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 1edc3fc..dddef6d 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -90,5 +90,9 @@
<!-- Whether rotation lock shows up in quick settings or not -->
<bool name="quick_settings_show_rotation_lock">false</bool>
+
+ <!-- Timeouts for brightness dialog to disappear -->
+ <integer name="quick_settings_brightness_dialog_short_timeout">2000</integer>
+ <integer name="quick_settings_brightness_dialog_long_timeout">4000</integer>
</resources>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 63ce2a9..e93e857 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -175,9 +175,6 @@
<!-- The distance you can pull a notificaiton before it pops open -->
<dimen name="one_finger_pop_limit">32dp</dimen>
- <!-- The amount of padding around the QuickSettings tiles -->
- <dimen name="quick_settings_container_padding">12dp</dimen>
-
<!-- The fixed height of each tile -->
<dimen name="quick_settings_cell_height">110dp</dimen>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 4545706..e05c9a5 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -401,6 +401,9 @@
<!-- Name of the launcher shortcut icon that allows dreams to be started immediately [CHAR LIMIT=20] -->
<string name="start_dreams">Start dreams</string>
+ <!-- Textual description of Ethernet connections -->
+ <string name="ethernet_label">Ethernet</string>
+
<!-- QuickSettings: Airplane mode [CHAR LIMIT=NONE] -->
<string name="quick_settings_airplane_mode_label">Airplane mode</string>
<!-- QuickSettings: Battery Charging [CHAR LIMIT=NONE] -->
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 738b41f..4a37f77 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -100,6 +100,15 @@
<item name="android:textColor">#ff3a3b39</item>
</style>
+ <style name="BaseBrightnessDialogContainer">
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:layout_marginLeft">8dp</item>
+ <item name="android:layout_marginRight">8dp</item>
+ <item name="android:padding">16dp</item>
+ </style>
+ <style name="BrightnessDialogContainer" parent="@style/BaseBrightnessDialogContainer" />
+
<style name="Animation" />
<style name="Animation.ShirtPocketPanel">
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java
index 9c3756c..291f38c 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java
@@ -94,6 +94,9 @@
@Override
public void onResume() {
mForeground = true;
+ if (mRecentsPanel != null) {
+ mRecentsPanel.refreshViews();
+ }
super.onResume();
}
@@ -186,4 +189,7 @@
}
}
+ boolean isForeground() {
+ return mForeground;
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
index 04e38a4..0caa671 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
@@ -24,7 +24,6 @@
import android.app.TaskStackBuilder;
import android.content.Context;
import android.content.Intent;
-import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
@@ -67,7 +66,6 @@
StatusBarPanel, Animator.AnimatorListener {
static final String TAG = "RecentsPanelView";
static final boolean DEBUG = TabletStatusBar.DEBUG || PhoneStatusBar.DEBUG || false;
- private Context mContext;
private PopupMenu mPopup;
private View mRecentsScrim;
private View mRecentsNoApps;
@@ -203,7 +201,6 @@
public RecentsPanelView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
- mContext = context;
updateValuesFromResources();
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.RecentsPanelView,
@@ -374,7 +371,6 @@
protected void onFinishInflate() {
super.onFinishInflate();
- mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mRecentsContainer = (ViewGroup) findViewById(R.id.recents_container);
mStatusBarTouchProxy = (StatusBarTouchProxy) findViewById(R.id.status_bar_touch_proxy);
mListAdapter = new TaskDescriptionAdapter(mContext);
@@ -488,7 +484,7 @@
}
}
}
- }
+ }
showIfReady();
}
@@ -508,6 +504,12 @@
}
}
+ public void refreshViews() {
+ mListAdapter.notifyDataSetInvalidated();
+ updateUiElements();
+ showIfReady();
+ }
+
public void refreshRecentTasksList() {
refreshRecentTasksList(null, false);
}
@@ -530,12 +532,12 @@
} else {
mRecentTaskDescriptions.addAll(tasks);
}
- mListAdapter.notifyDataSetInvalidated();
- updateUiElements(getResources().getConfiguration());
- showIfReady();
+ if (((RecentsActivity)mContext).isForeground()) {
+ refreshViews();
+ }
}
- private void updateUiElements(Configuration config) {
+ private void updateUiElements() {
final int items = mRecentTaskDescriptions.size();
mRecentsContainer.setVisibility(items > 0 ? View.VISIBLE : View.GONE);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 923cd93..ecb8fed 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -84,8 +84,8 @@
public abstract class BaseStatusBar extends SystemUI implements
CommandQueue.Callbacks {
- static final String TAG = "StatusBar";
- private static final boolean DEBUG = false;
+ public static final String TAG = "StatusBar";
+ public static final boolean DEBUG = false;
public static final boolean MULTIUSER_DEBUG = false;
protected static final int MSG_TOGGLE_RECENTS_PANEL = 1020;
@@ -162,6 +162,9 @@
private RemoteViews.OnClickHandler mOnClickHandler = new RemoteViews.OnClickHandler() {
@Override
public boolean onClickHandler(View view, PendingIntent pendingIntent, Intent fillInIntent) {
+ if (DEBUG) {
+ Slog.v(TAG, "Notification click handler invoked for intent: " + pendingIntent);
+ }
final boolean isActivity = pendingIntent.isActivity();
if (isActivity) {
try {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java
index bffb903..9a3648f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java
@@ -10,22 +10,23 @@
public class PanelBar extends FrameLayout {
public static final boolean DEBUG = false;
- public static final String TAG = PanelView.class.getSimpleName();
+ public static final String TAG = PanelBar.class.getSimpleName();
public static final void LOG(String fmt, Object... args) {
if (!DEBUG) return;
Slog.v(TAG, String.format(fmt, args));
}
+ public static final int STATE_CLOSED = 0;
+ public static final int STATE_OPENING = 1;
+ public static final int STATE_OPEN = 2;
+
private PanelHolder mPanelHolder;
private ArrayList<PanelView> mPanels = new ArrayList<PanelView>();
protected PanelView mTouchingPanel;
- private static final int STATE_CLOSED = 0;
- private static final int STATE_TRANSITIONING = 1;
- private static final int STATE_OPEN = 2;
private int mState = STATE_CLOSED;
private boolean mTracking;
- private void go(int state) {
+ public void go(int state) {
LOG("go state: %d -> %d", mState, state);
mState = state;
}
@@ -80,18 +81,21 @@
// figure out which panel needs to be talked to here
if (event.getAction() == MotionEvent.ACTION_DOWN) {
- mTouchingPanel = selectPanelForTouchX(event.getX());
- mPanelHolder.setSelectedPanel(mTouchingPanel);
- LOG("PanelBar.onTouch: state=%d ACTION_DOWN: panel %s", mState, mTouchingPanel.getName());
- if (mState == STATE_CLOSED || mState == STATE_OPEN) {
- go(STATE_TRANSITIONING);
- onPanelPeeked();
- }
+ final PanelView panel = selectPanelForTouchX(event.getX());
+ LOG("PanelBar.onTouch: state=%d ACTION_DOWN: panel %s", mState, panel);
+ startOpeningPanel(panel);
}
final boolean result = mTouchingPanel.getHandle().dispatchTouchEvent(event);
return result;
}
+ // called from PanelView when self-expanding, too
+ public void startOpeningPanel(PanelView panel) {
+ LOG("startOpeningPanel: " + panel);
+ mTouchingPanel = panel;
+ mPanelHolder.setSelectedPanel(mTouchingPanel);
+ }
+
public void panelExpansionChanged(PanelView panel, float frac) {
boolean fullyClosed = true;
PanelView fullyOpenedPanel = null;
@@ -99,6 +103,10 @@
for (PanelView pv : mPanels) {
// adjust any other panels that may be partially visible
if (pv.getExpandedHeight() > 0f) {
+ if (mState == STATE_CLOSED) {
+ go(STATE_OPENING);
+ onPanelPeeked();
+ }
fullyClosed = false;
final float thisFrac = pv.getExpandedFraction();
LOG("panelExpansionChanged: -> %s: f=%.1f", pv.getName(), thisFrac);
@@ -112,7 +120,7 @@
if (fullyOpenedPanel != null && !mTracking) {
go(STATE_OPEN);
onPanelFullyOpened(fullyOpenedPanel);
- } else if (fullyClosed && !mTracking) {
+ } else if (fullyClosed && !mTracking && mState != STATE_CLOSED) {
go(STATE_CLOSED);
onAllPanelsCollapsed();
}
@@ -122,13 +130,21 @@
}
public void collapseAllPanels(boolean animate) {
+ boolean waiting = false;
for (PanelView pv : mPanels) {
- if (animate && pv == mTouchingPanel) {
- mTouchingPanel.collapse();
+ if (animate && !pv.isFullyCollapsed()) {
+ pv.collapse();
+ waiting = true;
} else {
pv.setExpandedFraction(0); // just in case
}
}
+ if (!waiting) {
+ // it's possible that nothing animated, so we replicate the termination
+ // conditions of panelExpansionChanged here
+ go(STATE_CLOSED);
+ onAllPanelsCollapsed();
+ }
}
public void onPanelPeeked() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index 1c244d4..a4a3a6a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -9,6 +9,7 @@
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
+import android.view.ViewGroup;
import android.widget.FrameLayout;
import com.android.systemui.R;
@@ -18,7 +19,7 @@
import com.android.systemui.statusbar.policy.NetworkController;
public class PanelView extends FrameLayout {
- public static final boolean DEBUG = false;
+ public static final boolean DEBUG = PanelBar.DEBUG;
public static final String TAG = PanelView.class.getSimpleName();
public final void LOG(String fmt, Object... args) {
if (!DEBUG) return;
@@ -298,10 +299,16 @@
LOG("onMeasure(%d, %d) -> (%d, %d)",
widthMeasureSpec, heightMeasureSpec, getMeasuredWidth(), getMeasuredHeight());
- mFullHeight = getMeasuredHeight();
- // if one of our children is getting smaller, we should track that
- if (!mTracking && !mRubberbanding && !mTimeAnimator.isStarted() && mExpandedHeight > 0 && mExpandedHeight != mFullHeight) {
- mExpandedHeight = mFullHeight;
+
+ // Did one of our children change size?
+ int newHeight = getMeasuredHeight();
+ if (newHeight != mFullHeight) {
+ mFullHeight = newHeight;
+ // If the user isn't actively poking us, let's rubberband to the content
+ if (!mTracking && !mRubberbanding && !mTimeAnimator.isStarted()
+ && mExpandedHeight > 0 && mExpandedHeight != mFullHeight) {
+ mExpandedHeight = mFullHeight;
+ }
}
heightMeasureSpec = MeasureSpec.makeMeasureSpec(
(int) mExpandedHeight, MeasureSpec.AT_MOST); // MeasureSpec.getMode(heightMeasureSpec));
@@ -310,6 +317,7 @@
public void setExpandedHeight(float height) {
+ mTracking = mRubberbanding = false;
post(mStopAnimator);
setExpandedHeightInternal(height);
}
@@ -326,21 +334,26 @@
// Hmm, full height hasn't been computed yet
}
- LOG("setExpansion: height=%.1f fh=%.1f tracking=%s rubber=%s", h, fh, mTracking?"T":"f", mRubberbanding?"T":"f");
-
if (h < 0) h = 0;
if (!(STRETCH_PAST_CONTENTS && (mTracking || mRubberbanding)) && h > fh) h = fh;
mExpandedHeight = h;
+ LOG("setExpansion: height=%.1f fh=%.1f tracking=%s rubber=%s", h, fh, mTracking?"T":"f", mRubberbanding?"T":"f");
+
requestLayout();
// FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) getLayoutParams();
// lp.height = (int) mExpandedHeight;
// setLayoutParams(lp);
- mExpandedFraction = Math.min(1f, h / fh);
+ mExpandedFraction = Math.min(1f, (fh == 0) ? 0 : h / fh);
}
private float getFullHeight() {
+ if (mFullHeight <= 0) {
+ LOG("Forcing measure() since fullHeight=" + mFullHeight);
+ measure(MeasureSpec.makeMeasureSpec(LayoutParams.WRAP_CONTENT, MeasureSpec.EXACTLY),
+ MeasureSpec.makeMeasureSpec(LayoutParams.WRAP_CONTENT, MeasureSpec.EXACTLY));
+ }
return mFullHeight;
}
@@ -385,8 +398,12 @@
}
public void expand() {
- if (!isFullyExpanded()) {
+ if (isFullyCollapsed()) {
+ mBar.startOpeningPanel(this);
+ LOG("expand: calling fling(%s, true)", mSelfExpandVelocityPx);
fling (mSelfExpandVelocityPx, /*always=*/ true);
+ } else if (DEBUG) {
+ LOG("skipping expansion: is expanded");
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 8f6a903..c55da5d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -95,7 +95,7 @@
public class PhoneStatusBar extends BaseStatusBar {
static final String TAG = "PhoneStatusBar";
- public static final boolean DEBUG = false;
+ public static final boolean DEBUG = BaseStatusBar.DEBUG;
public static final boolean SPEW = DEBUG;
public static final boolean DUMPTRUCK = true; // extra dumpsys info
@@ -285,9 +285,6 @@
mStatusBarWindow = (StatusBarWindowView) View.inflate(context,
R.layout.super_status_bar, null);
- if (DEBUG) {
- mStatusBarWindow.setBackgroundColor(0x6000FF80);
- }
mStatusBarWindow.mService = this;
mStatusBarWindow.setOnTouchListener(new View.OnTouchListener() {
@Override
@@ -1160,7 +1157,7 @@
public void animateCollapse(int flags) {
if (SPEW) {
- Slog.d(TAG, "animateCollapse(): "
+ Slog.d(TAG, "animateCollapse():"
+ " mExpandedVisible=" + mExpandedVisible
+ " mAnimating=" + mAnimating
+ " mAnimatingReveal=" + mAnimatingReveal
@@ -1203,7 +1200,7 @@
}
// Ensure the panel is fully collapsed (just in case; bug 6765842)
- mStatusBarView.collapseAllPanels(/*animate=*/ false);
+ // @@@ mStatusBarView.collapseAllPanels(/*animate=*/ false);
mExpandedVisible = false;
mPile.setLayoutTransitionsEnabled(false);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
index 8fe525c..95b618a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
@@ -27,6 +27,7 @@
import android.os.SystemClock;
import android.util.AttributeSet;
import android.util.Log;
+import android.util.Slog;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
@@ -41,6 +42,8 @@
public class PhoneStatusBarView extends PanelBar {
private static final String TAG = "PhoneStatusBarView";
+ private static final boolean DEBUG = PhoneStatusBar.DEBUG;
+
PhoneStatusBar mBar;
int mScrimColor;
float mMinFlingGutter;
@@ -152,6 +155,10 @@
public void panelExpansionChanged(PanelView pv, float frac) {
super.panelExpansionChanged(pv, frac);
+ if (DEBUG) {
+ Slog.v(TAG, "panelExpansionChanged: f=" + frac);
+ }
+
if (mFadingPanel == pv
&& mScrimColor != 0 && ActivityManager.isHighEndGfx()) {
// woo, special effects
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
index 1b28045..3fc15e0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
@@ -16,27 +16,27 @@
package com.android.systemui.statusbar.phone;
+import android.app.AlertDialog;
import android.app.Dialog;
import android.app.PendingIntent;
-import android.bluetooth.BluetoothDevice;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.CursorLoader;
import android.content.DialogInterface;
+import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.Loader;
import android.content.res.Resources;
import android.database.Cursor;
import android.graphics.drawable.Drawable;
-import android.graphics.drawable.LayerDrawable;
import android.graphics.drawable.LevelListDrawable;
import android.hardware.display.DisplayManager;
-import android.hardware.display.WifiDisplay;
import android.hardware.display.WifiDisplayStatus;
import android.net.Uri;
-import android.os.Debug;
+import android.os.Handler;
+import android.os.SystemProperties;
import android.provider.ContactsContract;
import android.provider.Settings;
import android.view.LayoutInflater;
@@ -44,16 +44,11 @@
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
-import android.widget.AdapterView;
-import android.widget.ArrayAdapter;
-import android.widget.Button;
import android.widget.ImageView;
-import android.widget.ListView;
import android.widget.TextView;
import com.android.internal.view.RotationPolicy;
import com.android.systemui.R;
-import com.android.systemui.statusbar.phone.QuickSettingsModel.BrightnessState;
import com.android.systemui.statusbar.phone.QuickSettingsModel.RSSIState;
import com.android.systemui.statusbar.phone.QuickSettingsModel.State;
import com.android.systemui.statusbar.phone.QuickSettingsModel.UserState;
@@ -65,8 +60,6 @@
import com.android.systemui.statusbar.policy.ToggleSlider;
import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.Set;
/**
@@ -84,13 +77,18 @@
private BrightnessController mBrightnessController;
private BluetoothController mBluetoothController;
+
private Dialog mBrightnessDialog;
+ private int mBrightnessDialogShortTimeout;
+ private int mBrightnessDialogLongTimeout;
private CursorLoader mUserInfoLoader;
private LevelListDrawable mBatteryLevels;
private LevelListDrawable mChargingBatteryLevels;
+ private Handler mHandler;
+
// The set of QuickSettingsTiles that have dynamic spans (and need to be updated on
// configuration change)
private final ArrayList<QuickSettingsTileView> mDynamicSpannedTiles =
@@ -110,11 +108,16 @@
mContainerView = container;
mModel = new QuickSettingsModel(context);
mWifiDisplayStatus = new WifiDisplayStatus();
+ mHandler = new Handler();
Resources r = mContext.getResources();
mBatteryLevels = (LevelListDrawable) r.getDrawable(R.drawable.qs_sys_battery);
mChargingBatteryLevels =
(LevelListDrawable) r.getDrawable(R.drawable.qs_sys_battery_charging);
+ mBrightnessDialogLongTimeout =
+ r.getInteger(R.integer.quick_settings_brightness_dialog_long_timeout);
+ mBrightnessDialogShortTimeout =
+ r.getInteger(R.integer.quick_settings_brightness_dialog_short_timeout);
IntentFilter filter = new IntentFilter();
filter.addAction(DisplayManager.ACTION_WIFI_DISPLAY_STATUS_CHANGED);
@@ -209,6 +212,15 @@
QuickSettingsTileView userTile = (QuickSettingsTileView)
inflater.inflate(R.layout.quick_settings_tile, parent, false);
userTile.setContent(R.layout.quick_settings_tile_user, inflater);
+ userTile.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ mBar.collapseAllPanels(true);
+ ContactsContract.QuickContact.showQuickContact(mContext, v,
+ ContactsContract.Profile.CONTENT_URI,
+ ContactsContract.QuickContact.MODE_LARGE, null);
+ }
+ });
mModel.addUserTile(userTile, new QuickSettingsModel.RefreshCallback() {
@Override
public void refreshView(QuickSettingsTileView view, State state) {
@@ -448,6 +460,7 @@
public void refreshView(QuickSettingsTileView view, State state) {
TextView tv = (TextView) view.findViewById(R.id.brightness_textview);
tv.setCompoundDrawablesWithIntrinsicBounds(0, state.iconId, 0, 0);
+ dismissBrightnessDialog(mBrightnessDialogShortTimeout);
}
});
parent.addView(brightnessTile);
@@ -521,6 +534,24 @@
});
parent.addView(imeTile);
+ // Bug reports
+ QuickSettingsTileView bugreportTile = (QuickSettingsTileView)
+ inflater.inflate(R.layout.quick_settings_tile, parent, false);
+ bugreportTile.setContent(R.layout.quick_settings_tile_bugreport, inflater);
+ bugreportTile.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ mBar.collapseAllPanels(true);
+ showBugreportDialog();
+ }
+ });
+ mModel.addBugreportTile(bugreportTile, new QuickSettingsModel.RefreshCallback() {
+ @Override
+ public void refreshView(QuickSettingsTileView view, State state) {
+ view.setVisibility(state.enabled ? View.VISIBLE : View.GONE);
+ }
+ });
+ parent.addView(bugreportTile);
/*
QuickSettingsTileView mediaTile = (QuickSettingsTileView)
inflater.inflate(R.layout.quick_settings_tile, parent, false);
@@ -548,8 +579,34 @@
v.setColumnSpan(span);
}
mContainerView.requestLayout();
+
+ // Reset the dialog
+ boolean isBrightnessDialogVisible = false;
+ if (mBrightnessDialog != null) {
+ removeAllBrightnessDialogCallbacks();
+
+ isBrightnessDialogVisible = mBrightnessDialog.isShowing();
+ mBrightnessDialog.dismiss();
+ }
+ mBrightnessDialog = null;
+ if (isBrightnessDialogVisible) {
+ showBrightnessDialog();
+ }
}
+ private void removeAllBrightnessDialogCallbacks() {
+ mHandler.removeCallbacks(mDismissBrightnessDialogRunnable);
+ }
+
+ private Runnable mDismissBrightnessDialogRunnable = new Runnable() {
+ public void run() {
+ if (mBrightnessDialog != null && mBrightnessDialog.isShowing()) {
+ mBrightnessDialog.dismiss();
+ }
+ removeAllBrightnessDialogCallbacks();
+ };
+ };
+
private void showBrightnessDialog() {
if (mBrightnessDialog == null) {
mBrightnessDialog = new Dialog(mContext);
@@ -572,9 +629,34 @@
}
if (!mBrightnessDialog.isShowing()) {
mBrightnessDialog.show();
+ dismissBrightnessDialog(mBrightnessDialogLongTimeout);
}
}
+ private void dismissBrightnessDialog(int timeout) {
+ if (mBrightnessDialog != null) {
+ mHandler.postDelayed(mDismissBrightnessDialogRunnable, timeout);
+ }
+ }
+
+ private void showBugreportDialog() {
+ final AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
+ builder.setPositiveButton(com.android.internal.R.string.report, new OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ if (which == DialogInterface.BUTTON_POSITIVE) {
+ SystemProperties.set("ctl.start", "bugreport");
+ }
+ }
+ });
+ builder.setMessage(com.android.internal.R.string.bugreport_message);
+ builder.setTitle(com.android.internal.R.string.bugreport_title);
+ builder.setCancelable(true);
+ final Dialog dialog = builder.create();
+ dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
+ dialog.show();
+ }
+
private void updateWifiDisplayStatus() {
mWifiDisplayStatus = mDisplayManager.getWifiDisplayStatus();
applyWifiDisplayStatus();
@@ -595,4 +677,4 @@
}
}
};
-}
\ No newline at end of file
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
index 724df34..cc51aac 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
@@ -30,6 +30,7 @@
import android.hardware.display.WifiDisplayStatus;
import android.os.Handler;
import android.provider.Settings;
+import android.provider.Settings.SettingNotFoundException;
import android.text.TextUtils;
import android.view.View;
import android.view.inputmethod.InputMethodInfo;
@@ -107,9 +108,26 @@
}
}
+ /** ContentObserver to watch adb */
+ private class BugreportObserver extends ContentObserver {
+ public BugreportObserver(Handler handler) {
+ super(handler);
+ }
+
+ @Override public void onChange(boolean selfChange) {
+ onBugreportChanged();
+ }
+
+ public void startObserving() {
+ final ContentResolver cr = mContext.getContentResolver();
+ cr.registerContentObserver(
+ Settings.Secure.getUriFor(Settings.Secure.BUGREPORT_IN_POWER_MENU), false, this);
+ }
+ }
private Context mContext;
private Handler mHandler;
private NextAlarmObserver mNextAlarmObserver;
+ private BugreportObserver mBugreportObserver;
private QuickSettingsTileView mUserTile;
private RefreshCallback mUserCallback;
@@ -159,11 +177,17 @@
private RefreshCallback mBrightnessCallback;
private BrightnessState mBrightnessState = new BrightnessState();
+ private QuickSettingsTileView mBugreportTile;
+ private RefreshCallback mBugreportCallback;
+ private State mBugreportState = new State();
+
public QuickSettingsModel(Context context) {
mContext = context;
mHandler = new Handler();
mNextAlarmObserver = new NextAlarmObserver(mHandler);
mNextAlarmObserver.startObserving();
+ mBugreportObserver = new BugreportObserver(mHandler);
+ mBugreportObserver.startObserving();
IntentFilter alarmIntentFilter = new IntentFilter();
alarmIntentFilter.addAction(Intent.ACTION_ALARM_CHANGED);
@@ -341,6 +365,25 @@
mLocationCallback.refreshView(mLocationTile, mLocationState);
}
+ // Bug report
+ void addBugreportTile(QuickSettingsTileView view, RefreshCallback cb) {
+ mBugreportTile = view;
+ mBugreportCallback = cb;
+ onBugreportChanged();
+ }
+ // SettingsObserver callback
+ public void onBugreportChanged() {
+ final ContentResolver cr = mContext.getContentResolver();
+ boolean enabled = false;
+ try {
+ enabled = (Settings.Secure.getInt(cr, Settings.Secure.BUGREPORT_IN_POWER_MENU) != 0);
+ } catch (SettingNotFoundException e) {
+ }
+
+ mBugreportState.enabled = enabled;
+ mBugreportCallback.refreshView(mBugreportTile, mBugreportState);
+ }
+
// Wifi Display
void addWifiDisplayTile(QuickSettingsTileView view, RefreshCallback cb) {
mWifiDisplayTile = view;
@@ -348,7 +391,7 @@
}
public void onWifiDisplayStateChanged(WifiDisplayStatus status) {
mWifiDisplayState.enabled =
- (status.getFeatureState() != WifiDisplayStatus.FEATURE_STATE_UNAVAILABLE);
+ (status.getFeatureState() == WifiDisplayStatus.FEATURE_STATE_ON);
if (status.getActiveDisplay() != null) {
mWifiDisplayState.label = status.getActiveDisplay().getFriendlyDisplayName();
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
index e0b7fe6..f83517b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
@@ -17,6 +17,8 @@
package com.android.systemui.statusbar.phone;
import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Paint;
import android.util.AttributeSet;
import android.util.Log;
import android.view.KeyEvent;
@@ -28,12 +30,14 @@
import com.android.systemui.ExpandHelper;
import com.android.systemui.R;
+import com.android.systemui.statusbar.BaseStatusBar;
import com.android.systemui.statusbar.policy.NotificationRowLayout;
public class StatusBarWindowView extends FrameLayout
{
- private static final String TAG = "StatusBarWindowView";
+ public static final String TAG = "StatusBarWindowView";
+ public static final boolean DEBUG = BaseStatusBar.DEBUG;
private ExpandHelper mExpandHelper;
private NotificationRowLayout latestItems;
@@ -44,6 +48,7 @@
public StatusBarWindowView(Context context, AttributeSet attrs) {
super(context, attrs);
setMotionEventSplittingEnabled(false);
+ setWillNotDraw(!DEBUG);
}
@Override
@@ -101,5 +106,17 @@
}
return handled;
}
+
+ @Override
+ public void onDraw(Canvas canvas) {
+ super.onDraw(canvas);
+ if (DEBUG) {
+ Paint pt = new Paint();
+ pt.setColor(0x80FFFF00);
+ pt.setStrokeWidth(12.0f);
+ pt.setStyle(Paint.Style.STROKE);
+ canvas.drawRect(0, 0, canvas.getWidth(), canvas.getHeight(), pt);
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
index ee82777..463aacb 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -1097,8 +1097,7 @@
final boolean ethernetConnected = (mConnectedNetworkType == ConnectivityManager.TYPE_ETHERNET);
if (ethernetConnected) {
- // TODO: icons and strings for Ethernet connectivity
- combinedLabel = mConnectedNetworkTypeName;
+ combinedLabel = context.getString(R.string.ethernet_label);
}
if (mAirplaneMode &&
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
index bbd07a3..e6d6e36 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
@@ -33,7 +33,6 @@
import android.graphics.Canvas;
import android.graphics.Rect;
import android.os.Looper;
-import android.os.UserHandle;
import android.os.UserManager;
import android.util.AttributeSet;
import android.util.Log;
@@ -42,6 +41,7 @@
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
+import android.view.ViewGroup;
import android.view.WindowManager;
import android.view.animation.AnimationUtils;
import android.widget.RemoteViews.OnClickHandler;
@@ -691,6 +691,23 @@
}
inflateAndAddUserSelectorWidgetIfNecessary();
+ // Add status widget
+ int statusWidgetId = mLockPatternUtils.getStatusWidget();
+ if (statusWidgetId != -1) {
+ addWidget(statusWidgetId);
+ View newStatusWidget = mAppWidgetContainer.getChildAt(
+ mAppWidgetContainer.getChildCount() - 1);
+
+ int oldStatusWidgetPosition = getWidgetPosition(R.id.keyguard_status_view);
+ mAppWidgetContainer.removeViewAt(oldStatusWidgetPosition);
+
+ // Re-add new status widget at position of old one
+ mAppWidgetContainer.removeView(newStatusWidget);
+ newStatusWidget.setId(R.id.keyguard_status_view);
+ mAppWidgetContainer.addView(newStatusWidget, oldStatusWidgetPosition);
+ }
+
+ // Add user-selected widget
final int[] widgets = mLockPatternUtils.getUserDefinedWidgets();
for (int i = 0; i < widgets.length; i++) {
if (widgets[i] != -1) {
@@ -703,7 +720,7 @@
// if there are multiple users, we need to add the multi-user switcher widget to the
// keyguard.
UserManager mUm = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
- List<UserInfo> users = mUm.getUsers();
+ List<UserInfo> users = mUm.getUsers(true);
if (users.size() > 1) {
KeyguardWidgetFrame userSwitcher = (KeyguardWidgetFrame)
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardMultiUserSelectorView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardMultiUserSelectorView.java
index b3cd8a2..e4096b9 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardMultiUserSelectorView.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardMultiUserSelectorView.java
@@ -76,7 +76,7 @@
}
UserManager mUm = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
- ArrayList<UserInfo> users = new ArrayList<UserInfo>(mUm.getUsers());
+ ArrayList<UserInfo> users = new ArrayList<UserInfo>(mUm.getUsers(true));
Collections.sort(users, mOrderAddedComparator);
for (UserInfo user: users) {
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java
index 50a7134..416a0bb 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java
@@ -792,7 +792,7 @@
return;
}
- if (mUserManager.getUsers().size() < 2
+ if (mUserManager.getUsers(true).size() < 2
&& mLockPatternUtils.isLockScreenDisabled() && !lockedOrMissing) {
if (DEBUG) Log.d(TAG, "doKeyguard: not showing because lockscreen is off");
return;
diff --git a/services/java/com/android/server/AppWidgetServiceImpl.java b/services/java/com/android/server/AppWidgetServiceImpl.java
index 499c15e..815ee24 100644
--- a/services/java/com/android/server/AppWidgetServiceImpl.java
+++ b/services/java/com/android/server/AppWidgetServiceImpl.java
@@ -980,9 +980,13 @@
// drop unbound appWidgetIds (shouldn't be possible under normal circumstances)
if (id != null && id.provider != null && !id.provider.zombie && !id.host.zombie) {
- // We do not want to save this RemoteViews
- if (!isPartialUpdate)
+ if (!isPartialUpdate) {
+ // For a full update we replace the RemoteViews completely.
id.views = views;
+ } else {
+ // For a partial update, we merge the new RemoteViews with the old.
+ id.views.mergeRemoteViews(views);
+ }
// is anyone listening?
if (id.host.callbacks != null) {
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java
index ba758e5..fe2f8d8 100644
--- a/services/java/com/android/server/MountService.java
+++ b/services/java/com/android/server/MountService.java
@@ -1176,7 +1176,7 @@
true, mtpReserve, false, maxFileSize, null);
final UserManagerService userManager = UserManagerService.getInstance();
- for (UserInfo user : userManager.getUsers()) {
+ for (UserInfo user : userManager.getUsers(false)) {
createEmulatedVolumeForUserLocked(user.getUserHandle());
}
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 6c5a4e2..fb1d530 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -302,16 +302,22 @@
Watchdog.getInstance().init(context, battery, power, alarm,
ActivityManagerService.self());
+ Slog.i(TAG, "Input Manager");
+ inputManager = new InputManagerService(context, wmHandler);
+
Slog.i(TAG, "Window Manager");
- wm = WindowManagerService.main(context, power, display,
+ wm = WindowManagerService.main(context, power, display, inputManager,
uiHandler, wmHandler,
factoryTest != SystemServer.FACTORY_TEST_LOW_LEVEL,
!firstBoot, onlyCore);
ServiceManager.addService(Context.WINDOW_SERVICE, wm);
- inputManager = wm.getInputManagerService();
ServiceManager.addService(Context.INPUT_SERVICE, inputManager);
ActivityManagerService.self().setWindowManager(wm);
+
+ inputManager.setWindowManagerCallbacks(wm.getInputMonitor());
+ inputManager.start();
+
display.setWindowManager(wm);
display.setInputManager(inputManager);
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index cd3aeff..f162dae 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -14034,6 +14034,7 @@
startHomeActivityLocked(userId);
}
+ getUserManagerLocked().userForeground(userId);
sendUserSwitchBroadcastsLocked(oldUserId, userId);
}
} finally {
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index df50d89..05ff379 100755
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -3038,11 +3038,6 @@
// Collect information about the target of the Intent.
ActivityInfo aInfo = resolveActivity(intent, resolvedType, startFlags,
profileFile, profileFd, userId);
- if (aInfo != null && (aInfo.flags & ActivityInfo.FLAG_MULTIPROCESS) == 0
- && mService.isSingleton(aInfo.processName, aInfo.applicationInfo, null, 0)) {
- userId = 0;
- }
- aInfo = mService.getActivityInfoForUser(aInfo, userId);
synchronized (mService) {
int callingPid;
diff --git a/services/java/com/android/server/display/DisplayManagerService.java b/services/java/com/android/server/display/DisplayManagerService.java
index 02fc6b1..b109f2a 100644
--- a/services/java/com/android/server/display/DisplayManagerService.java
+++ b/services/java/com/android/server/display/DisplayManagerService.java
@@ -89,6 +89,11 @@
private static final String TAG = "DisplayManagerService";
private static final boolean DEBUG = false;
+ // When this system property is set to 0, WFD is forcibly disabled on boot.
+ // When this system property is set to 1, WFD is forcibly enabled on boot.
+ // Otherwise WFD is enabled according to the value of config_enableWifiDisplay.
+ private static final String FORCE_WIFI_DISPLAY_ENABLE = "persist.debug.wfd.enable";
+
private static final String SYSTEM_HEADLESS = "ro.config.headless";
private static final long WAIT_FOR_DEFAULT_DISPLAY_TIMEOUT = 10000;
@@ -499,7 +504,8 @@
private void registerWifiDisplayAdapterLocked() {
if (mContext.getResources().getBoolean(
- com.android.internal.R.bool.config_enableWifiDisplay)) {
+ com.android.internal.R.bool.config_enableWifiDisplay)
+ || SystemProperties.getInt(FORCE_WIFI_DISPLAY_ENABLE, -1) == 1) {
mWifiDisplayAdapter = new WifiDisplayAdapter(
mSyncRoot, mContext, mHandler, mDisplayAdapterListener,
mPersistentDataStore);
diff --git a/services/java/com/android/server/display/WifiDisplayController.java b/services/java/com/android/server/display/WifiDisplayController.java
index 84f4e83..58f0445 100644
--- a/services/java/com/android/server/display/WifiDisplayController.java
+++ b/services/java/com/android/server/display/WifiDisplayController.java
@@ -536,7 +536,7 @@
WifiP2pConfig config = new WifiP2pConfig();
config.deviceAddress = mConnectingDevice.deviceAddress;
// Helps with STA & P2P concurrency
- config.groupOwnerIntent = WifiP2pConfig.MAX_GROUP_OWNER_INTENT;
+ config.groupOwnerIntent = WifiP2pConfig.MIN_GROUP_OWNER_INTENT;
WifiDisplay display = createWifiDisplay(mConnectingDevice);
advertiseDisplay(display, null, 0, 0, 0);
diff --git a/services/java/com/android/server/input/InputManagerService.java b/services/java/com/android/server/input/InputManagerService.java
index 805818a..3709314 100644
--- a/services/java/com/android/server/input/InputManagerService.java
+++ b/services/java/com/android/server/input/InputManagerService.java
@@ -53,6 +53,7 @@
import android.os.Environment;
import android.os.Handler;
import android.os.IBinder;
+import android.os.Looper;
import android.os.Message;
import android.os.MessageQueue;
import android.os.Process;
@@ -70,7 +71,6 @@
import android.view.InputEvent;
import android.view.KeyEvent;
import android.view.PointerIcon;
-import android.view.Surface;
import android.view.ViewConfiguration;
import android.view.WindowManagerPolicy;
import android.widget.Toast;
@@ -109,8 +109,9 @@
private final int mPtr;
private final Context mContext;
- private final Callbacks mCallbacks;
private final InputManagerHandler mHandler;
+
+ private WindowManagerCallbacks mWindowManagerCallbacks;
private boolean mSystemReady;
private NotificationManager mNotificationManager;
@@ -217,15 +218,18 @@
/** Switch code: Keypad slide. When set, keyboard is exposed. */
public static final int SW_KEYPAD_SLIDE = 0x0a;
- public InputManagerService(Context context, Callbacks callbacks) {
+ public InputManagerService(Context context, Handler handler) {
this.mContext = context;
- this.mCallbacks = callbacks;
- this.mHandler = new InputManagerHandler();
+ this.mHandler = new InputManagerHandler(handler.getLooper());
Slog.i(TAG, "Initializing input manager");
mPtr = nativeInit(this, mContext, mHandler.getLooper().getQueue());
}
+ public void setWindowManagerCallbacks(WindowManagerCallbacks callbacks) {
+ mWindowManagerCallbacks = callbacks;
+ }
+
public void start() {
Slog.i(TAG, "Starting input manager");
nativeStart(mPtr);
@@ -1204,7 +1208,7 @@
// Native callback.
private void notifyConfigurationChanged(long whenNanos) {
- mCallbacks.notifyConfigurationChanged();
+ mWindowManagerCallbacks.notifyConfigurationChanged();
}
// Native callback.
@@ -1224,20 +1228,20 @@
private void notifySwitch(long whenNanos, int switchCode, int switchValue) {
switch (switchCode) {
case SW_LID:
- mCallbacks.notifyLidSwitchChanged(whenNanos, switchValue == 0);
+ mWindowManagerCallbacks.notifyLidSwitchChanged(whenNanos, switchValue == 0);
break;
}
}
// Native callback.
private void notifyInputChannelBroken(InputWindowHandle inputWindowHandle) {
- mCallbacks.notifyInputChannelBroken(inputWindowHandle);
+ mWindowManagerCallbacks.notifyInputChannelBroken(inputWindowHandle);
}
// Native callback.
private long notifyANR(InputApplicationHandle inputApplicationHandle,
InputWindowHandle inputWindowHandle) {
- return mCallbacks.notifyANR(inputApplicationHandle, inputWindowHandle);
+ return mWindowManagerCallbacks.notifyANR(inputApplicationHandle, inputWindowHandle);
}
// Native callback.
@@ -1258,25 +1262,25 @@
// Native callback.
private int interceptKeyBeforeQueueing(KeyEvent event, int policyFlags, boolean isScreenOn) {
- return mCallbacks.interceptKeyBeforeQueueing(
+ return mWindowManagerCallbacks.interceptKeyBeforeQueueing(
event, policyFlags, isScreenOn);
}
// Native callback.
private int interceptMotionBeforeQueueingWhenScreenOff(int policyFlags) {
- return mCallbacks.interceptMotionBeforeQueueingWhenScreenOff(policyFlags);
+ return mWindowManagerCallbacks.interceptMotionBeforeQueueingWhenScreenOff(policyFlags);
}
// Native callback.
private long interceptKeyBeforeDispatching(InputWindowHandle focus,
KeyEvent event, int policyFlags) {
- return mCallbacks.interceptKeyBeforeDispatching(focus, event, policyFlags);
+ return mWindowManagerCallbacks.interceptKeyBeforeDispatching(focus, event, policyFlags);
}
// Native callback.
private KeyEvent dispatchUnhandledKey(InputWindowHandle focus,
KeyEvent event, int policyFlags) {
- return mCallbacks.dispatchUnhandledKey(focus, event, policyFlags);
+ return mWindowManagerCallbacks.dispatchUnhandledKey(focus, event, policyFlags);
}
// Native callback.
@@ -1359,7 +1363,7 @@
// Native callback.
private int getPointerLayer() {
- return mCallbacks.getPointerLayer();
+ return mWindowManagerCallbacks.getPointerLayer();
}
// Native callback.
@@ -1414,7 +1418,7 @@
/**
* Callback interface implemented by the Window Manager.
*/
- public interface Callbacks {
+ public interface WindowManagerCallbacks {
public void notifyConfigurationChanged();
public void notifyLidSwitchChanged(long whenNanos, boolean lidOpen);
@@ -1441,8 +1445,8 @@
* Private handler for the input manager.
*/
private final class InputManagerHandler extends Handler {
- public InputManagerHandler() {
- super(true /*async*/);
+ public InputManagerHandler(Looper looper) {
+ super(looper, null, true /*async*/);
}
@Override
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java
index f3de8a4..3f2387b 100644
--- a/services/java/com/android/server/pm/PackageManagerService.java
+++ b/services/java/com/android/server/pm/PackageManagerService.java
@@ -1029,7 +1029,7 @@
readPermissions();
- mRestoredSettings = mSettings.readLPw(sUserManager.getUsers());
+ mRestoredSettings = mSettings.readLPw(sUserManager.getUsers(false));
long startTime = SystemClock.uptimeMillis();
EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_SYSTEM_SCAN_START,
@@ -5904,11 +5904,20 @@
*
* @return true if verification should be performed
*/
- private boolean isVerificationEnabled() {
+ private boolean isVerificationEnabled(int flags) {
if (!DEFAULT_VERIFY_ENABLE) {
return false;
}
+ // Check if installing from ADB
+ if ((flags & PackageManager.INSTALL_FROM_ADB) != 0) {
+ // Check if the developer does not want package verification for ADB installs
+ if (android.provider.Settings.Global.getInt(mContext.getContentResolver(),
+ android.provider.Settings.Global.PACKAGE_VERIFIER_INCLUDE_ADB, 1) == 0) {
+ return false;
+ }
+ }
+
return android.provider.Settings.Global.getInt(mContext.getContentResolver(),
android.provider.Settings.Global.PACKAGE_VERIFIER_ENABLE, 1) == 1;
}
@@ -6406,7 +6415,7 @@
*/
final int requiredUid = mRequiredVerifierPackage == null ? -1
: getPackageUid(mRequiredVerifierPackage, 0);
- if (requiredUid != -1 && isVerificationEnabled()) {
+ if (requiredUid != -1 && isVerificationEnabled(flags)) {
final Intent verification = new Intent(
Intent.ACTION_PACKAGE_NEEDS_VERIFICATION);
verification.setDataAndType(getPackageUri(), PACKAGE_MIME_TYPE);
diff --git a/services/java/com/android/server/pm/Settings.java b/services/java/com/android/server/pm/Settings.java
index b075da3..23e54678 100644
--- a/services/java/com/android/server/pm/Settings.java
+++ b/services/java/com/android/server/pm/Settings.java
@@ -2477,7 +2477,7 @@
private List<UserInfo> getAllUsers() {
long id = Binder.clearCallingIdentity();
try {
- return UserManagerService.getInstance().getUsers();
+ return UserManagerService.getInstance().getUsers(false);
} catch (NullPointerException npe) {
// packagemanager not yet initialized
} finally {
diff --git a/services/java/com/android/server/pm/UserManagerService.java b/services/java/com/android/server/pm/UserManagerService.java
index 2dc9a6a..2edc700 100644
--- a/services/java/com/android/server/pm/UserManagerService.java
+++ b/services/java/com/android/server/pm/UserManagerService.java
@@ -43,15 +43,19 @@
import android.util.AtomicFile;
import android.util.Slog;
import android.util.SparseArray;
+import android.util.TimeUtils;
import android.util.Xml;
import java.io.BufferedOutputStream;
import java.io.File;
+import java.io.FileDescriptor;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.io.PrintWriter;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
import org.xmlpull.v1.XmlPullParser;
@@ -66,6 +70,8 @@
private static final String ATTR_FLAGS = "flags";
private static final String ATTR_ICON_PATH = "icon";
private static final String ATTR_ID = "id";
+ private static final String ATTR_CREATION_TIME = "created";
+ private static final String ATTR_LAST_LOGGED_IN_TIME = "lastLoggedIn";
private static final String ATTR_SERIAL_NO = "serialNumber";
private static final String ATTR_NEXT_SERIAL_NO = "nextSerialNumber";
private static final String TAG_USERS = "users";
@@ -75,6 +81,8 @@
private static final String USER_LIST_FILENAME = "userlist.xml";
private static final String USER_PHOTO_FILENAME = "photo.png";
+ private static final long EPOCH_PLUS_30_YEARS = 30L * 365 * 24 * 60 * 60 * 1000L; // ms
+
private final Context mContext;
private final PackageManagerService mPm;
private final Object mInstallLock;
@@ -85,6 +93,7 @@
private final File mBaseUserPath;
private SparseArray<UserInfo> mUsers = new SparseArray<UserInfo>();
+ private HashSet<Integer> mRemovingUserIds = new HashSet<Integer>();
private int[] mUserIds;
private boolean mGuestEnabled;
@@ -145,12 +154,14 @@
}
@Override
- public List<UserInfo> getUsers() {
+ public List<UserInfo> getUsers(boolean excludeDying) {
checkManageUsersPermission("query users");
synchronized (mPackagesLock) {
ArrayList<UserInfo> users = new ArrayList<UserInfo>(mUsers.size());
for (int i = 0; i < mUsers.size(); i++) {
- users.add(mUsers.valueAt(i));
+ if (!excludeDying || !mRemovingUserIds.contains(mUsers.keyAt(i))) {
+ users.add(mUsers.valueAt(i));
+ }
}
return users;
}
@@ -436,6 +447,9 @@
serializer.attribute(null, ATTR_ID, Integer.toString(userInfo.id));
serializer.attribute(null, ATTR_SERIAL_NO, Integer.toString(userInfo.serialNumber));
serializer.attribute(null, ATTR_FLAGS, Integer.toString(userInfo.flags));
+ serializer.attribute(null, ATTR_CREATION_TIME, Long.toString(userInfo.creationTime));
+ serializer.attribute(null, ATTR_LAST_LOGGED_IN_TIME,
+ Long.toString(userInfo.lastLoggedInTime));
if (userInfo.iconPath != null) {
serializer.attribute(null, ATTR_ICON_PATH, userInfo.iconPath);
}
@@ -500,6 +514,8 @@
int serialNumber = id;
String name = null;
String iconPath = null;
+ long creationTime = 0L;
+ long lastLoggedInTime = 0L;
FileInputStream fis = null;
try {
@@ -520,18 +536,16 @@
}
if (type == XmlPullParser.START_TAG && parser.getName().equals(TAG_USER)) {
- String storedId = parser.getAttributeValue(null, ATTR_ID);
- if (Integer.parseInt(storedId) != id) {
+ int storedId = readIntAttribute(parser, ATTR_ID, -1);
+ if (storedId != id) {
Slog.e(LOG_TAG, "User id does not match the file name");
return null;
}
- String serialNumberValue = parser.getAttributeValue(null, ATTR_SERIAL_NO);
- if (serialNumberValue != null) {
- serialNumber = Integer.parseInt(serialNumberValue);
- }
- String flagString = parser.getAttributeValue(null, ATTR_FLAGS);
- flags = Integer.parseInt(flagString);
+ serialNumber = readIntAttribute(parser, ATTR_SERIAL_NO, id);
+ flags = readIntAttribute(parser, ATTR_FLAGS, 0);
iconPath = parser.getAttributeValue(null, ATTR_ICON_PATH);
+ creationTime = readLongAttribute(parser, ATTR_CREATION_TIME, 0);
+ lastLoggedInTime = readLongAttribute(parser, ATTR_LAST_LOGGED_IN_TIME, 0);
while ((type = parser.next()) != XmlPullParser.START_TAG
&& type != XmlPullParser.END_DOCUMENT) {
@@ -546,6 +560,8 @@
UserInfo userInfo = new UserInfo(id, name, iconPath, flags);
userInfo.serialNumber = serialNumber;
+ userInfo.creationTime = creationTime;
+ userInfo.lastLoggedInTime = lastLoggedInTime;
return userInfo;
} catch (IOException ioe) {
@@ -561,6 +577,26 @@
return null;
}
+ private int readIntAttribute(XmlPullParser parser, String attr, int defaultValue) {
+ String valueString = parser.getAttributeValue(null, attr);
+ if (valueString == null) return defaultValue;
+ try {
+ return Integer.parseInt(valueString);
+ } catch (NumberFormatException nfe) {
+ return defaultValue;
+ }
+ }
+
+ private long readLongAttribute(XmlPullParser parser, String attr, long defaultValue) {
+ String valueString = parser.getAttributeValue(null, attr);
+ if (valueString == null) return defaultValue;
+ try {
+ return Long.parseLong(valueString);
+ } catch (NumberFormatException nfe) {
+ return defaultValue;
+ }
+ }
+
@Override
public UserInfo createUser(String name, int flags) {
checkManageUsersPermission("Only the system can create users");
@@ -575,6 +611,8 @@
userInfo = new UserInfo(userId, name, null, flags);
File userPath = new File(mBaseUserPath, Integer.toString(userId));
userInfo.serialNumber = mNextSerialNumber++;
+ long now = System.currentTimeMillis();
+ userInfo.creationTime = (now > EPOCH_PLUS_30_YEARS) ? now : 0;
mUsers.put(userId, userInfo);
writeUserListLocked();
writeUserLocked(userInfo);
@@ -607,6 +645,7 @@
if (userHandle == 0 || user == null) {
return false;
}
+ mRemovingUserIds.add(userHandle);
}
int res;
@@ -636,6 +675,7 @@
// Remove this user from the list
mUsers.remove(userHandle);
+ mRemovingUserIds.remove(userHandle);
// Remove user file
AtomicFile userFile = new AtomicFile(new File(mUsersDir, userHandle + ".xml"));
userFile.delete();
@@ -700,6 +740,21 @@
}
/**
+ * Make a note of the last started time of a user.
+ * @param userId the user that was just foregrounded
+ */
+ public void userForeground(int userId) {
+ synchronized (mPackagesLock) {
+ UserInfo user = mUsers.get(userId);
+ long now = System.currentTimeMillis();
+ if (user != null && now > EPOCH_PLUS_30_YEARS) {
+ user.lastLoggedInTime = now;
+ writeUserLocked(user);
+ }
+ }
+ }
+
+ /**
* Returns the next available user id, filling in any holes in the ids.
* TODO: May not be a good idea to recycle ids, in case it results in confusion
* for data and battery stats collection, or unexpected cross-talk.
@@ -709,7 +764,7 @@
synchronized (mPackagesLock) {
int i = 10;
while (i < Integer.MAX_VALUE) {
- if (mUsers.indexOfKey(i) < 0) {
+ if (mUsers.indexOfKey(i) < 0 && !mRemovingUserIds.contains(i)) {
break;
}
i++;
@@ -717,4 +772,47 @@
return i;
}
}
+
+ @Override
+ protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
+ if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
+ != PackageManager.PERMISSION_GRANTED) {
+ pw.println("Permission Denial: can't dump UserManager from from pid="
+ + Binder.getCallingPid()
+ + ", uid=" + Binder.getCallingUid()
+ + " without permission "
+ + android.Manifest.permission.DUMP);
+ return;
+ }
+
+ long now = System.currentTimeMillis();
+ StringBuilder sb = new StringBuilder();
+ synchronized (mPackagesLock) {
+ pw.println("Users:");
+ for (int i = 0; i < mUsers.size(); i++) {
+ UserInfo user = mUsers.valueAt(i);
+ if (user == null) continue;
+ pw.print(" "); pw.print(user);
+ pw.println(mRemovingUserIds.contains(mUsers.keyAt(i)) ? " <removing> " : "");
+ pw.print(" Created: ");
+ if (user.creationTime == 0) {
+ pw.println("<unknown>");
+ } else {
+ sb.setLength(0);
+ TimeUtils.formatDuration(now - user.creationTime, sb);
+ sb.append(" ago");
+ pw.println(sb);
+ }
+ pw.print(" Last logged in: ");
+ if (user.lastLoggedInTime == 0) {
+ pw.println("<unknown>");
+ } else {
+ sb.setLength(0);
+ TimeUtils.formatDuration(now - user.lastLoggedInTime, sb);
+ sb.append(" ago");
+ pw.println(sb);
+ }
+ }
+ }
+ }
}
diff --git a/services/java/com/android/server/wm/InputMonitor.java b/services/java/com/android/server/wm/InputMonitor.java
index aa18ee4..61310ca 100644
--- a/services/java/com/android/server/wm/InputMonitor.java
+++ b/services/java/com/android/server/wm/InputMonitor.java
@@ -33,7 +33,7 @@
import java.util.ArrayList;
import java.util.Arrays;
-final class InputMonitor implements InputManagerService.Callbacks {
+final class InputMonitor implements InputManagerService.WindowManagerCallbacks {
private final WindowManagerService mService;
// Current window with input focus for keys and other non-touch events. May be null.
diff --git a/services/java/com/android/server/wm/WindowAnimator.java b/services/java/com/android/server/wm/WindowAnimator.java
index 0a4e6d3..377e89c 100644
--- a/services/java/com/android/server/wm/WindowAnimator.java
+++ b/services/java/com/android/server/wm/WindowAnimator.java
@@ -139,10 +139,8 @@
}
void addDisplayLocked(final int displayId) {
- DisplayContentsAnimator displayAnimator = getDisplayContentsAnimatorLocked(displayId);
- displayAnimator.mWindowAnimationBackgroundSurface =
- new DimSurface(mService.mFxSession, displayId);
- displayAnimator.mDimAnimator = new DimAnimator(mService.mFxSession, displayId);
+ // Create the DisplayContentsAnimator object by retrieving it.
+ getDisplayContentsAnimatorLocked(displayId);
if (displayId == Display.DEFAULT_DISPLAY) {
mInitialized = true;
}
@@ -787,7 +785,7 @@
private DisplayContentsAnimator getDisplayContentsAnimatorLocked(int displayId) {
DisplayContentsAnimator displayAnimator = mDisplayContentsAnimators.get(displayId);
if (displayAnimator == null) {
- displayAnimator = new DisplayContentsAnimator();
+ displayAnimator = new DisplayContentsAnimator(displayId);
mDisplayContentsAnimators.put(displayId, displayAnimator);
}
return displayAnimator;
@@ -801,11 +799,17 @@
return getDisplayContentsAnimatorLocked(displayId).mScreenRotationAnimation;
}
- private static class DisplayContentsAnimator {
+ private class DisplayContentsAnimator {
WinAnimatorList mWinAnimators = new WinAnimatorList();
- DimAnimator mDimAnimator = null;
+ final DimAnimator mDimAnimator;
DimAnimator.Parameters mDimParams = null;
- DimSurface mWindowAnimationBackgroundSurface = null;
+ final DimSurface mWindowAnimationBackgroundSurface;
ScreenRotationAnimation mScreenRotationAnimation = null;
+
+ public DisplayContentsAnimator(int displayId) {
+ mDimAnimator = new DimAnimator(mService.mFxSession, displayId);
+ mWindowAnimationBackgroundSurface =
+ new DimSurface(mService.mFxSession, displayId);
+ }
}
}
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 73cc7ed..5a6e010 100755
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -74,6 +74,7 @@
import android.graphics.RectF;
import android.graphics.Region;
import android.hardware.display.DisplayManager;
+import android.hardware.input.InputManager;
import android.os.Binder;
import android.os.Bundle;
import android.os.Debug;
@@ -738,6 +739,7 @@
public static WindowManagerService main(final Context context,
final PowerManagerService pm, final DisplayManagerService dm,
+ final InputManagerService im,
final Handler uiHandler, final Handler wmHandler,
final boolean haveInputMethods, final boolean showBootMsgs,
final boolean onlyCore) {
@@ -745,7 +747,7 @@
wmHandler.runWithScissors(new Runnable() {
@Override
public void run() {
- holder[0] = new WindowManagerService(context, pm, dm,
+ holder[0] = new WindowManagerService(context, pm, dm, im,
uiHandler, haveInputMethods, showBootMsgs, onlyCore);
}
}, 0);
@@ -767,7 +769,8 @@
}
private WindowManagerService(Context context, PowerManagerService pm,
- DisplayManagerService displayManager, Handler uiHandler,
+ DisplayManagerService displayManager, InputManagerService inputManager,
+ Handler uiHandler,
boolean haveInputMethods, boolean showBootMsgs, boolean onlyCore) {
mContext = context;
mHaveInputMethods = haveInputMethods;
@@ -814,14 +817,12 @@
| PowerManager.ON_AFTER_RELEASE, TAG);
mHoldingScreenWakeLock.setReferenceCounted(false);
- mInputManager = new InputManagerService(context, mInputMonitor);
+ mInputManager = inputManager;
mFxSession = new SurfaceSession();
mAnimator = new WindowAnimator(this);
initPolicy(uiHandler);
- mInputManager.start();
-
// Add ourself to the Watchdog monitors.
Watchdog.getInstance().addMonitor(this);
@@ -833,8 +834,8 @@
}
}
- public InputManagerService getInputManagerService() {
- return mInputManager;
+ public InputMonitor getInputMonitor() {
+ return mInputMonitor;
}
@Override
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/MultiLayersActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/MultiLayersActivity.java
index 0127396..eb8a0a9 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/MultiLayersActivity.java
+++ b/tests/HwAccelerationTest/src/com/android/test/hwui/MultiLayersActivity.java
@@ -45,10 +45,10 @@
row1.addView(new LayerView(this, 0xffff0000), new LinearLayout.LayoutParams(
0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f));
- row1.addView(new LayerView(this, 0xff00ff00), new LinearLayout.LayoutParams(
+ row1.addView(new LayerView(this, 0x0f00ff00), new LinearLayout.LayoutParams(
0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f));
- row2.addView(new LayerView(this, 0xff0000ff), new LinearLayout.LayoutParams(
+ row2.addView(new LayerView(this, 0x0f0000ff), new LinearLayout.LayoutParams(
0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f));
row2.addView(new LayerView(this, 0xffffff00), new LinearLayout.LayoutParams(
0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f));
diff --git a/tests/RenderScriptTests/ComputeBenchmark/src/com/example/android/rs/computebench/compute_benchmark.rs b/tests/RenderScriptTests/ComputeBenchmark/src/com/example/android/rs/computebench/compute_benchmark.rs
index 7b8ec04..2ee56ec 100644
--- a/tests/RenderScriptTests/ComputeBenchmark/src/com/example/android/rs/computebench/compute_benchmark.rs
+++ b/tests/RenderScriptTests/ComputeBenchmark/src/com/example/android/rs/computebench/compute_benchmark.rs
@@ -383,13 +383,12 @@
}
static void bench_approx_math() {
- BENCH_FN_FUNC_FN(approx_recip);
- BENCH_FN_FUNC_FN(approx_sqrt);
- BENCH_FN_FUNC_FN(approx_rsqrt);
- BENCH_FN_FUNC_FN(approx_length);
- BENCH_FN_FUNC_FN_FN(approx_distance);
- BENCH_FN_FUNC_FN(approx_normalize);
- BENCH_FN_FUNC_FN(approx_atan);
+ BENCH_FN_FUNC_FN(half_recip);
+ BENCH_FN_FUNC_FN(half_sqrt);
+ BENCH_FN_FUNC_FN(half_rsqrt);
+ BENCH_FN_FUNC_FN(fast_length);
+ BENCH_FN_FUNC_FN_FN(fast_distance);
+ BENCH_FN_FUNC_FN(fast_normalize);
}
void bench() {
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/fisheye_approx.rsh b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/fisheye_approx.rsh
index 008acbe..08b4126 100644
--- a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/fisheye_approx.rsh
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/fisheye_approx.rsh
@@ -48,8 +48,8 @@
const float2 coord = mad(inCoord, inv_dimensions, neg_center);
const float2 scaledCoord = axis_scale * coord;
const float dist2 = scaledCoord.x*scaledCoord.x + scaledCoord.y*scaledCoord.y;
- const float inv_dist = approx_rsqrt(dist2);
- const float radian = M_PI_2 - approx_atan((alpha * approx_sqrt(radius2 - dist2)) * inv_dist);
+ const float inv_dist = half_rsqrt(dist2);
+ const float radian = M_PI_2 - atan((alpha * half_sqrt(radius2 - dist2)) * inv_dist);
const float scalar = radian * factor * inv_dist;
const float2 new_coord = mad(coord, scalar, center);
const float4 fout = rsSample(in_alloc, sampler, new_coord);
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/vignette_approx.rsh b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/vignette_approx.rsh
index 19d0117..7f7bdcf 100644
--- a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/vignette_approx.rsh
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/vignette_approx.rsh
@@ -49,9 +49,9 @@
const float4 fin = convert_float4(*in);
const float2 inCoord = {(float)x, (float)y};
const float2 coord = mad(inCoord, inv_dimensions, neg_center);
- const float sloped_dist_ratio = approx_length(axis_scale * coord) * sloped_inv_max_dist;
- // TODO: add approx_exp once implemented
- const float lumen = opp_shade + shade * approx_recip(1.f + sloped_neg_range * exp(sloped_dist_ratio));
+ const float sloped_dist_ratio = fast_length(axis_scale * coord) * sloped_inv_max_dist;
+ // TODO: add half_exp once implemented
+ const float lumen = opp_shade + shade * half_recip(1.f + sloped_neg_range * exp(sloped_dist_ratio));
float4 fout;
fout.rgb = fin.rgb * lumen;
fout.w = fin.w;
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pConfig.java b/wifi/java/android/net/wifi/p2p/WifiP2pConfig.java
index f4440c8..b1501ed 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pConfig.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pConfig.java
@@ -39,6 +39,8 @@
/** @hide */
public static final int MAX_GROUP_OWNER_INTENT = 15;
+ /** @hide */
+ public static final int MIN_GROUP_OWNER_INTENT = 0;
/**
* This is an integer value between 0 and 15 where 0 indicates the least