diff options
183 files changed, 5905 insertions, 2017 deletions
diff --git a/api/current.txt b/api/current.txt index 3e1f5a521db6..acc9c4b11024 100644 --- a/api/current.txt +++ b/api/current.txt @@ -34141,6 +34141,15 @@ package android.util { field public static final int RTL = 1; // 0x1 } + public final class LocaleList { + ctor public LocaleList(); + ctor public LocaleList(java.util.Locale[]); + method public java.util.Locale get(int); + method public java.util.Locale getPrimary(); + method public boolean isEmpty(); + method public int size(); + } + public final class Log { method public static int d(java.lang.String, java.lang.String); method public static int d(java.lang.String, java.lang.String, java.lang.Throwable); diff --git a/api/system-current.txt b/api/system-current.txt index 984d3953ef86..955fb07e20a7 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -36474,6 +36474,15 @@ package android.util { field public static final int RTL = 1; // 0x1 } + public final class LocaleList { + ctor public LocaleList(); + ctor public LocaleList(java.util.Locale[]); + method public java.util.Locale get(int); + method public java.util.Locale getPrimary(); + method public boolean isEmpty(); + method public int size(); + } + public final class Log { method public static int d(java.lang.String, java.lang.String); method public static int d(java.lang.String, java.lang.String, java.lang.Throwable); diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java index 1f3ff5148716..2d825fa62791 100644 --- a/core/java/android/bluetooth/BluetoothAdapter.java +++ b/core/java/android/bluetooth/BluetoothAdapter.java @@ -64,9 +64,7 @@ import java.util.UUID; * <p>To get a {@link BluetoothAdapter} representing the local Bluetooth * adapter, when running on JELLY_BEAN_MR1 and below, call the * static {@link #getDefaultAdapter} method; when running on JELLY_BEAN_MR2 and - * higher, retrieve it through - * {@link android.content.Context#getSystemService} with - * {@link android.content.Context#BLUETOOTH_SERVICE}. + * higher, call {@link BluetoothManager#getAdapter}. * Fundamentally, this is your starting point for all * Bluetooth actions. Once you have the local adapter, you can get a set of * {@link BluetoothDevice} objects representing all paired devices with diff --git a/core/java/android/content/pm/UserInfo.java b/core/java/android/content/pm/UserInfo.java index cbd2f7850657..dfd0f7de63c0 100644 --- a/core/java/android/content/pm/UserInfo.java +++ b/core/java/android/content/pm/UserInfo.java @@ -145,6 +145,17 @@ public class UserInfo implements Parcelable { return (!hideSystemUser || id != UserHandle.USER_SYSTEM) && supportsSwitchTo(); } + /* @hide */ + public boolean canHaveProfile() { + if (isManagedProfile() || isGuest() || isRestricted()) { + return false; + } + if (UserManager.isSplitSystemUser()) { + return id != UserHandle.USER_SYSTEM; + } + return id == UserHandle.USER_OWNER; + } + public UserInfo() { } diff --git a/core/java/android/hardware/camera2/params/OutputConfiguration.java b/core/java/android/hardware/camera2/params/OutputConfiguration.java index 7aa9787a73fa..a04cdcebaa4c 100644 --- a/core/java/android/hardware/camera2/params/OutputConfiguration.java +++ b/core/java/android/hardware/camera2/params/OutputConfiguration.java @@ -19,7 +19,9 @@ package android.hardware.camera2.params; import android.hardware.camera2.CameraDevice; import android.hardware.camera2.utils.HashCodeHelpers; +import android.hardware.camera2.utils.SurfaceUtils; import android.util.Log; +import android.util.Size; import android.view.Surface; import android.os.Parcel; import android.os.Parcelable; @@ -66,9 +68,7 @@ public final class OutputConfiguration implements Parcelable { * */ public OutputConfiguration(Surface surface) { - checkNotNull(surface, "Surface must not be null"); - mSurface = surface; - mRotation = ROTATION_0; + this(surface, ROTATION_0); } /** @@ -94,6 +94,9 @@ public final class OutputConfiguration implements Parcelable { checkArgumentInRange(rotation, ROTATION_0, ROTATION_270, "Rotation constant"); mSurface = surface; mRotation = rotation; + mConfiguredSize = SurfaceUtils.getSurfaceSize(surface); + mConfiguredFormat = SurfaceUtils.getSurfaceFormat(surface); + mConfiguredDataspace = SurfaceUtils.getSurfaceDataspace(surface); } /** @@ -106,6 +109,9 @@ public final class OutputConfiguration implements Parcelable { checkArgumentInRange(rotation, ROTATION_0, ROTATION_270, "Rotation constant"); mSurface = surface; mRotation = rotation; + mConfiguredSize = SurfaceUtils.getSurfaceSize(mSurface); + mConfiguredFormat = SurfaceUtils.getSurfaceFormat(mSurface); + mConfiguredDataspace = SurfaceUtils.getSurfaceDataspace(mSurface); } /** @@ -163,8 +169,9 @@ public final class OutputConfiguration implements Parcelable { /** * Check if this {@link OutputConfiguration} is equal to another {@link OutputConfiguration}. * - * <p>Two output configurations are only equal if and only if the underlying surface and - * all other configuration parameters are equal. </p> + * <p>Two output configurations are only equal if and only if the underlying surfaces, surface + * properties (width, height, format, dataspace) when the output configurations are created, + * and all other configuration parameters are equal. </p> * * @return {@code true} if the objects were equal, {@code false} otherwise */ @@ -176,7 +183,11 @@ public final class OutputConfiguration implements Parcelable { return true; } else if (obj instanceof OutputConfiguration) { final OutputConfiguration other = (OutputConfiguration) obj; - return (mSurface == other.mSurface && mRotation == other.mRotation); + return mSurface == other.mSurface && + mRotation == other.mRotation && + mConfiguredSize.equals(other.mConfiguredSize) && + mConfiguredFormat == other.mConfiguredFormat && + mConfiguredDataspace == other.mConfiguredDataspace; } return false; } @@ -192,4 +203,9 @@ public final class OutputConfiguration implements Parcelable { private static final String TAG = "OutputConfiguration"; private final Surface mSurface; private final int mRotation; + + // The size, format, and dataspace of the surface when OutputConfiguration is created. + private final Size mConfiguredSize; + private final int mConfiguredFormat; + private final int mConfiguredDataspace; } diff --git a/core/java/android/net/NetworkCapabilities.java b/core/java/android/net/NetworkCapabilities.java index a6d477f2a11b..3bd12c060748 100644 --- a/core/java/android/net/NetworkCapabilities.java +++ b/core/java/android/net/NetworkCapabilities.java @@ -351,8 +351,12 @@ public final class NetworkCapabilities implements Parcelable { public void maybeMarkCapabilitiesRestricted() { // If all the capabilities are typically provided by restricted networks, conclude that this // network is restricted. - if ((mNetworkCapabilities & ~(DEFAULT_CAPABILITIES | RESTRICTED_CAPABILITIES)) == 0) + if ((mNetworkCapabilities & ~(DEFAULT_CAPABILITIES | RESTRICTED_CAPABILITIES)) == 0 && + // Must have at least some restricted capabilities, otherwise a request for an + // internet-less network will get marked restricted. + (mNetworkCapabilities & RESTRICTED_CAPABILITIES) != 0) { removeCapability(NET_CAPABILITY_NOT_RESTRICTED); + } } /** diff --git a/core/java/android/os/IUserManager.aidl b/core/java/android/os/IUserManager.aidl index 364c0eb4f326..aeb5d4517e6c 100644 --- a/core/java/android/os/IUserManager.aidl +++ b/core/java/android/os/IUserManager.aidl @@ -43,7 +43,7 @@ interface IUserManager { UserInfo getPrimaryUser(); List<UserInfo> getUsers(boolean excludeDying); List<UserInfo> getProfiles(int userHandle, boolean enabledOnly); - boolean canAddMoreManagedProfiles(); + boolean canAddMoreManagedProfiles(int userId); UserInfo getProfileParent(int userHandle); UserInfo getUserInfo(int userHandle); long getUserCreationTime(int userHandle); diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java index aea5123237f3..849f5de2a22c 100644 --- a/core/java/android/os/UserManager.java +++ b/core/java/android/os/UserManager.java @@ -1024,9 +1024,9 @@ public class UserManager { * @return true if more managed profiles can be added, false if limit has been reached. * @hide */ - public boolean canAddMoreManagedProfiles() { + public boolean canAddMoreManagedProfiles(int userId) { try { - return mService.canAddMoreManagedProfiles(); + return mService.canAddMoreManagedProfiles(userId); } catch (RemoteException re) { Log.w(TAG, "Could not check if we can add more managed profiles", re); return false; diff --git a/core/java/android/os/storage/VolumeInfo.java b/core/java/android/os/storage/VolumeInfo.java index ef54d84fdebf..688859479713 100644 --- a/core/java/android/os/storage/VolumeInfo.java +++ b/core/java/android/os/storage/VolumeInfo.java @@ -341,6 +341,7 @@ public class VolumeInfo implements Parcelable { } String description = null; + String derivedFsUuid = fsUuid; long mtpReserveSize = 0; long maxFileSize = 0; int mtpStorageId = StorageVolume.STORAGE_ID_INVALID; @@ -351,6 +352,7 @@ public class VolumeInfo implements Parcelable { final VolumeInfo privateVol = storage.findPrivateForEmulated(this); if (privateVol != null) { description = storage.getBestVolumeDescription(privateVol); + derivedFsUuid = privateVol.fsUuid; } if (isPrimary()) { @@ -393,7 +395,7 @@ public class VolumeInfo implements Parcelable { return new StorageVolume(id, mtpStorageId, userPath, description, isPrimary(), removable, emulated, mtpReserveSize, allowMassStorage, maxFileSize, new UserHandle(userId), - fsUuid, envState); + derivedFsUuid, envState); } public static int buildStableMtpStorageId(String fsUuid) { diff --git a/core/java/android/util/LocaleList.java b/core/java/android/util/LocaleList.java new file mode 100644 index 000000000000..017735ac03df --- /dev/null +++ b/core/java/android/util/LocaleList.java @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.util; + +import android.annotation.Nullable; + +import java.util.HashSet; +import java.util.Locale; + +// TODO: We don't except too many LocaleLists to exist at the same time, and +// we need access to the data at native level, so we should pass the data +// down to the native level, create a mapt of every list seen there, take a +// pointer back, and just keep that pointed in the Java-level object, so +// things could be copied very quickly. + +/** + * LocaleList is an immutable list of Locales, typically used to keep an + * ordered user preferences for locales. + */ +public final class LocaleList { + private final Locale[] mList; + private static final Locale[] sEmptyList = new Locale[0]; + + public Locale get(int location) { + return location < mList.length ? mList[location] : null; + } + + public Locale getPrimary() { + return mList.length == 0 ? null : get(0); + } + + public boolean isEmpty() { + return mList.length == 0; + } + + public int size() { + return mList.length; + } + + public LocaleList() { + mList = sEmptyList; + } + + /** + * @throws NullPointerException if any of the input locales is <code>null</code>. + * @throws IllegalArgumentException if any of the input locales repeat. + */ + public LocaleList(@Nullable Locale[] list) { + if (list == null || list.length == 0) { + mList = sEmptyList; + } else { + final Locale[] localeList = new Locale[list.length]; + final HashSet<Locale> seenLocales = new HashSet<Locale>(); + for (int i = 0; i < list.length; ++i) { + final Locale l = list[i]; + if (l == null) { + throw new NullPointerException(); + } else if (seenLocales.contains(l)) { + throw new IllegalArgumentException(); + } else { + seenLocales.add(l); + localeList[i] = (Locale) l.clone(); + } + } + mList = localeList; + } + } +} diff --git a/core/java/android/view/AppTransitionAnimationSpec.aidl b/core/java/android/view/AppTransitionAnimationSpec.aidl new file mode 100644 index 000000000000..8388347db325 --- /dev/null +++ b/core/java/android/view/AppTransitionAnimationSpec.aidl @@ -0,0 +1,20 @@ +/* +** Copyright 2015, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + +package android.view; + +/** @hide */ +parcelable AppTransitionAnimationSpec; diff --git a/core/java/android/view/AppTransitionAnimationSpec.java b/core/java/android/view/AppTransitionAnimationSpec.java new file mode 100644 index 000000000000..c6e1989e8b55 --- /dev/null +++ b/core/java/android/view/AppTransitionAnimationSpec.java @@ -0,0 +1,61 @@ +package android.view; + +import android.graphics.Bitmap; +import android.graphics.Rect; +import android.os.Parcel; +import android.os.Parcelable; + +/** + * Holds information about how the next app transition animation should be executed. + * + * This class is intended to be used with IWindowManager.overridePendingAppTransition* methods when + * simple arguments are not enough to describe the animation. + * + * @hide + */ +public class AppTransitionAnimationSpec implements Parcelable { + public final int taskId; + public final Bitmap bitmap; + public final Rect rect; + + public AppTransitionAnimationSpec(int taskId, Bitmap bitmap, Rect rect) { + this.taskId = taskId; + this.bitmap = bitmap; + this.rect = rect; + } + + public AppTransitionAnimationSpec(Parcel in) { + taskId = in.readInt(); + bitmap = in.readParcelable(null); + rect = in.readParcelable(null); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeInt(taskId); + dest.writeParcelable(bitmap, 0 /* flags */); + dest.writeParcelable(rect, 0 /* flags */); + + } + + public static final Parcelable.Creator<AppTransitionAnimationSpec> CREATOR + = new Parcelable.Creator<AppTransitionAnimationSpec>() { + public AppTransitionAnimationSpec createFromParcel(Parcel in) { + return new AppTransitionAnimationSpec(in); + } + + public AppTransitionAnimationSpec[] newArray(int size) { + return new AppTransitionAnimationSpec[size]; + } + }; + + @Override + public String toString() { + return "{taskId: " + taskId + ", bitmap: " + bitmap + ", rect: " + rect + "}"; + } +} diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl index 0a4b9826e2be..f86adfe7dc01 100644 --- a/core/java/android/view/IWindowManager.aidl +++ b/core/java/android/view/IWindowManager.aidl @@ -39,6 +39,7 @@ import android.view.MotionEvent; import android.view.InputChannel; import android.view.InputDevice; import android.view.IInputFilter; +import android.view.AppTransitionAnimationSpec; import android.view.WindowContentFrameStats; /** @@ -127,6 +128,16 @@ interface IWindowManager void overridePendingAppTransitionAspectScaledThumb(in Bitmap srcThumb, int startX, int startY, int targetWidth, int targetHeight, IRemoteCallback startedCallback, boolean scaleUp); + /** + * Overrides animation for app transition that exits from an application to a multi-window + * environment and allows specifying transition animation parameters for each window. + * + * @param specs Array of transition animation descriptions for entering windows. + * + * @hide + */ + void overridePendingAppTransitionMultiThumb(in AppTransitionAnimationSpec[] specs, + IRemoteCallback startedCallback, boolean scaleUp); void overridePendingAppTransitionInPlace(String packageName, int anim); void executeAppTransition(); void setAppStartingWindow(IBinder token, String pkg, int theme, diff --git a/core/java/android/view/TextureView.java b/core/java/android/view/TextureView.java index cdc196e1c371..197ea09e2d60 100644 --- a/core/java/android/view/TextureView.java +++ b/core/java/android/view/TextureView.java @@ -23,6 +23,7 @@ import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.SurfaceTexture; +import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.util.Log; @@ -294,6 +295,22 @@ public class TextureView extends View { public void buildLayer() { } + @Override + public void setForeground(Drawable foreground) { + if (foreground != null) { + throw new UnsupportedOperationException( + "TextureView doesn't support displaying a foreground drawable"); + } + } + + @Override + public void setBackgroundDrawable(Drawable background) { + if (background != null) { + throw new UnsupportedOperationException( + "TextureView doesn't support displaying a background drawable"); + } + } + /** * Subclasses of TextureView cannot do their own rendering * with the {@link Canvas} object. diff --git a/core/java/com/android/internal/app/ChooserActivity.java b/core/java/com/android/internal/app/ChooserActivity.java index d9faece9485f..5fc8c7a12b26 100644 --- a/core/java/com/android/internal/app/ChooserActivity.java +++ b/core/java/com/android/internal/app/ChooserActivity.java @@ -220,7 +220,7 @@ public class ChooserActivity extends ResolverActivity { result.putExtras(replExtras); } } - if (aInfo.name.equals(IntentForwarderActivity.FORWARD_INTENT_TO_USER_OWNER) + if (aInfo.name.equals(IntentForwarderActivity.FORWARD_INTENT_TO_PARENT) || aInfo.name.equals(IntentForwarderActivity.FORWARD_INTENT_TO_MANAGED_PROFILE)) { result = Intent.createChooser(result, getIntent().getCharSequenceExtra(Intent.EXTRA_TITLE)); diff --git a/core/java/com/android/internal/app/IntentForwarderActivity.java b/core/java/com/android/internal/app/IntentForwarderActivity.java index 39b66aa24a82..dbec7405fe49 100644 --- a/core/java/com/android/internal/app/IntentForwarderActivity.java +++ b/core/java/com/android/internal/app/IntentForwarderActivity.java @@ -45,8 +45,8 @@ public class IntentForwarderActivity extends Activity { public static String TAG = "IntentForwarderActivity"; - public static String FORWARD_INTENT_TO_USER_OWNER - = "com.android.internal.app.ForwardIntentToUserOwner"; + public static String FORWARD_INTENT_TO_PARENT + = "com.android.internal.app.ForwardIntentToParent"; public static String FORWARD_INTENT_TO_MANAGED_PROFILE = "com.android.internal.app.ForwardIntentToManagedProfile"; @@ -60,9 +60,9 @@ public class IntentForwarderActivity extends Activity { final int targetUserId; final int userMessageId; - if (className.equals(FORWARD_INTENT_TO_USER_OWNER)) { + if (className.equals(FORWARD_INTENT_TO_PARENT)) { userMessageId = com.android.internal.R.string.forward_intent_to_owner; - targetUserId = UserHandle.USER_OWNER; + targetUserId = getProfileParent(); } else if (className.equals(FORWARD_INTENT_TO_MANAGED_PROFILE)) { userMessageId = com.android.internal.R.string.forward_intent_to_work; targetUserId = getManagedProfile(); @@ -72,7 +72,7 @@ public class IntentForwarderActivity extends Activity { targetUserId = UserHandle.USER_NULL; } if (targetUserId == UserHandle.USER_NULL) { - // This covers the case where there is no managed profile. + // This covers the case where there is no parent / managed profile. finish(); return; } @@ -168,7 +168,7 @@ public class IntentForwarderActivity extends Activity { */ private int getManagedProfile() { UserManager userManager = (UserManager) getSystemService(Context.USER_SERVICE); - List<UserInfo> relatedUsers = userManager.getProfiles(UserHandle.USER_OWNER); + List<UserInfo> relatedUsers = userManager.getProfiles(UserHandle.myUserId()); for (UserInfo userInfo : relatedUsers) { if (userInfo.isManagedProfile()) return userInfo.id; } @@ -176,4 +176,19 @@ public class IntentForwarderActivity extends Activity { + " has been called, but there is no managed profile"); return UserHandle.USER_NULL; } + + /** + * Returns the userId of the profile parent or UserHandle.USER_NULL if there is + * no parent. + */ + private int getProfileParent() { + UserManager userManager = (UserManager) getSystemService(Context.USER_SERVICE); + UserInfo parent = userManager.getProfileParent(UserHandle.myUserId()); + if (parent == null) { + Slog.wtf(TAG, FORWARD_INTENT_TO_PARENT + + " has been called, but there is no parent"); + return UserHandle.USER_NULL; + } + return parent.id; + } } diff --git a/core/java/com/android/internal/statusbar/IStatusBar.aidl b/core/java/com/android/internal/statusbar/IStatusBar.aidl index c1645c330445..1e41e6396f6a 100644 --- a/core/java/com/android/internal/statusbar/IStatusBar.aidl +++ b/core/java/com/android/internal/statusbar/IStatusBar.aidl @@ -46,6 +46,8 @@ oneway interface IStatusBar void cancelPreloadRecentApps(); void showScreenPinningRequest(); + void showKeyboardShortcutsMenu(); + /** * Notifies the status bar that an app transition is pending to delay applying some flags with * visual impact until {@link #appTransitionReady} is called. diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl index 7db2cc9f0f18..6c957becc5e5 100644 --- a/core/java/com/android/internal/statusbar/IStatusBarService.aidl +++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl @@ -68,6 +68,8 @@ interface IStatusBarService void preloadRecentApps(); void cancelPreloadRecentApps(); + void showKeyboardShortcutsMenu(); + /** * Notifies the status bar that an app transition is pending to delay applying some flags with * visual impact until {@link #appTransitionReady} is called. diff --git a/core/java/com/android/internal/widget/NonClientDecorView.java b/core/java/com/android/internal/widget/NonClientDecorView.java index 05711b5ca83c..92812f8b2372 100644 --- a/core/java/com/android/internal/widget/NonClientDecorView.java +++ b/core/java/com/android/internal/widget/NonClientDecorView.java @@ -20,6 +20,7 @@ import android.content.Context; import android.graphics.Rect; import android.os.RemoteException; import android.util.AttributeSet; +import android.view.MotionEvent; import android.view.View; import android.widget.LinearLayout; import android.view.ViewGroup; @@ -63,18 +64,31 @@ public class NonClientDecorView extends LinearLayout implements View.OnClickList private final int DECOR_SHADOW_FOCUSED_HEIGHT_IN_DIP = 20; // The height of a window which has not in DIP. private final int DECOR_SHADOW_UNFOCUSED_HEIGHT_IN_DIP = 5; - private PhoneWindow mOwner = null; - boolean mWindowHasShadow = false; - boolean mShowDecor = false; + private boolean mWindowHasShadow = false; + private boolean mShowDecor = false; + + // True if the window is being dragged. + private boolean mDragging = false; + + // The bounds of the window and the absolute mouse pointer coordinates from before we started to + // drag the window. They will be used to determine the next window position. + private final Rect mWindowOriginalBounds = new Rect(); + private float mStartDragX; + private float mStartDragY; + // True when the left mouse button got released while dragging. + private boolean mLeftMouseButtonReleased; + + // Avoiding re-creation of Rect's by keeping a temporary window drag bound. + private final Rect mWindowDragBounds = new Rect(); // The current focus state of the window for updating the window elevation. - boolean mWindowHasFocus = true; + private boolean mWindowHasFocus = true; // Cludge to address b/22668382: Set the shadow size to the maximum so that the layer // size calculation takes the shadow size into account. We set the elevation currently // to max until the first layout command has been executed. - boolean mAllowUpdateElevation = false; + private boolean mAllowUpdateElevation = false; public NonClientDecorView(Context context) { super(context); @@ -103,6 +117,62 @@ public class NonClientDecorView extends LinearLayout implements View.OnClickList findViewById(R.id.close_window).setOnClickListener(this); } + @Override + public boolean onTouchEvent(MotionEvent e) { + // Note: There are no mixed events. When a new device gets used (e.g. 1. Mouse, 2. touch) + // the old input device events get cancelled first. So no need to remember the kind of + // input device we are listening to. + switch (e.getActionMasked()) { + case MotionEvent.ACTION_DOWN: + // A drag action is started if we aren't dragging already and the starting event is + // either a left mouse button or any other input device. + if (!mDragging && + (e.getToolType(e.getActionIndex()) != MotionEvent.TOOL_TYPE_MOUSE || + (e.getButtonState() & MotionEvent.BUTTON_PRIMARY) != 0)) { + mDragging = true; + mWindowOriginalBounds.set(getActivityBounds()); + mLeftMouseButtonReleased = false; + mStartDragX = e.getRawX(); + mStartDragY = e.getRawY(); + } + break; + + case MotionEvent.ACTION_MOVE: + if (mDragging && !mLeftMouseButtonReleased) { + if (e.getToolType(e.getActionIndex()) == MotionEvent.TOOL_TYPE_MOUSE && + (e.getButtonState() & MotionEvent.BUTTON_PRIMARY) == 0) { + // There is no separate mouse button up call and if the user mixes mouse + // button drag actions, we stop dragging once he releases the button. + mLeftMouseButtonReleased = true; + break; + } + mWindowDragBounds.set(mWindowOriginalBounds); + mWindowDragBounds.offset(Math.round(e.getRawX() - mStartDragX), + Math.round(e.getRawY() - mStartDragY)); + setActivityBounds(mWindowDragBounds); + } + break; + + case MotionEvent.ACTION_UP: + if (mDragging) { + // Since the window is already where it should be we don't have to do anything + // special at this time. + mDragging = false; + return true; + } + break; + + case MotionEvent.ACTION_CANCEL: + if (mDragging) { + mDragging = false; + setActivityBounds(mWindowOriginalBounds); + return true; + } + break; + } + return mDragging; + } + /** * The phone window configuration has changed and the decor needs to be updated. * @param showDecor True if the decor should be shown. diff --git a/core/jni/android/graphics/Paint.cpp b/core/jni/android/graphics/Paint.cpp index c66cdfec7d1c..988d13aa7ea8 100644 --- a/core/jni/android/graphics/Paint.cpp +++ b/core/jni/android/graphics/Paint.cpp @@ -112,15 +112,15 @@ public: } static jlong init(JNIEnv* env, jobject clazz) { - SK_COMPILE_ASSERT(1 << 0 == SkPaint::kAntiAlias_Flag, paint_flags_mismatch); - SK_COMPILE_ASSERT(1 << 2 == SkPaint::kDither_Flag, paint_flags_mismatch); - SK_COMPILE_ASSERT(1 << 3 == SkPaint::kUnderlineText_Flag, paint_flags_mismatch); - SK_COMPILE_ASSERT(1 << 4 == SkPaint::kStrikeThruText_Flag, paint_flags_mismatch); - SK_COMPILE_ASSERT(1 << 5 == SkPaint::kFakeBoldText_Flag, paint_flags_mismatch); - SK_COMPILE_ASSERT(1 << 6 == SkPaint::kLinearText_Flag, paint_flags_mismatch); - SK_COMPILE_ASSERT(1 << 7 == SkPaint::kSubpixelText_Flag, paint_flags_mismatch); - SK_COMPILE_ASSERT(1 << 8 == SkPaint::kDevKernText_Flag, paint_flags_mismatch); - SK_COMPILE_ASSERT(1 << 10 == SkPaint::kEmbeddedBitmapText_Flag, paint_flags_mismatch); + static_assert(1 << 0 == SkPaint::kAntiAlias_Flag, "paint_flags_mismatch"); + static_assert(1 << 2 == SkPaint::kDither_Flag, "paint_flags_mismatch"); + static_assert(1 << 3 == SkPaint::kUnderlineText_Flag, "paint_flags_mismatch"); + static_assert(1 << 4 == SkPaint::kStrikeThruText_Flag, "paint_flags_mismatch"); + static_assert(1 << 5 == SkPaint::kFakeBoldText_Flag, "paint_flags_mismatch"); + static_assert(1 << 6 == SkPaint::kLinearText_Flag, "paint_flags_mismatch"); + static_assert(1 << 7 == SkPaint::kSubpixelText_Flag, "paint_flags_mismatch"); + static_assert(1 << 8 == SkPaint::kDevKernText_Flag, "paint_flags_mismatch"); + static_assert(1 << 10 == SkPaint::kEmbeddedBitmapText_Flag, "paint_flags_mismatch"); Paint* obj = new Paint(); defaultSettingsForAndroid(obj); diff --git a/core/jni/android/graphics/PorterDuff.cpp b/core/jni/android/graphics/PorterDuff.cpp index d65864df2363..fed90a5d2f83 100644 --- a/core/jni/android/graphics/PorterDuff.cpp +++ b/core/jni/android/graphics/PorterDuff.cpp @@ -33,29 +33,29 @@ public: static jlong CreateXfermode(JNIEnv* env, jobject, jint modeHandle) { // validate that the Java enum values match our expectations - SK_COMPILE_ASSERT(0 == SkXfermode::kClear_Mode, xfermode_mismatch); - SK_COMPILE_ASSERT(1 == SkXfermode::kSrc_Mode, xfermode_mismatch); - SK_COMPILE_ASSERT(2 == SkXfermode::kDst_Mode, xfermode_mismatch); - SK_COMPILE_ASSERT(3 == SkXfermode::kSrcOver_Mode, xfermode_mismatch); - SK_COMPILE_ASSERT(4 == SkXfermode::kDstOver_Mode, xfermode_mismatch); - SK_COMPILE_ASSERT(5 == SkXfermode::kSrcIn_Mode, xfermode_mismatch); - SK_COMPILE_ASSERT(6 == SkXfermode::kDstIn_Mode, xfermode_mismatch); - SK_COMPILE_ASSERT(7 == SkXfermode::kSrcOut_Mode, xfermode_mismatch); - SK_COMPILE_ASSERT(8 == SkXfermode::kDstOut_Mode, xfermode_mismatch); - SK_COMPILE_ASSERT(9 == SkXfermode::kSrcATop_Mode, xfermode_mismatch); - SK_COMPILE_ASSERT(10 == SkXfermode::kDstATop_Mode, xfermode_mismatch); - SK_COMPILE_ASSERT(11 == SkXfermode::kXor_Mode, xfermode_mismatch); - SK_COMPILE_ASSERT(16 == SkXfermode::kDarken_Mode, xfermode_mismatch); - SK_COMPILE_ASSERT(17 == SkXfermode::kLighten_Mode, xfermode_mismatch); - SK_COMPILE_ASSERT(13 == SkXfermode::kModulate_Mode, xfermode_mismatch); - SK_COMPILE_ASSERT(14 == SkXfermode::kScreen_Mode, xfermode_mismatch); - SK_COMPILE_ASSERT(12 == SkXfermode::kPlus_Mode, xfermode_mismatch); - SK_COMPILE_ASSERT(15 == SkXfermode::kOverlay_Mode, xfermode_mismatch); - + static_assert(0 == SkXfermode::kClear_Mode, "xfermode_mismatch"); + static_assert(1 == SkXfermode::kSrc_Mode, "xfermode_mismatch"); + static_assert(2 == SkXfermode::kDst_Mode, "xfermode_mismatch"); + static_assert(3 == SkXfermode::kSrcOver_Mode, "xfermode_mismatch"); + static_assert(4 == SkXfermode::kDstOver_Mode, "xfermode_mismatch"); + static_assert(5 == SkXfermode::kSrcIn_Mode, "xfermode_mismatch"); + static_assert(6 == SkXfermode::kDstIn_Mode, "xfermode_mismatch"); + static_assert(7 == SkXfermode::kSrcOut_Mode, "xfermode_mismatch"); + static_assert(8 == SkXfermode::kDstOut_Mode, "xfermode_mismatch"); + static_assert(9 == SkXfermode::kSrcATop_Mode, "xfermode_mismatch"); + static_assert(10 == SkXfermode::kDstATop_Mode, "xfermode_mismatch"); + static_assert(11 == SkXfermode::kXor_Mode, "xfermode_mismatch"); + static_assert(16 == SkXfermode::kDarken_Mode, "xfermode_mismatch"); + static_assert(17 == SkXfermode::kLighten_Mode, "xfermode_mismatch"); + static_assert(13 == SkXfermode::kModulate_Mode, "xfermode_mismatch"); + static_assert(14 == SkXfermode::kScreen_Mode, "xfermode_mismatch"); + static_assert(12 == SkXfermode::kPlus_Mode, "xfermode_mismatch"); + static_assert(15 == SkXfermode::kOverlay_Mode, "xfermode_mismatch"); + SkXfermode::Mode mode = static_cast<SkXfermode::Mode>(modeHandle); return reinterpret_cast<jlong>(SkXfermode::Create(mode)); } - + }; static JNINativeMethod methods[] = { diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp index 4c920dc2c20a..414cbb4db835 100644 --- a/core/jni/com_android_internal_os_Zygote.cpp +++ b/core/jni/com_android_internal_os_Zygote.cpp @@ -358,8 +358,8 @@ static void DetachDescriptors(JNIEnv* env, jintArray fdsToClose) { return; } jsize count = env->GetArrayLength(fdsToClose); - jint *ar = env->GetIntArrayElements(fdsToClose, 0); - if (!ar) { + ScopedIntArrayRO ar(env, fdsToClose); + if (ar.get() == NULL) { ALOGE("Bad fd array"); RuntimeAbort(env); } diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index d591f8b10f85..2fcce675bb37 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -2658,7 +2658,7 @@ android:exported="true" > </activity> - <activity-alias android:name="com.android.internal.app.ForwardIntentToUserOwner" + <activity-alias android:name="com.android.internal.app.ForwardIntentToParent" android:targetActivity="com.android.internal.app.IntentForwarderActivity" android:exported="true" android:label="@string/user_owner_label"> diff --git a/docs/html/design/media/wear/1-tap-launch.png b/docs/html/design/media/wear/1-tap-launch.png Binary files differnew file mode 100644 index 000000000000..c0c9acabeac4 --- /dev/null +++ b/docs/html/design/media/wear/1-tap-launch.png diff --git a/docs/html/design/media/wear/2-tap-launch.png b/docs/html/design/media/wear/2-tap-launch.png Binary files differnew file mode 100644 index 000000000000..395a3ce80597 --- /dev/null +++ b/docs/html/design/media/wear/2-tap-launch.png diff --git a/docs/html/design/media/wear/aesthetic.png b/docs/html/design/media/wear/aesthetic.png Binary files differnew file mode 100644 index 000000000000..f6e5f3e2c9f2 --- /dev/null +++ b/docs/html/design/media/wear/aesthetic.png diff --git a/docs/html/design/media/wear/available_gestures.png b/docs/html/design/media/wear/available_gestures.png Binary files differnew file mode 100644 index 000000000000..677076b32a3a --- /dev/null +++ b/docs/html/design/media/wear/available_gestures.png diff --git a/docs/html/design/media/wear/available_gestures_2x.png b/docs/html/design/media/wear/available_gestures_2x.png Binary files differnew file mode 100644 index 000000000000..eced0c75ecc1 --- /dev/null +++ b/docs/html/design/media/wear/available_gestures_2x.png diff --git a/docs/html/design/media/wear/changing-target.png b/docs/html/design/media/wear/changing-target.png Binary files differnew file mode 100644 index 000000000000..427531fb91e3 --- /dev/null +++ b/docs/html/design/media/wear/changing-target.png diff --git a/docs/html/design/media/wear/revealing-info.png b/docs/html/design/media/wear/revealing-info.png Binary files differnew file mode 100644 index 000000000000..e419e9f94cf8 --- /dev/null +++ b/docs/html/design/media/wear/revealing-info.png diff --git a/docs/html/design/media/wear/toggling-states.png b/docs/html/design/media/wear/toggling-states.png Binary files differnew file mode 100644 index 000000000000..93398e6f2e77 --- /dev/null +++ b/docs/html/design/media/wear/toggling-states.png diff --git a/docs/html/design/media/wear/visual_feedback.gif b/docs/html/design/media/wear/visual_feedback.gif Binary files differnew file mode 100644 index 000000000000..e07000ac90a2 --- /dev/null +++ b/docs/html/design/media/wear/visual_feedback.gif diff --git a/docs/html/design/wear/watchfaces.jd b/docs/html/design/wear/watchfaces.jd index e01852346b03..c8c6d5a0d6b4 100644 --- a/docs/html/design/wear/watchfaces.jd +++ b/docs/html/design/wear/watchfaces.jd @@ -288,6 +288,107 @@ Try your concept out with lots of different types of data and scenarios. Test yo with an actual watch screen before you start coding.</p> +<h2 id="interactive">Design Interactive Watch Faces</h2> + +<p>Your watch face can respond to a single-tap gesture from the user, as long as +there’s not another UI element that also responds to that gesture. Some possible use cases for +interacting with the watch face include:</p> + +<ul> + <li><strong>Causing an aesthetic change</strong> on the watch face, for example inverting + the color scheme.</li> + <li><strong>Showing more information</strong> inline on the watch face, for example displaying a + detailed step count.</li> + <li><strong>Completing an action</strong> inline or in the background, for example starting a + timer.</li> + <li><strong>Launching a specific activity,</strong> for example a starting a conversation in a + messaging application.</li> +</ul> + +<h3 id="ag">Available gestures</h3> +<p>Only single taps are available. This restriction is important for maintaining clear and +consistent system interactions, and for making watch face interactions as simple as +possible: Neither you nor the user should think of watch faces as full-fledged apps. Figure 1 +summarizes the categories of gestures, and their uses.</p> + +<img src="{@docRoot}design/media/wear/available_gestures.png" +srcset="{@docRoot}design/media/wear/available_gestures.png 1x, +{@docRoot}design/media/wear/available_gestures_2x.png 2x" +alt="Single tap is the only available gesture." width="740" height="" id="available-gestures" /> +<p class="img-caption"> + <strong>Figure 1.</strong> Available, reserved, and blocked gestures. +</p> + +As a rule, watch-face interaction should be lightweight, with the user completing their desired +action within one or two touches. + +<h3>Tap targets</h3> + +<p>If you want to cause a simple state change on the watch face, such as a purely aesthetic +change, you can use the entire canvas of the watch face as the tap target.</p> + +<p>For a more significant change or action, such as launching an activity or sending a message to a +friend, it’s important to keep targets smaller, between 48-90 dpi, to avoid false-positive taps. +There should be a gap between targets of at least 8-16 dpi. For an optimized tappable experience, +display a maximum of 7 to 9 targets at once.</p> + +<h3 id=”areas”>Tap regions</h3> + +<p>You can also use different regions of the screen to trigger different changes to the watch face. +For example, tapping on the entire canvas could toggle states for the entire face. Tapping a specific target +could produce an inline display of information related to the target. Last, tapping outside the +target could restore the watch face to its default state.</p> + +<div style="float:right;margin-bottom:20px;margin-left:20px"> + <img src="/design/media/wear/visual_feedback.gif" width="200" + height="196" alt="The watch face should show where the user’s finger has made contact." style="margin-top:-10px;margin-left:13px"> +</div> + + +<h3>Visual feedback</h3> + +<p>Provide visual feedback when the user’s finger touches down on the watch face. The tap +event does not trigger until the user lifts their finger, but visual feedback on touchdown helps +indicate that the system has received the touch, and also helps the user know where the touch +landed.</p> + +<p class=”warning”><strong>Warning:</strong> Do not immediately launch a UI on touchdown. A UI that +you launch on touchdown conflicts with gestures for interacting with system UI elements including +the watch face picker, notification stream, settings shade, and app launcher.</p> + +<h3>Design examples</h3> + +Here are some examples of approaches for interactive watch faces: + +<h4>Applying an aesthetic change</h4> + +<img src="{@docRoot}design/media/wear/aesthetic.png" +alt="" width="686" height="" id="descriptive-id" /> + +<h4>Toggling states</h4> + +<img src="{@docRoot}design/media/wear/toggling-states.png" +alt="" width="686" height="" id="descriptive-id" /> + +<h4>Changing a targeted UI element</h4> + +<img src="{@docRoot}design/media/wear/changing-target.png" +alt="" width="686" height="" id="descriptive-id" /> + +<h4>Revealing information inline</h4> + +<img src="{@docRoot}design/media/wear/revealing-info.png" +alt="" width="686" height="" id="descriptive-id" /> + +<h4>Launching an activity with a single tap</h4> + +<img src="{@docRoot}design/media/wear/1-tap-launch.png" +alt="" width="751" height="" id="descriptive-id" /> + +<h4>Launching an activity with two taps</h4> + +<img src="{@docRoot}design/media/wear/2-tap-launch.png" +alt="" width="751" height="" id="descriptive-id" /> <h2 id="CompanionApp">Support the Android Wear Companion App</h2> diff --git a/docs/html/reference/android/support/wearable/R.anim.html b/docs/html/reference/android/support/wearable/R.anim.html index 11d766d0f689..8976afe7fe8a 100644 --- a/docs/html/reference/android/support/wearable/R.anim.html +++ b/docs/html/reference/android/support/wearable/R.anim.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -473,6 +473,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.html">R</a></li> <li class="selected api apilevel-"><a href="../../../../reference/android/support/wearable/R.anim.html">R.anim</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.animator.html">R.animator</a></li> + <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.array.html">R.array</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.attr.html">R.attr</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.color.html">R.color</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.dimen.html">R.dimen</a></li> @@ -614,7 +615,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1322,6 +1323,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/R.animator.html b/docs/html/reference/android/support/wearable/R.animator.html index 9fa64459f7f4..7ab63f2926b1 100644 --- a/docs/html/reference/android/support/wearable/R.animator.html +++ b/docs/html/reference/android/support/wearable/R.animator.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -473,6 +473,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.html">R</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.anim.html">R.anim</a></li> <li class="selected api apilevel-"><a href="../../../../reference/android/support/wearable/R.animator.html">R.animator</a></li> + <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.array.html">R.array</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.attr.html">R.attr</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.color.html">R.color</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.dimen.html">R.dimen</a></li> @@ -614,7 +615,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1134,6 +1135,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/R.attr.html b/docs/html/reference/android/support/wearable/R.attr.html index 1f043a2567f3..099c9814a878 100644 --- a/docs/html/reference/android/support/wearable/R.attr.html +++ b/docs/html/reference/android/support/wearable/R.attr.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -473,6 +473,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.html">R</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.anim.html">R.anim</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.animator.html">R.animator</a></li> + <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.array.html">R.array</a></li> <li class="selected api apilevel-"><a href="../../../../reference/android/support/wearable/R.attr.html">R.attr</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.color.html">R.color</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.dimen.html">R.dimen</a></li> @@ -614,7 +615,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -697,6 +698,23 @@ Summary: static int</nobr></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#buttonRippleColor">buttonRippleColor</a></td> + <td class="jd-descrcol" width="100%"> + <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" +or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". + + + + </td> + </tr> + + + <tr class=" api apilevel-" > + <td class="jd-typecol"><nobr> + public + static + + int</nobr></td> <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#circle_border_color">circle_border_color</a></td> <td class="jd-descrcol" width="100%"> <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", @@ -708,7 +726,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -724,7 +742,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -741,7 +759,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -757,7 +775,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -773,7 +791,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -789,7 +807,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -805,7 +823,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -821,6 +839,23 @@ Summary: </tr> + <tr class=" api apilevel-" > + <td class="jd-typecol"><nobr> + public + static + + int</nobr></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#color_sequence">color_sequence</a></td> + <td class="jd-descrcol" width="100%"> + <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" +or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". + + + + </td> + </tr> + + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public @@ -1054,9 +1089,9 @@ Summary: static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#layout_box">layout_box</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#image_circle_percentage">image_circle_percentage</a></td> <td class="jd-descrcol" width="100%"> - <p>Must be one or more (separated by '|') of the following constant values. + <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". @@ -1070,7 +1105,40 @@ Summary: static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#layout_gravityRound">layout_gravityRound</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#image_horizontal_offcenter_percentage">image_horizontal_offcenter_percentage</a></td> + <td class="jd-descrcol" width="100%"> + <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". + + + + </td> + </tr> + + + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + public + static + + int</nobr></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#image_tint">image_tint</a></td> + <td class="jd-descrcol" width="100%"> + <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", +"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". + + + + </td> + </tr> + + + <tr class=" api apilevel-" > + <td class="jd-typecol"><nobr> + public + static + + int</nobr></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#layout_box">layout_box</a></td> <td class="jd-descrcol" width="100%"> <p>Must be one or more (separated by '|') of the following constant values. @@ -1086,9 +1154,9 @@ Summary: static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#layout_heightRound">layout_heightRound</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#layout_gravityRound">layout_gravityRound</a></td> <td class="jd-descrcol" width="100%"> - <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". + <p>Must be one or more (separated by '|') of the following constant values. @@ -1102,7 +1170,7 @@ Summary: static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#layout_marginBottomRound">layout_marginBottomRound</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#layout_heightRound">layout_heightRound</a></td> <td class="jd-descrcol" width="100%"> <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". @@ -1118,7 +1186,7 @@ Summary: static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#layout_marginLeftRound">layout_marginLeftRound</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#layout_marginBottomRound">layout_marginBottomRound</a></td> <td class="jd-descrcol" width="100%"> <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". @@ -1134,7 +1202,7 @@ Summary: static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#layout_marginRightRound">layout_marginRightRound</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#layout_marginLeftRound">layout_marginLeftRound</a></td> <td class="jd-descrcol" width="100%"> <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". @@ -1150,7 +1218,7 @@ Summary: static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#layout_marginRound">layout_marginRound</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#layout_marginRightRound">layout_marginRightRound</a></td> <td class="jd-descrcol" width="100%"> <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". @@ -1166,7 +1234,7 @@ Summary: static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#layout_marginTopRound">layout_marginTopRound</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#layout_marginRound">layout_marginRound</a></td> <td class="jd-descrcol" width="100%"> <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". @@ -1182,7 +1250,7 @@ Summary: static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#layout_widthRound">layout_widthRound</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#layout_marginTopRound">layout_marginTopRound</a></td> <td class="jd-descrcol" width="100%"> <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". @@ -1198,7 +1266,7 @@ Summary: static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#maxTextSize">maxTextSize</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#layout_widthRound">layout_widthRound</a></td> <td class="jd-descrcol" width="100%"> <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". @@ -1214,7 +1282,7 @@ Summary: static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#minTextSize">minTextSize</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#maxTextSize">maxTextSize</a></td> <td class="jd-descrcol" width="100%"> <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". @@ -1230,7 +1298,7 @@ Summary: static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#pressedTranslationZ">pressedTranslationZ</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#minTextSize">minTextSize</a></td> <td class="jd-descrcol" width="100%"> <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". @@ -1246,10 +1314,9 @@ Summary: static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#rectLayout">rectLayout</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#pressedButtonTranslationZ">pressedButtonTranslationZ</a></td> <td class="jd-descrcol" width="100%"> - <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" -or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". + <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". @@ -1263,9 +1330,9 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#rippleColor">rippleColor</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html#rectLayout">rectLayout</a></td> <td class="jd-descrcol" width="100%"> - <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" + <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @@ -1605,6 +1672,41 @@ From class +<A NAME="buttonRippleColor"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + static + + int + </span> + buttonRippleColor + </h4> + <div class="api-level"> + + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p><p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" +or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". +<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", +"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". +</p></div> + + + </div> +</div> + + + <A NAME="circle_border_color"></A> <div class="jd-details api apilevel-"> @@ -1921,6 +2023,41 @@ containing a value of this type. +<A NAME="color_sequence"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + static + + int + </span> + color_sequence + </h4> + <div class="api-level"> + + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p><p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" +or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". +<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", +"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". +</p></div> + + + </div> +</div> + + + <A NAME="dotColor"></A> <div class="jd-details api apilevel-"> @@ -2457,6 +2594,122 @@ containing a value of this type. +<A NAME="image_circle_percentage"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + static + + int + </span> + image_circle_percentage + </h4> + <div class="api-level"> + + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p><p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". +Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), +in (inches), mm (millimeters). +<p>This may also be a reference to a resource (in the form +"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or +theme attribute (in the form +"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") +containing a value of this type. +</p></div> + + + </div> +</div> + + + +<A NAME="image_horizontal_offcenter_percentage"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + static + + int + </span> + image_horizontal_offcenter_percentage + </h4> + <div class="api-level"> + + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p><p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". +Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), +in (inches), mm (millimeters). +<p>This may also be a reference to a resource (in the form +"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or +theme attribute (in the form +"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") +containing a value of this type. +</p></div> + + + </div> +</div> + + + +<A NAME="image_tint"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + static + + int + </span> + image_tint + </h4> + <div class="api-level"> + + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p><p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", +"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". +<p>This may also be a reference to a resource (in the form +"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or +theme attribute (in the form +"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") +containing a value of this type. +</p></div> + + + </div> +</div> + + + <A NAME="layout_box"></A> <div class="jd-details api apilevel-"> @@ -2903,7 +3156,7 @@ containing a value of this type. -<A NAME="pressedTranslationZ"></A> +<A NAME="pressedButtonTranslationZ"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> @@ -2913,7 +3166,7 @@ containing a value of this type. int </span> - pressedTranslationZ + pressedButtonTranslationZ </h4> <div class="api-level"> @@ -2975,41 +3228,6 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na -<A NAME="rippleColor"></A> - -<div class="jd-details api apilevel-"> - <h4 class="jd-details-title"> - <span class="normal"> - public - static - - int - </span> - rippleColor - </h4> - <div class="api-level"> - - - - - </div> - <div class="jd-details-descr"> - - - - - <div class="jd-tagdata jd-tagdescr"><p><p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" -or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". -<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", -"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". -</p></div> - - - </div> -</div> - - - <A NAME="roundLayout"></A> <div class="jd-details api apilevel-"> @@ -3233,6 +3451,7 @@ containing a value of this type. <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/R.color.html b/docs/html/reference/android/support/wearable/R.color.html index cdfd0a8332d5..07b5e0c52bcc 100644 --- a/docs/html/reference/android/support/wearable/R.color.html +++ b/docs/html/reference/android/support/wearable/R.color.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -473,6 +473,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.html">R</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.anim.html">R.anim</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.animator.html">R.animator</a></li> + <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.array.html">R.array</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.attr.html">R.attr</a></li> <li class="selected api apilevel-"><a href="../../../../reference/android/support/wearable/R.color.html">R.color</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.dimen.html">R.dimen</a></li> @@ -614,7 +615,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -2450,6 +2451,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/R.dimen.html b/docs/html/reference/android/support/wearable/R.dimen.html index c24ef8d38205..215b2b3f76d2 100644 --- a/docs/html/reference/android/support/wearable/R.dimen.html +++ b/docs/html/reference/android/support/wearable/R.dimen.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -473,6 +473,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.html">R</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.anim.html">R.anim</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.animator.html">R.animator</a></li> + <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.array.html">R.array</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.attr.html">R.attr</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.color.html">R.color</a></li> <li class="selected api apilevel-"><a href="../../../../reference/android/support/wearable/R.dimen.html">R.dimen</a></li> @@ -614,7 +615,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1839,6 +1840,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/R.drawable.html b/docs/html/reference/android/support/wearable/R.drawable.html index 167c8abcc20e..c83cd2e8ba0d 100644 --- a/docs/html/reference/android/support/wearable/R.drawable.html +++ b/docs/html/reference/android/support/wearable/R.drawable.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -473,6 +473,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.html">R</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.anim.html">R.anim</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.animator.html">R.animator</a></li> + <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.array.html">R.array</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.attr.html">R.attr</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.color.html">R.color</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.dimen.html">R.dimen</a></li> @@ -614,7 +615,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1557,6 +1558,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/R.html b/docs/html/reference/android/support/wearable/R.html index fd87f794b671..714f287affa2 100644 --- a/docs/html/reference/android/support/wearable/R.html +++ b/docs/html/reference/android/support/wearable/R.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -473,6 +473,7 @@ type="text/css"> <li class="selected api apilevel-"><a href="../../../../reference/android/support/wearable/R.html">R</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.anim.html">R.anim</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.animator.html">R.animator</a></li> + <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.array.html">R.array</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.attr.html">R.attr</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.color.html">R.color</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.dimen.html">R.dimen</a></li> @@ -614,7 +615,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -717,7 +718,7 @@ Summary: class</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html">R.attr</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.array.html">R.array</a></td> <td class="jd-descrcol" width="100%"> @@ -734,7 +735,7 @@ Summary: class</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.color.html">R.color</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html">R.attr</a></td> <td class="jd-descrcol" width="100%"> @@ -751,7 +752,7 @@ Summary: class</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.dimen.html">R.dimen</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.color.html">R.color</a></td> <td class="jd-descrcol" width="100%"> @@ -768,7 +769,7 @@ Summary: class</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.drawable.html">R.drawable</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.dimen.html">R.dimen</a></td> <td class="jd-descrcol" width="100%"> @@ -785,7 +786,7 @@ Summary: class</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.id.html">R.id</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.drawable.html">R.drawable</a></td> <td class="jd-descrcol" width="100%"> @@ -802,7 +803,7 @@ Summary: class</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.interpolator.html">R.interpolator</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.id.html">R.id</a></td> <td class="jd-descrcol" width="100%"> @@ -819,7 +820,7 @@ Summary: class</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.layout.html">R.layout</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.interpolator.html">R.interpolator</a></td> <td class="jd-descrcol" width="100%"> @@ -836,7 +837,7 @@ Summary: class</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.string.html">R.string</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.layout.html">R.layout</a></td> <td class="jd-descrcol" width="100%"> @@ -853,7 +854,7 @@ Summary: class</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.style.html">R.style</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.string.html">R.string</a></td> <td class="jd-descrcol" width="100%"> @@ -870,6 +871,23 @@ Summary: class</nobr></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.style.html">R.style</a></td> + <td class="jd-descrcol" width="100%"> + + + + + </td> + </tr> + + + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + class</nobr></td> <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html">R.styleable</a></td> <td class="jd-descrcol" width="100%"> @@ -1283,6 +1301,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/R.id.html b/docs/html/reference/android/support/wearable/R.id.html index 2b3db853b6b4..c6bad3bfd734 100644 --- a/docs/html/reference/android/support/wearable/R.id.html +++ b/docs/html/reference/android/support/wearable/R.id.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -473,6 +473,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.html">R</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.anim.html">R.anim</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.animator.html">R.animator</a></li> + <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.array.html">R.array</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.attr.html">R.attr</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.color.html">R.color</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.dimen.html">R.dimen</a></li> @@ -614,7 +615,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -2262,6 +2263,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/R.interpolator.html b/docs/html/reference/android/support/wearable/R.interpolator.html index ae6cac10e217..01391a8c18e0 100644 --- a/docs/html/reference/android/support/wearable/R.interpolator.html +++ b/docs/html/reference/android/support/wearable/R.interpolator.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -473,6 +473,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.html">R</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.anim.html">R.anim</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.animator.html">R.animator</a></li> + <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.array.html">R.array</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.attr.html">R.attr</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.color.html">R.color</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.dimen.html">R.dimen</a></li> @@ -614,7 +615,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1369,6 +1370,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/R.layout.html b/docs/html/reference/android/support/wearable/R.layout.html index 7a87cf2b6e0a..4987ba723b9b 100644 --- a/docs/html/reference/android/support/wearable/R.layout.html +++ b/docs/html/reference/android/support/wearable/R.layout.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -473,6 +473,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.html">R</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.anim.html">R.anim</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.animator.html">R.animator</a></li> + <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.array.html">R.array</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.attr.html">R.attr</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.color.html">R.color</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.dimen.html">R.dimen</a></li> @@ -614,7 +615,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1275,6 +1276,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/R.string.html b/docs/html/reference/android/support/wearable/R.string.html index 3d13614f7525..c8707ef893f0 100644 --- a/docs/html/reference/android/support/wearable/R.string.html +++ b/docs/html/reference/android/support/wearable/R.string.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -473,6 +473,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.html">R</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.anim.html">R.anim</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.animator.html">R.animator</a></li> + <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.array.html">R.array</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.attr.html">R.attr</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.color.html">R.color</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.dimen.html">R.dimen</a></li> @@ -614,7 +615,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1134,6 +1135,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/R.style.html b/docs/html/reference/android/support/wearable/R.style.html index 48837d0b1af4..38ce3084a561 100644 --- a/docs/html/reference/android/support/wearable/R.style.html +++ b/docs/html/reference/android/support/wearable/R.style.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -473,6 +473,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.html">R</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.anim.html">R.anim</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.animator.html">R.animator</a></li> + <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.array.html">R.array</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.attr.html">R.attr</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.color.html">R.color</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.dimen.html">R.dimen</a></li> @@ -614,7 +615,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -2262,6 +2263,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/R.styleable.html b/docs/html/reference/android/support/wearable/R.styleable.html index d1e4ca3d5a6a..e43e070aedd6 100644 --- a/docs/html/reference/android/support/wearable/R.styleable.html +++ b/docs/html/reference/android/support/wearable/R.styleable.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -473,6 +473,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.html">R</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.anim.html">R.anim</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.animator.html">R.animator</a></li> + <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.array.html">R.array</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.attr.html">R.attr</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.color.html">R.color</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.dimen.html">R.dimen</a></li> @@ -614,7 +615,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1137,9 +1138,9 @@ Summary: static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_imageScaleMode">ActionPage_imageScaleMode</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_buttonRippleColor">ActionPage_buttonRippleColor</a></td> <td class="jd-descrcol" width="100%"> - <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#imageScaleMode">imageScaleMode</a></code> + <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#buttonRippleColor">buttonRippleColor</a></code> attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage">ActionPage</a></code> array. @@ -1154,9 +1155,9 @@ Summary: static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_maxTextSize">ActionPage_maxTextSize</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_imageScaleMode">ActionPage_imageScaleMode</a></td> <td class="jd-descrcol" width="100%"> - <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#maxTextSize">maxTextSize</a></code> + <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#imageScaleMode">imageScaleMode</a></code> attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage">ActionPage</a></code> array. @@ -1171,9 +1172,9 @@ Summary: static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_minTextSize">ActionPage_minTextSize</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_maxTextSize">ActionPage_maxTextSize</a></td> <td class="jd-descrcol" width="100%"> - <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#minTextSize">minTextSize</a></code> + <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#maxTextSize">maxTextSize</a></code> attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage">ActionPage</a></code> array. @@ -1188,9 +1189,9 @@ Summary: static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_pressedTranslationZ">ActionPage_pressedTranslationZ</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_minTextSize">ActionPage_minTextSize</a></td> <td class="jd-descrcol" width="100%"> - <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#pressedTranslationZ">pressedTranslationZ</a></code> + <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#minTextSize">minTextSize</a></code> attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage">ActionPage</a></code> array. @@ -1205,9 +1206,9 @@ Summary: static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_rippleColor">ActionPage_rippleColor</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_pressedButtonTranslationZ">ActionPage_pressedButtonTranslationZ</a></td> <td class="jd-descrcol" width="100%"> - <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#rippleColor">rippleColor</a></code> + <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#pressedButtonTranslationZ">pressedButtonTranslationZ</a></code> attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage">ActionPage</a></code> array. @@ -1390,6 +1391,57 @@ Summary: static int</nobr></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_image_circle_percentage">CircledImageView_image_circle_percentage</a></td> + <td class="jd-descrcol" width="100%"> + <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#image_circle_percentage">image_circle_percentage</a></code> + attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView">CircledImageView</a></code> array. + + + + </td> + </tr> + + + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + public + static + + int</nobr></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_image_horizontal_offcenter_percentage">CircledImageView_image_horizontal_offcenter_percentage</a></td> + <td class="jd-descrcol" width="100%"> + <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#image_horizontal_offcenter_percentage">image_horizontal_offcenter_percentage</a></code> + attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView">CircledImageView</a></code> array. + + + + </td> + </tr> + + + <tr class=" api apilevel-" > + <td class="jd-typecol"><nobr> + public + static + + int</nobr></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_image_tint">CircledImageView_image_tint</a></td> + <td class="jd-descrcol" width="100%"> + <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#image_tint">image_tint</a></code> + attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView">CircledImageView</a></code> array. + + + + </td> + </tr> + + + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + public + static + + int</nobr></td> <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_shadow_width">CircledImageView_shadow_width</a></td> <td class="jd-descrcol" width="100%"> <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#shadow_width">shadow_width</a></code> @@ -1401,7 +1453,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1417,7 +1469,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1434,7 +1486,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1451,7 +1503,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1468,7 +1520,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1485,15 +1537,15 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_imageScaleMode">CircularButton_imageScaleMode</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_buttonRippleColor">CircularButton_buttonRippleColor</a></td> <td class="jd-descrcol" width="100%"> - <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#imageScaleMode">imageScaleMode</a></code> + <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#buttonRippleColor">buttonRippleColor</a></code> attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton">CircularButton</a></code> array. @@ -1502,15 +1554,15 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_pressedTranslationZ">CircularButton_pressedTranslationZ</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_imageScaleMode">CircularButton_imageScaleMode</a></td> <td class="jd-descrcol" width="100%"> - <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#pressedTranslationZ">pressedTranslationZ</a></code> + <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#imageScaleMode">imageScaleMode</a></code> attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton">CircularButton</a></code> array. @@ -1519,15 +1571,15 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static int</nobr></td> - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_rippleColor">CircularButton_rippleColor</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_pressedButtonTranslationZ">CircularButton_pressedButtonTranslationZ</a></td> <td class="jd-descrcol" width="100%"> - <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#rippleColor">rippleColor</a></code> + <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#pressedButtonTranslationZ">pressedButtonTranslationZ</a></code> attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton">CircularButton</a></code> array. @@ -1536,7 +1588,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1552,7 +1604,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1569,7 +1621,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1585,7 +1637,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1602,7 +1654,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1619,7 +1671,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1636,7 +1688,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1653,7 +1705,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1670,7 +1722,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1687,7 +1739,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1704,7 +1756,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1721,7 +1773,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1738,7 +1790,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1755,7 +1807,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1772,7 +1824,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1789,7 +1841,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1806,10 +1858,43 @@ Summary: </tr> + <tr class=" api apilevel-" > + <td class="jd-typecol"><nobr> + public + static + final + int[]</nobr></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#ProgressSpinner">ProgressSpinner</a></td> + <td class="jd-descrcol" width="100%"> + Attributes that can be used with a ProgressSpinner. + + + + </td> + </tr> + + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static + + int</nobr></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#ProgressSpinner_color_sequence">ProgressSpinner_color_sequence</a></td> + <td class="jd-descrcol" width="100%"> + <p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#color_sequence">color_sequence</a></code> + attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#ProgressSpinner">ProgressSpinner</a></code> array. + + + + </td> + </tr> + + + <tr class=" api apilevel-" > + <td class="jd-typecol"><nobr> + public + static final int[]</nobr></td> <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html#WatchViewStub">WatchViewStub</a></td> @@ -1822,7 +1907,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1839,7 +1924,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1856,7 +1941,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1872,7 +1957,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1889,7 +1974,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1906,7 +1991,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1923,7 +2008,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1940,7 +2025,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1957,7 +2042,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1974,7 +2059,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -1991,7 +2076,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -2008,7 +2093,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -2025,7 +2110,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -2042,7 +2127,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -2059,7 +2144,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -2076,7 +2161,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -2092,7 +2177,7 @@ Summary: </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -2109,7 +2194,7 @@ Summary: </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> public static @@ -2875,15 +2960,15 @@ containing a value of this type.</p></div> <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_textColor">android:textColor</a></code></code></td><td></td></tr> <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_textStyle">android:textStyle</a></code></code></td><td></td></tr> <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_typeface">android:typeface</a></code></code></td><td></td></tr> + <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_buttonRippleColor">android.support.wearable:buttonRippleColor</a></code></code></td><td></td></tr> <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_imageScaleMode">android.support.wearable:imageScaleMode</a></code></code></td><td></td></tr> <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_maxTextSize">android.support.wearable:maxTextSize</a></code></code></td><td></td></tr> <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_minTextSize">android.support.wearable:minTextSize</a></code></code></td><td></td></tr> - <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_pressedTranslationZ">android.support.wearable:pressedTranslationZ</a></code></code></td><td></td></tr> - <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_rippleColor">android.support.wearable:rippleColor</a></code></code></td><td></td></tr> + <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_pressedButtonTranslationZ">android.support.wearable:pressedButtonTranslationZ</a></code></code></td><td></td></tr> </table></p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">See Also</h5> - <ul class="nolist"><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_color">ActionPage_android_color</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_elevation">ActionPage_android_elevation</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_fontFamily">ActionPage_android_fontFamily</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_gravity">ActionPage_android_gravity</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_lineSpacingExtra">ActionPage_android_lineSpacingExtra</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_lineSpacingMultiplier">ActionPage_android_lineSpacingMultiplier</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_maxLines">ActionPage_android_maxLines</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_src">ActionPage_android_src</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_stateListAnimator">ActionPage_android_stateListAnimator</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_text">ActionPage_android_text</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_textColor">ActionPage_android_textColor</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_textStyle">ActionPage_android_textStyle</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_typeface">ActionPage_android_typeface</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_imageScaleMode">ActionPage_imageScaleMode</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_maxTextSize">ActionPage_maxTextSize</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_minTextSize">ActionPage_minTextSize</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_pressedTranslationZ">ActionPage_pressedTranslationZ</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_rippleColor">ActionPage_rippleColor</a></code></li> + <ul class="nolist"><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_color">ActionPage_android_color</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_elevation">ActionPage_android_elevation</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_fontFamily">ActionPage_android_fontFamily</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_gravity">ActionPage_android_gravity</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_lineSpacingExtra">ActionPage_android_lineSpacingExtra</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_lineSpacingMultiplier">ActionPage_android_lineSpacingMultiplier</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_maxLines">ActionPage_android_maxLines</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_src">ActionPage_android_src</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_stateListAnimator">ActionPage_android_stateListAnimator</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_text">ActionPage_android_text</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_textColor">ActionPage_android_textColor</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_textStyle">ActionPage_android_textStyle</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_android_typeface">ActionPage_android_typeface</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_buttonRippleColor">ActionPage_buttonRippleColor</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_imageScaleMode">ActionPage_imageScaleMode</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_maxTextSize">ActionPage_maxTextSize</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_minTextSize">ActionPage_minTextSize</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage_pressedButtonTranslationZ">ActionPage_pressedButtonTranslationZ</a></code></li> </ul> </div> @@ -3309,7 +3394,7 @@ containing a value of this type.</p></div> -<A NAME="ActionPage_imageScaleMode"></A> +<A NAME="ActionPage_buttonRippleColor"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> @@ -3319,7 +3404,7 @@ containing a value of this type.</p></div> int </span> - ActionPage_imageScaleMode + ActionPage_buttonRippleColor </h4> <div class="api-level"> @@ -3332,19 +3417,14 @@ containing a value of this type.</p></div> - <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#imageScaleMode">imageScaleMode</a></code> + <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#buttonRippleColor">buttonRippleColor</a></code> attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage">ActionPage</a></code> array. - <p>Must be one of the following constant values.</p> -<table> -<colgroup align="left" /> -<colgroup align="left" /> -<colgroup align="left" /> -<tr><th>Constant</th><th>Value</th><th>Description</th></tr> -<tr><td><code>fit</code></td><td>0</td><td></td></tr> -<tr><td><code>center</code></td><td>1</td><td></td></tr> -</table></p></div> + <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" +or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". +<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", +"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".</p></div> </div> @@ -3352,7 +3432,7 @@ containing a value of this type.</p></div> -<A NAME="ActionPage_maxTextSize"></A> +<A NAME="ActionPage_imageScaleMode"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> @@ -3362,7 +3442,7 @@ containing a value of this type.</p></div> int </span> - ActionPage_maxTextSize + ActionPage_imageScaleMode </h4> <div class="api-level"> @@ -3375,18 +3455,19 @@ containing a value of this type.</p></div> - <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#maxTextSize">maxTextSize</a></code> + <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#imageScaleMode">imageScaleMode</a></code> attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage">ActionPage</a></code> array. - <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". -Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), -in (inches), mm (millimeters). -<p>This may also be a reference to a resource (in the form -"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or -theme attribute (in the form -"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") -containing a value of this type.</p></div> + <p>Must be one of the following constant values.</p> +<table> +<colgroup align="left" /> +<colgroup align="left" /> +<colgroup align="left" /> +<tr><th>Constant</th><th>Value</th><th>Description</th></tr> +<tr><td><code>fit</code></td><td>0</td><td></td></tr> +<tr><td><code>center</code></td><td>1</td><td></td></tr> +</table></p></div> </div> @@ -3394,7 +3475,7 @@ containing a value of this type.</p></div> -<A NAME="ActionPage_minTextSize"></A> +<A NAME="ActionPage_maxTextSize"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> @@ -3404,7 +3485,7 @@ containing a value of this type.</p></div> int </span> - ActionPage_minTextSize + ActionPage_maxTextSize </h4> <div class="api-level"> @@ -3417,7 +3498,7 @@ containing a value of this type.</p></div> - <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#minTextSize">minTextSize</a></code> + <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#maxTextSize">maxTextSize</a></code> attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage">ActionPage</a></code> array. @@ -3436,7 +3517,7 @@ containing a value of this type.</p></div> -<A NAME="ActionPage_pressedTranslationZ"></A> +<A NAME="ActionPage_minTextSize"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> @@ -3446,7 +3527,7 @@ containing a value of this type.</p></div> int </span> - ActionPage_pressedTranslationZ + ActionPage_minTextSize </h4> <div class="api-level"> @@ -3459,7 +3540,7 @@ containing a value of this type.</p></div> - <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#pressedTranslationZ">pressedTranslationZ</a></code> + <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#minTextSize">minTextSize</a></code> attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage">ActionPage</a></code> array. @@ -3478,7 +3559,7 @@ containing a value of this type.</p></div> -<A NAME="ActionPage_rippleColor"></A> +<A NAME="ActionPage_pressedButtonTranslationZ"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> @@ -3488,7 +3569,7 @@ containing a value of this type.</p></div> int </span> - ActionPage_rippleColor + ActionPage_pressedButtonTranslationZ </h4> <div class="api-level"> @@ -3501,14 +3582,18 @@ containing a value of this type.</p></div> - <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#rippleColor">rippleColor</a></code> + <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#pressedButtonTranslationZ">pressedButtonTranslationZ</a></code> attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#ActionPage">ActionPage</a></code> array. - <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" -or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". -<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", -"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".</p></div> + <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". +Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), +in (inches), mm (millimeters). +<p>This may also be a reference to a resource (in the form +"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or +theme attribute (in the form +"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") +containing a value of this type.</p></div> </div> @@ -3641,11 +3726,14 @@ or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>na <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_circle_padding">android.support.wearable:circle_padding</a></code></code></td><td></td></tr> <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_circle_radius">android.support.wearable:circle_radius</a></code></code></td><td></td></tr> <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_circle_radius_pressed">android.support.wearable:circle_radius_pressed</a></code></code></td><td></td></tr> + <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_image_circle_percentage">android.support.wearable:image_circle_percentage</a></code></code></td><td></td></tr> + <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_image_horizontal_offcenter_percentage">android.support.wearable:image_horizontal_offcenter_percentage</a></code></code></td><td></td></tr> + <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_image_tint">android.support.wearable:image_tint</a></code></code></td><td></td></tr> <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_shadow_width">android.support.wearable:shadow_width</a></code></code></td><td></td></tr> </table></p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">See Also</h5> - <ul class="nolist"><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_android_src">CircledImageView_android_src</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_circle_border_color">CircledImageView_circle_border_color</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_circle_border_width">CircledImageView_circle_border_width</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_circle_color">CircledImageView_circle_color</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_circle_padding">CircledImageView_circle_padding</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_circle_radius">CircledImageView_circle_radius</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_circle_radius_pressed">CircledImageView_circle_radius_pressed</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_shadow_width">CircledImageView_shadow_width</a></code></li> + <ul class="nolist"><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_android_src">CircledImageView_android_src</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_circle_border_color">CircledImageView_circle_border_color</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_circle_border_width">CircledImageView_circle_border_width</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_circle_color">CircledImageView_circle_color</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_circle_padding">CircledImageView_circle_padding</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_circle_radius">CircledImageView_circle_radius</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_circle_radius_pressed">CircledImageView_circle_radius_pressed</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_image_circle_percentage">CircledImageView_image_circle_percentage</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_image_horizontal_offcenter_percentage">CircledImageView_image_horizontal_offcenter_percentage</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_image_tint">CircledImageView_image_tint</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView_shadow_width">CircledImageView_shadow_width</a></code></li> </ul> </div> @@ -3937,6 +4025,131 @@ containing a value of this type.</p></div> +<A NAME="CircledImageView_image_circle_percentage"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + static + + int + </span> + CircledImageView_image_circle_percentage + </h4> + <div class="api-level"> + + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#image_circle_percentage">image_circle_percentage</a></code> + attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView">CircledImageView</a></code> array. + + + <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". +Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), +in (inches), mm (millimeters). +<p>This may also be a reference to a resource (in the form +"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or +theme attribute (in the form +"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") +containing a value of this type.</p></div> + + + </div> +</div> + + + +<A NAME="CircledImageView_image_horizontal_offcenter_percentage"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + static + + int + </span> + CircledImageView_image_horizontal_offcenter_percentage + </h4> + <div class="api-level"> + + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#image_horizontal_offcenter_percentage">image_horizontal_offcenter_percentage</a></code> + attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView">CircledImageView</a></code> array. + + + <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". +Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), +in (inches), mm (millimeters). +<p>This may also be a reference to a resource (in the form +"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or +theme attribute (in the form +"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") +containing a value of this type.</p></div> + + + </div> +</div> + + + +<A NAME="CircledImageView_image_tint"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + static + + int + </span> + CircledImageView_image_tint + </h4> + <div class="api-level"> + + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#image_tint">image_tint</a></code> + attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircledImageView">CircledImageView</a></code> array. + + + <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", +"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". +<p>This may also be a reference to a resource (in the form +"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or +theme attribute (in the form +"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") +containing a value of this type.</p></div> + + + </div> +</div> + + + <A NAME="CircledImageView_shadow_width"></A> <div class="jd-details api apilevel-"> @@ -4012,13 +4225,13 @@ containing a value of this type.</p></div> <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_android_elevation">android:elevation</a></code></code></td><td></td></tr> <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_android_src">android:src</a></code></code></td><td></td></tr> <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_android_stateListAnimator">android:stateListAnimator</a></code></code></td><td></td></tr> + <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_buttonRippleColor">android.support.wearable:buttonRippleColor</a></code></code></td><td></td></tr> <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_imageScaleMode">android.support.wearable:imageScaleMode</a></code></code></td><td></td></tr> - <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_pressedTranslationZ">android.support.wearable:pressedTranslationZ</a></code></code></td><td></td></tr> - <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_rippleColor">android.support.wearable:rippleColor</a></code></code></td><td></td></tr> + <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_pressedButtonTranslationZ">android.support.wearable:pressedButtonTranslationZ</a></code></code></td><td></td></tr> </table></p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">See Also</h5> - <ul class="nolist"><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_android_color">CircularButton_android_color</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_android_elevation">CircularButton_android_elevation</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_android_src">CircularButton_android_src</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_android_stateListAnimator">CircularButton_android_stateListAnimator</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_imageScaleMode">CircularButton_imageScaleMode</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_pressedTranslationZ">CircularButton_pressedTranslationZ</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_rippleColor">CircularButton_rippleColor</a></code></li> + <ul class="nolist"><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_android_color">CircularButton_android_color</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_android_elevation">CircularButton_android_elevation</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_android_src">CircularButton_android_src</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_android_stateListAnimator">CircularButton_android_stateListAnimator</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_buttonRippleColor">CircularButton_buttonRippleColor</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_imageScaleMode">CircularButton_imageScaleMode</a></code></li><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton_pressedButtonTranslationZ">CircularButton_pressedButtonTranslationZ</a></code></li> </ul> </div> @@ -4156,7 +4369,7 @@ containing a value of this type.</p></div> -<A NAME="CircularButton_imageScaleMode"></A> +<A NAME="CircularButton_buttonRippleColor"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> @@ -4166,7 +4379,7 @@ containing a value of this type.</p></div> int </span> - CircularButton_imageScaleMode + CircularButton_buttonRippleColor </h4> <div class="api-level"> @@ -4179,19 +4392,14 @@ containing a value of this type.</p></div> - <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#imageScaleMode">imageScaleMode</a></code> + <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#buttonRippleColor">buttonRippleColor</a></code> attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton">CircularButton</a></code> array. - <p>Must be one of the following constant values.</p> -<table> -<colgroup align="left" /> -<colgroup align="left" /> -<colgroup align="left" /> -<tr><th>Constant</th><th>Value</th><th>Description</th></tr> -<tr><td><code>fit</code></td><td>0</td><td></td></tr> -<tr><td><code>center</code></td><td>1</td><td></td></tr> -</table></p></div> + <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" +or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". +<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", +"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".</p></div> </div> @@ -4199,7 +4407,7 @@ containing a value of this type.</p></div> -<A NAME="CircularButton_pressedTranslationZ"></A> +<A NAME="CircularButton_imageScaleMode"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> @@ -4209,7 +4417,7 @@ containing a value of this type.</p></div> int </span> - CircularButton_pressedTranslationZ + CircularButton_imageScaleMode </h4> <div class="api-level"> @@ -4222,18 +4430,19 @@ containing a value of this type.</p></div> - <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#pressedTranslationZ">pressedTranslationZ</a></code> + <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#imageScaleMode">imageScaleMode</a></code> attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton">CircularButton</a></code> array. - <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". -Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), -in (inches), mm (millimeters). -<p>This may also be a reference to a resource (in the form -"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or -theme attribute (in the form -"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") -containing a value of this type.</p></div> + <p>Must be one of the following constant values.</p> +<table> +<colgroup align="left" /> +<colgroup align="left" /> +<colgroup align="left" /> +<tr><th>Constant</th><th>Value</th><th>Description</th></tr> +<tr><td><code>fit</code></td><td>0</td><td></td></tr> +<tr><td><code>center</code></td><td>1</td><td></td></tr> +</table></p></div> </div> @@ -4241,7 +4450,7 @@ containing a value of this type.</p></div> -<A NAME="CircularButton_rippleColor"></A> +<A NAME="CircularButton_pressedButtonTranslationZ"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> @@ -4251,7 +4460,7 @@ containing a value of this type.</p></div> int </span> - CircularButton_rippleColor + CircularButton_pressedButtonTranslationZ </h4> <div class="api-level"> @@ -4264,14 +4473,18 @@ containing a value of this type.</p></div> - <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#rippleColor">rippleColor</a></code> + <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#pressedButtonTranslationZ">pressedButtonTranslationZ</a></code> attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#CircularButton">CircularButton</a></code> array. - <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" -or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". -<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", -"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".</p></div> + <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". +Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), +in (inches), mm (millimeters). +<p>This may also be a reference to a resource (in the form +"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or +theme attribute (in the form +"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") +containing a value of this type.</p></div> </div> @@ -4952,6 +5165,87 @@ containing a value of this type.</p></div> +<A NAME="ProgressSpinner"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + static + final + int[] + </span> + ProgressSpinner + </h4> + <div class="api-level"> + + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p>Attributes that can be used with a ProgressSpinner. + <p>Includes the following attributes:</p> + <table> + <colgroup align="left" /> + <colgroup align="left" /> + <tr><th>Attribute</th><th>Description</th></tr> + <tr><td><code><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ProgressSpinner_color_sequence">android.support.wearable:color_sequence</a></code></code></td><td></td></tr> + </table></p></div> + <div class="jd-tagdata"> + <h5 class="jd-tagtitle">See Also</h5> + <ul class="nolist"><li><code><a href="../../../../reference/android/support/wearable/R.styleable.html#ProgressSpinner_color_sequence">ProgressSpinner_color_sequence</a></code></li> + </ul> + </div> + + + </div> +</div> + + + +<A NAME="ProgressSpinner_color_sequence"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + static + + int + </span> + ProgressSpinner_color_sequence + </h4> + <div class="api-level"> + + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p><p>This symbol is the offset where the <code><a href="../../../../reference/android/support/wearable/R.attr.html#color_sequence">color_sequence</a></code> + attribute's value can be found in the <code><a href="../../../../reference/android/support/wearable/R.styleable.html#ProgressSpinner">ProgressSpinner</a></code> array. + + + <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" +or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". +<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", +"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".</p></div> + + + </div> +</div> + + + <A NAME="WatchViewStub"></A> <div class="jd-details api apilevel-"> @@ -5847,6 +6141,7 @@ containing a value of this type.</p></div> <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/activity/ConfirmationActivity.html b/docs/html/reference/android/support/wearable/activity/ConfirmationActivity.html index f7cd6137c0dd..92bfeca1a932 100644 --- a/docs/html/reference/android/support/wearable/activity/ConfirmationActivity.html +++ b/docs/html/reference/android/support/wearable/activity/ConfirmationActivity.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -713,7 +713,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -10110,6 +10110,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/activity/WearableActivity.html b/docs/html/reference/android/support/wearable/activity/WearableActivity.html index 2698dca89cde..6f70f74102a3 100644 --- a/docs/html/reference/android/support/wearable/activity/WearableActivity.html +++ b/docs/html/reference/android/support/wearable/activity/WearableActivity.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -716,7 +716,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -10513,6 +10513,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/activity/package-summary.html b/docs/html/reference/android/support/wearable/activity/package-summary.html index 4dd01b752962..e3a691a98b0b 100644 --- a/docs/html/reference/android/support/wearable/activity/package-summary.html +++ b/docs/html/reference/android/support/wearable/activity/package-summary.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -542,7 +542,7 @@ type="text/css"> <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> @@ -654,6 +654,7 @@ type="text/css"> <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/companion/WatchFaceCompanion.html b/docs/html/reference/android/support/wearable/companion/WatchFaceCompanion.html index ce369f254083..8174777dd103 100644 --- a/docs/html/reference/android/support/wearable/companion/WatchFaceCompanion.html +++ b/docs/html/reference/android/support/wearable/companion/WatchFaceCompanion.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -599,7 +599,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1158,6 +1158,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/companion/package-summary.html b/docs/html/reference/android/support/wearable/companion/package-summary.html index 0447708c9b75..7404dcd22a92 100644 --- a/docs/html/reference/android/support/wearable/companion/package-summary.html +++ b/docs/html/reference/android/support/wearable/companion/package-summary.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -541,7 +541,7 @@ type="text/css"> <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> @@ -641,6 +641,7 @@ type="text/css"> <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/input/RemoteInputConstants.html b/docs/html/reference/android/support/wearable/input/RemoteInputConstants.html index f3cb90c04d6e..35fe2d534985 100644 --- a/docs/html/reference/android/support/wearable/input/RemoteInputConstants.html +++ b/docs/html/reference/android/support/wearable/input/RemoteInputConstants.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -603,7 +603,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1151,6 +1151,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/input/RemoteInputIntent.html b/docs/html/reference/android/support/wearable/input/RemoteInputIntent.html index 92d90bc58bf2..34ae2d57ec84 100644 --- a/docs/html/reference/android/support/wearable/input/RemoteInputIntent.html +++ b/docs/html/reference/android/support/wearable/input/RemoteInputIntent.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -603,7 +603,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -644,7 +644,7 @@ Summary: new RemoteInput.Builder(KEY_QUICK_REPLY_TEXT).setLabel("Quick reply").build() }; Intent intent = new Intent(ACTION_REMOTE_INPUT); - intent.putExtra(EXTRA_REMOTE_INPUT, remoteInputs); + intent.putExtra(EXTRA_REMOTE_INPUTS, remoteInputs); startActivity(intent); </pre> @@ -1496,6 +1496,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/input/package-summary.html b/docs/html/reference/android/support/wearable/input/package-summary.html index 2071e28689f9..314838d63550 100644 --- a/docs/html/reference/android/support/wearable/input/package-summary.html +++ b/docs/html/reference/android/support/wearable/input/package-summary.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -542,7 +542,7 @@ type="text/css"> <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> @@ -653,6 +653,7 @@ type="text/css"> <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/media/MediaControlConstants.html b/docs/html/reference/android/support/wearable/media/MediaControlConstants.html index 42c141b552b2..30ddc4502d3d 100644 --- a/docs/html/reference/android/support/wearable/media/MediaControlConstants.html +++ b/docs/html/reference/android/support/wearable/media/MediaControlConstants.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -602,7 +602,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1370,6 +1370,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/media/package-summary.html b/docs/html/reference/android/support/wearable/media/package-summary.html index 3310b5accda1..72dce84c3e3f 100644 --- a/docs/html/reference/android/support/wearable/media/package-summary.html +++ b/docs/html/reference/android/support/wearable/media/package-summary.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -541,7 +541,7 @@ type="text/css"> <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> @@ -641,6 +641,7 @@ type="text/css"> <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/package-summary.html b/docs/html/reference/android/support/wearable/package-summary.html index a8e3db057eb2..a4ef3760a675 100644 --- a/docs/html/reference/android/support/wearable/package-summary.html +++ b/docs/html/reference/android/support/wearable/package-summary.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -474,6 +474,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.html">R</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.anim.html">R.anim</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.animator.html">R.animator</a></li> + <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.array.html">R.array</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.attr.html">R.attr</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.color.html">R.color</a></li> <li class="api apilevel-"><a href="../../../../reference/android/support/wearable/R.dimen.html">R.dimen</a></li> @@ -553,7 +554,7 @@ type="text/css"> <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> @@ -607,7 +608,7 @@ type="text/css"> <tr class=" api apilevel-" > - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html">R.attr</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.array.html">R.array</a></td> <td class="jd-descrcol" width="100%"> @@ -618,7 +619,7 @@ type="text/css"> <tr class="alt-color api apilevel-" > - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.color.html">R.color</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.attr.html">R.attr</a></td> <td class="jd-descrcol" width="100%"> @@ -629,7 +630,7 @@ type="text/css"> <tr class=" api apilevel-" > - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.dimen.html">R.dimen</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.color.html">R.color</a></td> <td class="jd-descrcol" width="100%"> @@ -640,7 +641,7 @@ type="text/css"> <tr class="alt-color api apilevel-" > - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.drawable.html">R.drawable</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.dimen.html">R.dimen</a></td> <td class="jd-descrcol" width="100%"> @@ -651,7 +652,7 @@ type="text/css"> <tr class=" api apilevel-" > - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.id.html">R.id</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.drawable.html">R.drawable</a></td> <td class="jd-descrcol" width="100%"> @@ -662,7 +663,7 @@ type="text/css"> <tr class="alt-color api apilevel-" > - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.interpolator.html">R.interpolator</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.id.html">R.id</a></td> <td class="jd-descrcol" width="100%"> @@ -673,7 +674,7 @@ type="text/css"> <tr class=" api apilevel-" > - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.layout.html">R.layout</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.interpolator.html">R.interpolator</a></td> <td class="jd-descrcol" width="100%"> @@ -684,7 +685,7 @@ type="text/css"> <tr class="alt-color api apilevel-" > - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.string.html">R.string</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.layout.html">R.layout</a></td> <td class="jd-descrcol" width="100%"> @@ -695,7 +696,7 @@ type="text/css"> <tr class=" api apilevel-" > - <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.style.html">R.style</a></td> + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.string.html">R.string</a></td> <td class="jd-descrcol" width="100%"> @@ -706,6 +707,17 @@ type="text/css"> <tr class="alt-color api apilevel-" > + <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.style.html">R.style</a></td> + <td class="jd-descrcol" width="100%"> + + + + + </td> + </tr> + + + <tr class=" api apilevel-" > <td class="jd-linkcol"><a href="../../../../reference/android/support/wearable/R.styleable.html">R.styleable</a></td> <td class="jd-descrcol" width="100%"> @@ -785,6 +797,7 @@ type="text/css"> <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/provider/WearableCalendarContract.Attendees.html b/docs/html/reference/android/support/wearable/provider/WearableCalendarContract.Attendees.html index ba439b3bf3c3..794973f71683 100644 --- a/docs/html/reference/android/support/wearable/provider/WearableCalendarContract.Attendees.html +++ b/docs/html/reference/android/support/wearable/provider/WearableCalendarContract.Attendees.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -602,7 +602,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1063,6 +1063,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/provider/WearableCalendarContract.Instances.html b/docs/html/reference/android/support/wearable/provider/WearableCalendarContract.Instances.html index 70ad4d9d7279..77c3c67cd34e 100644 --- a/docs/html/reference/android/support/wearable/provider/WearableCalendarContract.Instances.html +++ b/docs/html/reference/android/support/wearable/provider/WearableCalendarContract.Instances.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -602,7 +602,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1063,6 +1063,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/provider/WearableCalendarContract.Reminders.html b/docs/html/reference/android/support/wearable/provider/WearableCalendarContract.Reminders.html index 752da5e6d6f8..9dfd7f7ef6fe 100644 --- a/docs/html/reference/android/support/wearable/provider/WearableCalendarContract.Reminders.html +++ b/docs/html/reference/android/support/wearable/provider/WearableCalendarContract.Reminders.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -602,7 +602,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1063,6 +1063,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/provider/WearableCalendarContract.html b/docs/html/reference/android/support/wearable/provider/WearableCalendarContract.html index 919306b7b4dc..588ae7156ce0 100644 --- a/docs/html/reference/android/support/wearable/provider/WearableCalendarContract.html +++ b/docs/html/reference/android/support/wearable/provider/WearableCalendarContract.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -611,7 +611,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1265,6 +1265,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/provider/package-summary.html b/docs/html/reference/android/support/wearable/provider/package-summary.html index f82ce5c63107..bb4c581937db 100644 --- a/docs/html/reference/android/support/wearable/provider/package-summary.html +++ b/docs/html/reference/android/support/wearable/provider/package-summary.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -544,7 +544,7 @@ type="text/css"> <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> @@ -677,6 +677,7 @@ type="text/css"> <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/ActionLabel.html b/docs/html/reference/android/support/wearable/view/ActionLabel.html index 371601873b84..f8cb733323b1 100644 --- a/docs/html/reference/android/support/wearable/view/ActionLabel.html +++ b/docs/html/reference/android/support/wearable/view/ActionLabel.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -684,7 +685,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -12362,6 +12363,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/ActionPage.html b/docs/html/reference/android/support/wearable/view/ActionPage.html index 268bba159674..69c4dfb4ad0c 100644 --- a/docs/html/reference/android/support/wearable/view/ActionPage.html +++ b/docs/html/reference/android/support/wearable/view/ActionPage.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -714,7 +715,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -15449,6 +15450,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/BoxInsetLayout.LayoutParams.html b/docs/html/reference/android/support/wearable/view/BoxInsetLayout.LayoutParams.html index 43097b4237c1..d716836368c6 100644 --- a/docs/html/reference/android/support/wearable/view/BoxInsetLayout.LayoutParams.html +++ b/docs/html/reference/android/support/wearable/view/BoxInsetLayout.LayoutParams.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -687,7 +688,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -2431,6 +2432,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/BoxInsetLayout.html b/docs/html/reference/android/support/wearable/view/BoxInsetLayout.html index 5619e75d4db7..d3151356d362 100644 --- a/docs/html/reference/android/support/wearable/view/BoxInsetLayout.html +++ b/docs/html/reference/android/support/wearable/view/BoxInsetLayout.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -725,7 +726,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -15573,6 +15574,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/CardFragment.html b/docs/html/reference/android/support/wearable/view/CardFragment.html index 9437e931a755..b73c6caafc62 100644 --- a/docs/html/reference/android/support/wearable/view/CardFragment.html +++ b/docs/html/reference/android/support/wearable/view/CardFragment.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -679,7 +680,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -4875,6 +4876,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/CardFrame.html b/docs/html/reference/android/support/wearable/view/CardFrame.html index 1beeda2ef813..32224d5f8a88 100644 --- a/docs/html/reference/android/support/wearable/view/CardFrame.html +++ b/docs/html/reference/android/support/wearable/view/CardFrame.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -714,7 +715,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -15930,6 +15931,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/CardScrollView.html b/docs/html/reference/android/support/wearable/view/CardScrollView.html index 0364eb93f886..a36184718240 100644 --- a/docs/html/reference/android/support/wearable/view/CardScrollView.html +++ b/docs/html/reference/android/support/wearable/view/CardScrollView.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -722,7 +723,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -15898,6 +15899,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/CircledImageView.html b/docs/html/reference/android/support/wearable/view/CircledImageView.html index 1c9451b5b182..a2ba3f7f192c 100644 --- a/docs/html/reference/android/support/wearable/view/CircledImageView.html +++ b/docs/html/reference/android/support/wearable/view/CircledImageView.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -684,7 +685,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -2857,12 +2858,44 @@ android.view.View void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html#setImageCirclePercentage(float)">setImageCirclePercentage</a></span>(float percentage)</nobr> + + </td></tr> + + + + <tr class=" api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + + void</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html#setImageDrawable(android.graphics.drawable.Drawable)">setImageDrawable</a></span>(Drawable drawable)</nobr> </td></tr> + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + + void</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html#setImageHorizontalOffcenterPercentage(float)">setImageHorizontalOffcenterPercentage</a></span>(float percentage)</nobr> + + </td></tr> + + + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -2889,7 +2922,7 @@ android.view.View void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> - <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html#setPressed(boolean)">setPressed</a></span>(boolean pressed)</nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html#setImageTint(int)">setImageTint</a></span>(int tint)</nobr> </td></tr> @@ -2905,7 +2938,7 @@ android.view.View void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> - <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html#setProgress(float)">setProgress</a></span>(float progress)</nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html#setPressed(boolean)">setPressed</a></span>(boolean pressed)</nobr> </td></tr> @@ -2921,6 +2954,22 @@ android.view.View void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html#setProgress(float)">setProgress</a></span>(float progress)</nobr> + + </td></tr> + + + + <tr class=" api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + + void</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html#setShadowVisibility(float)">setShadowVisibility</a></span>(float shadowVisibility)</nobr> <div class="jd-descrdiv"> @@ -2934,7 +2983,7 @@ android.view.View - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -11857,6 +11906,38 @@ From interface </div> +<A NAME="setImageCirclePercentage(float)"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + + + + + void + </span> + <span class="sympad">setImageCirclePercentage</span> + <span class="normal">(float percentage)</span> + </h4> + <div class="api-level"> + <div></div> + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p></p></div> + + </div> +</div> + + <A NAME="setImageDrawable(android.graphics.drawable.Drawable)"></A> <div class="jd-details api apilevel-"> @@ -11889,6 +11970,38 @@ From interface </div> +<A NAME="setImageHorizontalOffcenterPercentage(float)"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + + + + + void + </span> + <span class="sympad">setImageHorizontalOffcenterPercentage</span> + <span class="normal">(float percentage)</span> + </h4> + <div class="api-level"> + <div></div> + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p></p></div> + + </div> +</div> + + <A NAME="setImageResource(int)"></A> <div class="jd-details api apilevel-"> @@ -11921,6 +12034,38 @@ From interface </div> +<A NAME="setImageTint(int)"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + + + + + void + </span> + <span class="sympad">setImageTint</span> + <span class="normal">(int tint)</span> + </h4> + <div class="api-level"> + <div></div> + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p></p></div> + + </div> +</div> + + <A NAME="setPressed(boolean)"></A> <div class="jd-details api apilevel-"> @@ -12330,6 +12475,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/CircularButton.html b/docs/html/reference/android/support/wearable/view/CircularButton.html index edcb3f27169d..ff626ce1500c 100644 --- a/docs/html/reference/android/support/wearable/view/CircularButton.html +++ b/docs/html/reference/android/support/wearable/view/CircularButton.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -687,7 +688,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -11986,6 +11987,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/CrossfadeDrawable.html b/docs/html/reference/android/support/wearable/view/CrossfadeDrawable.html index f346b82b1148..176e532ed4a4 100644 --- a/docs/html/reference/android/support/wearable/view/CrossfadeDrawable.html +++ b/docs/html/reference/android/support/wearable/view/CrossfadeDrawable.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -665,7 +666,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -3562,6 +3563,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/DelayedConfirmationView.DelayedConfirmationListener.html b/docs/html/reference/android/support/wearable/view/DelayedConfirmationView.DelayedConfirmationListener.html index 6159875b6c17..459b6831713b 100644 --- a/docs/html/reference/android/support/wearable/view/DelayedConfirmationView.DelayedConfirmationListener.html +++ b/docs/html/reference/android/support/wearable/view/DelayedConfirmationView.DelayedConfirmationListener.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -602,7 +603,7 @@ type="text/css"> <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -908,6 +909,7 @@ type="text/css"> <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/DelayedConfirmationView.html b/docs/html/reference/android/support/wearable/view/DelayedConfirmationView.html index 3b61bf06ba38..10e10b9968c3 100644 --- a/docs/html/reference/android/support/wearable/view/DelayedConfirmationView.html +++ b/docs/html/reference/android/support/wearable/view/DelayedConfirmationView.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -698,7 +699,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -3164,12 +3165,44 @@ From class void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html#setImageCirclePercentage(float)">setImageCirclePercentage</a></span>(float percentage)</nobr> + + </td></tr> + + + + <tr class=" api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + + void</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html#setImageDrawable(android.graphics.drawable.Drawable)">setImageDrawable</a></span>(Drawable drawable)</nobr> </td></tr> + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + + void</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html#setImageHorizontalOffcenterPercentage(float)">setImageHorizontalOffcenterPercentage</a></span>(float percentage)</nobr> + + </td></tr> + + + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -3196,7 +3229,7 @@ From class void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> - <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html#setPressed(boolean)">setPressed</a></span>(boolean pressed)</nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html#setImageTint(int)">setImageTint</a></span>(int tint)</nobr> </td></tr> @@ -3212,7 +3245,7 @@ From class void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> - <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html#setProgress(float)">setProgress</a></span>(float progress)</nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html#setPressed(boolean)">setPressed</a></span>(boolean pressed)</nobr> </td></tr> @@ -3228,6 +3261,22 @@ From class void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html#setProgress(float)">setProgress</a></span>(float progress)</nobr> + + </td></tr> + + + + <tr class=" api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + + void</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/CircledImageView.html#setShadowVisibility(float)">setShadowVisibility</a></span>(float shadowVisibility)</nobr> <div class="jd-descrdiv"> @@ -3241,7 +3290,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -11914,6 +11963,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/DismissOverlayView.html b/docs/html/reference/android/support/wearable/view/DismissOverlayView.html index f4554036c053..f146dafb9606 100644 --- a/docs/html/reference/android/support/wearable/view/DismissOverlayView.html +++ b/docs/html/reference/android/support/wearable/view/DismissOverlayView.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -719,7 +720,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -15317,6 +15318,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/DotsPageIndicator.html b/docs/html/reference/android/support/wearable/view/DotsPageIndicator.html index 006a2707c480..634cf952d9e3 100644 --- a/docs/html/reference/android/support/wearable/view/DotsPageIndicator.html +++ b/docs/html/reference/android/support/wearable/view/DotsPageIndicator.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -705,7 +706,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -13437,6 +13438,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/FragmentGridPagerAdapter.html b/docs/html/reference/android/support/wearable/view/FragmentGridPagerAdapter.html index 9df4ae7438c9..ed7fecdaecd3 100644 --- a/docs/html/reference/android/support/wearable/view/FragmentGridPagerAdapter.html +++ b/docs/html/reference/android/support/wearable/view/FragmentGridPagerAdapter.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -611,6 +612,9 @@ Summary: + | <a href="#promethods">Protected Methods</a> + + | <a href="#inhmethods">Inherited Methods</a> @@ -660,7 +664,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -965,6 +969,22 @@ Summary: + Fragment</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/FragmentGridPagerAdapter.html#findExistingFragment(int, int)">findExistingFragment</a></span>(int row, int column)</nobr> + + </td></tr> + + + + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> @@ -981,7 +1001,7 @@ Summary: - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1004,7 +1024,7 @@ Summary: - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> abstract @@ -1027,7 +1047,7 @@ Summary: - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1050,7 +1070,7 @@ Summary: - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1074,7 +1094,7 @@ Summary: - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1097,7 +1117,7 @@ Summary: - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1126,6 +1146,71 @@ Summary: +<!-- ========== METHOD SUMMARY =========== --> +<table id="promethods" class="jd-sumtable"><tr><th colspan="12">Protected Methods</th></tr> + + + + + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + + void</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/FragmentGridPagerAdapter.html#applyItemPosition(java.lang.Object, android.graphics.Point)">applyItemPosition</a></span>(Object object, Point position)</nobr> + + <div class="jd-descrdiv"> + Called after <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code> to allow superclasses to update their + internal bookkeeping if a subclass has overridden <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code>. + + + + </div> + + </td></tr> + + + + <tr class=" api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + + void</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/FragmentGridPagerAdapter.html#removeFragment(android.app.Fragment, android.app.FragmentTransaction)">removeFragment</a></span>(Fragment fragment, FragmentTransaction transaction)</nobr> + + </td></tr> + + + + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + + void</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/FragmentGridPagerAdapter.html#restoreFragment(android.app.Fragment, android.app.FragmentTransaction)">restoreFragment</a></span>(Fragment fragment, FragmentTransaction transaction)</nobr> + + </td></tr> + + + +</table> + + @@ -1157,6 +1242,30 @@ From class <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> + + + + + + void</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#applyItemPosition(java.lang.Object, android.graphics.Point)">applyItemPosition</a></span>(Object object, Point position)</nobr> + + <div class="jd-descrdiv"> + Called after <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code> to allow superclasses to update their + internal bookkeeping if a subclass has overridden <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code>. + + + + </div> + + </td></tr> + + + + <tr class=" api apilevel-" > + <td class="jd-typecol"><nobr> abstract @@ -1178,7 +1287,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1201,7 +1310,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1224,7 +1333,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1247,7 +1356,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> abstract @@ -1270,7 +1379,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1293,7 +1402,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1316,7 +1425,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1339,7 +1448,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> abstract @@ -1362,7 +1471,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> abstract @@ -1385,7 +1494,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> abstract @@ -1409,7 +1518,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1433,7 +1542,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1457,7 +1566,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1481,7 +1590,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1504,7 +1613,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1527,7 +1636,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1550,7 +1659,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1573,7 +1682,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1596,7 +1705,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1964,6 +2073,38 @@ From class </div> +<A NAME="findExistingFragment(int, int)"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + + + + + Fragment + </span> + <span class="sympad">findExistingFragment</span> + <span class="normal">(int row, int column)</span> + </h4> + <div class="api-level"> + <div></div> + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p></p></div> + + </div> +</div> + + <A NAME="finishUpdate(android.view.ViewGroup)"></A> <div class="jd-details api apilevel-"> @@ -2331,6 +2472,122 @@ From class <!-- ========= METHOD DETAIL ======== --> +<h2>Protected Methods</h2> + + + +<A NAME="applyItemPosition(java.lang.Object, android.graphics.Point)"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + protected + + + + + void + </span> + <span class="sympad">applyItemPosition</span> + <span class="normal">(Object object, Point position)</span> + </h4> + <div class="api-level"> + <div></div> + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p>Called after <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code> to allow superclasses to update their + internal bookkeeping if a subclass has overridden <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code>.</p></div> + <div class="jd-tagdata"> + <h5 class="jd-tagtitle">Parameters</h5> + <table class="jd-tagtable"> + <tr> + <th>object</td> + <td>Object representing the item passed to <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code>.</td> + </tr> + <tr> + <th>position</td> + <td>position which was returned from <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code>. +</td> + </tr> + </table> + </div> + + </div> +</div> + + +<A NAME="removeFragment(android.app.Fragment, android.app.FragmentTransaction)"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + protected + + + + + void + </span> + <span class="sympad">removeFragment</span> + <span class="normal">(Fragment fragment, FragmentTransaction transaction)</span> + </h4> + <div class="api-level"> + <div></div> + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p></p></div> + + </div> +</div> + + +<A NAME="restoreFragment(android.app.Fragment, android.app.FragmentTransaction)"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + protected + + + + + void + </span> + <span class="sympad">restoreFragment</span> + <span class="normal">(Fragment fragment, FragmentTransaction transaction)</span> + </h4> + <div class="api-level"> + <div></div> + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p></p></div> + + </div> +</div> + + + <!-- ========= END OF CLASS DATA ========= --> @@ -2389,6 +2646,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/GridPageOptions.BackgroundListener.html b/docs/html/reference/android/support/wearable/view/GridPageOptions.BackgroundListener.html index a37d8f8ac324..1e066c1ea7bd 100644 --- a/docs/html/reference/android/support/wearable/view/GridPageOptions.BackgroundListener.html +++ b/docs/html/reference/android/support/wearable/view/GridPageOptions.BackgroundListener.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -602,7 +603,7 @@ type="text/css"> <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -853,6 +854,7 @@ type="text/css"> <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/GridPageOptions.html b/docs/html/reference/android/support/wearable/view/GridPageOptions.html index 56cfa0509db7..8c2258245eb4 100644 --- a/docs/html/reference/android/support/wearable/view/GridPageOptions.html +++ b/docs/html/reference/android/support/wearable/view/GridPageOptions.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -602,7 +603,7 @@ type="text/css"> <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -948,6 +949,7 @@ type="text/css"> <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/GridPagerAdapter.html b/docs/html/reference/android/support/wearable/view/GridPagerAdapter.html index 9876a82df06b..b157c39022a6 100644 --- a/docs/html/reference/android/support/wearable/view/GridPagerAdapter.html +++ b/docs/html/reference/android/support/wearable/view/GridPagerAdapter.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="selected api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -600,6 +601,9 @@ Summary: + | <a href="#promethods">Protected Methods</a> + + | <a href="#inhmethods">Inherited Methods</a> @@ -645,7 +649,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1369,6 +1373,39 @@ Summary: +<!-- ========== METHOD SUMMARY =========== --> +<table id="promethods" class="jd-sumtable"><tr><th colspan="12">Protected Methods</th></tr> + + + + + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + + void</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#applyItemPosition(java.lang.Object, android.graphics.Point)">applyItemPosition</a></span>(Object object, Point position)</nobr> + + <div class="jd-descrdiv"> + Called after <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code> to allow superclasses to update their + internal bookkeeping if a subclass has overridden <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code>. + + + + </div> + + </td></tr> + + + +</table> + + @@ -2742,6 +2779,58 @@ From class <!-- ========= METHOD DETAIL ======== --> +<h2>Protected Methods</h2> + + + +<A NAME="applyItemPosition(java.lang.Object, android.graphics.Point)"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + protected + + + + + void + </span> + <span class="sympad">applyItemPosition</span> + <span class="normal">(Object object, Point position)</span> + </h4> + <div class="api-level"> + <div></div> + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p>Called after <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code> to allow superclasses to update their + internal bookkeeping if a subclass has overridden <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code>.</p></div> + <div class="jd-tagdata"> + <h5 class="jd-tagtitle">Parameters</h5> + <table class="jd-tagtable"> + <tr> + <th>object</td> + <td>Object representing the item passed to <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code>.</td> + </tr> + <tr> + <th>position</td> + <td>position which was returned from <code><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getItemPosition(java.lang.Object)">getItemPosition(Object)</a></code>. +</td> + </tr> + </table> + </div> + + </div> +</div> + + + <!-- ========= END OF CLASS DATA ========= --> @@ -2800,6 +2889,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/GridViewPager.LayoutParams.html b/docs/html/reference/android/support/wearable/view/GridViewPager.LayoutParams.html index 9db55c9dd351..c4d63e227d24 100644 --- a/docs/html/reference/android/support/wearable/view/GridViewPager.LayoutParams.html +++ b/docs/html/reference/android/support/wearable/view/GridViewPager.LayoutParams.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="selected api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -673,7 +674,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1787,6 +1788,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/GridViewPager.OnAdapterChangeListener.html b/docs/html/reference/android/support/wearable/view/GridViewPager.OnAdapterChangeListener.html index 1cbec14072e7..fcd6a3dec8cf 100644 --- a/docs/html/reference/android/support/wearable/view/GridViewPager.OnAdapterChangeListener.html +++ b/docs/html/reference/android/support/wearable/view/GridViewPager.OnAdapterChangeListener.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -621,7 +622,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -968,6 +969,7 @@ Summary: <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/GridViewPager.OnPageChangeListener.html b/docs/html/reference/android/support/wearable/view/GridViewPager.OnPageChangeListener.html index fd81fbe47cc7..072f6c59f97b 100644 --- a/docs/html/reference/android/support/wearable/view/GridViewPager.OnPageChangeListener.html +++ b/docs/html/reference/android/support/wearable/view/GridViewPager.OnPageChangeListener.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -621,7 +622,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1085,6 +1086,7 @@ Summary: <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/GridViewPager.html b/docs/html/reference/android/support/wearable/view/GridViewPager.html index b92720cd3099..3e2179d7c38d 100644 --- a/docs/html/reference/android/support/wearable/view/GridViewPager.html +++ b/docs/html/reference/android/support/wearable/view/GridViewPager.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="selected api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -717,7 +718,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -16881,6 +16882,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/SimpleAnimatorListener.html b/docs/html/reference/android/support/wearable/view/SimpleAnimatorListener.html index 454f4203392a..9940f3b1f62c 100644 --- a/docs/html/reference/android/support/wearable/view/SimpleAnimatorListener.html +++ b/docs/html/reference/android/support/wearable/view/SimpleAnimatorListener.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="selected api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -651,7 +652,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1525,6 +1526,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/WatchViewStub.OnLayoutInflatedListener.html b/docs/html/reference/android/support/wearable/view/WatchViewStub.OnLayoutInflatedListener.html index b05ce347ba97..9492429c36e5 100644 --- a/docs/html/reference/android/support/wearable/view/WatchViewStub.OnLayoutInflatedListener.html +++ b/docs/html/reference/android/support/wearable/view/WatchViewStub.OnLayoutInflatedListener.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -602,7 +603,7 @@ type="text/css"> <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -847,6 +848,7 @@ type="text/css"> <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/WatchViewStub.html b/docs/html/reference/android/support/wearable/view/WatchViewStub.html index 8fd5feed5a71..170a165ff372 100644 --- a/docs/html/reference/android/support/wearable/view/WatchViewStub.html +++ b/docs/html/reference/android/support/wearable/view/WatchViewStub.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="selected api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -725,7 +726,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -15465,6 +15466,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/WearableFrameLayout.LayoutParams.html b/docs/html/reference/android/support/wearable/view/WearableFrameLayout.LayoutParams.html index 93f4b0d35a24..fb54c95e0e32 100644 --- a/docs/html/reference/android/support/wearable/view/WearableFrameLayout.LayoutParams.html +++ b/docs/html/reference/android/support/wearable/view/WearableFrameLayout.LayoutParams.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -684,7 +685,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -2322,6 +2323,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/WearableFrameLayout.html b/docs/html/reference/android/support/wearable/view/WearableFrameLayout.html index f2b0df705e6a..e269ab8d4349 100644 --- a/docs/html/reference/android/support/wearable/view/WearableFrameLayout.html +++ b/docs/html/reference/android/support/wearable/view/WearableFrameLayout.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="selected api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -714,7 +715,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -16352,6 +16353,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/WearableListView.Adapter.html b/docs/html/reference/android/support/wearable/view/WearableListView.Adapter.html index 9619c5d6365f..0686ff23343f 100644 --- a/docs/html/reference/android/support/wearable/view/WearableListView.Adapter.html +++ b/docs/html/reference/android/support/wearable/view/WearableListView.Adapter.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -647,7 +648,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1561,6 +1562,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/WearableListView.ClickListener.html b/docs/html/reference/android/support/wearable/view/WearableListView.ClickListener.html index 84cb188da7b1..17431c40c447 100644 --- a/docs/html/reference/android/support/wearable/view/WearableListView.ClickListener.html +++ b/docs/html/reference/android/support/wearable/view/WearableListView.ClickListener.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -602,7 +603,7 @@ type="text/css"> <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -919,6 +920,7 @@ type="text/css"> <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/WearableListView.OnCenterProximityListener.html b/docs/html/reference/android/support/wearable/view/WearableListView.OnCenterProximityListener.html index b2b92460606f..936a163c3c00 100644 --- a/docs/html/reference/android/support/wearable/view/WearableListView.OnCenterProximityListener.html +++ b/docs/html/reference/android/support/wearable/view/WearableListView.OnCenterProximityListener.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -602,7 +603,7 @@ type="text/css"> <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -930,6 +931,7 @@ type="text/css"> <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/WearableListView.OnCentralPositionChangedListener.html b/docs/html/reference/android/support/wearable/view/WearableListView.OnCentralPositionChangedListener.html index 66eeac3ce550..c49bbccea6e0 100644 --- a/docs/html/reference/android/support/wearable/view/WearableListView.OnCentralPositionChangedListener.html +++ b/docs/html/reference/android/support/wearable/view/WearableListView.OnCentralPositionChangedListener.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -602,7 +603,7 @@ type="text/css"> <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -861,6 +862,7 @@ type="text/css"> <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/WearableListView.OnScrollListener.html b/docs/html/reference/android/support/wearable/view/WearableListView.OnScrollListener.html index de2bcd7f5e7e..2871600c8275 100644 --- a/docs/html/reference/android/support/wearable/view/WearableListView.OnScrollListener.html +++ b/docs/html/reference/android/support/wearable/view/WearableListView.OnScrollListener.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -602,7 +603,7 @@ type="text/css"> <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1065,6 +1066,7 @@ type="text/css"> <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/WearableListView.ViewHolder.html b/docs/html/reference/android/support/wearable/view/WearableListView.ViewHolder.html index b7953d470b43..270d8d8530a1 100644 --- a/docs/html/reference/android/support/wearable/view/WearableListView.ViewHolder.html +++ b/docs/html/reference/android/support/wearable/view/WearableListView.ViewHolder.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -652,7 +653,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1346,6 +1347,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/WearableListView.html b/docs/html/reference/android/support/wearable/view/WearableListView.html index eec5c324c4b4..7fb95650932f 100644 --- a/docs/html/reference/android/support/wearable/view/WearableListView.html +++ b/docs/html/reference/android/support/wearable/view/WearableListView.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -501,6 +501,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -724,7 +725,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -3236,7 +3237,7 @@ android.view.View boolean</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> - <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/WearableListView.html#onInterceptTouchEvent(android.view.MotionEvent)">onInterceptTouchEvent</a></span>(MotionEvent event)</nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/WearableListView.html#isAtTop()">isAtTop</a></span>()</nobr> </td></tr> @@ -3252,7 +3253,7 @@ android.view.View boolean</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> - <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/WearableListView.html#onTouchEvent(android.view.MotionEvent)">onTouchEvent</a></span>(MotionEvent event)</nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/WearableListView.html#onInterceptTouchEvent(android.view.MotionEvent)">onInterceptTouchEvent</a></span>(MotionEvent event)</nobr> </td></tr> @@ -3265,6 +3266,22 @@ android.view.View + boolean</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/WearableListView.html#onTouchEvent(android.view.MotionEvent)">onTouchEvent</a></span>(MotionEvent event)</nobr> + + </td></tr> + + + + <tr class=" api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> @@ -3281,7 +3298,7 @@ android.view.View - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -3304,7 +3321,7 @@ android.view.View - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -3327,7 +3344,7 @@ android.view.View - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -3343,7 +3360,7 @@ android.view.View - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -3366,7 +3383,7 @@ android.view.View - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -3390,7 +3407,7 @@ android.view.View - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -3413,7 +3430,7 @@ android.view.View - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -3436,6 +3453,22 @@ android.view.View </td></tr> + + <tr class=" api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + + void</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/view/WearableListView.html#smoothScrollToPosition(int, android.support.v7.widget.RecyclerView.SmoothScroller)">smoothScrollToPosition</a></span>(int position, RecyclerView.SmoothScroller smoothScroller)</nobr> + + </td></tr> + + </table> @@ -16613,6 +16646,43 @@ From interface </div> +<A NAME="isAtTop()"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + + + + + boolean + </span> + <span class="sympad">isAtTop</span> + <span class="normal">()</span> + </h4> + <div class="api-level"> + <div></div> + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p></p></div> + <div class="jd-tagdata"> + <h5 class="jd-tagtitle">Returns</h5> + <ul class="nolist"><li>true if the list is scrolled all the way to the top. +</li></ul> + </div> + + </div> +</div> + + <A NAME="onInterceptTouchEvent(android.view.MotionEvent)"></A> <div class="jd-details api apilevel-"> @@ -16963,6 +17033,38 @@ From interface </div> +<A NAME="smoothScrollToPosition(int, android.support.v7.widget.RecyclerView.SmoothScroller)"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + + + + + void + </span> + <span class="sympad">smoothScrollToPosition</span> + <span class="normal">(int position, RecyclerView.SmoothScroller smoothScroller)</span> + </h4> + <div class="api-level"> + <div></div> + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p></p></div> + + </div> +</div> + + @@ -17026,6 +17128,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/view/package-summary.html b/docs/html/reference/android/support/wearable/view/package-summary.html index 28f94db18246..f76e3780b060 100644 --- a/docs/html/reference/android/support/wearable/view/package-summary.html +++ b/docs/html/reference/android/support/wearable/view/package-summary.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -502,6 +502,7 @@ type="text/css"> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridPagerAdapter.html">GridPagerAdapter</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.html">GridViewPager</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/GridViewPager.LayoutParams.html">GridViewPager.LayoutParams</a></li> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></li> @@ -578,7 +579,7 @@ type="text/css"> <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> @@ -920,6 +921,17 @@ type="text/css"> <tr class=" api apilevel-" > + <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/view/ProgressSpinner.html">ProgressSpinner</a></td> + <td class="jd-descrcol" width="100%"> + An indeterminate progress spinner designed for wearables which cycles through colors. + + + + </td> + </tr> + + + <tr class="alt-color api apilevel-" > <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/view/SimpleAnimatorListener.html">SimpleAnimatorListener</a></td> <td class="jd-descrcol" width="100%"> Convenience class for listening for Animator events that implements the AnimatorListener @@ -931,7 +943,7 @@ type="text/css"> </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/view/WatchViewStub.html">WatchViewStub</a></td> <td class="jd-descrcol" width="100%"> A WatchViewStub allows for the use of different sub-layouts depending on the @@ -944,7 +956,7 @@ type="text/css"> </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.html">WearableFrameLayout</a></td> <td class="jd-descrcol" width="100%"> WearableFrameLayout works exactly like FrameLayout, except it can have overrides for a round @@ -956,7 +968,7 @@ type="text/css"> </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/view/WearableFrameLayout.LayoutParams.html">WearableFrameLayout.LayoutParams</a></td> <td class="jd-descrcol" width="100%"> Per-child layout information for layouts on wearable devices. @@ -967,7 +979,7 @@ type="text/css"> </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/view/WearableListView.html">WearableListView</a></td> <td class="jd-descrcol" width="100%"> An alternative version of ListView that is optimized for ease of use on small screen wearable @@ -979,7 +991,7 @@ type="text/css"> </tr> - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/view/WearableListView.Adapter.html">WearableListView.Adapter</a></td> <td class="jd-descrcol" width="100%"> Base class for adapters providing data for the WearableListView. @@ -990,7 +1002,7 @@ type="text/css"> </tr> - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/view/WearableListView.ViewHolder.html">WearableListView.ViewHolder</a></td> <td class="jd-descrcol" width="100%"> Wrapper around items displayed in the list view. @@ -1070,6 +1082,7 @@ type="text/css"> <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/watchface/CanvasWatchFaceService.Engine.html b/docs/html/reference/android/support/wearable/watchface/CanvasWatchFaceService.Engine.html index bbae62a45429..1a7aa76db391 100644 --- a/docs/html/reference/android/support/wearable/watchface/CanvasWatchFaceService.Engine.html +++ b/docs/html/reference/android/support/wearable/watchface/CanvasWatchFaceService.Engine.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -466,6 +466,11 @@ type="text/css"> <ul> + <li><h2>Annotations</h2> + <ul> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.TapType.html">WatchFaceService.TapType</a></li> + </ul> + </li> <li><h2>Classes</h2> @@ -631,7 +636,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -968,6 +973,29 @@ From class final + int</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.Engine.html#getNotificationCount()">getNotificationCount</a></span>()</nobr> + + <div class="jd-descrdiv"> + Returns the total number of notification cards in the stream. + + + + </div> + + </td></tr> + + + + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + + + final + + Rect</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> @@ -984,7 +1012,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1007,7 +1035,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1030,7 +1058,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1053,7 +1081,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1069,7 +1097,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1085,7 +1113,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1101,7 +1129,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1124,6 +1152,29 @@ From class + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + + void</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onNotificationCountChanged(int)">onNotificationCountChanged</a></span>(int count)</nobr> + + <div class="jd-descrdiv"> + Called when the total number of notification cards in the stream has changed. + + + + </div> + + </td></tr> + + + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1180,6 +1231,29 @@ From class void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onTapCommand(int, int, int, long)">onTapCommand</a></span>(int tapType, int x, int y, long eventTime)</nobr> + + <div class="jd-descrdiv"> + Called when a tap or touch related event occurs. + + + + </div> + + </td></tr> + + + + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + + void</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onTimeTick()">onTimeTick</a></span>()</nobr> <div class="jd-descrdiv"> @@ -1193,7 +1267,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1216,7 +1290,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1239,7 +1313,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -2201,6 +2275,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/watchface/CanvasWatchFaceService.html b/docs/html/reference/android/support/wearable/watchface/CanvasWatchFaceService.html index 5dbd8ea0fda3..aee337f1efd0 100644 --- a/docs/html/reference/android/support/wearable/watchface/CanvasWatchFaceService.html +++ b/docs/html/reference/android/support/wearable/watchface/CanvasWatchFaceService.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -466,6 +466,11 @@ type="text/css"> <ul> + <li><h2>Annotations</h2> + <ul> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.TapType.html">WatchFaceService.TapType</a></li> + </ul> + </li> <li><h2>Classes</h2> @@ -694,7 +699,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -952,6 +957,44 @@ Summary: </tr> + <tr class=" api apilevel-" > + <td class="jd-typecol">int</td> + <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.html#TAP_TYPE_TAP">TAP_TYPE_TAP</a></td> + <td class="jd-descrcol" width="100%"> + Used in onTapCommaned to indicate that an "up" event on the watch face has occurred that + has not been consumed by another activity. + + + + </td> + </tr> + + + <tr class="alt-color api apilevel-" > + <td class="jd-typecol">int</td> + <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.html#TAP_TYPE_TOUCH">TAP_TYPE_TOUCH</a></td> + <td class="jd-descrcol" width="100%"> + Used in onTapCommand to indicate a "down" touch event on the watch face. + + + + </td> + </tr> + + + <tr class=" api apilevel-" > + <td class="jd-typecol">int</td> + <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.html#TAP_TYPE_TOUCH_CANCEL">TAP_TYPE_TOUCH_CANCEL</a></td> + <td class="jd-descrcol" width="100%"> + Used in onTapCaommand to indicate that a previous TAP_TYPE_TOUCH touch event has been + canceled. + + + + </td> + </tr> + + </table> </div> </div> @@ -6238,6 +6281,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/watchface/Gles2WatchFaceService.Engine.html b/docs/html/reference/android/support/wearable/watchface/Gles2WatchFaceService.Engine.html index 76191787785c..aba23a6f68fc 100644 --- a/docs/html/reference/android/support/wearable/watchface/Gles2WatchFaceService.Engine.html +++ b/docs/html/reference/android/support/wearable/watchface/Gles2WatchFaceService.Engine.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -466,6 +466,11 @@ type="text/css"> <ul> + <li><h2>Annotations</h2> + <ul> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.TapType.html">WatchFaceService.TapType</a></li> + </ul> + </li> <li><h2>Classes</h2> @@ -631,7 +636,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1138,6 +1143,29 @@ From class final + int</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.Engine.html#getNotificationCount()">getNotificationCount</a></span>()</nobr> + + <div class="jd-descrdiv"> + Returns the total number of notification cards in the stream. + + + + </div> + + </td></tr> + + + + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + + + final + + Rect</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> @@ -1154,7 +1182,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1177,7 +1205,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1200,7 +1228,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1223,7 +1251,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1239,7 +1267,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1255,7 +1283,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1271,7 +1299,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1294,6 +1322,29 @@ From class + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + + void</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onNotificationCountChanged(int)">onNotificationCountChanged</a></span>(int count)</nobr> + + <div class="jd-descrdiv"> + Called when the total number of notification cards in the stream has changed. + + + + </div> + + </td></tr> + + + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1350,6 +1401,29 @@ From class void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onTapCommand(int, int, int, long)">onTapCommand</a></span>(int tapType, int x, int y, long eventTime)</nobr> + + <div class="jd-descrdiv"> + Called when a tap or touch related event occurs. + + + + </div> + + </td></tr> + + + + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + + void</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onTimeTick()">onTimeTick</a></span>()</nobr> <div class="jd-descrdiv"> @@ -1363,7 +1437,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1386,7 +1460,7 @@ From class - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1409,7 +1483,7 @@ From class - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -2668,6 +2742,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/watchface/Gles2WatchFaceService.html b/docs/html/reference/android/support/wearable/watchface/Gles2WatchFaceService.html index 63712907ab57..1dcc7ddf71f4 100644 --- a/docs/html/reference/android/support/wearable/watchface/Gles2WatchFaceService.html +++ b/docs/html/reference/android/support/wearable/watchface/Gles2WatchFaceService.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -466,6 +466,11 @@ type="text/css"> <ul> + <li><h2>Annotations</h2> + <ul> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.TapType.html">WatchFaceService.TapType</a></li> + </ul> + </li> <li><h2>Classes</h2> @@ -694,7 +699,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -955,6 +960,44 @@ Summary: </tr> + <tr class=" api apilevel-" > + <td class="jd-typecol">int</td> + <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.html#TAP_TYPE_TAP">TAP_TYPE_TAP</a></td> + <td class="jd-descrcol" width="100%"> + Used in onTapCommaned to indicate that an "up" event on the watch face has occurred that + has not been consumed by another activity. + + + + </td> + </tr> + + + <tr class="alt-color api apilevel-" > + <td class="jd-typecol">int</td> + <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.html#TAP_TYPE_TOUCH">TAP_TYPE_TOUCH</a></td> + <td class="jd-descrcol" width="100%"> + Used in onTapCommand to indicate a "down" touch event on the watch face. + + + + </td> + </tr> + + + <tr class=" api apilevel-" > + <td class="jd-typecol">int</td> + <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.html#TAP_TYPE_TOUCH_CANCEL">TAP_TYPE_TOUCH_CANCEL</a></td> + <td class="jd-descrcol" width="100%"> + Used in onTapCaommand to indicate that a previous TAP_TYPE_TOUCH touch event has been + canceled. + + + + </td> + </tr> + + </table> </div> </div> @@ -6241,6 +6284,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/watchface/WatchFaceService.Engine.html b/docs/html/reference/android/support/wearable/watchface/WatchFaceService.Engine.html index 23263865d8e8..ad6cc2c570d4 100644 --- a/docs/html/reference/android/support/wearable/watchface/WatchFaceService.Engine.html +++ b/docs/html/reference/android/support/wearable/watchface/WatchFaceService.Engine.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -466,6 +466,11 @@ type="text/css"> <ul> + <li><h2>Annotations</h2> + <ul> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.TapType.html">WatchFaceService.TapType</a></li> + </ul> + </li> <li><h2>Classes</h2> @@ -620,7 +625,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -831,6 +836,29 @@ Summary: final + int</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.Engine.html#getNotificationCount()">getNotificationCount</a></span>()</nobr> + + <div class="jd-descrdiv"> + Returns the total number of notification cards in the stream. + + + + </div> + + </td></tr> + + + + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + + + final + + Rect</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> @@ -847,7 +875,7 @@ Summary: - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -870,7 +898,7 @@ Summary: - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -893,7 +921,7 @@ Summary: - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -916,7 +944,7 @@ Summary: - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -932,7 +960,7 @@ Summary: - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -948,7 +976,7 @@ Summary: - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -964,7 +992,7 @@ Summary: - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -987,6 +1015,29 @@ Summary: + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + + void</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onNotificationCountChanged(int)">onNotificationCountChanged</a></span>(int count)</nobr> + + <div class="jd-descrdiv"> + Called when the total number of notification cards in the stream has changed. + + + + </div> + + </td></tr> + + + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1043,6 +1094,29 @@ Summary: void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onTapCommand(int, int, int, long)">onTapCommand</a></span>(int tapType, int x, int y, long eventTime)</nobr> + + <div class="jd-descrdiv"> + Called when a tap or touch related event occurs. + + + + </div> + + </td></tr> + + + + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + + void</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onTimeTick()">onTimeTick</a></span>()</nobr> <div class="jd-descrdiv"> @@ -1056,7 +1130,7 @@ Summary: - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1079,7 +1153,7 @@ Summary: - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1102,7 +1176,7 @@ Summary: - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1805,6 +1879,39 @@ From class </div> +<A NAME="getNotificationCount()"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + + final + + + int + </span> + <span class="sympad">getNotificationCount</span> + <span class="normal">()</span> + </h4> + <div class="api-level"> + <div></div> + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p>Returns the total number of notification cards in the stream. +</p></div> + + </div> +</div> + + <A NAME="getPeekCardPosition()"></A> <div class="jd-details api apilevel-"> @@ -2075,6 +2182,48 @@ From class </div> +<A NAME="onNotificationCountChanged(int)"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + + + + + void + </span> + <span class="sympad">onNotificationCountChanged</span> + <span class="normal">(int count)</span> + </h4> + <div class="api-level"> + <div></div> + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p>Called when the total number of notification cards in the stream has changed.</p></div> + <div class="jd-tagdata"> + <h5 class="jd-tagtitle">Parameters</h5> + <table class="jd-tagtable"> + <tr> + <th>count</td> + <td>total number of the notification cards in the stream +</td> + </tr> + </table> + </div> + + </div> +</div> + + <A NAME="onPeekCardPositionUpdate(android.graphics.Rect)"></A> <div class="jd-details api apilevel-"> @@ -2154,6 +2303,60 @@ From class </div> +<A NAME="onTapCommand(int, int, int, long)"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + + + + + void + </span> + <span class="sympad">onTapCommand</span> + <span class="normal">(int tapType, int x, int y, long eventTime)</span> + </h4> + <div class="api-level"> + <div></div> + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p>Called when a tap or touch related event occurs.</p></div> + <div class="jd-tagdata"> + <h5 class="jd-tagtitle">Parameters</h5> + <table class="jd-tagtable"> + <tr> + <th>tapType</td> + <td>Value representing the event sent to the wallpaper.</td> + </tr> + <tr> + <th>x</td> + <td>X coordinate of the event.</td> + </tr> + <tr> + <th>y</td> + <td>Y coordinate of the event.</td> + </tr> + <tr> + <th>eventTime</td> + <td>The time, in millis, of the event. +</td> + </tr> + </table> + </div> + + </div> +</div> + + <A NAME="onTimeTick()"></A> <div class="jd-details api apilevel-"> @@ -2369,6 +2572,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/watchface/WatchFaceService.html b/docs/html/reference/android/support/wearable/watchface/WatchFaceService.html index f566e7e68051..40cf0a3ac51f 100644 --- a/docs/html/reference/android/support/wearable/watchface/WatchFaceService.html +++ b/docs/html/reference/android/support/wearable/watchface/WatchFaceService.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -466,6 +466,11 @@ type="text/css"> <ul> + <li><h2>Annotations</h2> + <ul> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.TapType.html">WatchFaceService.TapType</a></li> + </ul> + </li> <li><h2>Classes</h2> @@ -684,7 +689,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -922,6 +927,23 @@ Summary: </tr> + <tr class=" api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + @interface</nobr></td> + <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.TapType.html">WatchFaceService.TapType</a></td> + <td class="jd-descrcol" width="100%"> + + + + + </td> + </tr> + + @@ -1005,6 +1027,44 @@ Summary: </tr> + <tr class=" api apilevel-" > + <td class="jd-typecol">int</td> + <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.html#TAP_TYPE_TAP">TAP_TYPE_TAP</a></td> + <td class="jd-descrcol" width="100%"> + Used in onTapCommaned to indicate that an "up" event on the watch face has occurred that + has not been consumed by another activity. + + + + </td> + </tr> + + + <tr class="alt-color api apilevel-" > + <td class="jd-typecol">int</td> + <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.html#TAP_TYPE_TOUCH">TAP_TYPE_TOUCH</a></td> + <td class="jd-descrcol" width="100%"> + Used in onTapCommand to indicate a "down" touch event on the watch face. + + + + </td> + </tr> + + + <tr class=" api apilevel-" > + <td class="jd-typecol">int</td> + <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.html#TAP_TYPE_TOUCH_CANCEL">TAP_TYPE_TOUCH_CANCEL</a></td> + <td class="jd-descrcol" width="100%"> + Used in onTapCaommand to indicate that a previous TAP_TYPE_TOUCH touch event has been + canceled. + + + + </td> + </tr> + + </table> @@ -6330,6 +6390,136 @@ From interface +<A NAME="TAP_TYPE_TAP"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + static + final + int + </span> + TAP_TYPE_TAP + </h4> + <div class="api-level"> + + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p>Used in onTapCommaned to indicate that an "up" event on the watch face has occurred that + has not been consumed by another activity. A TAP_TYPE_TOUCH will always occur first. This + event will not occur if a TAP_TYPE_TOUCH_CANCEL is sent. +</p></div> + + + <div class="jd-tagdata"> + <span class="jd-tagtitle">Constant Value: </span> + <span> + + 2 + (0x00000002) + + </span> + </div> + + </div> +</div> + + + +<A NAME="TAP_TYPE_TOUCH"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + static + final + int + </span> + TAP_TYPE_TOUCH + </h4> + <div class="api-level"> + + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p>Used in onTapCommand to indicate a "down" touch event on the watch face. +</p></div> + + + <div class="jd-tagdata"> + <span class="jd-tagtitle">Constant Value: </span> + <span> + + 0 + (0x00000000) + + </span> + </div> + + </div> +</div> + + + +<A NAME="TAP_TYPE_TOUCH_CANCEL"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + static + final + int + </span> + TAP_TYPE_TOUCH_CANCEL + </h4> + <div class="api-level"> + + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p>Used in onTapCaommand to indicate that a previous TAP_TYPE_TOUCH touch event has been + canceled. This generally happens when the watch face is touched but then a move or long + press occurs. +</p></div> + + + <div class="jd-tagdata"> + <span class="jd-tagtitle">Constant Value: </span> + <span> + + 1 + (0x00000001) + + </span> + </div> + + </div> +</div> + + + <!-- Fields --> @@ -6484,6 +6674,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/watchface/WatchFaceStyle.Builder.html b/docs/html/reference/android/support/wearable/watchface/WatchFaceStyle.Builder.html index 956e3a8311cc..a5401e584654 100644 --- a/docs/html/reference/android/support/wearable/watchface/WatchFaceStyle.Builder.html +++ b/docs/html/reference/android/support/wearable/watchface/WatchFaceStyle.Builder.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -466,6 +466,11 @@ type="text/css"> <ul> + <li><h2>Annotations</h2> + <ul> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.TapType.html">WatchFaceService.TapType</a></li> + </ul> + </li> <li><h2>Classes</h2> @@ -609,7 +614,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -758,6 +763,29 @@ Summary: <a href="../../../../../reference/android/support/wearable/watchface/WatchFaceStyle.Builder.html">WatchFaceStyle.Builder</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceStyle.Builder.html#setAcceptsTapEvents(boolean)">setAcceptsTapEvents</a></span>(boolean acceptsTapEvents)</nobr> + + <div class="jd-descrdiv"> + Sets whether this watchface accepts tap events. + + + + </div> + + </td></tr> + + + + <tr class="alt-color api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + + <a href="../../../../../reference/android/support/wearable/watchface/WatchFaceStyle.Builder.html">WatchFaceStyle.Builder</a></nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceStyle.Builder.html#setAmbientPeekMode(int)">setAmbientPeekMode</a></span>(int ambientPeekMode)</nobr> <div class="jd-descrdiv"> @@ -772,7 +800,7 @@ Summary: - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -795,7 +823,7 @@ Summary: - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -818,7 +846,7 @@ Summary: - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -841,7 +869,7 @@ Summary: - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -864,7 +892,7 @@ Summary: - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -887,7 +915,7 @@ Summary: - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -910,7 +938,7 @@ Summary: - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -933,7 +961,7 @@ Summary: - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -959,7 +987,7 @@ Summary: - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1312,6 +1340,53 @@ From class </div> +<A NAME="setAcceptsTapEvents(boolean)"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + + + + + <a href="../../../../../reference/android/support/wearable/watchface/WatchFaceStyle.Builder.html">WatchFaceStyle.Builder</a> + </span> + <span class="sympad">setAcceptsTapEvents</span> + <span class="normal">(boolean acceptsTapEvents)</span> + </h4> + <div class="api-level"> + <div></div> + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p>Sets whether this watchface accepts tap events. The default is false. + <p> + Watchfaces that set this <code>true</code> are indicating they are prepared to receive + <code><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.html#TAP_TYPE_TOUCH">TAP_TYPE_TOUCH</a></code>, + <code><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.html#TAP_TYPE_TOUCH_CANCEL">TAP_TYPE_TOUCH_CANCEL</a></code>, + and <code><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.html#TAP_TYPE_TAP">TAP_TYPE_TAP</a></code></p></div> + <div class="jd-tagdata"> + <h5 class="jd-tagtitle">Parameters</h5> + <table class="jd-tagtable"> + <tr> + <th>acceptsTapEvents</td> + <td>whether to receive touch events. +</td> + </tr> + </table> + </div> + + </div> +</div> + + <A NAME="setAmbientPeekMode(int)"></A> <div class="jd-details api apilevel-"> @@ -1825,6 +1900,7 @@ From class <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/watchface/WatchFaceStyle.html b/docs/html/reference/android/support/wearable/watchface/WatchFaceStyle.html index e08608f7b45e..70c3851ce965 100644 --- a/docs/html/reference/android/support/wearable/watchface/WatchFaceStyle.html +++ b/docs/html/reference/android/support/wearable/watchface/WatchFaceStyle.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -466,6 +466,11 @@ type="text/css"> <ul> + <li><h2>Annotations</h2> + <ul> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.TapType.html">WatchFaceService.TapType</a></li> + </ul> + </li> <li><h2>Classes</h2> @@ -632,7 +637,7 @@ Summary: <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> @@ -1022,6 +1027,29 @@ android.os.Parcelable + boolean</nobr> + </td> + <td class="jd-linkcol" width="100%"><nobr> + <span class="sympad"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceStyle.html#getAcceptsTapEvents()">getAcceptsTapEvents</a></span>()</nobr> + + <div class="jd-descrdiv"> + Whether the watchface accepts tap events. + + + + </div> + + </td></tr> + + + + <tr class=" api apilevel-" > + <td class="jd-typecol"><nobr> + + + + + int</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> @@ -1039,7 +1067,7 @@ android.os.Parcelable - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1062,7 +1090,7 @@ android.os.Parcelable - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1085,7 +1113,7 @@ android.os.Parcelable - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1108,7 +1136,7 @@ android.os.Parcelable - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1131,7 +1159,7 @@ android.os.Parcelable - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1154,7 +1182,7 @@ android.os.Parcelable - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1177,7 +1205,7 @@ android.os.Parcelable - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1200,7 +1228,7 @@ android.os.Parcelable - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1223,7 +1251,7 @@ android.os.Parcelable - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1247,7 +1275,7 @@ android.os.Parcelable - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1263,7 +1291,7 @@ android.os.Parcelable - <tr class=" api apilevel-" > + <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> @@ -1279,7 +1307,7 @@ android.os.Parcelable - <tr class="alt-color api apilevel-" > + <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> @@ -1706,7 +1734,8 @@ From interface <div class="jd-tagdata jd-tagdescr"><p>When this background visibility is selected, the background of the peek card should only be - shown briefly, and only if the peek card represents an interruptive notification. + shown briefly, and only if the peek card represents an interruptive notification. This is the + default mode. </p></div> @@ -1749,7 +1778,7 @@ From interface <div class="jd-tagdata jd-tagdescr"><p>When this background visibility is selected, the background of the peek card should always - be shown. This is the default mode. + be shown. Note that this will obscure your watch face whenever there is a peek card showing. </p></div> @@ -2191,6 +2220,39 @@ From interface </div> +<A NAME="getAcceptsTapEvents()"></A> + +<div class="jd-details api apilevel-"> + <h4 class="jd-details-title"> + <span class="normal"> + public + + + + + boolean + </span> + <span class="sympad">getAcceptsTapEvents</span> + <span class="normal">()</span> + </h4> + <div class="api-level"> + <div></div> + + + + </div> + <div class="jd-details-descr"> + + + + + <div class="jd-tagdata jd-tagdescr"><p>Whether the watchface accepts tap events. The default is false. +</p></div> + + </div> +</div> + + <A NAME="getAmbientPeekMode()"></A> <div class="jd-details api apilevel-"> @@ -2705,6 +2767,7 @@ From interface <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/reference/android/support/wearable/watchface/package-summary.html b/docs/html/reference/android/support/wearable/watchface/package-summary.html index 6853fc410cfe..a654b13276b8 100644 --- a/docs/html/reference/android/support/wearable/watchface/package-summary.html +++ b/docs/html/reference/android/support/wearable/watchface/package-summary.html @@ -128,7 +128,7 @@ type="text/css"> var metaTags = []; var devsite = false; </script> -<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> +<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script> @@ -467,6 +467,11 @@ type="text/css"> <ul> + <li><h2>Annotations</h2> + <ul> + <li class="api apilevel-"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.TapType.html">WatchFaceService.TapType</a></li> + </ul> + </li> <li><h2>Classes</h2> @@ -548,7 +553,7 @@ type="text/css"> <div id="naMessage"></div> -<div id="jd-content" class="api apilevel-"><p style="border:2px solid #99ccff;padding:12px;margin-top:20px"><strong>Note:</strong> The Wearable Support Library classes under the <code>android.support.wearable</code> package are subject to change. For the full Android API reference, see <a href="/reference/">Reference</a>.</p> +<div id="jd-content" class="api apilevel-"> @@ -556,6 +561,27 @@ type="text/css"> + <h2>Annotations</h2> + <div class="jd-sumtable"> + + + <table class="jd-sumtable-expando"> + + <tr class="alt-color api apilevel-" > + <td class="jd-linkcol"><a href="../../../../../reference/android/support/wearable/watchface/WatchFaceService.TapType.html">WatchFaceService.TapType</a></td> + <td class="jd-descrcol" width="100%"> + + + + + </td> + </tr> + + + </table> + + </div> + @@ -726,6 +752,7 @@ type="text/css"> <option value="es">Español</option> <option value="ja">日本語</option> <option value="ko">한국어</option> + <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> diff --git a/docs/html/tools/help/adb.jd b/docs/html/tools/help/adb.jd index 641d463baca7..2faff4f3fe5c 100644 --- a/docs/html/tools/help/adb.jd +++ b/docs/html/tools/help/adb.jd @@ -420,62 +420,54 @@ Wi-Fi, as described here. <ol> <li> -Connect Android device and adb host computer +<p>Connect your Android device and adb host computer to a common Wi-Fi network accessible to both. We have found that not all access points are suitable; you may need to use an access point -whose firewall is configured properly to support adb. -</li> +whose firewall is configured properly to support adb.</p> -<li> -Connect the device with USB cable to host. +<p class="note"><strong>Note: </strong>If you are attempting to connect +to a Wear device, force it to connect to Wi-Fi by shutting off Bluetooth +on the phone connected to it.</p> </li> <li> -Make sure adb is running in USB mode on host. -<pre> -$ adb usb -restarting in USB mode -</pre> +Connect the device to the host computer with a USB cable. </li> <li> -Connect to the device over USB. -<pre> -$ adb devices -List of devices attached -######## device +Set the target device to listen for a TCP/IP connection on port 5555. +<pre class="no-pretty-print"> +$ adb tcpip 5555 </pre> </li> <li> -Restart host adb in tcpip mode. -<pre> -$ adb tcpip 5555 -restarting in TCP mode port: 5555 -</pre> +Disconnect the USB cable from the target device. </li> <li> -Find out the IP address of the Android device: -Settings -> About tablet -> Status -> IP address. -Remember the IP address, of the form <code>#.#.#.#</code>. +Find the IP address of the Android device. For example, on a Nexus device, you can find +the IP address at <strong>Settings</strong> > <strong>About tablet</strong> +(or <strong>About phone</strong>) > <strong>Status</strong> > <strong>IP address</strong>. Or, +on an Android Wear device, you can find the IP address at <strong>Settings</strong> > +<strong>Wi-Fi Settings</strong> > <strong>Advanced</strong> > <strong>IP address</strong>. </li> <li> -Connect adb host to device: -<pre> -$ adb connect #.#.#.# -connected to #.#.#.#:5555 +Connect to the device, identifying it by IP address. +<pre class="no-pretty-print"> +$ adb connect <device-ip-address> </pre> </li> + <li> -Remove USB cable from device, and confirm you can still access device: -<pre> +Confirm that your host computer is connected to the target device: +<pre class="no-pretty-print"> $ adb devices List of devices attached -#.#.#.#:5555 device +<device-ip-address>:5555 device </pre> </ol> @@ -500,10 +492,10 @@ Reconnect by executing the "adb connect" step again. <li> Or if that doesn't work, reset your adb host: -<pre> +<pre class="no-pretty-print"> adb kill-server </pre> and then start over from the beginning. </li> -</ol>
\ No newline at end of file +</ol> diff --git a/docs/html/training/training_toc.cs b/docs/html/training/training_toc.cs index 527996988a0c..7cffdd8f036d 100644 --- a/docs/html/training/training_toc.cs +++ b/docs/html/training/training_toc.cs @@ -989,6 +989,9 @@ include the action bar on devices running Android 2.1 or higher." <a href="<?cs var:toroot ?>training/wearables/watch-faces/information.html">Showing Information in Watch Faces</a> </li> <li> + <a href="<?cs var:toroot ?>training/wearables/watch-faces/interacting.html">Creating Interactive Watch Faces</a> + </li> + <li> <a href="<?cs var:toroot ?>training/wearables/watch-faces/configuration.html">Providing Configuration Activities</a> </li> <li> diff --git a/docs/html/training/wearables/watch-faces/index.jd b/docs/html/training/wearables/watch-faces/index.jd index ec428c139a9c..b54463684033 100644 --- a/docs/html/training/wearables/watch-faces/index.jd +++ b/docs/html/training/wearables/watch-faces/index.jd @@ -65,6 +65,9 @@ Drawing Watch Faces</a></dt> <dt><a href="{@docRoot}training/wearables/watch-faces/information.html"> Showing Information in Watch Faces</a></dt> <dd>Learn how to incorporate contextual information into your watch face.</dd> +<dt><a href="{@docRoot}training/wearables/watch-faces/interacting.html"> +Making Your Watch Face Interactive </a></dt> +<dd>Learn how to enable the user to interact with your watch face.</dd> <dt><a href="{@docRoot}training/wearables/watch-faces/configuration.html"> Providing Configuration Activities</a></dt> <dd>Learn how to create watch faces with configurable parameters.</dd> diff --git a/docs/html/training/wearables/watch-faces/interacting.jd b/docs/html/training/wearables/watch-faces/interacting.jd new file mode 100644 index 000000000000..4f2486cf416f --- /dev/null +++ b/docs/html/training/wearables/watch-faces/interacting.jd @@ -0,0 +1,133 @@ +page.title=Creating Interactive Watch Faces + +@jd:body + +<div id="tb-wrapper"> +<div id="tb"> +<h2>This lesson teaches you to</h2> +<ol> + <li><a href="#Construct">Construct an Interactive Watch Face</a></li> + <li><a href="#Handle">Handle Gestures</a></li> +</ol> +<h2>You should also read</h2> +<ul> + <li><a href="{@docRoot}design/wear/watchfaces.html">Watch Faces for Android Wear</a></li> +</ul> +<h2>Related Samples</h2> + <ul> + <li><a href="{@docRoot}samples/WatchFace/index.html">WatchFace</a></li> + </ul> +</div> +</div> + +<p>Your watch's display is more than just a pretty face: Users can interact with it. +For example, a user might tap the watch face to learn what song is currently playing, or +to see the day's agenda. Android Wear allows Android Wear watch faces to accept +the single-tap gesture at a given location on the watch face, as long as there's not another +UI element that also responds to that gesture. + +<p>This lesson teaches you how to implement an interactive watch face by first constructing the +watch face style, and then implementing gesture handling.</p> + +<p class="note"><strong>Note:</strong> Before beginning development work on your interactive watch +face, you should be sure to read the <a href="{@docRoot}design/wear/watchfaces.html">Watch Faces for +Android Wear</a> design guide. + +<h2 id="Construct">Handling Tap Events</h2> + +<p>When constructing an interactive watch-face style, the first thing the app must do is tell the +system that the watch face receives <a href="{@docRoot}design/wear/watchfaces.html#ag">tap events</a>. +The following example shows how to do this: + +<pre> +setWatchFaceStyle(new WatchFaceStyle.Builder(mService) + .setAcceptsTapEvents(true) + // other style customizations + .build()); +</pre> + +<p>When the system detects a tap on the watch face, it triggers the +<a href="{@docRoot}reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onTapCommand(int, int, int, long)"> +{@code WatchFaceService.Engine.onTapCommand()}</a> method. Override this method in your +implementation of +<a href="{@docRoot}reference/android/support/wearable/watchface/WatchFaceService.Engine.html"> +{@code WatchFaceService.Engine}</a>to initiate the action you wish to perform, such +as showing a detailed step count or changing the theme of the watch face. The code snippet +in <a href="#Handle">Handle Gestures</a> shows an example of such an +implementation.</p> + +<h2 id="Handle">Handle Gestures</h2> + +<p> To provide a consistent user experience, the system +reserves gestures such as drag and long-press for system UI elements. +Therefore, the system does not send raw touch events to the watch face. Instead, the system forwards specific commands to the +<a href="{@docRoot}reference/android/support/wearable/watchface/WatchFaceService.Engine.html#onTapCommand(int, int, int, long)"> +method. + +<p>The system sends the first command, +<a href="{@docRoot}reference/android/support/wearable/watchface/WatchFaceService.html#TAP_TYPE_TOUCH"</a> +{@code TAP_TYPE_TOUCH}</a>, when the user initially touches the +screen. This event lets you provide visual feedback to the user on touch. Your app should not +launch a UI when this event triggers. Launching a UI prevents drag events from opening the app +launcher, settings shade, and notifications stream.</p> + +<p>Before sending the next command, the system judges whether the contact is a single tap, which is +<a href="{@docRoot}design/wear/watchfaces.html#ag">the only gesture allowed</a>. If the user +immediately lifts their finger, the system determines that a single tap took place, and forwards +a +<a href="{@docRoot}reference/android/support/wearable/watchface/WatchFaceService.html#TAP_TYPE_TAP"</a> +{@code TAP_TYPE_TAP}</a> event. If the user does not immediately lift their finger, the system +forwards a +<a href="{@docRoot}reference/android/support/wearable/watchface/WatchFaceService.html#TAP_TYPE_TOUCH_CANCEL"</a> +{@code TAP_TYPE_TOUCH_CANCEL}</a> event. Once the user has triggered a +<a href="{@docRoot}reference/android/support/wearable/watchface/WatchFaceService.html#TAP_TYPE_TOUCH_CANCEL"</a> +{@code TAP_TYPE_TOUCH_CANCEL}</a> event, they cannot trigger a +<a href="{@docRoot}reference/android/support/wearable/watchface/WatchFaceService.html#TAP_TYPE_TAP"</a> +{@code TAP_TYPE_TAP}</a> event until they +make a new contact with the screen.</p> + +<p>The following example shows you how to implement tap events on a watch face:</p> + + +<pre> +@Override +public void onTapCommand( + @TapType int tapType, int x, int y, long eventTime) { + switch (tapType) { + case WatchFaceService.TAP_TYPE_TAP: + hideTapHighlight(); + if (withinTapRegion(x, y)) { + // Implement the tap action + // (e.g. show detailed step count) + onWatchFaceTap(); + } + break; + + case WatchFaceService.TAP_TYPE_TOUCH: + if (withinTapRegion(x, y)) { + // Provide visual feedback of touch event + startTapHighlight(x, y, eventTime); + } + break; + + case WatchFaceService.TAP_TYPE_TOUCH_CANCEL: + hideTapHighlight(); + break; + + default: + super.onTapCommand(tapType, x, y, eventTime); + break; + } +} +</pre> + +<p>In this example, the app determines what kind of event has taken place, +and responds accordingly. If the event is initial contact by the user's finger, +the app displays visual feedback. If the event is an immediate lifting +of the finger after contact, it performs the action on which the +user tapped. If the event is prolonged contact by the finger, the app +does nothing.</p> + + + + diff --git a/libs/hwui/AmbientShadow.cpp b/libs/hwui/AmbientShadow.cpp index 751531e1b57d..20ecda28b22a 100644 --- a/libs/hwui/AmbientShadow.cpp +++ b/libs/hwui/AmbientShadow.cpp @@ -52,14 +52,14 @@ // If this is set to negative value, then all the edge will be tessellated. #define ALPHA_THRESHOLD (0.1f / 255.0f) -#include <math.h> -#include <utils/Log.h> - #include "AmbientShadow.h" + #include "ShadowTessellator.h" #include "Vertex.h" #include "VertexBuffer.h" -#include "utils/MathUtils.h" + +#include <algorithm> +#include <utils/Log.h> namespace android { namespace uirenderer { @@ -78,7 +78,7 @@ inline Vector2 getNormalFromVertices(const Vector3* vertices, int current, int n // The input z value will be converted to be non-negative inside. // The output must be ranged from 0 to 1. inline float getAlphaFromFactoredZ(float factoredZ) { - return 1.0 / (1 + MathUtils::max(factoredZ, 0.0f)); + return 1.0 / (1 + std::max(factoredZ, 0.0f)); } // The shader is using gaussian function e^-(1-x)*(1-x)*4, therefore, we transform diff --git a/libs/hwui/Canvas.h b/libs/hwui/Canvas.h index 3c77b3d1cac9..4bd4ac8d4c37 100644 --- a/libs/hwui/Canvas.h +++ b/libs/hwui/Canvas.h @@ -85,10 +85,6 @@ public: virtual void getMatrix(SkMatrix* outMatrix) const = 0; virtual void setMatrix(const SkMatrix& matrix) = 0; - /// Like setMatrix(), but to be translated into local / view-relative coordinates - /// rather than executed in global / device coordinates at rendering time. - virtual void setLocalMatrix(const SkMatrix& matrix) = 0; - virtual void concat(const SkMatrix& matrix) = 0; virtual void rotate(float degrees) = 0; virtual void scale(float sx, float sy) = 0; diff --git a/libs/hwui/CanvasState.cpp b/libs/hwui/CanvasState.cpp index e22b0d3084ab..54fb5f233fce 100644 --- a/libs/hwui/CanvasState.cpp +++ b/libs/hwui/CanvasState.cpp @@ -138,7 +138,7 @@ void CanvasState::setMatrix(const SkMatrix& matrix) { } void CanvasState::setMatrix(const Matrix4& matrix) { - mSnapshot->transform->load(matrix); + *(mSnapshot->transform) = matrix; } void CanvasState::concatMatrix(const SkMatrix& matrix) { diff --git a/libs/hwui/DisplayListCanvas.cpp b/libs/hwui/DisplayListCanvas.cpp index 61c5883cfbfb..bb149fe09d69 100644 --- a/libs/hwui/DisplayListCanvas.cpp +++ b/libs/hwui/DisplayListCanvas.cpp @@ -168,11 +168,6 @@ void DisplayListCanvas::setMatrix(const SkMatrix& matrix) { mState.setMatrix(matrix); } -void DisplayListCanvas::setLocalMatrix(const SkMatrix& matrix) { - addStateOp(new (alloc()) SetLocalMatrixOp(matrix)); - mState.setMatrix(matrix); -} - void DisplayListCanvas::concat(const SkMatrix& matrix) { addStateOp(new (alloc()) ConcatMatrixOp(matrix)); mState.concatMatrix(matrix); diff --git a/libs/hwui/DisplayListCanvas.h b/libs/hwui/DisplayListCanvas.h index 3b619046612f..f29e835c4858 100644 --- a/libs/hwui/DisplayListCanvas.h +++ b/libs/hwui/DisplayListCanvas.h @@ -143,7 +143,6 @@ public: // Matrix virtual void getMatrix(SkMatrix* outMatrix) const override { mState.getMatrix(outMatrix); } virtual void setMatrix(const SkMatrix& matrix) override; - virtual void setLocalMatrix(const SkMatrix& matrix) override; virtual void concat(const SkMatrix& matrix) override; virtual void rotate(float degrees) override; diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h index 8ff58d4f64f5..8bb892f8e9d4 100644 --- a/libs/hwui/DisplayListOp.h +++ b/libs/hwui/DisplayListOp.h @@ -472,7 +472,9 @@ public: : mMatrix(matrix) {} virtual void applyState(OpenGLRenderer& renderer, int saveCount) const override { - renderer.setMatrix(mMatrix); + // Setting a matrix on a Canvas isn't equivalent to setting a total matrix on the scene. + // Set a canvas-relative matrix on the renderer instead. + renderer.setLocalMatrix(mMatrix); } virtual void output(int level, uint32_t logFlags) const override { @@ -489,25 +491,6 @@ private: const SkMatrix mMatrix; }; -class SetLocalMatrixOp : public StateOp { -public: - SetLocalMatrixOp(const SkMatrix& matrix) - : mMatrix(matrix) {} - - virtual void applyState(OpenGLRenderer& renderer, int saveCount) const override { - renderer.setLocalMatrix(mMatrix); - } - - virtual void output(int level, uint32_t logFlags) const override { - OP_LOG("SetLocalMatrix " SK_MATRIX_STRING, SK_MATRIX_ARGS(&mMatrix)); - } - - virtual const char* name() override { return "SetLocalMatrix"; } - -private: - const SkMatrix mMatrix; -}; - class ConcatMatrixOp : public StateOp { public: ConcatMatrixOp(const SkMatrix& matrix) diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp index 057c231012a4..75c3ead68f7b 100644 --- a/libs/hwui/FontRenderer.cpp +++ b/libs/hwui/FontRenderer.cpp @@ -26,14 +26,12 @@ #include "Rect.h" #include "renderstate/RenderState.h" #include "utils/Blur.h" -#include "utils/MathUtils.h" #include "utils/Timing.h" +#include <algorithm> +#include <cutils/properties.h> #include <SkGlyph.h> #include <SkUtils.h> - -#include <cutils/properties.h> - #include <utils/Log.h> #ifdef ANDROID_ENABLE_RENDERSCRIPT @@ -118,10 +116,10 @@ FontRenderer::FontRenderer() uint32_t maxTextureSize = (uint32_t) Caches::getInstance().maxTextureSize; - mSmallCacheWidth = MathUtils::min(mSmallCacheWidth, maxTextureSize); - mSmallCacheHeight = MathUtils::min(mSmallCacheHeight, maxTextureSize); - mLargeCacheWidth = MathUtils::min(mLargeCacheWidth, maxTextureSize); - mLargeCacheHeight = MathUtils::min(mLargeCacheHeight, maxTextureSize); + mSmallCacheWidth = std::min(mSmallCacheWidth, maxTextureSize); + mSmallCacheHeight = std::min(mSmallCacheHeight, maxTextureSize); + mLargeCacheWidth = std::min(mLargeCacheWidth, maxTextureSize); + mLargeCacheHeight = std::min(mLargeCacheHeight, maxTextureSize); if (sLogFontRendererCreate) { INIT_LOGD(" Text cache sizes, in pixels: %i x %i, %i x %i, %i x %i, %i x %i", diff --git a/libs/hwui/GlopBuilder.cpp b/libs/hwui/GlopBuilder.cpp index 288fed360162..c9e388021558 100644 --- a/libs/hwui/GlopBuilder.cpp +++ b/libs/hwui/GlopBuilder.cpp @@ -467,8 +467,8 @@ void GlopBuilder::setTransform(const Matrix4& ortho, const Matrix4& canvas, const int transformFlags) { TRIGGER_STAGE(kTransformStage); - mOutGlop->transform.ortho.load(ortho); - mOutGlop->transform.canvas.load(canvas); + mOutGlop->transform.ortho = ortho; + mOutGlop->transform.canvas = canvas; mOutGlop->transform.transformFlags = transformFlags; } @@ -615,7 +615,7 @@ void GlopBuilder::build() { shaderMatrix.loadInverse(mOutGlop->transform.canvas); shaderMatrix.multiply(mOutGlop->transform.modelView); } else { - shaderMatrix.load(mOutGlop->transform.modelView); + shaderMatrix = mOutGlop->transform.modelView; } SkiaShader::store(mCaches, *mShader, shaderMatrix, &textureUnit, &mDescription, &(mOutGlop->fill.skiaShaderData)); diff --git a/libs/hwui/Interpolator.cpp b/libs/hwui/Interpolator.cpp index e1b0fc3937c5..cc47f0052b73 100644 --- a/libs/hwui/Interpolator.cpp +++ b/libs/hwui/Interpolator.cpp @@ -16,11 +16,11 @@ #include "Interpolator.h" -#include <cmath> -#include <cutils/log.h> - #include "utils/MathUtils.h" +#include <algorithm> +#include <cutils/log.h> + namespace android { namespace uirenderer { @@ -106,7 +106,7 @@ float LUTInterpolator::interpolate(float input) { weight = modff(lutpos, &ipart); int i1 = (int) ipart; - int i2 = MathUtils::min(i1 + 1, (int) mSize - 1); + int i2 = std::min(i1 + 1, (int) mSize - 1); LOG_ALWAYS_FATAL_IF(i1 < 0 || i2 < 0, "negatives in interpolation!" " i1=%d, i2=%d, input=%f, lutpos=%f, size=%zu, values=%p, ipart=%f, weight=%f", diff --git a/libs/hwui/Matrix.cpp b/libs/hwui/Matrix.cpp index 115e23c848dc..73ebd1304750 100644 --- a/libs/hwui/Matrix.cpp +++ b/libs/hwui/Matrix.cpp @@ -152,10 +152,6 @@ void Matrix4::load(const float* v) { mType = kTypeUnknown; } -void Matrix4::load(const Matrix4& v) { - *this = v; -} - void Matrix4::load(const SkMatrix& v) { memset(data, 0, sizeof(data)); diff --git a/libs/hwui/Matrix.h b/libs/hwui/Matrix.h index ed54a25f3edf..ed517ac26295 100644 --- a/libs/hwui/Matrix.h +++ b/libs/hwui/Matrix.h @@ -114,7 +114,6 @@ public: void loadIdentity(); void load(const float* v); - void load(const Matrix4& v); void load(const SkMatrix& v); void loadInverse(const Matrix4& v); @@ -139,7 +138,7 @@ public: void multiply(const Matrix4& v) { Matrix4 u; u.loadMultiply(*this, v); - load(u); + *this = u; } void multiply(float v); diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 7a56d42b65e2..b35c0179193a 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -1141,7 +1141,7 @@ bool OpenGLRenderer::storeDisplayState(DeferredDisplayState& state, int stateDef // Transform and alpha always deferred, since they are used by state operations // (Note: saveLayer/restore use colorFilter and alpha, so we just save restore everything) - state.mMatrix.load(*currentMatrix); + state.mMatrix = *currentMatrix; state.mAlpha = currentSnapshot()->alpha; // always store/restore, since these are just pointers @@ -1151,7 +1151,7 @@ bool OpenGLRenderer::storeDisplayState(DeferredDisplayState& state, int stateDef } void OpenGLRenderer::restoreDisplayState(const DeferredDisplayState& state, bool skipClipRestore) { - setMatrix(state.mMatrix); + setGlobalMatrix(state.mMatrix); writableSnapshot()->alpha = state.mAlpha; writableSnapshot()->roundRectClipState = state.mRoundRectClipState; writableSnapshot()->projectionPathMask = state.mProjectionPathMask; @@ -2098,8 +2098,9 @@ void OpenGLRenderer::skew(float sx, float sy) { mState.skew(sx, sy); } -void OpenGLRenderer::setMatrix(const Matrix4& matrix) { - mState.setMatrix(matrix); +void OpenGLRenderer::setLocalMatrix(const Matrix4& matrix) { + mState.setMatrix(mBaseTransform); + mState.concatMatrix(matrix); } void OpenGLRenderer::setLocalMatrix(const SkMatrix& matrix) { diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h index 4f75482f06e5..45662a77cfdd 100755 --- a/libs/hwui/OpenGLRenderer.h +++ b/libs/hwui/OpenGLRenderer.h @@ -367,8 +367,10 @@ public: void restore(); void restoreToCount(int saveCount); - void getMatrix(SkMatrix* outMatrix) const { mState.getMatrix(outMatrix); } - void setMatrix(const SkMatrix& matrix) { mState.setMatrix(matrix); } + void setGlobalMatrix(const Matrix4& matrix) { + mState.setMatrix(matrix); + } + void setLocalMatrix(const Matrix4& matrix); void setLocalMatrix(const SkMatrix& matrix); void concatMatrix(const SkMatrix& matrix) { mState.concatMatrix(matrix); } diff --git a/libs/hwui/Patch.cpp b/libs/hwui/Patch.cpp index 500f9e95381c..b471e7850a99 100644 --- a/libs/hwui/Patch.cpp +++ b/libs/hwui/Patch.cpp @@ -14,16 +14,16 @@ * limitations under the License. */ -#include <cmath> - -#include <utils/Log.h> +#include "Patch.h" #include "Caches.h" -#include "Patch.h" #include "Properties.h" #include "UvMapper.h" #include "utils/MathUtils.h" +#include <algorithm> +#include <utils/Log.h> + namespace android { namespace uirenderer { @@ -189,10 +189,10 @@ void Patch::generateQuad(TextureVertex*& vertex, float x1, float y1, float x2, f const uint32_t oldQuadCount = quadCount; quadCount++; - x1 = MathUtils::max(x1, 0.0f); - x2 = MathUtils::max(x2, 0.0f); - y1 = MathUtils::max(y1, 0.0f); - y2 = MathUtils::max(y2, 0.0f); + x1 = std::max(x1, 0.0f); + x2 = std::max(x2, 0.0f); + y1 = std::max(y1, 0.0f); + y2 = std::max(y2, 0.0f); // Skip degenerate and transparent (empty) quads if ((mColors[oldQuadCount] == 0) || x1 >= x2 || y1 >= y2) { diff --git a/libs/hwui/PathTessellator.cpp b/libs/hwui/PathTessellator.cpp index 8fa187c1e530..b57b8f04d1de 100644 --- a/libs/hwui/PathTessellator.cpp +++ b/libs/hwui/PathTessellator.cpp @@ -32,6 +32,15 @@ #define DEBUG_DUMP_BUFFER() #endif +#include "PathTessellator.h" + +#include "Matrix.h" +#include "Vector.h" +#include "Vertex.h" +#include "utils/MathUtils.h" + +#include <algorithm> + #include <SkPath.h> #include <SkPaint.h> #include <SkPoint.h> @@ -44,12 +53,6 @@ #include <utils/Log.h> #include <utils/Trace.h> -#include "PathTessellator.h" -#include "Matrix.h" -#include "Vector.h" -#include "Vertex.h" -#include "utils/MathUtils.h" - namespace android { namespace uirenderer { @@ -152,7 +155,7 @@ public: // always use 2 points for hairline if (halfStrokeWidth == 0.0f) return 2; - float threshold = MathUtils::min(inverseScaleX, inverseScaleY) * ROUND_CAP_THRESH; + float threshold = std::min(inverseScaleX, inverseScaleY) * ROUND_CAP_THRESH; return MathUtils::divisionsNeededToApproximateArc(halfStrokeWidth, PI, threshold); } return 0; diff --git a/libs/hwui/PathTessellator.h b/libs/hwui/PathTessellator.h index b66e83252fb3..cddfb049212c 100644 --- a/libs/hwui/PathTessellator.h +++ b/libs/hwui/PathTessellator.h @@ -22,8 +22,12 @@ #include "Vertex.h" #include "VertexBuffer.h" +#include <algorithm> #include <vector> +class SkPath; +class SkPaint; + namespace android { namespace uirenderer { @@ -38,7 +42,7 @@ struct PathApproximationInfo { : thresholdSquared(pixelThreshold * pixelThreshold) , sqrInvScaleX(invScaleX * invScaleX) , sqrInvScaleY(invScaleY * invScaleY) - , thresholdForConicQuads(pixelThreshold * MathUtils::min(invScaleX, invScaleY) / 2.0f) { + , thresholdForConicQuads(pixelThreshold * std::min(invScaleX, invScaleY) / 2.0f) { }; const float thresholdSquared; diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index 48da3e8b380e..73c01075e842 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -532,7 +532,7 @@ void RenderNode::computeOrderingImpl( if (properties().getProjectBackwards()) { // composited projectee, flag for out of order draw, save matrix, and store in proj surface opState->mSkipInOrderDraw = true; - opState->mTransformFromCompositingAncestor.load(localTransformFromProjectionSurface); + opState->mTransformFromCompositingAncestor = localTransformFromProjectionSurface; compositedChildrenOfProjectionSurface->push_back(opState); } else { // standard in order draw @@ -719,7 +719,7 @@ void RenderNode::issueOperationsOf3dChildren(ChildrenSelectMode mode, // Apply the base transform of the parent of the 3d children. This isolates // 3d children of the current chunk from transformations made in previous chunks. int rootRestoreTo = renderer.save(SkCanvas::kMatrix_SaveFlag); - renderer.setMatrix(initialTransform); + renderer.setGlobalMatrix(initialTransform); /** * Draw shadows and (potential) casters mostly in order, but allow the shadows of casters diff --git a/libs/hwui/SkiaCanvas.cpp b/libs/hwui/SkiaCanvas.cpp index c122d9904ecc..36633b5205a1 100644 --- a/libs/hwui/SkiaCanvas.cpp +++ b/libs/hwui/SkiaCanvas.cpp @@ -74,7 +74,6 @@ public: virtual void getMatrix(SkMatrix* outMatrix) const override; virtual void setMatrix(const SkMatrix& matrix) override; - virtual void setLocalMatrix(const SkMatrix& matrix) override { this->setMatrix(matrix); } virtual void concat(const SkMatrix& matrix) override; virtual void rotate(float degrees) override; virtual void scale(float sx, float sy) override; @@ -702,7 +701,7 @@ void SkiaCanvas::drawText(const uint16_t* text, const float* positions, int coun SkPaint paintCopy(paint); paintCopy.setTextAlign(SkPaint::kLeft_Align); - SK_COMPILE_ASSERT(sizeof(SkPoint) == sizeof(float)*2, SkPoint_is_no_longer_2_floats); + static_assert(sizeof(SkPoint) == sizeof(float)*2, "SkPoint is no longer two floats"); mCanvas->drawPosText(text, count << 1, reinterpret_cast<const SkPoint*>(positions), paintCopy); } diff --git a/libs/hwui/SkiaCanvasProxy.cpp b/libs/hwui/SkiaCanvasProxy.cpp index 5e6d77474e5b..c3f5eb27e236 100644 --- a/libs/hwui/SkiaCanvasProxy.cpp +++ b/libs/hwui/SkiaCanvasProxy.cpp @@ -45,7 +45,7 @@ void SkiaCanvasProxy::onDrawPoints(PointMode pointMode, size_t count, const SkPo } // convert the SkPoints into floats - SK_COMPILE_ASSERT(sizeof(SkPoint) == sizeof(float)*2, SkPoint_is_no_longer_2_floats); + static_assert(sizeof(SkPoint) == sizeof(float)*2, "SkPoint is no longer two floats"); const size_t floatCount = count << 1; const float* floatArray = &pts[0].fX; @@ -142,7 +142,7 @@ void SkiaCanvasProxy::onDrawSprite(const SkBitmap& bitmap, int left, int top, const SkPaint* paint) { // TODO: if bitmap is a subset, do we need to add pixelRefOrigin to src? mCanvas->save(SkCanvas::kMatrixClip_SaveFlag); - mCanvas->setLocalMatrix(SkMatrix::I()); + mCanvas->setMatrix(SkMatrix::I()); mCanvas->drawBitmap(bitmap, left, top, paint); mCanvas->restore(); } @@ -154,7 +154,7 @@ void SkiaCanvasProxy::onDrawVertices(VertexMode mode, int vertexCount, const SkP return; } // convert the SkPoints into floats - SK_COMPILE_ASSERT(sizeof(SkPoint) == sizeof(float)*2, SkPoint_is_no_longer_2_floats); + static_assert(sizeof(SkPoint) == sizeof(float)*2, "SkPoint is no longer two floats"); const int floatCount = vertexCount << 1; const float* vArray = &vertices[0].fX; const float* tArray = (texs) ? &texs[0].fX : NULL; @@ -192,9 +192,7 @@ void SkiaCanvasProxy::didConcat(const SkMatrix& matrix) { } void SkiaCanvasProxy::didSetMatrix(const SkMatrix& matrix) { - // SkCanvas setMatrix() is relative to the Canvas origin, but OpenGLRenderer's - // setMatrix() is relative to device origin; call setLocalMatrix() instead. - mCanvas->setLocalMatrix(matrix); + mCanvas->setMatrix(matrix); } void SkiaCanvasProxy::onDrawDRRect(const SkRRect& outer, const SkRRect& inner, @@ -286,7 +284,7 @@ void SkiaCanvasProxy::onDrawText(const void* text, size_t byteLength, SkScalar x } } - SK_COMPILE_ASSERT(sizeof(SkPoint) == sizeof(float)*2, SkPoint_is_no_longer_2_floats); + static_assert(sizeof(SkPoint) == sizeof(float)*2, "SkPoint is no longer two floats"); mCanvas->drawText(glyphs.glyphIDs, &pointStorage[0].fX, glyphs.count, glyphs.paint, x, y, bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom, 0); } @@ -322,7 +320,7 @@ void SkiaCanvasProxy::onDrawPosText(const void* text, size_t byteLength, const S glyphs.paint.measureText(glyphs.glyphIDs, glyphs.count << 1, &bounds); bounds.offset(x, y); - SK_COMPILE_ASSERT(sizeof(SkPoint) == sizeof(float)*2, SkPoint_is_no_longer_2_floats); + static_assert(sizeof(SkPoint) == sizeof(float)*2, "SkPoint is no longer two floats"); mCanvas->drawText(glyphs.glyphIDs, &posArray[0].fX, glyphs.count, glyphs.paint, x, y, bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom, 0); } diff --git a/libs/hwui/Snapshot.cpp b/libs/hwui/Snapshot.cpp index fd077d9c8388..ca19a423e5c8 100644 --- a/libs/hwui/Snapshot.cpp +++ b/libs/hwui/Snapshot.cpp @@ -58,7 +58,7 @@ Snapshot::Snapshot(const sp<Snapshot>& s, int saveFlags) , mViewportData(s->mViewportData) , mRelativeLightCenter(s->mRelativeLightCenter) { if (saveFlags & SkCanvas::kMatrix_SaveFlag) { - mTransformRoot.load(*s->transform); + mTransformRoot = *s->transform; transform = &mTransformRoot; } else { transform = s->transform; @@ -190,8 +190,7 @@ void Snapshot::setClippingRoundRect(LinearAllocator& allocator, const Rect& boun state->highPriority = highPriority; // store the inverse drawing matrix - Matrix4 roundRectDrawingMatrix; - roundRectDrawingMatrix.load(getOrthoMatrix()); + Matrix4 roundRectDrawingMatrix = getOrthoMatrix(); roundRectDrawingMatrix.multiply(*transform); state->matrix.loadInverse(roundRectDrawingMatrix); diff --git a/libs/hwui/SpotShadow.cpp b/libs/hwui/SpotShadow.cpp index eaf03036b568..9b0a1aadf0bf 100644 --- a/libs/hwui/SpotShadow.cpp +++ b/libs/hwui/SpotShadow.cpp @@ -46,17 +46,18 @@ #define TRANSFORMED_PENUMBRA_ALPHA 1.0f #define TRANSFORMED_UMBRA_ALPHA 0.0f -#include <algorithm> -#include <math.h> -#include <stdlib.h> -#include <utils/Log.h> +#include "SpotShadow.h" #include "ShadowTessellator.h" -#include "SpotShadow.h" #include "Vertex.h" #include "VertexBuffer.h" #include "utils/MathUtils.h" +#include <algorithm> +#include <math.h> +#include <stdlib.h> +#include <utils/Log.h> + // TODO: After we settle down the new algorithm, we can remove the old one and // its utility functions. // Right now, we still need to keep it for comparison purpose and future expansion. @@ -543,7 +544,7 @@ void SpotShadow::createSpotShadow(bool isCasterOpaque, const Vector3& lightCente } float ratioVI = outlineData[i].radius / distOutline; - minRaitoVI = MathUtils::min(minRaitoVI, ratioVI); + minRaitoVI = std::min(minRaitoVI, ratioVI); if (ratioVI >= (1 - FAKE_UMBRA_SIZE_RATIO)) { ratioVI = (1 - FAKE_UMBRA_SIZE_RATIO); } diff --git a/libs/hwui/VertexBuffer.h b/libs/hwui/VertexBuffer.h index 9be4d8487505..c0373aceebba 100644 --- a/libs/hwui/VertexBuffer.h +++ b/libs/hwui/VertexBuffer.h @@ -17,7 +17,7 @@ #ifndef ANDROID_HWUI_VERTEX_BUFFER_H #define ANDROID_HWUI_VERTEX_BUFFER_H -#include "utils/MathUtils.h" +#include <algorithm> namespace android { namespace uirenderer { @@ -129,10 +129,10 @@ public: unsigned int getSize() const { return mByteCount; } unsigned int getIndexCount() const { return mIndexCount; } void updateIndexCount(unsigned int newCount) { - mIndexCount = MathUtils::min(newCount, mAllocatedIndexCount); + mIndexCount = std::min(newCount, mAllocatedIndexCount); } void updateVertexCount(unsigned int newCount) { - mVertexCount = MathUtils::min(newCount, mAllocatedVertexCount); + mVertexCount = std::min(newCount, mAllocatedVertexCount); } MeshFeatureFlags getMeshFeatureFlags() const { return mMeshFeatureFlags; } void setMeshFeatureFlags(int flags) { diff --git a/libs/hwui/renderstate/RenderState.cpp b/libs/hwui/renderstate/RenderState.cpp index 1e39bfa4b583..b5ed9e6558a7 100644 --- a/libs/hwui/renderstate/RenderState.cpp +++ b/libs/hwui/renderstate/RenderState.cpp @@ -19,6 +19,8 @@ #include "renderthread/EglManager.h" #include "utils/GLUtils.h" +#include <algorithm> + namespace android { namespace uirenderer { @@ -320,7 +322,7 @@ void RenderState::render(const Glop& glop) { GLsizei elementsCount = mesh.elementCount; const GLbyte* vertexData = static_cast<const GLbyte*>(vertices.position); while (elementsCount > 0) { - GLsizei drawCount = MathUtils::min(elementsCount, (GLsizei) kMaxNumberOfQuads * 6); + GLsizei drawCount = std::min(elementsCount, (GLsizei) kMaxNumberOfQuads * 6); // rebind pointers without forcing, since initial bind handled above meshState().bindPositionVertexPointer(false, vertexData, vertices.stride); diff --git a/libs/hwui/utils/MathUtils.h b/libs/hwui/utils/MathUtils.h index 9c3787cd1e7f..8d20f2142e73 100644 --- a/libs/hwui/utils/MathUtils.h +++ b/libs/hwui/utils/MathUtils.h @@ -16,6 +16,7 @@ #ifndef MATHUTILS_H #define MATHUTILS_H +#include <algorithm> #include <math.h> namespace android { @@ -82,18 +83,8 @@ public: } template<typename T> - static inline T max(T a, T b) { - return a > b ? a : b; - } - - template<typename T> - static inline T min(T a, T b) { - return a < b ? a : b; - } - - template<typename T> static inline T clamp(T a, T minValue, T maxValue) { - return min(max(a, minValue), maxValue); + return std::min(std::max(a, minValue), maxValue); } inline static float lerp(float v1, float v2, float t) { diff --git a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java index 2de7fc474cd4..2c6bdb35bb8c 100644 --- a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java +++ b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java @@ -26,7 +26,6 @@ import static com.android.documentsui.BaseActivity.State.ACTION_OPEN_TREE; import static com.android.documentsui.DirectoryFragment.ANIM_DOWN; import static com.android.documentsui.DirectoryFragment.ANIM_NONE; import static com.android.documentsui.DirectoryFragment.ANIM_UP; -import static com.android.internal.util.Preconditions.checkArgument; import android.app.Activity; import android.app.Fragment; @@ -48,9 +47,6 @@ import android.os.Bundle; import android.os.Parcelable; import android.provider.DocumentsContract; import android.provider.DocumentsContract.Root; -import android.support.v4.app.ActionBarDrawerToggle; -import android.support.v4.widget.DrawerLayout; -import android.support.v4.widget.DrawerLayout.DrawerListener; import android.util.Log; import android.view.Menu; import android.view.MenuItem; @@ -81,9 +77,7 @@ public class DocumentsActivity extends BaseActivity { private Toolbar mRootsToolbar; - private DrawerLayout mDrawerLayout; - private ActionBarDrawerToggle mDrawerToggle; - private View mRootsDrawer; + private DrawerController mDrawer; private DirectoryContainerView mDirectoryContainer; @@ -105,6 +99,7 @@ public class DocumentsActivity extends BaseActivity { final Resources res = getResources(); mShowAsDialog = res.getBoolean(R.bool.show_as_dialog) && mState.action != ACTION_MANAGE && mState.action != ACTION_BROWSE; + if (!mShowAsDialog) { setTheme(R.style.DocumentsNonDialogTheme); } @@ -117,6 +112,8 @@ public class DocumentsActivity extends BaseActivity { final Context context = this; if (mShowAsDialog) { + mDrawer = DrawerController.createDummy(); + // Strongly define our horizontal dimension; we leave vertical as // WRAP_CONTENT so that system resizes us when IME is showing. final WindowManager.LayoutParams a = getWindow().getAttributes(); @@ -128,17 +125,7 @@ public class DocumentsActivity extends BaseActivity { getWindow().setAttributes(a); } else { - // Non-dialog means we have a drawer - mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); - - if (mDrawerLayout != null) { - mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, - R.drawable.ic_hamburger, R.string.drawer_open, R.string.drawer_close); - - mDrawerLayout.setDrawerListener(mDrawerListener); - - mRootsDrawer = findViewById(R.id.drawer_roots); - } + mDrawer = DrawerController.create(this); } mDirectoryContainer = (DirectoryContainerView) findViewById(R.id.container_directory); @@ -162,10 +149,9 @@ public class DocumentsActivity extends BaseActivity { // Hide roots when we're managing a specific root if (mState.action == ACTION_MANAGE || mState.action == ACTION_BROWSE) { - if (mShowAsDialog || mDrawerLayout == null) { + mDrawer.lockClosed(); + if (mShowAsDialog) { findViewById(R.id.container_roots).setVisibility(View.GONE); - } else { - mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); } } @@ -341,53 +327,15 @@ public class DocumentsActivity extends BaseActivity { } } - private DrawerListener mDrawerListener = new DrawerListener() { - @Override - public void onDrawerSlide(View drawerView, float slideOffset) { - mDrawerToggle.onDrawerSlide(drawerView, slideOffset); - } - - @Override - public void onDrawerOpened(View drawerView) { - mDrawerToggle.onDrawerOpened(drawerView); - } - - @Override - public void onDrawerClosed(View drawerView) { - mDrawerToggle.onDrawerClosed(drawerView); - } - - @Override - public void onDrawerStateChanged(int newState) { - mDrawerToggle.onDrawerStateChanged(newState); - } - }; - @Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); - if (mDrawerToggle != null) { - mDrawerToggle.syncState(); - } + mDrawer.syncState(); updateActionBar(); } public void setRootsDrawerOpen(boolean open) { - if (!mShowAsDialog && mDrawerLayout != null) { - if (open) { - mDrawerLayout.openDrawer(mRootsDrawer); - } else { - mDrawerLayout.closeDrawer(mRootsDrawer); - } - } - } - - private boolean isRootsDrawerOpen() { - if (mShowAsDialog || mDrawerLayout == null) { - return false; - } else { - return mDrawerLayout.isDrawerOpen(mRootsDrawer); - } + mDrawer.setOpen(open); } @Override @@ -408,8 +356,7 @@ public class DocumentsActivity extends BaseActivity { } } - if (!mShowAsDialog && mDrawerLayout != null && - mDrawerLayout.getDrawerLockMode(mRootsDrawer) == DrawerLayout.LOCK_MODE_UNLOCKED) { + if (!mShowAsDialog && mDrawer.isUnlocked()) { mToolbar.setNavigationIcon(R.drawable.ic_hamburger); mToolbar.setNavigationContentDescription(R.string.drawer_open); mToolbar.setNavigationOnClickListener(new View.OnClickListener() { @@ -504,10 +451,7 @@ public class DocumentsActivity extends BaseActivity { @Override public boolean onOptionsItemSelected(MenuItem item) { - if (mDrawerToggle != null && mDrawerToggle.onOptionsItemSelected(item)) { - return true; - } - return super.onOptionsItemSelected(item); + return mDrawer.onOptionsItemSelected(item) || super.onOptionsItemSelected(item); } @Override @@ -526,7 +470,7 @@ public class DocumentsActivity extends BaseActivity { if (size > 1) { mState.stack.pop(); onCurrentDirectoryChanged(ANIM_UP); - } else if (size == 1 && !isRootsDrawerOpen()) { + } else if (size == 1 && !mDrawer.isOpen()) { // TODO: open root drawer once we can capture back key super.onBackPressed(); } else { diff --git a/packages/DocumentsUI/src/com/android/documentsui/DrawerController.java b/packages/DocumentsUI/src/com/android/documentsui/DrawerController.java new file mode 100644 index 000000000000..cf16c3faebde --- /dev/null +++ b/packages/DocumentsUI/src/com/android/documentsui/DrawerController.java @@ -0,0 +1,196 @@ +/* + * Copyright (C) 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.documentsui; + +import static com.android.internal.util.Preconditions.checkArgument; + +import android.app.Activity; +import android.support.v4.app.ActionBarDrawerToggle; +import android.support.v4.widget.DrawerLayout; +import android.support.v4.widget.DrawerLayout.DrawerListener; +import android.view.MenuItem; +import android.view.View; + +/** + * A facade over the various pieces comprising "roots fragment in a Drawer". + * + * @see DrawerController#create(DrawerLayout) + */ +abstract class DrawerController implements DrawerListener { + + abstract void setOpen(boolean open); + abstract void lockOpen(); + abstract void lockClosed(); + abstract boolean isOpen(); + abstract boolean isUnlocked(); + abstract void syncState(); + abstract boolean onOptionsItemSelected(MenuItem item); + + /** + * Returns a controller suitable for {@code Layout}. + */ + static DrawerController create(Activity activity) { + + DrawerLayout layout = (DrawerLayout) activity.findViewById(R.id.drawer_layout); + + if (layout == null) { + return new DummyDrawerController(); + } + + View drawer = activity.findViewById(R.id.drawer_roots); + ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( + activity, + layout, + R.drawable.ic_hamburger, + R.string.drawer_open, + R.string.drawer_close); + + return new RuntimeDrawerController(layout, drawer, toggle); + } + + /** + * Returns a controller suitable for {@code Layout}. + */ + static DrawerController createDummy() { + return new DummyDrawerController(); + } + + /** + * Runtime controller that manages a real drawer. + */ + private static final class RuntimeDrawerController extends DrawerController { + + private final ActionBarDrawerToggle mToggle; + private DrawerLayout mLayout; + private View mDrawer; + + public RuntimeDrawerController( + DrawerLayout layout, View drawer, ActionBarDrawerToggle toggle) { + checkArgument(layout != null); + + mLayout = layout; + mDrawer = drawer; + mToggle = toggle; + + mLayout.setDrawerListener(this); + } + + @Override + void setOpen(boolean open) { + if (open) { + mLayout.openDrawer(mDrawer); + } else { + mLayout.closeDrawer(mDrawer); + } + } + + @Override + boolean isOpen() { + return mLayout.isDrawerOpen(mDrawer); + } + + @Override + void syncState() { + mToggle.syncState(); + } + + @Override + boolean isUnlocked() { + return mLayout.getDrawerLockMode(mDrawer) == DrawerLayout.LOCK_MODE_UNLOCKED; + } + + @Override + void lockOpen() { + mLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_OPEN); + } + + @Override + void lockClosed() { + mLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); + } + + @Override + boolean onOptionsItemSelected(MenuItem item) { + return false; + } + + @Override + public void onDrawerSlide(View drawerView, float slideOffset) { + mToggle.onDrawerSlide(drawerView, slideOffset); + } + + @Override + public void onDrawerOpened(View drawerView) { + mToggle.onDrawerOpened(drawerView); + } + + @Override + public void onDrawerClosed(View drawerView) { + mToggle.onDrawerClosed(drawerView); + } + + @Override + public void onDrawerStateChanged(int newState) { + mToggle.onDrawerStateChanged(newState); + } + } + + /* + * Dummy controller useful with clients that don't host a real drawer. + */ + private static final class DummyDrawerController extends DrawerController { + + @Override + boolean isOpen() { + return false; + } + + @Override + void syncState() {} + + @Override + void lockOpen() {} + + @Override + void lockClosed() {} + + @Override + boolean isUnlocked() { + return true; + } + + @Override + boolean onOptionsItemSelected(MenuItem item) { + return false; + } + + @Override + public void onDrawerSlide(View drawerView, float slideOffset) {} + + @Override + public void onDrawerOpened(View drawerView) {} + + @Override + public void onDrawerClosed(View drawerView) {} + + @Override + public void onDrawerStateChanged(int newState) {} + + @Override + void setOpen(boolean open) {} + } +} diff --git a/packages/DocumentsUI/src/com/android/documentsui/StandaloneActivity.java b/packages/DocumentsUI/src/com/android/documentsui/StandaloneActivity.java index 1ca277dd3b1f..a935a0053429 100644 --- a/packages/DocumentsUI/src/com/android/documentsui/StandaloneActivity.java +++ b/packages/DocumentsUI/src/com/android/documentsui/StandaloneActivity.java @@ -70,6 +70,8 @@ public class StandaloneActivity extends BaseActivity { private ItemSelectedListener mStackListener; private BaseAdapter mStackAdapter; private DocumentClipper mClipper; + private DrawerController mDrawer; + private boolean mCompactMode; public StandaloneActivity() { super(TAG); @@ -107,6 +109,18 @@ public class StandaloneActivity extends BaseActivity { setActionBar(mToolbar); + + // "show as dialog" is true on BIG screens. But we *assume* a big screen + // and specialize for smaller screens by moving roots into an auto-hide drawer. + // This works in conjunction with the specialized layouts defined for sw720dp. + mCompactMode = !getResources().getBoolean(R.bool.show_as_dialog); + + if (mCompactMode) { + setTheme(R.style.DocumentsNonDialogTheme); + } + + mDrawer = DrawerController.create(this); + mClipper = new DocumentClipper(this); RootsFragment.show(getFragmentManager(), null); @@ -164,10 +178,23 @@ public class StandaloneActivity extends BaseActivity { @Override public void updateActionBar() { final RootInfo root = getCurrentRoot(); - mToolbar.setNavigationIcon( - root != null ? root.loadToolbarIcon(mToolbar.getContext()) : null); - mToolbar.setNavigationContentDescription(R.string.drawer_open); - mToolbar.setNavigationOnClickListener(null); + + if (mCompactMode) { + mToolbar.setNavigationIcon(R.drawable.ic_hamburger); + mToolbar.setNavigationContentDescription(R.string.drawer_open); + mToolbar.setNavigationOnClickListener( + new View.OnClickListener() { + @Override + public void onClick(View v) { + mDrawer.setOpen(true); + } + }); + } else { + mToolbar.setNavigationIcon( + root != null ? root.loadToolbarIcon(mToolbar.getContext()) : null); + mToolbar.setNavigationContentDescription(R.string.drawer_open); + mToolbar.setNavigationOnClickListener(null); + } if (mSearchManager.isExpanded()) { mToolbar.setTitle(null); @@ -284,6 +311,12 @@ public class StandaloneActivity extends BaseActivity { } @Override + void onRootPicked(RootInfo root) { + super.onRootPicked(root); + mDrawer.setOpen(false); + } + + @Override public void onDocumentsPicked(List<DocumentInfo> docs) { throw new UnsupportedOperationException(); } diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java index 4eb6f881afb8..40dcd0d86dc1 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -147,6 +147,12 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { private int mRingMode; private int mPhoneState; private boolean mKeyguardIsVisible; + + /** + * If true, fingerprint was already authenticated and we don't need to start listening again + * until the Keyguard has been dismissed. + */ + private boolean mFingerprintAlreadyAuthenticated; private boolean mBouncer; private boolean mBootCompleted; private boolean mUserHasAuthenticatedSinceBoot; @@ -373,6 +379,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { private void onFingerprintAuthenticated(int userId) { mUserFingerprintAuthenticated.put(userId, true); + + // If fingerprint unlocking is allowed, this event will lead to a Keyguard dismiss or to a + // wake-up (if Keyguard is not showing), so we don't need to listen until Keyguard is + // fully gone. + mFingerprintAlreadyAuthenticated = isUnlockingWithFingerprintAllowed(); for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { @@ -818,6 +829,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { cb.onFinishedGoingToSleep(arg1); } } + mFingerprintAlreadyAuthenticated = false; updateFingerprintListeningState(); } @@ -951,13 +963,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } private boolean shouldListenForFingerprint() { - return (mKeyguardIsVisible || !mDeviceInteractive) && !mSwitchingUser; + return (mKeyguardIsVisible || !mDeviceInteractive) && !mSwitchingUser + && !mFingerprintAlreadyAuthenticated; } private void startListeningForFingerprint() { if (DEBUG) Log.v(TAG, "startListeningForFingerprint()"); int userId = ActivityManager.getCurrentUser(); - if (!mFingerprintDetectionRunning && isUnlockWithFingerprintPossible(userId)) { + if (isUnlockWithFingerprintPossible(userId)) { mUserHasAuthenticatedSinceBoot = mTrustManager.hasUserAuthenticatedSinceBoot( ActivityManager.getCurrentUser()); if (mFingerprintCancelSignal != null) { @@ -1249,6 +1262,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { cb.onKeyguardVisibilityChangedRaw(isShowing); } } + if (!isShowing) { + mFingerprintAlreadyAuthenticated = false; + } updateFingerprintListeningState(); } diff --git a/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.java b/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.java index 23532053a47f..c430def757db 100644 --- a/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.java +++ b/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.java @@ -30,6 +30,11 @@ import java.util.Arrays; import java.util.Date; import java.util.LinkedList; +/** + * Loader for MTP document. + * At the first request, the loader returns only first NUM_INITIAL_ENTRIES. Then it launches + * background thread to load the rest documents and caches its result for next requests. + */ class DocumentLoader { static final int NUM_INITIAL_ENTRIES = 10; static final int NUM_LOADING_ENTRIES = 20; @@ -37,7 +42,7 @@ class DocumentLoader { private final MtpManager mMtpManager; private final ContentResolver mResolver; - private final LinkedList<LoaderTask> mTasks = new LinkedList<LoaderTask>(); + private final TaskList mTaskList = new TaskList(); private boolean mHasBackgroundThread = false; DocumentLoader(MtpManager mtpManager, ContentResolver resolver) { @@ -56,7 +61,7 @@ class DocumentLoader { synchronized Cursor queryChildDocuments(String[] columnNames, Identifier parent) throws IOException { - LoaderTask task = findTask(parent); + LoaderTask task = mTaskList.findTask(parent); if (task == null) { int parentHandle = parent.mObjectHandle; // Need to pass the special value MtpManager.OBJECT_HANDLE_ROOT_CHILDREN to @@ -70,11 +75,12 @@ class DocumentLoader { mMtpManager, parent.mDeviceId, task.getUnloadedObjectHandles(NUM_INITIAL_ENTRIES))); + } else { + // Once remove the existing task in order to add it to the head of the list. + mTaskList.remove(task); } - // Move this task to the head of the list to prioritize it. - mTasks.remove(task); - mTasks.addFirst(task); + mTaskList.addFirst(task); if (!task.completed() && !mHasBackgroundThread) { mHasBackgroundThread = true; new BackgroundLoaderThread().start(); @@ -84,41 +90,11 @@ class DocumentLoader { } synchronized void clearCache(int deviceId) { - int i = 0; - while (i < mTasks.size()) { - if (mTasks.get(i).mIdentifier.mDeviceId == deviceId) { - mTasks.remove(i); - } else { - i++; - } - } + mTaskList.clearTaskForDevice(deviceId); } synchronized void clearCache() { - int i = 0; - while (i < mTasks.size()) { - if (mTasks.get(i).completed()) { - mTasks.remove(i); - } else { - i++; - } - } - } - - private LoaderTask findTask(Identifier parent) { - for (int i = 0; i < mTasks.size(); i++) { - if (mTasks.get(i).mIdentifier.equals(parent)) - return mTasks.get(i); - } - return null; - } - - private LoaderTask findUncompletedTask() { - for (int i = 0; i < mTasks.size(); i++) { - if (!mTasks.get(i).completed()) - return mTasks.get(i); - } - return null; + mTaskList.clearCompletedTask(); } private class BackgroundLoaderThread extends Thread { @@ -130,7 +106,7 @@ class DocumentLoader { int deviceId; int[] handles; synchronized (DocumentLoader.this) { - task = findUncompletedTask(); + task = mTaskList.findRunningTask(); if (task == null) { mHasBackgroundThread = false; return; @@ -156,13 +132,53 @@ class DocumentLoader { task.notify(mResolver); } } else { - mTasks.remove(task); + mTaskList.remove(task); } } } } } + private static class TaskList extends LinkedList<LoaderTask> { + LoaderTask findTask(Identifier parent) { + for (int i = 0; i < size(); i++) { + if (get(i).mIdentifier.equals(parent)) + return get(i); + } + return null; + } + + LoaderTask findRunningTask() { + for (int i = 0; i < size(); i++) { + if (!get(i).completed()) + return get(i); + } + return null; + } + + void clearTaskForDevice(int deviceId) { + int i = 0; + while (i < size()) { + if (get(i).mIdentifier.mDeviceId == deviceId) { + remove(i); + } else { + i++; + } + } + } + + void clearCompletedTask() { + int i = 0; + while (i < size()) { + if (get(i).completed()) { + remove(i); + } else { + i++; + } + } + } + } + private static class LoaderTask { final Identifier mIdentifier; final int[] mObjectHandles; diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 918d85666b79..8b3f2d8bab3c 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -1140,4 +1140,9 @@ <!-- Displayed when user launches an app that was uninstalled [CHAR LIMIT=NONE] --> <string name="activity_not_found">Application is not installed on your device</string> + <!-- Name of setting to show clock seconds [CHAR LIMIT=40] --> + <string name="clock_seconds">Show clock seconds</string> + <!-- Description of setting to show clock seconds [CHAR LIMIT=NONE] --> + <string name="clock_seconds_desc">Show clock seconds in the status bar. May impact battery life.</string> + </resources> diff --git a/packages/SystemUI/res/xml/tuner_prefs.xml b/packages/SystemUI/res/xml/tuner_prefs.xml index 3a41c3c540bd..beb863c44925 100644 --- a/packages/SystemUI/res/xml/tuner_prefs.xml +++ b/packages/SystemUI/res/xml/tuner_prefs.xml @@ -72,10 +72,16 @@ android:summary="@string/show_battery_percentage_summary" android:persistent="false" /> + <com.android.systemui.tuner.TunerSwitch + android:key="clock_seconds" + android:title="@string/clock_seconds" + android:summary="@string/clock_seconds_desc" /> + <Preference android:key="demo_mode" android:title="@string/demo_mode" /> + <!-- Warning, this goes last. --> <Preference android:summary="@string/tuner_persistent_warning" android:selectable="false" /> diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java index 328ee35d7f1d..36efeaddd004 100644 --- a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java +++ b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java @@ -256,6 +256,8 @@ public class DozeService extends DreamService { private void continuePulsing(int reason) { if (mHost.isPulsingBlocked()) { + mPulsing = false; + mWakeLock.release(); return; } mHost.pulseWhileDozing(new DozeHost.PulseCallback() { diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java index 947c19cadce5..00ac5f96e1e9 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java @@ -16,6 +16,7 @@ package com.android.systemui.recents.views; +import android.app.ActivityManager; import android.app.ActivityOptions; import android.app.TaskStackBuilder; import android.content.Context; @@ -31,6 +32,8 @@ import android.os.UserHandle; import android.provider.Settings; import android.util.AttributeSet; import android.util.Log; +import android.util.SparseArray; +import android.view.AppTransitionAnimationSpec; import android.view.LayoutInflater; import android.view.View; import android.view.WindowInsets; @@ -60,6 +63,8 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV private static final String TAG = "RecentsView"; + private static final boolean ADD_HEADER_BITMAP = true; + /** The RecentsView callbacks */ public interface RecentsViewCallbacks { public void onTaskViewClicked(); @@ -443,62 +448,158 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV } } - private void postDrawHeaderThumbnailTransitionRunnable(final TaskView tv, final int offsetX, - final int offsetY, final TaskViewTransform transform, + private void postDrawHeaderThumbnailTransitionRunnable(final TaskStackView view, + final TaskView clickedView, final int offsetX, final int offsetY, + final float stackScroll, final ActivityOptions.OnAnimationStartedListener animStartedListener) { Runnable r = new Runnable() { @Override public void run() { - // Disable any focused state before we draw the header - if (tv.isFocusedTask()) { - tv.unsetFocusedTask(); - } + overrideDrawHeaderThumbnailTransition(view, clickedView, offsetX, offsetY, + stackScroll, animStartedListener); - float scale = tv.getScaleX(); - int fromHeaderWidth = (int) (tv.mHeaderView.getMeasuredWidth() * scale); - int fromHeaderHeight = (int) (tv.mHeaderView.getMeasuredHeight() * scale); - - Bitmap b = Bitmap.createBitmap(fromHeaderWidth, fromHeaderHeight, - Bitmap.Config.ARGB_8888); - if (Constants.DebugFlags.App.EnableTransitionThumbnailDebugMode) { - b.eraseColor(0xFFff0000); - } else { - Canvas c = new Canvas(b); - c.scale(tv.getScaleX(), tv.getScaleY()); - tv.mHeaderView.draw(c); - c.setBitmap(null); - } - b = b.createAshmemBitmap(); - int[] pts = new int[2]; - tv.getLocationOnScreen(pts); - try { - WindowManagerGlobal.getWindowManagerService() - .overridePendingAppTransitionAspectScaledThumb(b, - pts[0] + offsetX, - pts[1] + offsetY, - transform.rect.width(), - transform.rect.height(), - new IRemoteCallback.Stub() { - @Override - public void sendResult(Bundle data) - throws RemoteException { - post(new Runnable() { - @Override - public void run() { - if (animStartedListener != null) { - animStartedListener.onAnimationStarted(); - } - } - }); - } - }, true); - } catch (RemoteException e) { - Log.w(TAG, "Error overriding app transition", e); - } } }; + mCb.runAfterPause(r); } + + private void overrideDrawHeaderThumbnailTransition(TaskStackView stackView, + TaskView clickedTask, int offsetX, int offsetY, float stackScroll, + final ActivityOptions.OnAnimationStartedListener animStartedListener) { + List<AppTransitionAnimationSpec> specs = getAppTransitionAnimationSpecs(stackView, + clickedTask, offsetX, offsetY, stackScroll); + if (specs == null) { + return; + } + + IRemoteCallback.Stub callback = new IRemoteCallback.Stub() { + @Override + public void sendResult(Bundle data) throws RemoteException { + post(new Runnable() { + @Override + public void run() { + if (animStartedListener != null) { + animStartedListener.onAnimationStarted(); + } + } + }); + } + }; + + AppTransitionAnimationSpec[] specsArray = + new AppTransitionAnimationSpec[specs.size()]; + try { + WindowManagerGlobal.getWindowManagerService().overridePendingAppTransitionMultiThumb( + specs.toArray(specsArray), callback, true /* scaleUp */); + + } catch (RemoteException e) { + Log.w(TAG, "Error overriding app transition", e); + } + } + + private List<AppTransitionAnimationSpec> getAppTransitionAnimationSpecs(TaskStackView stackView, + TaskView clickedTask, int offsetX, int offsetY, float stackScroll) { + final int targetStackId = clickedTask.getTask().key.stackId; + if (targetStackId != ActivityManager.FREEFORM_WORKSPACE_STACK_ID + && targetStackId != ActivityManager.FULLSCREEN_WORKSPACE_STACK_ID) { + return null; + } + // If this is a full screen stack, the transition will be towards the single, full screen + // task. We only need the transition spec for this task. + List<AppTransitionAnimationSpec> specs = new ArrayList<>(); + if (targetStackId == ActivityManager.FULLSCREEN_WORKSPACE_STACK_ID) { + specs.add(createThumbnailHeaderAnimationSpec( + stackView, offsetX, offsetY, stackScroll, clickedTask, + clickedTask.getTask().key.id, ADD_HEADER_BITMAP)); + return specs; + } + // This is a free form stack or full screen stack, so there will be multiple windows + // animating from thumbnails. We need transition animation specs for all of them. + + // We will use top and bottom task views as a base for tasks, that aren't visible on the + // screen. This is necessary for cascade recents list, where some of the tasks might be + // hidden. + List<TaskView> taskViews = stackView.getTaskViews(); + int childCount = taskViews.size(); + TaskView topChild = taskViews.get(0); + TaskView bottomChild = taskViews.get(childCount - 1); + SparseArray<TaskView> taskViewsByTaskId = new SparseArray<>(); + for (int i = 0; i < childCount; i++) { + TaskView taskView = taskViews.get(i); + taskViewsByTaskId.put(taskView.getTask().key.id, taskView); + } + + TaskStack stack = stackView.getStack(); + // We go through all tasks now and for each generate transition animation spec. If there is + // a view associated with a task, we use that view as a base for the animation. If there + // isn't, we use bottom or top view, depending on which one would be closer to the task + // view if it existed. + ArrayList<Task> tasks = stack.getTasks(); + boolean passedClickedTask = false; + for (int i = 0, n = tasks.size(); i < n; i++) { + Task task = tasks.get(i); + TaskView taskView = taskViewsByTaskId.get(task.key.id); + if (taskView != null) { + specs.add(createThumbnailHeaderAnimationSpec(stackView, offsetX, offsetY, + stackScroll, taskView, taskView.getTask().key.id, ADD_HEADER_BITMAP)); + if (taskView == clickedTask) { + passedClickedTask = true; + } + } else { + taskView = passedClickedTask ? bottomChild : topChild; + specs.add(createThumbnailHeaderAnimationSpec(stackView, offsetX, offsetY, + stackScroll, taskView, task.key.id, !ADD_HEADER_BITMAP)); + } + } + + return specs; + } + + private AppTransitionAnimationSpec createThumbnailHeaderAnimationSpec(TaskStackView stackView, + int offsetX, int offsetY, float stackScroll, TaskView tv, int taskId, + boolean addHeaderBitmap) { + // Disable any focused state before we draw the header + // Upfront the processing of the thumbnail + if (tv.isFocusedTask()) { + tv.unsetFocusedTask(); + } + TaskViewTransform transform = new TaskViewTransform(); + transform = stackView.getStackAlgorithm().getStackTransform(tv.mTask, stackScroll, + transform, null); + + float scale = tv.getScaleX(); + int fromHeaderWidth = (int) (tv.mHeaderView.getMeasuredWidth() * scale); + int fromHeaderHeight = (int) (tv.mHeaderView.getMeasuredHeight() * scale); + + Bitmap b = null; + if (addHeaderBitmap) { + b = Bitmap.createBitmap(fromHeaderWidth, fromHeaderHeight, + Bitmap.Config.ARGB_8888); + + if (Constants.DebugFlags.App.EnableTransitionThumbnailDebugMode) { + b.eraseColor(0xFFff0000); + } else { + Canvas c = new Canvas(b); + c.scale(tv.getScaleX(), tv.getScaleY()); + tv.mHeaderView.draw(c); + c.setBitmap(null); + + } + b = b.createAshmemBitmap(); + } + + int[] pts = new int[2]; + tv.getLocationOnScreen(pts); + + final int left = pts[0] + offsetX; + final int top = pts[1] + offsetY; + final Rect rect = new Rect(left, top, left + transform.rect.width(), + top + transform.rect.height()); + + return new AppTransitionAnimationSpec(taskId, b, rect); + } + /**** TaskStackView.TaskStackCallbacks Implementation ****/ @Override @@ -521,12 +622,10 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV // and then offset to the expected transform rect, but bound this to just // outside the display rect (to ensure we don't animate from too far away) sourceView = stackView; - transform = stackView.getStackAlgorithm().getStackTransform(task, stackScroll, transform, null); offsetX = transform.rect.left; offsetY = mConfig.displayRect.height(); } else { sourceView = tv.mThumbnailView; - transform = stackView.getStackAlgorithm().getStackTransform(task, stackScroll, transform, null); } // Compute the thumbnail to scale up from @@ -553,10 +652,8 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV } }; } - if (tv != null) { - postDrawHeaderThumbnailTransitionRunnable(tv, offsetX, offsetY, transform, - animStartedListener); - } + postDrawHeaderThumbnailTransitionRunnable(stackView, tv, offsetX, offsetY, stackScroll, + animStartedListener); if (mConfig.multiStackEnabled) { opts = ActivityOptions.makeCustomAnimation(sourceView.getContext(), R.anim.recents_from_unknown_enter, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index a55256d9e216..3a9662639255 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -135,6 +135,7 @@ public abstract class BaseStatusBar extends SystemUI implements protected static final int MSG_CANCEL_PRELOAD_RECENT_APPS = 1023; protected static final int MSG_SHOW_NEXT_AFFILIATED_TASK = 1024; protected static final int MSG_SHOW_PREV_AFFILIATED_TASK = 1025; + protected static final int MSG_SHOW_KEYBOARD_SHORTCUTS_MENU = 1026; protected static final boolean ENABLE_HEADS_UP = true; // scores above this threshold should be displayed in heads up mode. @@ -1066,6 +1067,13 @@ public abstract class BaseStatusBar extends SystemUI implements mHandler.sendEmptyMessage(msg); } + @Override + public void showKeyboardShortcutsMenu() { + int msg = MSG_SHOW_KEYBOARD_SHORTCUTS_MENU; + mHandler.removeMessages(msg); + mHandler.sendEmptyMessage(msg); + } + /** Jumps to the next affiliated task in the group. */ public void showNextAffiliatedTask() { int msg = MSG_SHOW_NEXT_AFFILIATED_TASK; @@ -1143,6 +1151,10 @@ public abstract class BaseStatusBar extends SystemUI implements } } + protected void showKeyboardShortcuts() { + Toast.makeText(mContext, "Show keyboard shortcuts screen", Toast.LENGTH_LONG).show(); + } + protected void cancelPreloadingRecents() { if (mRecents != null) { mRecents.cancelPreloadingRecents(); @@ -1253,6 +1265,9 @@ public abstract class BaseStatusBar extends SystemUI implements case MSG_SHOW_PREV_AFFILIATED_TASK: showRecentsPreviousAffiliatedTask(); break; + case MSG_SHOW_KEYBOARD_SHORTCUTS_MENU: + showKeyboardShortcuts(); + break; } } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java index a1b07b50271f..d0cd6cbeb5f7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java @@ -64,6 +64,7 @@ public class CommandQueue extends IStatusBar.Stub { private static final int MSG_APP_TRANSITION_STARTING = 21 << MSG_SHIFT; private static final int MSG_ASSIST_DISCLOSURE = 22 << MSG_SHIFT; private static final int MSG_START_ASSIST = 23 << MSG_SHIFT; + private static final int MSG_SHOW_KEYBOARD_SHORTCUTS = 24 << MSG_SHIFT; public static final int FLAG_EXCLUDE_NONE = 0; public static final int FLAG_EXCLUDE_SEARCH_PANEL = 1 << 0; @@ -98,6 +99,7 @@ public class CommandQueue extends IStatusBar.Stub { public void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey); public void toggleRecentApps(); public void preloadRecentApps(); + public void showKeyboardShortcutsMenu(); public void cancelPreloadRecentApps(); public void setWindowState(int window, int state); public void buzzBeepBlinked(); @@ -224,6 +226,14 @@ public class CommandQueue extends IStatusBar.Stub { } } + @Override + public void showKeyboardShortcutsMenu() { + synchronized (mList) { + mHandler.removeMessages(MSG_SHOW_KEYBOARD_SHORTCUTS); + mHandler.obtainMessage(MSG_SHOW_KEYBOARD_SHORTCUTS).sendToTarget(); + } + } + public void setWindowState(int window, int state) { synchronized (mList) { // don't coalesce these @@ -360,6 +370,9 @@ public class CommandQueue extends IStatusBar.Stub { case MSG_CANCEL_PRELOAD_RECENT_APPS: mCallbacks.cancelPreloadRecentApps(); break; + case MSG_SHOW_KEYBOARD_SHORTCUTS: + mCallbacks.showKeyboardShortcutsMenu(); + break; case MSG_SET_WINDOW_STATE: mCallbacks.setWindowState(msg.arg1, msg.arg2); break; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java index 4d3e57ed8b9d..3ff69c9d2fb6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java @@ -104,13 +104,11 @@ public class DozeScrimController { * Aborts pulsing immediately. */ public void abortPulsing() { - mHandler.removeCallbacks(mPulseIn); - abortAnimations(); + cancelPulsing(); if (mDozing) { mScrimController.setDozeBehindAlpha(1f); mScrimController.setDozeInFrontAlpha(1f); } - mPulseCallback = null; } public void onScreenTurnedOn() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarApps.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarApps.java index d74c5b01307b..cb5c1257a831 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarApps.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarApps.java @@ -20,7 +20,6 @@ import android.animation.LayoutTransition; import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityOptions; -import android.app.AppGlobals; import android.content.BroadcastReceiver; import android.content.ClipData; import android.content.ClipDescription; @@ -29,13 +28,10 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.ApplicationInfo; -import android.content.pm.ActivityInfo; import android.content.pm.IPackageManager; import android.content.pm.PackageManager; -import android.content.pm.ResolveInfo; import android.graphics.Rect; import android.os.Bundle; -import android.os.RemoteException; import android.os.UserHandle; import android.os.UserManager; import android.util.AttributeSet; @@ -49,6 +45,7 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.Toast; +import com.android.internal.content.PackageMonitor; import com.android.systemui.R; import java.util.List; @@ -75,6 +72,8 @@ class NavigationBarApps extends LinearLayout { private final PackageManager mPackageManager; private final UserManager mUserManager; private final LayoutInflater mLayoutInflater; + private final AppPackageMonitor mAppPackageMonitor; + // This view has two roles: // 1) If the drag started outside the pinned apps list, it is a placeholder icon with a null @@ -106,6 +105,7 @@ class NavigationBarApps extends LinearLayout { mPackageManager = context.getPackageManager(); mUserManager = (UserManager) getContext().getSystemService(Context.USER_SERVICE); mLayoutInflater = LayoutInflater.from(context); + mAppPackageMonitor = new AppPackageMonitor(); // Dragging an icon removes and adds back the dragged icon. Use the layout transitions to // trigger animation. By default all transitions animate, so turn off the unneeded ones. @@ -121,6 +121,76 @@ class NavigationBarApps extends LinearLayout { setLayoutTransition(transition); } + // Monitor that catches events like "app uninstalled". + private class AppPackageMonitor extends PackageMonitor { + @Override + public void onPackageRemoved(String packageName, int uid) { + postRemoveIfUnlauncheable(packageName, new UserHandle(getChangingUserId())); + super.onPackageRemoved(packageName, uid); + } + + @Override + public void onPackageModified(String packageName) { + postRemoveIfUnlauncheable(packageName, new UserHandle(getChangingUserId())); + super.onPackageModified(packageName); + } + + @Override + public void onPackagesAvailable(String[] packages) { + if (isReplacing()) { + UserHandle user = new UserHandle(getChangingUserId()); + + for (String packageName : packages) { + postRemoveIfUnlauncheable(packageName, user); + } + } + super.onPackagesAvailable(packages); + } + + @Override + public void onPackagesUnavailable(String[] packages) { + if (!isReplacing()) { + UserHandle user = new UserHandle(getChangingUserId()); + + for (String packageName : packages) { + postRemoveIfUnlauncheable(packageName, user); + } + } + super.onPackagesUnavailable(packages); + } + } + + private void postRemoveIfUnlauncheable(final String packageName, final UserHandle user) { + // This method doesn't necessarily get called in the main thread. Redirect the call into + // the main thread. + post(new Runnable() { + @Override + public void run() { + if (!isAttachedToWindow()) return; + removeIfUnlauncheable(packageName, user); + } + }); + } + + private void removeIfUnlauncheable(String packageName, UserHandle user) { + long appUserSerialNumber = mUserManager.getSerialNumberForUser(user); + + // Remove icons for all apps that match a package that perhaps became unlauncheable. + for(int i = sAppsModel.getAppCount() - 1; i >= 0; --i) { + AppInfo appInfo = sAppsModel.getApp(i); + if (appInfo.getUserSerialNumber() != appUserSerialNumber) continue; + + ComponentName appComponentName = appInfo.getComponentName(); + if (!appComponentName.getPackageName().equals(packageName)) continue; + + if (sAppsModel.buildAppLaunchIntent(appComponentName, user) != null) continue; + + removeViewAt(i); + sAppsModel.removeApp(i); + sAppsModel.savePrefs(); + } + } + @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); @@ -145,12 +215,15 @@ class NavigationBarApps extends LinearLayout { IntentFilter filter = new IntentFilter(); filter.addAction(Intent.ACTION_USER_SWITCHED); mContext.registerReceiver(mBroadcastReceiver, filter); + + mAppPackageMonitor.register(mContext, null, UserHandle.ALL, true); } @Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); mContext.unregisterReceiver(mBroadcastReceiver); + mAppPackageMonitor.unregister(); } /** @@ -470,7 +543,6 @@ class NavigationBarApps extends LinearLayout { ComponentName component = appInfo.getComponentName(); long appUserSerialNumber = appInfo.getUserSerialNumber(); - UserHandle appUser = mUserManager.getUserForSerialNumber(appUserSerialNumber); if (appUser == null) { Toast.makeText(getContext(), R.string.activity_not_found, Toast.LENGTH_SHORT).show(); @@ -478,7 +550,12 @@ class NavigationBarApps extends LinearLayout { " because its user doesn't exist."); return; } - int appUserId = appUser.getIdentifier(); + + Intent launchIntent = sAppsModel.buildAppLaunchIntent(component, appUser); + if (launchIntent == null) { + Toast.makeText(getContext(), R.string.activity_not_found, Toast.LENGTH_SHORT).show(); + return; + } // Play a scale-up animation while launching the activity. // TODO: Consider playing a different animation, or no animation, if the activity is @@ -489,54 +566,9 @@ class NavigationBarApps extends LinearLayout { ActivityOptions opts = ActivityOptions.makeScaleUpAnimation(v, 0, 0, v.getWidth(), v.getHeight()); Bundle optsBundle = opts.toBundle(); - - // Launch the activity. This code is based on LauncherAppsService.startActivityAsUser code. - Intent launchIntent = new Intent(Intent.ACTION_MAIN); - launchIntent.addCategory(Intent.CATEGORY_LAUNCHER); launchIntent.setSourceBounds(sourceBounds); - launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - launchIntent.setPackage(component.getPackageName()); - - IPackageManager pm = AppGlobals.getPackageManager(); - try { - ActivityInfo info = pm.getActivityInfo(component, 0, appUserId); - if (info == null) { - Toast.makeText(getContext(), R.string.activity_not_found, Toast.LENGTH_SHORT).show(); - Log.e(TAG, "Can't start activity " + component + " because it's not installed."); - return; - } - - if (!info.exported) { - Toast.makeText(getContext(), R.string.activity_not_found, Toast.LENGTH_SHORT).show(); - Log.e(TAG, "Can't start activity " + component + " because it doesn't have 'exported' attribute."); - return; - } - } catch (RemoteException e) { - Toast.makeText(getContext(), R.string.activity_not_found, Toast.LENGTH_SHORT).show(); - Log.e(TAG, "Failed to get activity info for " + component, e); - return; - } - - // Check that the component actually has Intent.CATEGORY_LAUCNCHER - // as calling startActivityAsUser ignores the category and just - // resolves based on the component if present. - List<ResolveInfo> apps = getContext().getPackageManager().queryIntentActivitiesAsUser(launchIntent, - 0 /* flags */, appUserId); - final int size = apps.size(); - for (int i = 0; i < size; ++i) { - ActivityInfo activityInfo = apps.get(i).activityInfo; - if (activityInfo.packageName.equals(component.getPackageName()) && - activityInfo.name.equals(component.getClassName())) { - // Found an activity with category launcher that matches - // this component so ok to launch. - launchIntent.setComponent(component); - mContext.startActivityAsUser(launchIntent, optsBundle, appUser); - return; - } - } - Toast.makeText(getContext(), R.string.activity_not_found, Toast.LENGTH_SHORT).show(); - Log.e(TAG, "Attempt to launch activity without category Intent.CATEGORY_LAUNCHER " + component); + mContext.startActivityAsUser(launchIntent, optsBundle, appUser); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarAppsModel.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarAppsModel.java index b8764cf40efb..c4c31fd6bf80 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarAppsModel.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarAppsModel.java @@ -16,16 +16,23 @@ package com.android.systemui.statusbar.phone; +import android.app.AppGlobals; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; +import android.content.pm.ActivityInfo; +import android.content.pm.IPackageManager; import android.content.pm.ResolveInfo; import android.content.pm.UserInfo; +import android.os.RemoteException; import android.os.UserHandle; import android.os.UserManager; +import android.util.Log; import android.util.Slog; +import com.android.internal.annotations.VisibleForTesting; + import java.util.ArrayList; import java.util.HashSet; import java.util.List; @@ -94,6 +101,58 @@ class NavigationBarAppsModel { } } + @VisibleForTesting + protected IPackageManager getPackageManager() { + return AppGlobals.getPackageManager(); + } + + // Returns a launch intent for a given component, or null if the component is unlauncheable. + public Intent buildAppLaunchIntent(ComponentName component, UserHandle appUser) { + int appUserId = appUser.getIdentifier(); + + // This code is based on LauncherAppsService.startActivityAsUser code. + Intent launchIntent = new Intent(Intent.ACTION_MAIN); + launchIntent.addCategory(Intent.CATEGORY_LAUNCHER); + launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + launchIntent.setPackage(component.getPackageName()); + + try { + ActivityInfo info = getPackageManager().getActivityInfo(component, 0, appUserId); + if (info == null) { + Log.e(TAG, "Activity " + component + " is not installed."); + return null; + } + + if (!info.exported) { + Log.e(TAG, "Activity " + component + " doesn't have 'exported' attribute."); + return null; + } + } catch (RemoteException e) { + Log.e(TAG, "Failed to get activity info for " + component, e); + return null; + } + + // Check that the component actually has Intent.CATEGORY_LAUNCHER + // as calling startActivityAsUser ignores the category and just + // resolves based on the component if present. + List<ResolveInfo> apps = mContext.getPackageManager().queryIntentActivitiesAsUser(launchIntent, + 0 /* flags */, appUserId); + final int size = apps.size(); + for (int i = 0; i < size; ++i) { + ActivityInfo activityInfo = apps.get(i).activityInfo; + if (activityInfo.packageName.equals(component.getPackageName()) && + activityInfo.name.equals(component.getClassName())) { + // Found an activity with category launcher that matches + // this component so ok to launch. + launchIntent.setComponent(component); + return launchIntent; + } + } + + Log.e(TAG, "Activity doesn't have category Intent.CATEGORY_LAUNCHER " + component); + return null; + } + /** * Reinitializes the model for a new user. */ @@ -199,6 +258,10 @@ class NavigationBarAppsModel { /** Loads the list of apps from SharedPreferences. */ private void loadAppsFromPrefs() { + UserManager mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE); + + boolean hadUnlauncheableApps = false; + int appCount = mPrefs.getInt(userPrefixed(APP_COUNT_PREF), -1); for (int i = 0; i < appCount; i++) { String prefValue = mPrefs.getString(prefNameForApp(i), null); @@ -214,8 +277,15 @@ class NavigationBarAppsModel { // Couldn't find the saved state. Just skip this item. continue; } - mApps.add(new AppInfo(componentName, userSerialNumber)); + UserHandle appUser = mUserManager.getUserForSerialNumber(userSerialNumber); + if (appUser != null && buildAppLaunchIntent(componentName, appUser) != null) { + mApps.add(new AppInfo(componentName, userSerialNumber)); + } else { + hadUnlauncheableApps = true; + } } + + if (hadUnlauncheableApps) savePrefs(); } /** Adds the first few apps from the owner profile. Used for demo purposes. */ diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java index 1649acb18f5b..7de7a7b58c7a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java @@ -91,7 +91,8 @@ public class NavigationBarView extends LinearLayout { private OnVerticalChangedListener mOnVerticalChangedListener; private boolean mIsLayoutRtl; - private boolean mLayoutTransitionsEnabled; + private boolean mLayoutTransitionsEnabled = true; + private boolean mWakeAndUnlocking; private class NavTransitionListener implements TransitionListener { private boolean mBackTransitioning; @@ -371,13 +372,19 @@ public class NavigationBarView extends LinearLayout { } } + public void setLayoutTransitionsEnabled(boolean enabled) { + mLayoutTransitionsEnabled = enabled; + updateLayoutTransitionsEnabled(); + } + public void setWakeAndUnlocking(boolean wakeAndUnlocking) { setUseFadingAnimations(wakeAndUnlocking); - setLayoutTransitionsEnabled(!wakeAndUnlocking); + mWakeAndUnlocking = wakeAndUnlocking; + updateLayoutTransitionsEnabled(); } - private void setLayoutTransitionsEnabled(boolean enabled) { - mLayoutTransitionsEnabled = enabled; + private void updateLayoutTransitionsEnabled() { + boolean enabled = !mWakeAndUnlocking && mLayoutTransitionsEnabled; ViewGroup navButtons = (ViewGroup) mCurrentView.findViewById(R.id.nav_buttons); LayoutTransition lt = navButtons.getLayoutTransition(); if (lt != null) { @@ -469,7 +476,7 @@ public class NavigationBarView extends LinearLayout { } mCurrentView = mRotatedViews[rot]; mCurrentView.setVisibility(View.VISIBLE); - setLayoutTransitionsEnabled(mLayoutTransitionsEnabled); + updateLayoutTransitionsEnabled(); getImeSwitchButton().setOnClickListener(mImeSwitcherClickListener); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java index 710c335ecafe..3c3c325f3afe 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -2388,4 +2388,9 @@ public class NotificationPanelView extends PanelView implements protected boolean isPanelVisibleBecauseOfHeadsUp() { return mHeadsUpManager.hasPinnedHeadsUp() || mHeadsUpAnimatingAway; } + + @Override + public boolean hasOverlappingRendering() { + return !mDozing; + } } 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 b7943530b39a..d8f5ccffe332 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -155,6 +155,7 @@ import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.statusbar.policy.ZenModeController; import com.android.systemui.statusbar.stack.NotificationStackScrollLayout; import com.android.systemui.statusbar.stack.NotificationStackScrollLayout.OnChildLocationsChangedListener; +import com.android.systemui.statusbar.stack.StackStateAnimator; import com.android.systemui.statusbar.stack.StackViewState; import com.android.systemui.volume.VolumeComponent; @@ -232,7 +233,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, public static final int FADE_KEYGUARD_START_DELAY = 100; public static final int FADE_KEYGUARD_DURATION = 300; - public static final int FADE_KEYGUARD_DURATION_PULSING = 120; + public static final int FADE_KEYGUARD_DURATION_PULSING = 96; /** Allow some time inbetween the long press for back and recents. */ private static final int LOCK_TO_APP_GESTURE_TOLERENCE = 200; @@ -3477,16 +3478,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, .alpha(0f) .setStartDelay(0) .setDuration(FADE_KEYGUARD_DURATION_PULSING) - .setInterpolator(ScrimController.KEYGUARD_FADE_OUT_INTERPOLATOR) - .withLayer() - .withEndAction(new Runnable() { - @Override - public void run() { - mNotificationPanel.setAlpha(1f); - hideKeyguard(); - } - }) - .start(); + .setInterpolator(ScrimController.KEYGUARD_FADE_OUT_INTERPOLATOR); } /** @@ -3523,11 +3515,24 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, setBarState(StatusBarState.SHADE); if (mLeaveOpenOnKeyguardHide) { mLeaveOpenOnKeyguardHide = false; - mNotificationPanel.animateToFullShade(calculateGoingToFullShadeDelay()); + long delay = calculateGoingToFullShadeDelay(); + mNotificationPanel.animateToFullShade(delay); if (mDraggedDownRow != null) { mDraggedDownRow.setUserLocked(false); mDraggedDownRow = null; } + + // Disable layout transitions in navbar for this transition because the load is just + // too heavy for the CPU and GPU on any device. + if (mNavigationBarView != null) { + mNavigationBarView.setLayoutTransitionsEnabled(false); + mNavigationBarView.postDelayed(new Runnable() { + @Override + public void run() { + mNavigationBarView.setLayoutTransitionsEnabled(true); + } + }, delay + StackStateAnimator.ANIMATION_DURATION_GO_TO_FULL_SHADE); + } } else { instantCollapseNotificationPanel(); } @@ -3539,6 +3544,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, mQSPanel.refreshAllTiles(); } mHandler.removeMessages(MSG_LAUNCH_TRANSITION_TIMEOUT); + mNotificationPanel.setAlpha(1f); return staying; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java index 448f16dac5ac..7e83f2670986 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -279,10 +279,15 @@ public class StatusBarKeyguardViewManager { if (mFingerprintUnlockController.getMode() == FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING) { mFingerprintUnlockController.startKeyguardFadingAway(); - mPhoneStatusBar.setKeyguardFadingAway(startTime, 0, 250); + mPhoneStatusBar.setKeyguardFadingAway(startTime, 0, 240); mStatusBarWindowManager.setKeyguardFadingAway(true); mPhoneStatusBar.fadeKeyguardWhilePulsing(); - animateScrimControllerKeyguardFadingOut(0, 250); + animateScrimControllerKeyguardFadingOut(0, 240, new Runnable() { + @Override + public void run() { + mPhoneStatusBar.hideKeyguard(); + } + }); } else { mFingerprintUnlockController.startKeyguardFadingAway(); mPhoneStatusBar.setKeyguardFadingAway(startTime, delay, fadeoutDuration); @@ -316,10 +321,18 @@ public class StatusBarKeyguardViewManager { } private void animateScrimControllerKeyguardFadingOut(long delay, long duration) { + animateScrimControllerKeyguardFadingOut(delay, duration, null /* endRunnable */); + } + + private void animateScrimControllerKeyguardFadingOut(long delay, long duration, + final Runnable endRunnable) { Trace.asyncTraceBegin(Trace.TRACE_TAG_VIEW, "Fading out", 0); mScrimController.animateKeyguardFadingOut(delay, duration, new Runnable() { @Override public void run() { + if (endRunnable != null) { + endRunnable.run(); + } mStatusBarWindowManager.setKeyguardFadingAway(false); mPhoneStatusBar.finishKeyguardFadingAway(); mFingerprintUnlockController.finishKeyguardFadingAway(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java index 61986adc1d65..896bd62f9969 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java @@ -23,6 +23,8 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.res.TypedArray; import android.os.Bundle; +import android.os.Handler; +import android.os.SystemClock; import android.os.UserHandle; import android.text.Spannable; import android.text.SpannableStringBuilder; @@ -30,22 +32,28 @@ import android.text.format.DateFormat; import android.text.style.CharacterStyle; import android.text.style.RelativeSizeSpan; import android.util.AttributeSet; +import android.view.Display; import android.widget.TextView; import com.android.systemui.DemoMode; import com.android.systemui.R; +import com.android.systemui.tuner.TunerService; +import com.android.systemui.tuner.TunerService.Tunable; + +import libcore.icu.LocaleData; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Locale; import java.util.TimeZone; -import libcore.icu.LocaleData; - /** * Digital clock for the status bar. */ -public class Clock extends TextView implements DemoMode { +public class Clock extends TextView implements DemoMode, Tunable { + + public static final String CLOCK_SECONDS = "clock_seconds"; + private boolean mAttached; private Calendar mCalendar; private String mClockFormatString; @@ -57,6 +65,8 @@ public class Clock extends TextView implements DemoMode { private static final int AM_PM_STYLE_GONE = 2; private final int mAmPmStyle; + private boolean mShowSeconds; + private Handler mSecondsHandler; public Clock(Context context) { this(context, null); @@ -77,6 +87,7 @@ public class Clock extends TextView implements DemoMode { } finally { a.recycle(); } + TunerService.get(context).addTunable(this, CLOCK_SECONDS); } @Override @@ -105,6 +116,7 @@ public class Clock extends TextView implements DemoMode { // Make sure we update to the current time updateClock(); + updateShowSeconds(); } @Override @@ -143,6 +155,35 @@ public class Clock extends TextView implements DemoMode { setText(getSmallTime()); } + @Override + public void onTuningChanged(String key, String newValue) { + mShowSeconds = newValue != null && Integer.parseInt(newValue) != 0; + updateShowSeconds(); + } + + private void updateShowSeconds() { + if (mShowSeconds) { + // Wait until we have a display to start trying to show seconds. + if (mSecondsHandler == null && getDisplay() != null) { + mSecondsHandler = new Handler(); + if (getDisplay().getState() == Display.STATE_ON) { + mSecondsHandler.postAtTime(mSecondTick, + SystemClock.uptimeMillis() / 1000 * 1000 + 1000); + } + IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_OFF); + filter.addAction(Intent.ACTION_SCREEN_ON); + mContext.registerReceiver(mScreenReceiver, filter); + } + } else { + if (mSecondsHandler != null) { + mContext.unregisterReceiver(mScreenReceiver); + mSecondsHandler.removeCallbacks(mSecondTick); + mSecondsHandler = null; + updateClock(); + } + } + } + private final CharSequence getSmallTime() { Context context = getContext(); boolean is24 = DateFormat.is24HourFormat(context, ActivityManager.getCurrentUser()); @@ -152,7 +193,9 @@ public class Clock extends TextView implements DemoMode { final char MAGIC2 = '\uEF01'; SimpleDateFormat sdf; - String format = is24 ? d.timeFormat_Hm : d.timeFormat_hm; + String format = mShowSeconds + ? is24 ? d.timeFormat_Hms : d.timeFormat_hms + : is24 ? d.timeFormat_Hm : d.timeFormat_hm; if (!format.equals(mClockFormatString)) { /* * Search for an unquoted "a" in the format string, so we can @@ -244,5 +287,32 @@ public class Clock extends TextView implements DemoMode { setText(getSmallTime()); } } + + private final BroadcastReceiver mScreenReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + String action = intent.getAction(); + if (Intent.ACTION_SCREEN_OFF.equals(action)) { + if (mSecondsHandler != null) { + mSecondsHandler.removeCallbacks(mSecondTick); + } + } else if (Intent.ACTION_SCREEN_ON.equals(action)) { + if (mSecondsHandler != null) { + mSecondsHandler.postAtTime(mSecondTick, + SystemClock.uptimeMillis() / 1000 * 1000 + 1000); + } + } + } + }; + + private final Runnable mSecondTick = new Runnable() { + @Override + public void run() { + if (mCalendar != null) { + updateClock(); + } + mSecondsHandler.postAtTime(this, SystemClock.uptimeMillis() / 1000 * 1000 + 1000); + } + }; } diff --git a/packages/SystemUI/src/com/android/systemui/tuner/StatusBarSwitch.java b/packages/SystemUI/src/com/android/systemui/tuner/StatusBarSwitch.java index e5b550e82bdb..dcb0d8d0c498 100644 --- a/packages/SystemUI/src/com/android/systemui/tuner/StatusBarSwitch.java +++ b/packages/SystemUI/src/com/android/systemui/tuner/StatusBarSwitch.java @@ -38,6 +38,18 @@ public class StatusBarSwitch extends SwitchPreference implements Tunable { } @Override + protected void onAttachedToActivity() { + super.onAttachedToActivity(); + TunerService.get(getContext()).addTunable(this, StatusBarIconController.ICON_BLACKLIST); + } + + @Override + protected void onDetachedFromActivity() { + TunerService.get(getContext()).removeTunable(this); + super.onDetachedFromActivity(); + } + + @Override public void onTuningChanged(String key, String newValue) { if (!StatusBarIconController.ICON_BLACKLIST.equals(key)) { return; diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerFragment.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerFragment.java index 71b5de56444b..96ad756b4e94 100644 --- a/packages/SystemUI/src/com/android/systemui/tuner/TunerFragment.java +++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerFragment.java @@ -15,8 +15,6 @@ */ package com.android.systemui.tuner; -import static com.android.systemui.BatteryMeterView.SHOW_PERCENT_SETTING; - import android.app.AlertDialog; import android.app.FragmentTransaction; import android.content.DialogInterface; @@ -29,7 +27,6 @@ import android.preference.Preference; import android.preference.Preference.OnPreferenceChangeListener; import android.preference.Preference.OnPreferenceClickListener; import android.preference.PreferenceFragment; -import android.preference.PreferenceGroup; import android.preference.SwitchPreference; import android.provider.Settings; import android.provider.Settings.System; @@ -39,8 +36,8 @@ import android.view.MenuItem; import com.android.internal.logging.MetricsLogger; import com.android.systemui.R; -import com.android.systemui.statusbar.phone.StatusBarIconController; -import com.android.systemui.tuner.TunerService.Tunable; + +import static com.android.systemui.BatteryMeterView.SHOW_PERCENT_SETTING; public class TunerFragment extends PreferenceFragment { @@ -108,7 +105,6 @@ public class TunerFragment extends PreferenceFragment { getContext().getContentResolver().registerContentObserver( System.getUriFor(SHOW_PERCENT_SETTING), false, mSettingObserver); - registerPrefs(getPreferenceScreen()); MetricsLogger.visibility(getContext(), MetricsLogger.TUNER, true); } @@ -117,36 +113,9 @@ public class TunerFragment extends PreferenceFragment { super.onPause(); getContext().getContentResolver().unregisterContentObserver(mSettingObserver); - unregisterPrefs(getPreferenceScreen()); MetricsLogger.visibility(getContext(), MetricsLogger.TUNER, false); } - private void registerPrefs(PreferenceGroup group) { - TunerService tunerService = TunerService.get(getContext()); - final int N = group.getPreferenceCount(); - for (int i = 0; i < N; i++) { - Preference pref = group.getPreference(i); - if (pref instanceof StatusBarSwitch) { - tunerService.addTunable((Tunable) pref, StatusBarIconController.ICON_BLACKLIST); - } else if (pref instanceof PreferenceGroup) { - registerPrefs((PreferenceGroup) pref); - } - } - } - - private void unregisterPrefs(PreferenceGroup group) { - TunerService tunerService = TunerService.get(getContext()); - final int N = group.getPreferenceCount(); - for (int i = 0; i < N; i++) { - Preference pref = group.getPreference(i); - if (pref instanceof Tunable) { - tunerService.removeTunable((Tunable) pref); - } else if (pref instanceof PreferenceGroup) { - registerPrefs((PreferenceGroup) pref); - } - } - } - @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { menu.add(Menu.NONE, MENU_REMOVE, Menu.NONE, R.string.remove_from_settings); diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerSwitch.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerSwitch.java new file mode 100644 index 000000000000..0740e0808529 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerSwitch.java @@ -0,0 +1,39 @@ +package com.android.systemui.tuner; + +import android.content.Context; +import android.preference.SwitchPreference; +import android.provider.Settings; +import android.util.AttributeSet; + +import com.android.systemui.tuner.TunerService.Tunable; + +public class TunerSwitch extends SwitchPreference implements Tunable { + + public TunerSwitch(Context context, AttributeSet attrs) { + super(context, attrs); + } + + @Override + protected void onAttachedToActivity() { + super.onAttachedToActivity(); + TunerService.get(getContext()).addTunable(this, getKey()); + } + + @Override + protected void onDetachedFromActivity() { + TunerService.get(getContext()).removeTunable(this); + super.onDetachedFromActivity(); + } + + @Override + public void onTuningChanged(String key, String newValue) { + setChecked(newValue != null && Integer.parseInt(newValue) != 0); + } + + @Override + protected boolean persistBoolean(boolean value) { + Settings.Secure.putString(getContext().getContentResolver(), getKey(), value ? "1" : "0"); + return true; + } + +} diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarAppsModelTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarAppsModelTest.java index 62213ab51703..4d0e28bb6d98 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarAppsModelTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarAppsModelTest.java @@ -16,21 +16,26 @@ package com.android.systemui.statusbar.phone; +import org.mockito.InOrder; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; +import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; +import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.ActivityInfo; +import android.content.pm.IPackageManager; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.content.pm.UserInfo; +import android.os.RemoteException; import android.os.UserHandle; import android.os.UserManager; import android.test.AndroidTestCase; @@ -45,6 +50,7 @@ import java.util.Map; /** Tests for the data model for the navigation bar app icons. */ public class NavigationBarAppsModelTest extends AndroidTestCase { private PackageManager mMockPackageManager; + private IPackageManager mMockIPackageManager; private SharedPreferences mMockPrefs; private SharedPreferences.Editor mMockEdit; private UserManager mMockUserManager; @@ -61,6 +67,7 @@ public class NavigationBarAppsModelTest extends AndroidTestCase { final Context context = mock(Context.class); mMockPackageManager = mock(PackageManager.class); + mMockIPackageManager = mock(IPackageManager.class); mMockPrefs = mock(SharedPreferences.class); mMockEdit = mock(SharedPreferences.Editor.class); mMockUserManager = mock(UserManager.class); @@ -78,8 +85,71 @@ public class NavigationBarAppsModelTest extends AndroidTestCase { when(mMockPrefs.edit()).thenReturn(mMockEdit); when(mMockUserManager.getSerialNumberForUser(new UserHandle(2))).thenReturn(22L); + when(mMockUserManager.getUserForSerialNumber(45L)).thenReturn(new UserHandle(4)); + when(mMockUserManager.getUserForSerialNumber(239L)).thenReturn(new UserHandle(5)); + + mModel = new NavigationBarAppsModel(context) { + @Override + protected IPackageManager getPackageManager() { + return mMockIPackageManager; + } + }; + } + + /** Tests buildAppLaunchIntent(). */ + public void testBuildAppLaunchIntent() { + ActivityInfo mockNonExportedActivityInfo = new ActivityInfo(); + mockNonExportedActivityInfo.exported = false; + ActivityInfo mockExportedActivityInfo = new ActivityInfo(); + mockExportedActivityInfo.exported = true; + try { + when(mMockIPackageManager.getActivityInfo( + new ComponentName("package1", "class1"), 0, 4)). + thenReturn(mockNonExportedActivityInfo); + when(mMockIPackageManager.getActivityInfo( + new ComponentName("package2", "class2"), 0, 5)). + thenThrow(new RemoteException()); + when(mMockIPackageManager.getActivityInfo( + new ComponentName("package3", "class3"), 0, 6)). + thenReturn(mockExportedActivityInfo); + when(mMockIPackageManager.getActivityInfo( + new ComponentName("package4", "class4"), 0, 7)). + thenReturn(mockExportedActivityInfo); + } catch (RemoteException e) { + fail("RemoteException can't happen in the test, but it happened."); + } - mModel = new NavigationBarAppsModel(context); + // Assume some installed activities. + ActivityInfo ai0 = new ActivityInfo(); + ai0.packageName = "package0"; + ai0.name = "class0"; + ActivityInfo ai1 = new ActivityInfo(); + ai1.packageName = "package4"; + ai1.name = "class4"; + ResolveInfo ri0 = new ResolveInfo(); + ri0.activityInfo = ai0; + ResolveInfo ri1 = new ResolveInfo(); + ri1.activityInfo = ai1; + when(mMockPackageManager + .queryIntentActivitiesAsUser(any(Intent.class), eq(0), any(int.class))) + .thenReturn(Arrays.asList(ri0, ri1)); + + // Unlauncheable (for various reasons) apps. + assertEquals(null, mModel.buildAppLaunchIntent( + new ComponentName("package0", "class0"), new UserHandle(3))); + assertEquals(null, mModel.buildAppLaunchIntent( + new ComponentName("package1", "class1"), new UserHandle(4))); + assertEquals(null, mModel.buildAppLaunchIntent( + new ComponentName("package2", "class2"), new UserHandle(5))); + assertEquals(null, mModel.buildAppLaunchIntent( + new ComponentName("package3", "class3"), new UserHandle(6))); + + // A launcheable app. + Intent intent = mModel.buildAppLaunchIntent( + new ComponentName("package4", "class4"), new UserHandle(7)); + assertNotNull(intent); + assertEquals(new ComponentName("package4", "class4"), intent.getComponent()); + assertEquals("package4", intent.getPackage()); } /** Initializes the model from SharedPreferences for a few app activites. */ @@ -93,6 +163,39 @@ public class NavigationBarAppsModelTest extends AndroidTestCase { when(mMockPrefs.getString("22|app_2", null)).thenReturn("package2/class2"); when(mMockPrefs.getLong("22|app_user_2", -1)).thenReturn(239L); + ActivityInfo mockActivityInfo = new ActivityInfo(); + mockActivityInfo.exported = true; + try { + when(mMockIPackageManager.getActivityInfo( + new ComponentName("package0", "class0"), 0, 5)).thenReturn(mockActivityInfo); + when(mMockIPackageManager.getActivityInfo( + new ComponentName("package1", "class1"), 0, 4)).thenReturn(mockActivityInfo); + when(mMockIPackageManager.getActivityInfo( + new ComponentName("package2", "class2"), 0, 5)).thenReturn(mockActivityInfo); + } catch (RemoteException e) { + fail("RemoteException can't happen in the test, but it happened."); + } + + // Assume some installed activities. + ActivityInfo ai0 = new ActivityInfo(); + ai0.packageName = "package0"; + ai0.name = "class0"; + ActivityInfo ai1 = new ActivityInfo(); + ai1.packageName = "package1"; + ai1.name = "class1"; + ActivityInfo ai2 = new ActivityInfo(); + ai2.packageName = "package2"; + ai2.name = "class2"; + ResolveInfo ri0 = new ResolveInfo(); + ri0.activityInfo = ai0; + ResolveInfo ri1 = new ResolveInfo(); + ri1.activityInfo = ai1; + ResolveInfo ri2 = new ResolveInfo(); + ri2.activityInfo = ai2; + when(mMockPackageManager + .queryIntentActivitiesAsUser(any(Intent.class), eq(0), any(int.class))) + .thenReturn(Arrays.asList(ri0, ri1, ri2)); + mModel.setCurrentUser(2); } @@ -133,6 +236,15 @@ public class NavigationBarAppsModelTest extends AndroidTestCase { assertEquals(22L, mModel.getApp(0).getUserSerialNumber()); assertEquals("package2/class2", mModel.getApp(1).getComponentName().flattenToString()); assertEquals(22L, mModel.getApp(1).getUserSerialNumber()); + InOrder order = inOrder(mMockEdit); + order.verify(mMockEdit).apply(); + order.verify(mMockEdit).putInt("22|app_count", 2); + order.verify(mMockEdit).putString("22|app_0", "package1/class1"); + order.verify(mMockEdit).putLong("22|app_user_0", 22L); + order.verify(mMockEdit).putString("22|app_1", "package2/class2"); + order.verify(mMockEdit).putLong("22|app_user_1", 22L); + order.verify(mMockEdit).apply(); + verifyNoMoreInteractions(mMockEdit); } /** Tests initializing the model if one of the prefs is missing. */ @@ -145,11 +257,72 @@ public class NavigationBarAppsModelTest extends AndroidTestCase { // But assume one pref is missing. when(mMockPrefs.getString("22|app_1", null)).thenReturn(null); + ActivityInfo mockActivityInfo = new ActivityInfo(); + mockActivityInfo.exported = true; + try { + when(mMockIPackageManager.getActivityInfo( + new ComponentName("package0", "class0"), 0, 5)).thenReturn(mockActivityInfo); + } catch (RemoteException e) { + fail("RemoteException can't happen in the test, but it happened."); + } + + ActivityInfo ai0 = new ActivityInfo(); + ai0.packageName = "package0"; + ai0.name = "class0"; + ResolveInfo ri0 = new ResolveInfo(); + ri0.activityInfo = ai0; + when(mMockPackageManager + .queryIntentActivitiesAsUser(any(Intent.class), eq(0), any(int.class))) + .thenReturn(Arrays.asList(ri0)); + // Initializing the model should load from prefs and skip the missing one. mModel.setCurrentUser(2); assertEquals(1, mModel.getAppCount()); assertEquals("package0/class0", mModel.getApp(0).getComponentName().flattenToString()); assertEquals(239L, mModel.getApp(0).getUserSerialNumber()); + verifyNoMoreInteractions(mMockEdit); + } + + /** Tests initializing the model if one of the apps is unlauncheable. */ + public void testInitializeWithUnlauncheableApp() { + // Assume two apps are nominally stored. + when(mMockPrefs.getInt("22|app_count", -1)).thenReturn(2); + when(mMockPrefs.getString("22|app_0", null)).thenReturn("package0/class0"); + when(mMockPrefs.getLong("22|app_user_0", -1)).thenReturn(239L); + when(mMockPrefs.getString("22|app_1", null)).thenReturn("package1/class1"); + when(mMockPrefs.getLong("22|app_user_1", -1)).thenReturn(45L); + + ActivityInfo mockActivityInfo = new ActivityInfo(); + mockActivityInfo.exported = true; + try { + when(mMockIPackageManager.getActivityInfo( + new ComponentName("package0", "class0"), 0, 5)).thenReturn(mockActivityInfo); + } catch (RemoteException e) { + fail("RemoteException can't happen in the test, but it happened."); + } + + ActivityInfo ai0 = new ActivityInfo(); + ai0.packageName = "package0"; + ai0.name = "class0"; + ResolveInfo ri0 = new ResolveInfo(); + ri0.activityInfo = ai0; + when(mMockPackageManager + .queryIntentActivitiesAsUser(any(Intent.class), eq(0), any(int.class))) + .thenReturn(Arrays.asList(ri0)); + + // Initializing the model should load from prefs and skip the unlauncheable one. + mModel.setCurrentUser(2); + assertEquals(1, mModel.getAppCount()); + assertEquals("package0/class0", mModel.getApp(0).getComponentName().flattenToString()); + assertEquals(239L, mModel.getApp(0).getUserSerialNumber()); + + // Once an unlauncheable app is detected, the model should save all apps excluding the + // unlauncheable one. + verify(mMockEdit).putInt("22|app_count", 1); + verify(mMockEdit).putString("22|app_0", "package0/class0"); + verify(mMockEdit).putLong("22|app_user_0", 239L); + verify(mMockEdit).apply(); + verifyNoMoreInteractions(mMockEdit); } /** Tests saving the model to SharedPreferences. */ diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index b6cd47772974..55a26599a92d 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -10906,7 +10906,7 @@ public final class ActivityManagerService extends ActivityManagerNative synchronized (this) { buildAssistBundleLocked(pae, pae.result); mPendingAssistExtras.remove(pae); - mHandler.removeCallbacks(pae); + mUiHandler.removeCallbacks(pae); } return pae.extras; } @@ -10994,7 +10994,7 @@ public final class ActivityManagerService extends ActivityManagerNative activity.app.thread.requestAssistContextExtras(activity.appToken, pae, requestType); mPendingAssistExtras.add(pae); - mHandler.postDelayed(pae, timeout); + mUiHandler.postDelayed(pae, timeout); } catch (RemoteException e) { Slog.w(TAG, "getAssistContextExtras failed: crash calling " + activity); return null; @@ -11051,7 +11051,7 @@ public final class ActivityManagerService extends ActivityManagerNative synchronized (this) { buildAssistBundleLocked(pae, extras); boolean exists = mPendingAssistExtras.remove(pae); - mHandler.removeCallbacks(pae); + mUiHandler.removeCallbacks(pae); if (!exists) { // Timed out. return; diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java index 356565fc802f..fcd596f28c5a 100644 --- a/services/core/java/com/android/server/am/ActivityStack.java +++ b/services/core/java/com/android/server/am/ActivityStack.java @@ -248,6 +248,8 @@ final class ActivityStack { /** Run all ActivityStacks through this */ final ActivityStackSupervisor mStackSupervisor; + private final LaunchingTaskPositioner mTaskPositioner; + static final int PAUSE_TIMEOUT_MSG = ActivityManagerService.FIRST_ACTIVITY_STACK_MSG + 1; static final int DESTROY_TIMEOUT_MSG = ActivityManagerService.FIRST_ACTIVITY_STACK_MSG + 2; static final int LAUNCH_TICK_MSG = ActivityManagerService.FIRST_ACTIVITY_STACK_MSG + 3; @@ -363,6 +365,33 @@ final class ActivityStack { mStackId = activityContainer.mStackId; mCurrentUser = mService.mCurrentUserId; mRecentTasks = recentTasks; + mTaskPositioner = mStackId == FREEFORM_WORKSPACE_STACK_ID + ? new LaunchingTaskPositioner() : null; + } + + void attachDisplay(ActivityStackSupervisor.ActivityDisplay activityDisplay, boolean onTop) { + mDisplayId = activityDisplay.mDisplayId; + mStacks = activityDisplay.mStacks; + mBounds = mWindowManager.attachStack(mStackId, activityDisplay.mDisplayId, onTop); + mFullscreen = mBounds == null; + if (mTaskPositioner != null) { + mTaskPositioner.setDisplay(activityDisplay.mDisplay); + mTaskPositioner.configure(mBounds); + } + } + + void detachDisplay() { + mDisplayId = Display.INVALID_DISPLAY; + mStacks = null; + if (mTaskPositioner != null) { + mTaskPositioner.reset(); + } + mWindowManager.detachStack(mStackId); + } + + void setBounds(Rect bounds) { + mBounds = mFullscreen ? null : new Rect(bounds); + mTaskPositioner.configure(bounds); } boolean okToShowLocked(ActivityRecord r) { @@ -2223,7 +2252,7 @@ final class ActivityStack { + task, new RuntimeException("here").fillInStackTrace()); task.addActivityToTop(r); r.putInHistory(); - addAppToken(r, task); + addConfigOverride(r, task); if (VALIDATE_TOKENS) { validateAppTokensLocked(); } @@ -2283,7 +2312,7 @@ final class ActivityStack { : AppTransition.TRANSIT_ACTIVITY_OPEN, keepCurTransition); mNoAnimActivities.remove(r); } - addAppToken(r, task); + addConfigOverride(r, task); boolean doShow = true; if (newTask) { // Even though this activity is starting fresh, we still need @@ -2332,7 +2361,7 @@ final class ActivityStack { } else { // If this is the first activity, don't do any fancy animations, // because there is nothing for it to animate on top of. - addAppToken(r, task); + addConfigOverride(r, task); ActivityOptions.abort(options); options = null; } @@ -4513,6 +4542,9 @@ final class ActivityStack { boolean toTop) { TaskRecord task = new TaskRecord(mService, taskId, info, intent, voiceSession, voiceInteractor); + if (mTaskPositioner != null) { + mTaskPositioner.updateDefaultBounds(task, mTaskHistory); + } addTask(task, toTop, false); return task; } @@ -4548,7 +4580,7 @@ final class ActivityStack { } } - void addAppToken(ActivityRecord r, TaskRecord task) { + void addConfigOverride(ActivityRecord r, TaskRecord task) { final Rect bounds = task.getLaunchBounds(); final Configuration config = mWindowManager.addAppToken(task.mActivities.indexOf(r), r.appToken, diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java index 12b848be6ea3..0bdeed771ba8 100644 --- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java +++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java @@ -2977,7 +2977,7 @@ public final class ActivityStackSupervisor implements DisplayListener { } } - stack.mBounds = stack.mFullscreen ? null : new Rect(bounds); + stack.setBounds(bounds); if (r != null) { final boolean updated = stack.ensureActivityConfigurationLocked(r, 0); @@ -3112,7 +3112,7 @@ public final class ActivityStackSupervisor implements DisplayListener { "Added restored task=" + task + " to stack=" + stack); final ArrayList<ActivityRecord> activities = task.mActivities; for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) { - stack.addAppToken(activities.get(activityNdx), task); + stack.addConfigOverride(activities.get(activityNdx), task); } return true; } @@ -4387,13 +4387,8 @@ public final class ActivityStackSupervisor implements DisplayListener { if (DEBUG_STACK) Slog.d(TAG_STACK, "attachToDisplayLocked: " + this + " to display=" + activityDisplay + " onTop=" + onTop); mActivityDisplay = activityDisplay; - mStack.mDisplayId = activityDisplay.mDisplayId; - mStack.mStacks = activityDisplay.mStacks; - + mStack.attachDisplay(activityDisplay, onTop); activityDisplay.attachActivities(mStack, onTop); - mStack.mBounds = - mWindowManager.attachStack(mStackId, activityDisplay.mDisplayId, onTop); - mStack.mFullscreen = mStack.mBounds == null; } @Override @@ -4465,9 +4460,7 @@ public final class ActivityStackSupervisor implements DisplayListener { if (mActivityDisplay != null) { mActivityDisplay.detachActivitiesLocked(mStack); mActivityDisplay = null; - mStack.mDisplayId = -1; - mStack.mStacks = null; - mWindowManager.detachStack(mStackId); + mStack.detachDisplay(); } } diff --git a/services/core/java/com/android/server/am/LaunchingTaskPositioner.java b/services/core/java/com/android/server/am/LaunchingTaskPositioner.java new file mode 100644 index 000000000000..3005c869ddcf --- /dev/null +++ b/services/core/java/com/android/server/am/LaunchingTaskPositioner.java @@ -0,0 +1,142 @@ +/* + * Copyright (C) 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.am; + +import android.graphics.Point; +import android.graphics.Rect; +import android.view.Display; + +import java.util.ArrayList; + +/** + * Determines where a launching task should be positioned and sized on the display. + */ +class LaunchingTaskPositioner { + // Determines how close window frames/corners have to be to call them colliding. + private static final int BOUNDS_CONFLICT_MIN_DISTANCE = 4; + + // Task will receive dimensions based on available dimensions divided by this. + private static final int WINDOW_SIZE_DENOMINATOR = 2; + + // Task will receive margins based on available dimensions divided by this. + private static final int MARGIN_SIZE_DENOMINATOR = 4; + + // If task bounds collide with some other, we will step and try again until we find a good + // position. The step will be determined by using dimensions and dividing it by this. + private static final int STEP_DENOMINATOR = 16; + + // We always want to step by at least this. + private static final int MINIMAL_STEP = 1; + + private boolean mDefaultStartBoundsConfigurationSet = false; + private final Rect mAvailableRect = new Rect(); + private int mDefaultFreeformStartX; + private int mDefaultFreeformStartY; + private int mDefaultFreeformWidth; + private int mDefaultFreeformHeight; + private int mDefaultFreeformStepHorizontal; + private int mDefaultFreeformStepVertical; + private int mDisplayWidth; + private int mDisplayHeight; + + void setDisplay(Display display) { + Point size = new Point(); + display.getSize(size); + mDisplayWidth = size.x; + mDisplayHeight = size.y; + } + + void configure(Rect stackBounds) { + if (stackBounds == null) { + mAvailableRect.set(0, 0, mDisplayWidth, mDisplayHeight); + } else { + mAvailableRect.set(stackBounds); + } + int width = mAvailableRect.width(); + int height = mAvailableRect.height(); + mDefaultFreeformStartX = mAvailableRect.left + width / MARGIN_SIZE_DENOMINATOR; + mDefaultFreeformStartY = mAvailableRect.top + height / MARGIN_SIZE_DENOMINATOR; + mDefaultFreeformWidth = width / WINDOW_SIZE_DENOMINATOR; + mDefaultFreeformHeight = height / WINDOW_SIZE_DENOMINATOR; + mDefaultFreeformStepHorizontal = Math.max(width / STEP_DENOMINATOR, MINIMAL_STEP); + mDefaultFreeformStepVertical = Math.max(height / STEP_DENOMINATOR, MINIMAL_STEP); + mDefaultStartBoundsConfigurationSet = true; + } + + /** + * Tries to set task's bound in a way that it won't collide with any other task. By colliding + * we mean that two tasks have left-top corner very close to each other, so one might get + * obfuscated by the other one. + * + * @param task Task for which we want to find bounds that won't collide with other. + * @param tasks Existing tasks with which we don't want to collide. + */ + void updateDefaultBounds(TaskRecord task, ArrayList<TaskRecord> tasks) { + if (!mDefaultStartBoundsConfigurationSet) { + return; + } + int startX = mDefaultFreeformStartX; + int startY = mDefaultFreeformStartY; + final int right = mAvailableRect.right; + final int bottom = mAvailableRect.bottom; + boolean restarted = false; + while (boundsConflict(startX, startY, tasks)) { + // Unfortunately there is already a task at that spot, so we need to look for some + // other place. + startX += mDefaultFreeformStepHorizontal; + startY += mDefaultFreeformStepVertical; + if (startX + mDefaultFreeformWidth > right + || startY + mDefaultFreeformHeight > bottom) { + // We don't want the task to go outside of the display, because it won't look + // nice. Let's restart from the top instead, because there should be some space + // there. + startX = mAvailableRect.left; + startY = mAvailableRect.top; + restarted = true; + } + if (restarted + && (startX > mDefaultFreeformStartX || startY > mDefaultFreeformStartY)) { + // If we restarted and crossed the initial position, let's not struggle anymore. + // The user already must have ton of tasks visible, we can just smack the new + // one in the center. + startX = mDefaultFreeformStartX; + startY = mDefaultFreeformStartY; + break; + } + } + task.setInitialBounds(startX, startY, startX + mDefaultFreeformWidth, + startY + mDefaultFreeformHeight); + } + + private boolean boundsConflict(int startX, int startY, ArrayList<TaskRecord> tasks) { + for (int i = tasks.size() - 1; i >= 0; i--) { + TaskRecord task = tasks.get(i); + if (!task.mActivities.isEmpty()) { + Rect bounds = task.mBounds; + if (bounds != null && (Math.abs(bounds.left - startX) < BOUNDS_CONFLICT_MIN_DISTANCE + || Math.abs(bounds.top - startY) < BOUNDS_CONFLICT_MIN_DISTANCE)) { + return true; + } + } + } + return false; + } + + void reset() { + mDefaultStartBoundsConfigurationSet = false; + } +} diff --git a/services/core/java/com/android/server/am/TaskRecord.java b/services/core/java/com/android/server/am/TaskRecord.java index ed935a139f45..ff412d1167b9 100644 --- a/services/core/java/com/android/server/am/TaskRecord.java +++ b/services/core/java/com/android/server/am/TaskRecord.java @@ -1217,6 +1217,14 @@ final class TaskRecord { return mLastNonFullscreenBounds; } + void setInitialBounds(int left, int top, int right, int bottom) { + if (mBounds == null) { + mBounds = new Rect(); + } + mBounds.set(left, top, right, bottom); + mLastNonFullscreenBounds = mBounds; + } + void dump(PrintWriter pw, String prefix) { pw.print(prefix); pw.print("userId="); pw.print(userId); pw.print(" effectiveUid="); UserHandle.formatUid(pw, effectiveUid); diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index 1b9b32f25081..a55911609c6d 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -71,7 +71,7 @@ import static android.os.Trace.TRACE_TAG_PACKAGE_MANAGER; import static android.system.OsConstants.O_CREAT; import static android.system.OsConstants.O_RDWR; import static com.android.internal.app.IntentForwarderActivity.FORWARD_INTENT_TO_MANAGED_PROFILE; -import static com.android.internal.app.IntentForwarderActivity.FORWARD_INTENT_TO_USER_OWNER; +import static com.android.internal.app.IntentForwarderActivity.FORWARD_INTENT_TO_PARENT; import static com.android.internal.content.NativeLibraryHelper.LIB64_DIR_NAME; import static com.android.internal.content.NativeLibraryHelper.LIB_DIR_NAME; import static com.android.internal.util.ArrayUtils.appendInt; @@ -4949,18 +4949,25 @@ public class PackageManagerService extends IPackageManager.Stub { private ResolveInfo createForwardingResolveInfo(IntentFilter filter, int sourceUserId, int targetUserId) { ResolveInfo forwardingResolveInfo = new ResolveInfo(); + long ident = Binder.clearCallingIdentity(); + boolean targetIsProfile; + try { + targetIsProfile = sUserManager.getUserInfo(targetUserId).isManagedProfile(); + } finally { + Binder.restoreCallingIdentity(ident); + } String className; - if (targetUserId == UserHandle.USER_OWNER) { - className = FORWARD_INTENT_TO_USER_OWNER; - } else { + if (targetIsProfile) { className = FORWARD_INTENT_TO_MANAGED_PROFILE; + } else { + className = FORWARD_INTENT_TO_PARENT; } ComponentName forwardingActivityComponentName = new ComponentName( mAndroidApplication.packageName, className); ActivityInfo forwardingActivityInfo = getActivityInfo(forwardingActivityComponentName, 0, sourceUserId); - if (targetUserId == UserHandle.USER_OWNER) { - forwardingActivityInfo.showUserIcon = UserHandle.USER_OWNER; + if (!targetIsProfile) { + forwardingActivityInfo.showUserIcon = targetUserId; forwardingResolveInfo.noResourceId = true; } forwardingResolveInfo.activityInfo = forwardingActivityInfo; diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java index 08f0f0993521..4bfcb902fb65 100644 --- a/services/core/java/com/android/server/pm/UserManagerService.java +++ b/services/core/java/com/android/server/pm/UserManagerService.java @@ -133,7 +133,7 @@ public class UserManagerService extends IUserManager.Stub { private static final long EPOCH_PLUS_30_YEARS = 30L * 365 * 24 * 60 * 60 * 1000L; // ms - // Maximum number of managed profiles permitted is 1. This cannot be increased + // Maximum number of managed profiles permitted per user is 1. This cannot be increased // without first making sure that the rest of the framework is prepared for it. private static final int MAX_MANAGED_PROFILES = 1; @@ -419,9 +419,10 @@ public class UserManagerService extends IUserManager.Stub { return ui; } + /** Called by PackageManagerService */ public boolean exists(int userId) { synchronized (mPackagesLock) { - return ArrayUtils.contains(mUserIds, userId); + return mUsers.get(userId) != null; } } @@ -626,7 +627,7 @@ public class UserManagerService extends IUserManager.Stub { } @Override - public boolean canAddMoreManagedProfiles() { + public boolean canAddMoreManagedProfiles(int userId) { checkManageUsersPermission("check if more managed profiles can be added."); if (ActivityManager.isLowRamDeviceStatic()) { return false; @@ -635,10 +636,14 @@ public class UserManagerService extends IUserManager.Stub { PackageManager.FEATURE_MANAGED_USERS)) { return false; } + // Limit number of managed profiles that can be created + int managedProfilesCount = getProfiles(userId, true).size() - 1; + if (managedProfilesCount >= MAX_MANAGED_PROFILES) { + return false; + } synchronized(mPackagesLock) { - // Limit number of managed profiles that can be created - if (numberOfUsersOfTypeLocked(UserInfo.FLAG_MANAGED_PROFILE, true) - >= MAX_MANAGED_PROFILES) { + UserInfo userInfo = getUserInfoLocked(userId); + if (!userInfo.canHaveProfile()) { return false; } int usersCount = getAliveUsersExcludingGuestsCountLocked(); @@ -1237,10 +1242,6 @@ public class UserManagerService extends IUserManager.Stub { @Override public UserInfo createProfileForUser(String name, int flags, int userId) { checkManageUsersPermission("Only the system can create users"); - if (userId != UserHandle.USER_OWNER) { - Slog.w(LOG_TAG, "Only user owner can have profiles"); - return null; - } return createUserInternal(name, flags, userId); } @@ -1272,7 +1273,8 @@ public class UserManagerService extends IUserManager.Stub { parent = getUserInfoLocked(parentId); if (parent == null) return null; } - if (isManagedProfile && !canAddMoreManagedProfiles()) { + if (isManagedProfile && !canAddMoreManagedProfiles(parentId)) { + Log.e(LOG_TAG, "Cannot add more managed profiles for user " + parentId); return null; } if (!isGuest && !isManagedProfile && isUserLimitReachedLocked()) { diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index 45bbf37005e1..e0da33f31c9d 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -2835,6 +2835,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } } + } else if (keyCode == KeyEvent.KEYCODE_SLASH && event.isMetaPressed()) { + if (down) { + if (repeatCount == 0) { + showKeyboardShortcutsMenu(); + } + } } else if (keyCode == KeyEvent.KEYCODE_ASSIST) { if (down) { if (repeatCount == 0) { @@ -3255,6 +3261,17 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } + private void showKeyboardShortcutsMenu() { + try { + IStatusBarService statusbar = getStatusBarService(); + if (statusbar != null) { + statusbar.showKeyboardShortcutsMenu(); + } + } catch (RemoteException e) { + Slog.e(TAG, "RemoteException when showing keyboard shortcuts menu", e); + } + } + private void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHome) { mPreloadedRecentApps = false; // preloading no longer needs to be canceled try { @@ -6113,6 +6130,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { } startedWakingUp(); screenTurningOn(null); + screenTurnedOn(); } ProgressDialog mBootMsgDialog = null; diff --git a/services/core/java/com/android/server/policy/StatusBarController.java b/services/core/java/com/android/server/policy/StatusBarController.java index d1b50dadc6a0..da23f451a6b5 100644 --- a/services/core/java/com/android/server/policy/StatusBarController.java +++ b/services/core/java/com/android/server/policy/StatusBarController.java @@ -122,7 +122,7 @@ public class StatusBarController extends BarController { * * @return the desired start time of the status bar transition, in uptime millis */ - private long calculateStatusBarTransitionStartTime(Animation openAnimation, + private static long calculateStatusBarTransitionStartTime(Animation openAnimation, Animation closeAnimation) { if (openAnimation != null && closeAnimation != null) { TranslateAnimation openTranslateAnimation = findTranslateAnimation(openAnimation); @@ -151,7 +151,7 @@ public class StatusBarController extends BarController { * * @return the found animation, {@code null} otherwise */ - private TranslateAnimation findTranslateAnimation(Animation animation) { + private static TranslateAnimation findTranslateAnimation(Animation animation) { if (animation instanceof TranslateAnimation) { return (TranslateAnimation) animation; } else if (animation instanceof AnimationSet) { @@ -170,7 +170,7 @@ public class StatusBarController extends BarController { * Binary searches for a {@code t} such that there exists a {@code -0.01 < eps < 0.01} for which * {@code interpolator(t + eps) > 0.99}. */ - private float findAlmostThereFraction(Interpolator interpolator) { + private static float findAlmostThereFraction(Interpolator interpolator) { float val = 0.5f; float adj = 0.25f; while (adj >= 0.01f) { diff --git a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java index 5d5230756e42..6b45941d91ec 100644 --- a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java +++ b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java @@ -32,6 +32,14 @@ public class KeyguardServiceDelegate { private static final String TAG = "KeyguardServiceDelegate"; private static final boolean DEBUG = true; + private static final int SCREEN_STATE_OFF = 0; + private static final int SCREEN_STATE_TURNING_ON = 1; + private static final int SCREEN_STATE_ON = 2; + + private static final int INTERACTIVE_STATE_SLEEP = 0; + private static final int INTERACTIVE_STATE_AWAKE = 1; + private static final int INTERACTIVE_STATE_GOING_TO_SLEEP = 2; + protected KeyguardServiceWrapper mKeyguardService; private final Context mContext; private final View mScrim; // shown if keyguard crashes @@ -61,6 +69,8 @@ public class KeyguardServiceDelegate { public int offReason; public int currentUser; public boolean bootCompleted; + public int screenState; + public int interactiveState; }; public interface DrawnListener { @@ -144,10 +154,17 @@ public class KeyguardServiceDelegate { // If the system is ready, it means keyguard crashed and restarted. mKeyguardService.onSystemReady(); // This is used to hide the scrim once keyguard displays. - mKeyguardService.onStartedWakingUp(); - mKeyguardService.onScreenTurningOn( - new KeyguardShowDelegate(mDrawnListenerWhenConnect)); - mKeyguardService.onScreenTurnedOn(); + if (mKeyguardState.interactiveState == INTERACTIVE_STATE_AWAKE) { + mKeyguardService.onStartedWakingUp(); + } + if (mKeyguardState.screenState == SCREEN_STATE_ON + || mKeyguardState.screenState == SCREEN_STATE_TURNING_ON) { + mKeyguardService.onScreenTurningOn( + new KeyguardShowDelegate(mDrawnListenerWhenConnect)); + } + if (mKeyguardState.screenState == SCREEN_STATE_ON) { + mKeyguardService.onScreenTurnedOn(); + } mDrawnListenerWhenConnect = null; } if (mKeyguardState.bootCompleted) { @@ -231,6 +248,7 @@ public class KeyguardServiceDelegate { if (DEBUG) Log.v(TAG, "onStartedWakingUp()"); mKeyguardService.onStartedWakingUp(); } + mKeyguardState.interactiveState = INTERACTIVE_STATE_AWAKE; } public void onScreenTurnedOff() { @@ -238,6 +256,7 @@ public class KeyguardServiceDelegate { if (DEBUG) Log.v(TAG, "onScreenTurnedOff()"); mKeyguardService.onScreenTurnedOff(); } + mKeyguardState.screenState = SCREEN_STATE_OFF; } public void onScreenTurningOn(final DrawnListener drawnListener) { @@ -252,6 +271,7 @@ public class KeyguardServiceDelegate { mDrawnListenerWhenConnect = drawnListener; showScrim(); } + mKeyguardState.screenState = SCREEN_STATE_TURNING_ON; } public void onScreenTurnedOn() { @@ -259,6 +279,7 @@ public class KeyguardServiceDelegate { if (DEBUG) Log.v(TAG, "onScreenTurnedOn()"); mKeyguardService.onScreenTurnedOn(); } + mKeyguardState.screenState = SCREEN_STATE_ON; } public void onStartedGoingToSleep(int why) { @@ -266,12 +287,14 @@ public class KeyguardServiceDelegate { mKeyguardService.onStartedGoingToSleep(why); } mKeyguardState.offReason = why; + mKeyguardState.interactiveState = INTERACTIVE_STATE_GOING_TO_SLEEP; } public void onFinishedGoingToSleep(int why) { if (mKeyguardService != null) { mKeyguardService.onFinishedGoingToSleep(why); } + mKeyguardState.interactiveState = INTERACTIVE_STATE_SLEEP; } public void setKeyguardEnabled(boolean enabled) { diff --git a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java index 2a817eac3a09..8663254df10e 100644 --- a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java +++ b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java @@ -494,6 +494,15 @@ public class StatusBarManagerService extends IStatusBarService.Stub { } @Override + public void showKeyboardShortcutsMenu() { + if (mBar != null) { + try { + mBar.showKeyboardShortcutsMenu(); + } catch (RemoteException ex) {} + } + } + + @Override public void setCurrentUser(int newUserId) { if (SPEW) Slog.d(TAG, "Setting current user to user " + newUserId); mCurrentUserId = newUserId; diff --git a/services/core/java/com/android/server/wm/AppTransition.java b/services/core/java/com/android/server/wm/AppTransition.java index dfdb29c1071a..d1145d030654 100644 --- a/services/core/java/com/android/server/wm/AppTransition.java +++ b/services/core/java/com/android/server/wm/AppTransition.java @@ -26,6 +26,8 @@ import android.os.Handler; import android.os.IBinder; import android.os.IRemoteCallback; import android.util.Slog; +import android.util.SparseArray; +import android.view.AppTransitionAnimationSpec; import android.view.WindowManager; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; @@ -153,22 +155,25 @@ public class AppTransition implements Dump { private static final int THUMBNAIL_TRANSITION_EXIT_SCALE_DOWN = 3; private String mNextAppTransitionPackage; - private Bitmap mNextAppTransitionThumbnail; // Used for thumbnail transitions. True if we're scaling up, false if scaling down private boolean mNextAppTransitionScaleUp; private IRemoteCallback mNextAppTransitionCallback; private int mNextAppTransitionEnter; private int mNextAppTransitionExit; private int mNextAppTransitionInPlace; - private int mNextAppTransitionStartX; - private int mNextAppTransitionStartY; - private int mNextAppTransitionStartWidth; - private int mNextAppTransitionStartHeight; + + // Keyed by task id. + private final SparseArray<AppTransitionAnimationSpec> mNextAppTransitionAnimationsSpecs + = new SparseArray<>(); + private AppTransitionAnimationSpec mDefaultNextAppTransitionAnimationSpec; + private Rect mNextAppTransitionInsets = new Rect(); private Rect mTmpFromClipRect = new Rect(); private Rect mTmpToClipRect = new Rect(); + private final Rect mTmpStartRect = new Rect(); + private final static int APP_STATE_IDLE = 0; private final static int APP_STATE_READY = 1; private final static int APP_STATE_RUNNING = 2; @@ -276,8 +281,9 @@ public class AppTransition implements Dump { mAppTransitionState = APP_STATE_TIMEOUT; } - Bitmap getNextAppTransitionThumbnail() { - return mNextAppTransitionThumbnail; + Bitmap getAppTransitionThumbnailHeader(int taskId) { + AppTransitionAnimationSpec spec = mNextAppTransitionAnimationsSpecs.get(taskId); + return spec != null ? spec.bitmap : null; } /** Returns whether the next thumbnail transition is aspect scaled up. */ @@ -291,14 +297,6 @@ public class AppTransition implements Dump { return mNextAppTransitionScaleUp; } - int getStartingX() { - return mNextAppTransitionStartX; - } - - int getStartingY() { - return mNextAppTransitionStartY; - } - boolean prepare() { if (!isRunning()) { mAppTransitionState = APP_STATE_IDLE; @@ -321,7 +319,7 @@ public class AppTransition implements Dump { void clear() { mNextAppTransitionType = NEXT_TRANSIT_TYPE_NONE; mNextAppTransitionPackage = null; - mNextAppTransitionThumbnail = null; + mNextAppTransitionAnimationsSpecs.clear(); } void freeze() { @@ -459,16 +457,17 @@ public class AppTransition implements Dump { return -startPos / denom; } - private Animation createScaleUpAnimationLocked(int transit, boolean enter, - int appWidth, int appHeight) { + private Animation createScaleUpAnimationLocked( + int transit, boolean enter, int appWidth, int appHeight) { Animation a = null; + getDefaultNextAppTransitionStartRect(mTmpStartRect); if (enter) { // Entering app zooms out from the center of the initial rect. - float scaleW = mNextAppTransitionStartWidth / (float) appWidth; - float scaleH = mNextAppTransitionStartHeight / (float) appHeight; + float scaleW = mTmpStartRect.width() / (float) appWidth; + float scaleH = mTmpStartRect.height() / (float) appHeight; Animation scale = new ScaleAnimation(scaleW, 1, scaleH, 1, - computePivot(mNextAppTransitionStartX, scaleW), - computePivot(mNextAppTransitionStartY, scaleH)); + computePivot(mTmpStartRect.left, scaleW), + computePivot(mTmpStartRect.right, scaleH)); scale.setInterpolator(mDecelerateInterpolator); Animation alpha = new AlphaAnimation(0, 1); @@ -512,6 +511,32 @@ public class AppTransition implements Dump { return a; } + private void getDefaultNextAppTransitionStartRect(Rect rect) { + if (mDefaultNextAppTransitionAnimationSpec == null || + mDefaultNextAppTransitionAnimationSpec.rect == null) { + Slog.wtf(TAG, "Starting rect for app requested, but none available", new Throwable()); + rect.setEmpty(); + } else { + rect.set(mDefaultNextAppTransitionAnimationSpec.rect); + } + } + + void getNextAppTransitionStartRect(int taskId, Rect rect) { + AppTransitionAnimationSpec spec = mNextAppTransitionAnimationsSpecs.get(taskId); + if (spec == null || spec.rect == null) { + Slog.wtf(TAG, "Starting rect for task: " + taskId + " requested, but not available", + new Throwable()); + rect.setEmpty(); + } else { + rect.set(spec.rect); + } + } + + private void putDefaultNextAppTransitionCoordinates(int left, int top, int width, int height) { + mDefaultNextAppTransitionAnimationSpec = new AppTransitionAnimationSpec(-1 /* taskId */, + null /* bitmap */, new Rect(left, top, left + width, top + height)); + } + private Animation createClipRevealAnimationLocked(int transit, boolean enter, Rect appFrame) { final Animation anim; if (enter) { @@ -519,28 +544,27 @@ public class AppTransition implements Dump { final int appWidth = appFrame.width(); final int appHeight = appFrame.height(); + getDefaultNextAppTransitionStartRect(mTmpStartRect); float t = 0f; if (appHeight > 0) { - t = (float) mNextAppTransitionStartY / appHeight; + t = (float) mTmpStartRect.left / appHeight; } int translationY = mClipRevealTranslationY + (int)(appHeight / 7f * t); - int centerX = mNextAppTransitionStartX + mNextAppTransitionStartWidth / 2; - int centerY = mNextAppTransitionStartY + mNextAppTransitionStartHeight / 2; + int centerX = mTmpStartRect.centerX(); + int centerY = mTmpStartRect.centerY(); + int halfWidth = mTmpStartRect.width() / 2; + int halfHeight = mTmpStartRect.height() / 2; // Clip third of the from size of launch icon, expand to full width/height Animation clipAnimLR = new ClipRectLRAnimation( - centerX - mNextAppTransitionStartWidth / 2, - centerX + mNextAppTransitionStartWidth / 2, - 0, appWidth); + centerX - halfWidth, centerX + halfWidth, 0, appWidth); clipAnimLR.setInterpolator(mClipHorizontalInterpolator); clipAnimLR.setDuration((long) (DEFAULT_APP_TRANSITION_DURATION / 2.5f)); - Animation clipAnimTB = new ClipRectTBAnimation( - centerY - mNextAppTransitionStartHeight / 2 - translationY, - centerY + mNextAppTransitionStartHeight / 2 - translationY, - 0, appHeight); + Animation clipAnimTB = new ClipRectTBAnimation(centerY - halfHeight - translationY, + centerY + halfHeight/ 2 - translationY, 0, appHeight); clipAnimTB.setInterpolator(mTouchResponseInterpolator); clipAnimTB.setDuration(DEFAULT_APP_TRANSITION_DURATION); @@ -649,31 +673,32 @@ public class AppTransition implements Dump { /** * This animation runs for the thumbnail that gets cross faded with the enter/exit activity - * when a thumbnail is specified with the activity options. + * when a thumbnail is specified with the pending animation override. */ - Animation createThumbnailAspectScaleAnimationLocked(Rect appRect) { + Animation createThumbnailAspectScaleAnimationLocked(Rect appRect, Bitmap thumbnailHeader, + final int taskId) { Animation a; - final int thumbWidthI = mNextAppTransitionThumbnail.getWidth(); + final int thumbWidthI = thumbnailHeader.getWidth(); final float thumbWidth = thumbWidthI > 0 ? thumbWidthI : 1; - final int thumbHeightI = mNextAppTransitionThumbnail.getHeight(); + final int thumbHeightI = thumbnailHeader.getHeight(); final float thumbHeight = thumbHeightI > 0 ? thumbHeightI : 1; final int appWidth = appRect.width(); float scaleW = appWidth / thumbWidth; float unscaledHeight = thumbHeight * scaleW; - float unscaledStartY = mNextAppTransitionStartY - (unscaledHeight - thumbHeight) / 2f; + getNextAppTransitionStartRect(taskId, mTmpStartRect); + float unscaledStartY = mTmpStartRect.top - (unscaledHeight - thumbHeight) / 2f; if (mNextAppTransitionScaleUp) { // Animation up from the thumbnail to the full screen Animation scale = new ScaleAnimation(1f, scaleW, 1f, scaleW, - mNextAppTransitionStartX + (thumbWidth / 2f), - mNextAppTransitionStartY + (thumbHeight / 2f)); + mTmpStartRect.left + (thumbWidth / 2f), mTmpStartRect.top + (thumbHeight / 2f)); scale.setInterpolator(mTouchResponseInterpolator); scale.setDuration(THUMBNAIL_APP_TRANSITION_DURATION); Animation alpha = new AlphaAnimation(1, 0); alpha.setInterpolator(mThumbnailFadeOutInterpolator); alpha.setDuration(THUMBNAIL_APP_TRANSITION_ALPHA_DURATION); final float toX = appRect.left + appRect.width() / 2 - - (mNextAppTransitionStartX + thumbWidth / 2); + (mTmpStartRect.left + thumbWidth / 2); final float toY = appRect.top + mNextAppTransitionInsets.top + -unscaledStartY; Animation translate = new TranslateAnimation(0, toX, 0, toY); translate.setInterpolator(mTouchResponseInterpolator); @@ -688,8 +713,7 @@ public class AppTransition implements Dump { } else { // Animation down from the full screen to the thumbnail Animation scale = new ScaleAnimation(scaleW, 1f, scaleW, 1f, - mNextAppTransitionStartX + (thumbWidth / 2f), - mNextAppTransitionStartY + (thumbHeight / 2f)); + mTmpStartRect.left + (thumbWidth / 2f), mTmpStartRect.top + (thumbHeight / 2f)); scale.setInterpolator(mTouchResponseInterpolator); scale.setDuration(THUMBNAIL_APP_TRANSITION_DURATION); Animation alpha = new AlphaAnimation(0f, 1f); @@ -718,11 +742,13 @@ public class AppTransition implements Dump { */ Animation createAspectScaledThumbnailEnterExitAnimationLocked(int thumbTransitState, int appWidth, int appHeight, int orientation, int transit, Rect containingFrame, - Rect contentInsets, @Nullable Rect surfaceInsets, boolean resizedWindow) { + Rect contentInsets, @Nullable Rect surfaceInsets, boolean resizedWindow, + int taskId) { Animation a; - final int thumbWidthI = mNextAppTransitionStartWidth; + getDefaultNextAppTransitionStartRect(mTmpStartRect); + final int thumbWidthI = mTmpStartRect.width(); final float thumbWidth = thumbWidthI > 0 ? thumbWidthI : 1; - final int thumbHeightI = mNextAppTransitionStartHeight; + final int thumbHeightI = mTmpStartRect.height(); final float thumbHeight = thumbHeightI > 0 ? thumbHeightI : 1; // Used for the ENTER_SCALE_UP and EXIT_SCALE_DOWN transitions @@ -733,7 +759,7 @@ public class AppTransition implements Dump { case THUMBNAIL_TRANSITION_ENTER_SCALE_UP: { if (resizedWindow) { a = createAspectScaledThumbnailEnterNonFullscreenAnimationLocked( - containingFrame, surfaceInsets); + containingFrame, surfaceInsets, taskId); } else { // App window scaling up to become full screen if (orientation == Configuration.ORIENTATION_PORTRAIT) { @@ -759,8 +785,8 @@ public class AppTransition implements Dump { mNextAppTransitionInsets.set(contentInsets); Animation scaleAnim = new ScaleAnimation(scale, 1, scale, 1, - computePivot(mNextAppTransitionStartX, scale), - computePivot(mNextAppTransitionStartY, scale)); + computePivot(mTmpStartRect.left, scale), + computePivot(mTmpStartRect.top, scale)); Animation clipAnim = new ClipRectAnimation(mTmpFromClipRect, mTmpToClipRect); Animation translateAnim = new TranslateAnimation(0, 0, -scaledTopDecor, 0); @@ -819,8 +845,8 @@ public class AppTransition implements Dump { mNextAppTransitionInsets.set(contentInsets); Animation scaleAnim = new ScaleAnimation(1, scale, 1, scale, - computePivot(mNextAppTransitionStartX, scale), - computePivot(mNextAppTransitionStartY, scale)); + computePivot(mTmpStartRect.left, scale), + computePivot(mTmpStartRect.top, scale)); Animation clipAnim = new ClipRectAnimation(mTmpFromClipRect, mTmpToClipRect); Animation translateAnim = new TranslateAnimation(0, 0, 0, -scaledTopDecor); @@ -844,11 +870,12 @@ public class AppTransition implements Dump { } private Animation createAspectScaledThumbnailEnterNonFullscreenAnimationLocked( - Rect containingFrame, @Nullable Rect surfaceInsets) { + Rect containingFrame, @Nullable Rect surfaceInsets, int taskId) { + getNextAppTransitionStartRect(taskId, mTmpStartRect); float width = containingFrame.width(); float height = containingFrame.height(); - float scaleWidth = mNextAppTransitionStartWidth / width; - float scaleHeight = mNextAppTransitionStartHeight / height; + float scaleWidth = mTmpStartRect.width() / width; + float scaleHeight = mTmpStartRect.height() / height; AnimationSet set = new AnimationSet(true); int surfaceInsetsHorizontal = surfaceInsets == null ? 0 : surfaceInsets.left + surfaceInsets.right; @@ -858,9 +885,9 @@ public class AppTransition implements Dump { // we need to account for surface insets that will be used to enlarge the surface. ScaleAnimation scale = new ScaleAnimation(scaleWidth, 1, scaleHeight, 1, (width + surfaceInsetsHorizontal) / 2, (height + surfaceInsetsVertical) / 2); - int fromX = mNextAppTransitionStartX + mNextAppTransitionStartWidth / 2 + int fromX = mTmpStartRect.left + mTmpStartRect.width() / 2 - (containingFrame.left + containingFrame.width() / 2); - int fromY = mNextAppTransitionStartY + mNextAppTransitionStartHeight / 2 + int fromY = mTmpStartRect.top + mTmpStartRect.height() / 2 - (containingFrame.top + containingFrame.height() / 2); TranslateAnimation translation = new TranslateAnimation(fromX, 0, fromY, 0); set.addAnimation(scale); @@ -870,13 +897,15 @@ public class AppTransition implements Dump { /** * This animation runs for the thumbnail that gets cross faded with the enter/exit activity - * when a thumbnail is specified with the activity options. + * when a thumbnail is specified with the pending animation override. */ - Animation createThumbnailScaleAnimationLocked(int appWidth, int appHeight, int transit) { + Animation createThumbnailScaleAnimationLocked(int appWidth, int appHeight, int transit, + Bitmap thumbnailHeader) { Animation a; - final int thumbWidthI = mNextAppTransitionThumbnail.getWidth(); + getDefaultNextAppTransitionStartRect(mTmpStartRect); + final int thumbWidthI = thumbnailHeader.getWidth(); final float thumbWidth = thumbWidthI > 0 ? thumbWidthI : 1; - final int thumbHeightI = mNextAppTransitionThumbnail.getHeight(); + final int thumbHeightI = thumbnailHeader.getHeight(); final float thumbHeight = thumbHeightI > 0 ? thumbHeightI : 1; if (mNextAppTransitionScaleUp) { @@ -884,8 +913,8 @@ public class AppTransition implements Dump { float scaleW = appWidth / thumbWidth; float scaleH = appHeight / thumbHeight; Animation scale = new ScaleAnimation(1, scaleW, 1, scaleH, - computePivot(mNextAppTransitionStartX, 1 / scaleW), - computePivot(mNextAppTransitionStartY, 1 / scaleH)); + computePivot(mTmpStartRect.left, 1 / scaleW), + computePivot(mTmpStartRect.top, 1 / scaleH)); scale.setInterpolator(mDecelerateInterpolator); Animation alpha = new AlphaAnimation(1, 0); @@ -901,8 +930,8 @@ public class AppTransition implements Dump { float scaleW = appWidth / thumbWidth; float scaleH = appHeight / thumbHeight; a = new ScaleAnimation(scaleW, 1, scaleH, 1, - computePivot(mNextAppTransitionStartX, 1 / scaleW), - computePivot(mNextAppTransitionStartY, 1 / scaleH)); + computePivot(mTmpStartRect.left, 1 / scaleW), + computePivot(mTmpStartRect.top, 1 / scaleH)); } return prepareThumbnailAnimation(a, appWidth, appHeight, transit); @@ -913,11 +942,13 @@ public class AppTransition implements Dump { * leaving, and the activity that is entering. */ Animation createThumbnailEnterExitAnimationLocked(int thumbTransitState, int appWidth, - int appHeight, int transit) { + int appHeight, int transit, int taskId) { + Bitmap thumbnailHeader = getAppTransitionThumbnailHeader(taskId); Animation a; - final int thumbWidthI = mNextAppTransitionThumbnail.getWidth(); + getDefaultNextAppTransitionStartRect(mTmpStartRect); + final int thumbWidthI = thumbnailHeader != null ? thumbnailHeader.getWidth() : appWidth; final float thumbWidth = thumbWidthI > 0 ? thumbWidthI : 1; - final int thumbHeightI = mNextAppTransitionThumbnail.getHeight(); + final int thumbHeightI = thumbnailHeader != null ? thumbnailHeader.getHeight() : appHeight; final float thumbHeight = thumbHeightI > 0 ? thumbHeightI : 1; switch (thumbTransitState) { @@ -926,8 +957,8 @@ public class AppTransition implements Dump { float scaleW = thumbWidth / appWidth; float scaleH = thumbHeight / appHeight; a = new ScaleAnimation(scaleW, 1, scaleH, 1, - computePivot(mNextAppTransitionStartX, scaleW), - computePivot(mNextAppTransitionStartY, scaleH)); + computePivot(mTmpStartRect.left, scaleW), + computePivot(mTmpStartRect.top, scaleH)); break; } case THUMBNAIL_TRANSITION_EXIT_SCALE_UP: { @@ -954,8 +985,8 @@ public class AppTransition implements Dump { float scaleW = thumbWidth / appWidth; float scaleH = thumbHeight / appHeight; Animation scale = new ScaleAnimation(1, scaleW, 1, scaleH, - computePivot(mNextAppTransitionStartX, scaleW), - computePivot(mNextAppTransitionStartY, scaleH)); + computePivot(mTmpStartRect.left, scaleW), + computePivot(mTmpStartRect.top, scaleH)); Animation alpha = new AlphaAnimation(1, 0); @@ -987,7 +1018,7 @@ public class AppTransition implements Dump { Animation loadAnimation(WindowManager.LayoutParams lp, int transit, boolean enter, int appWidth, int appHeight, int orientation, Rect containingFrame, Rect contentInsets, @Nullable Rect surfaceInsets, Rect appFrame, boolean isVoiceInteraction, - boolean resizedWindow) { + boolean resizedWindow, int taskId) { Animation a; if (isVoiceInteraction && (transit == TRANSIT_ACTIVITY_OPEN || transit == TRANSIT_TASK_OPEN @@ -1042,7 +1073,7 @@ public class AppTransition implements Dump { mNextAppTransitionScaleUp = (mNextAppTransitionType == NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_UP); a = createThumbnailEnterExitAnimationLocked(getThumbnailTransitionState(enter), - appWidth, appHeight, transit); + appWidth, appHeight, transit, taskId); if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) { String animName = mNextAppTransitionScaleUp ? "ANIM_THUMBNAIL_SCALE_UP" : "ANIM_THUMBNAIL_SCALE_DOWN"; @@ -1057,7 +1088,7 @@ public class AppTransition implements Dump { (mNextAppTransitionType == NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_UP); a = createAspectScaledThumbnailEnterExitAnimationLocked( getThumbnailTransitionState(enter), appWidth, appHeight, orientation, transit, - containingFrame, contentInsets, surfaceInsets, resizedWindow); + containingFrame, contentInsets, surfaceInsets, resizedWindow, taskId); if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) { String animName = mNextAppTransitionScaleUp ? "ANIM_THUMBNAIL_ASPECT_SCALE_UP" : "ANIM_THUMBNAIL_ASPECT_SCALE_DOWN"; @@ -1147,7 +1178,7 @@ public class AppTransition implements Dump { if (isTransitionSet()) { mNextAppTransitionType = NEXT_TRANSIT_TYPE_CUSTOM; mNextAppTransitionPackage = packageName; - mNextAppTransitionThumbnail = null; + mNextAppTransitionAnimationsSpecs.clear(); mNextAppTransitionEnter = enterAnim; mNextAppTransitionExit = exitAnim; postAnimationCallback(); @@ -1158,15 +1189,13 @@ public class AppTransition implements Dump { } void overridePendingAppTransitionScaleUp(int startX, int startY, int startWidth, - int startHeight) { + int startHeight) { if (isTransitionSet()) { mNextAppTransitionType = NEXT_TRANSIT_TYPE_SCALE_UP; mNextAppTransitionPackage = null; - mNextAppTransitionThumbnail = null; - mNextAppTransitionStartX = startX; - mNextAppTransitionStartY = startY; - mNextAppTransitionStartWidth = startWidth; - mNextAppTransitionStartHeight = startHeight; + mNextAppTransitionAnimationsSpecs.clear(); + putDefaultNextAppTransitionCoordinates(startX, startY, startX + startWidth, + startY + startHeight); postAnimationCallback(); mNextAppTransitionCallback = null; } @@ -1176,10 +1205,7 @@ public class AppTransition implements Dump { int startWidth, int startHeight) { if (isTransitionSet()) { mNextAppTransitionType = NEXT_TRANSIT_TYPE_CLIP_REVEAL; - mNextAppTransitionStartX = startX; - mNextAppTransitionStartY = startY; - mNextAppTransitionStartWidth = startWidth; - mNextAppTransitionStartHeight = startHeight; + putDefaultNextAppTransitionCoordinates(startX, startY, startWidth, startHeight); postAnimationCallback(); mNextAppTransitionCallback = null; } @@ -1191,10 +1217,9 @@ public class AppTransition implements Dump { mNextAppTransitionType = scaleUp ? NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_UP : NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_DOWN; mNextAppTransitionPackage = null; - mNextAppTransitionThumbnail = srcThumb; + mNextAppTransitionAnimationsSpecs.clear(); mNextAppTransitionScaleUp = scaleUp; - mNextAppTransitionStartX = startX; - mNextAppTransitionStartY = startY; + putDefaultNextAppTransitionCoordinates(startX, startY, 0 ,0); postAnimationCallback(); mNextAppTransitionCallback = startedCallback; } else { @@ -1208,12 +1233,9 @@ public class AppTransition implements Dump { mNextAppTransitionType = scaleUp ? NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_UP : NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_DOWN; mNextAppTransitionPackage = null; - mNextAppTransitionThumbnail = srcThumb; + mNextAppTransitionAnimationsSpecs.clear(); mNextAppTransitionScaleUp = scaleUp; - mNextAppTransitionStartX = startX; - mNextAppTransitionStartY = startY; - mNextAppTransitionStartWidth = targetWidth; - mNextAppTransitionStartHeight = targetHeight; + putDefaultNextAppTransitionCoordinates(startX, startY, targetWidth, targetHeight); postAnimationCallback(); mNextAppTransitionCallback = startedCallback; } else { @@ -1221,6 +1243,27 @@ public class AppTransition implements Dump { } } + public void overridePendingAppTransitionMultiThumb(AppTransitionAnimationSpec[] specs, + IRemoteCallback callback, boolean scaleUp) { + if (isTransitionSet()) { + mNextAppTransitionType = scaleUp ? NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_UP + : NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_DOWN; + mNextAppTransitionPackage = null; + mNextAppTransitionAnimationsSpecs.clear(); + mNextAppTransitionScaleUp = scaleUp; + for (int i = 0; i < specs.length; i++) { + AppTransitionAnimationSpec spec = specs[i]; + if (spec != null) { + mNextAppTransitionAnimationsSpecs.put(spec.taskId, spec); + } + } + postAnimationCallback(); + mNextAppTransitionCallback = callback; + } else { + postAnimationCallback(); + } + } + void overrideInPlaceAppTransition(String packageName, int anim) { if (isTransitionSet()) { mNextAppTransitionType = NEXT_TRANSIT_TYPE_CUSTOM_IN_PLACE; @@ -1350,33 +1393,30 @@ public class AppTransition implements Dump { pw.print(prefix); pw.print("mNextAppTransitionInPlace=0x"); pw.print(Integer.toHexString(mNextAppTransitionInPlace)); break; - case NEXT_TRANSIT_TYPE_SCALE_UP: + case NEXT_TRANSIT_TYPE_SCALE_UP: { + getDefaultNextAppTransitionStartRect(mTmpStartRect); pw.print(prefix); pw.print("mNextAppTransitionStartX="); - pw.print(mNextAppTransitionStartX); + pw.print(mTmpStartRect.left); pw.print(" mNextAppTransitionStartY="); - pw.println(mNextAppTransitionStartY); + pw.println(mTmpStartRect.top); pw.print(prefix); pw.print("mNextAppTransitionStartWidth="); - pw.print(mNextAppTransitionStartWidth); + pw.print(mTmpStartRect.width()); pw.print(" mNextAppTransitionStartHeight="); - pw.println(mNextAppTransitionStartHeight); + pw.println(mTmpStartRect.height()); break; + } case NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_UP: case NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_DOWN: case NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_UP: - case NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_DOWN: - pw.print(prefix); pw.print("mNextAppTransitionThumbnail="); - pw.print(mNextAppTransitionThumbnail); - pw.print(" mNextAppTransitionStartX="); - pw.print(mNextAppTransitionStartX); - pw.print(" mNextAppTransitionStartY="); - pw.println(mNextAppTransitionStartY); - pw.print(prefix); pw.print("mNextAppTransitionStartWidth="); - pw.print(mNextAppTransitionStartWidth); - pw.print(" mNextAppTransitionStartHeight="); - pw.println(mNextAppTransitionStartHeight); + case NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_DOWN: { + pw.print(prefix); pw.print("mDefaultNextAppTransitionAnimationSpec="); + pw.println(mDefaultNextAppTransitionAnimationSpec); + pw.print(prefix); pw.print("mNextAppTransitionAnimationsSpecs="); + pw.println(mNextAppTransitionAnimationsSpecs); pw.print(prefix); pw.print("mNextAppTransitionScaleUp="); pw.println(mNextAppTransitionScaleUp); break; + } } if (mNextAppTransitionCallback != null) { pw.print(prefix); pw.print("mNextAppTransitionCallback="); diff --git a/services/core/java/com/android/server/wm/AppWindowAnimator.java b/services/core/java/com/android/server/wm/AppWindowAnimator.java index df7b23d88276..2828cd0acdfe 100644 --- a/services/core/java/com/android/server/wm/AppWindowAnimator.java +++ b/services/core/java/com/android/server/wm/AppWindowAnimator.java @@ -193,6 +193,7 @@ public class AppWindowAnimator { final int windowCount = mAppToken.allAppWindows.size(); final int adj = animLayerAdjustment; thumbnailLayer = -1; + final WallpaperController wallpaperController = mService.mWallpaperControllerLocked; for (int i = 0; i < windowCount; i++) { final WindowState w = mAppToken.allAppWindows.get(i); final WindowStateAnimator winAnimator = w.mWinAnimator; @@ -204,9 +205,7 @@ public class AppWindowAnimator { if (w == mService.mInputMethodTarget && !mService.mInputMethodTargetWaitingAnim) { mService.setInputMethodAnimLayerAdjustment(adj); } - if (w == mService.mWallpaperTarget && mService.mLowerWallpaperTarget == null) { - mService.setWallpaperAnimLayerAdjustmentLocked(adj); - } + wallpaperController.setAnimLayerAdjustment(w, adj); } } diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java index 21e92c9f3036..65f26c1c0afa 100644 --- a/services/core/java/com/android/server/wm/InputMonitor.java +++ b/services/core/java/com/android/server/wm/InputMonitor.java @@ -260,6 +260,7 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks { // Add all windows on the default display. final int numDisplays = mService.mDisplayContents.size(); + final WallpaperController wallpaperController = mService.mWallpaperControllerLocked; for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) { WindowList windows = mService.mDisplayContents.valueAt(displayNdx).getWindowList(); for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) { @@ -287,7 +288,7 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks { != 0) { disableWallpaperTouchEvents = true; } - final boolean hasWallpaper = (child == mService.mWallpaperTarget) + final boolean hasWallpaper = wallpaperController.isWallpaperTarget(child) && (privateFlags & WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD) == 0 && !disableWallpaperTouchEvents; final boolean onDefaultDisplay = (child.getDisplayId() == Display.DEFAULT_DISPLAY); diff --git a/services/core/java/com/android/server/wm/Session.java b/services/core/java/com/android/server/wm/Session.java index 75bb10ab1dfe..12f61f933695 100644 --- a/services/core/java/com/android/server/wm/Session.java +++ b/services/core/java/com/android/server/wm/Session.java @@ -403,7 +403,7 @@ final class Session extends IWindowSession.Stub synchronized(mService.mWindowMap) { long ident = Binder.clearCallingIdentity(); try { - mService.setWindowWallpaperPositionLocked( + mService.mWallpaperControllerLocked.setWindowWallpaperPosition( mService.windowForClientLocked(this, window, true), x, y, xStep, yStep); } finally { @@ -413,14 +413,16 @@ final class Session extends IWindowSession.Stub } public void wallpaperOffsetsComplete(IBinder window) { - mService.wallpaperOffsetsComplete(window); + synchronized (mService.mWindowMap) { + mService.mWallpaperControllerLocked.wallpaperOffsetsComplete(window); + } } public void setWallpaperDisplayOffset(IBinder window, int x, int y) { synchronized(mService.mWindowMap) { long ident = Binder.clearCallingIdentity(); try { - mService.setWindowWallpaperDisplayOffsetLocked( + mService.mWallpaperControllerLocked.setWindowWallpaperDisplayOffset( mService.windowForClientLocked(this, window, true), x, y); } finally { Binder.restoreCallingIdentity(ident); @@ -433,7 +435,7 @@ final class Session extends IWindowSession.Stub synchronized(mService.mWindowMap) { long ident = Binder.clearCallingIdentity(); try { - return mService.sendWindowWallpaperCommandLocked( + return mService.mWallpaperControllerLocked.sendWindowWallpaperCommand( mService.windowForClientLocked(this, window, true), action, x, y, z, extras, sync); } finally { @@ -443,7 +445,9 @@ final class Session extends IWindowSession.Stub } public void wallpaperCommandComplete(IBinder window, Bundle result) { - mService.wallpaperCommandComplete(window, result); + synchronized (mService.mWindowMap) { + mService.mWallpaperControllerLocked.wallpaperCommandComplete(window); + } } public void onRectangleOnScreenRequested(IBinder token, Rect rectangle) { diff --git a/services/core/java/com/android/server/wm/WallpaperController.java b/services/core/java/com/android/server/wm/WallpaperController.java new file mode 100644 index 000000000000..b871d7f0f501 --- /dev/null +++ b/services/core/java/com/android/server/wm/WallpaperController.java @@ -0,0 +1,862 @@ +/* + * Copyright (C) 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package com.android.server.wm; + +import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER; +import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD; +import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING; +import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_SCRIM; +import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER; +import static com.android.server.wm.WindowManagerService.DEBUG_ADD_REMOVE; +import static com.android.server.wm.WindowManagerService.DEBUG_APP_TRANSITIONS; +import static com.android.server.wm.WindowManagerService.DEBUG_LAYERS; +import static com.android.server.wm.WindowManagerService.DEBUG_WINDOW_MOVEMENT; +import static com.android.server.wm.WindowManagerService.DEBUG_VISIBILITY; +import static com.android.server.wm.WindowManagerService.DEBUG_WALLPAPER; +import static com.android.server.wm.WindowManagerService.DEBUG_WALLPAPER_LIGHT; +import static com.android.server.wm.WindowManagerService.H.WALLPAPER_DRAW_PENDING_TIMEOUT; +import static com.android.server.wm.WindowManagerService.TYPE_LAYER_MULTIPLIER; +import static com.android.server.wm.WindowManagerService.TYPE_LAYER_OFFSET; + +import android.os.Bundle; +import android.os.Debug; +import android.os.IBinder; +import android.os.RemoteException; +import android.os.SystemClock; +import android.util.Slog; +import android.view.DisplayInfo; +import android.view.WindowManager; +import android.view.WindowManagerPolicy; + +import java.io.PrintWriter; +import java.util.ArrayList; + +/** + * Controls wallpaper windows visibility, ordering, and so on. + * NOTE: All methods in this class must be called with the window manager service lock held. + */ +class WallpaperController { + private static final String TAG = com.android.server.wm.WindowManagerService.TAG; + final private WindowManagerService mService; + + private final ArrayList<WindowToken> mWallpaperTokens = new ArrayList<>(); + + // If non-null, this is the currently visible window that is associated + // with the wallpaper. + private WindowState mWallpaperTarget = null; + // If non-null, we are in the middle of animating from one wallpaper target + // to another, and this is the lower one in Z-order. + private WindowState mLowerWallpaperTarget = null; + // If non-null, we are in the middle of animating from one wallpaper target + // to another, and this is the higher one in Z-order. + private WindowState mUpperWallpaperTarget = null; + + private int mWallpaperAnimLayerAdjustment; + + private float mLastWallpaperX = -1; + private float mLastWallpaperY = -1; + private float mLastWallpaperXStep = -1; + private float mLastWallpaperYStep = -1; + private int mLastWallpaperDisplayOffsetX = Integer.MIN_VALUE; + private int mLastWallpaperDisplayOffsetY = Integer.MIN_VALUE; + + // This is set when we are waiting for a wallpaper to tell us it is done + // changing its scroll position. + WindowState mWaitingOnWallpaper; + + // The last time we had a timeout when waiting for a wallpaper. + private long mLastWallpaperTimeoutTime; + // We give a wallpaper up to 150ms to finish scrolling. + private static final long WALLPAPER_TIMEOUT = 150; + // Time we wait after a timeout before trying to wait again. + private static final long WALLPAPER_TIMEOUT_RECOVERY = 10000; + + // Set to the wallpaper window we would like to hide once the transition animations are done. + // This is useful in cases where we don't want the wallpaper to be hidden when the close app + // is a wallpaper target and is done animating out, but the opening app isn't a wallpaper + // target and isn't done animating in. + private WindowState mDeferredHideWallpaper = null; + + // We give a wallpaper up to 500ms to finish drawing before playing app transitions. + private static final long WALLPAPER_DRAW_PENDING_TIMEOUT_DURATION = 500; + private static final int WALLPAPER_DRAW_NORMAL = 0; + private static final int WALLPAPER_DRAW_PENDING = 1; + private static final int WALLPAPER_DRAW_TIMEOUT = 2; + private int mWallpaperDrawState = WALLPAPER_DRAW_NORMAL; + + public WallpaperController(WindowManagerService service) { + mService = service; + } + + WindowState getWallpaperTarget() { + return mWallpaperTarget; + } + + WindowState getLowerWallpaperTarget() { + return mLowerWallpaperTarget; + } + + WindowState getUpperWallpaperTarget() { + return mUpperWallpaperTarget; + } + + boolean isWallpaperTarget(WindowState win) { + return win == mWallpaperTarget; + } + + boolean isBelowWallpaperTarget(WindowState win) { + return mWallpaperTarget != null && mWallpaperTarget.mLayer >= win.mBaseLayer; + } + + boolean isWallpaperVisible() { + return isWallpaperVisible(mWallpaperTarget); + } + + private boolean isWallpaperVisible(WindowState wallpaperTarget) { + if (DEBUG_WALLPAPER) Slog.v(TAG, "Wallpaper vis: target " + wallpaperTarget + ", obscured=" + + (wallpaperTarget != null ? Boolean.toString(wallpaperTarget.mObscured) : "??") + + " anim=" + ((wallpaperTarget != null && wallpaperTarget.mAppToken != null) + ? wallpaperTarget.mAppToken.mAppAnimator.animation : null) + + " upper=" + mUpperWallpaperTarget + + " lower=" + mLowerWallpaperTarget); + return (wallpaperTarget != null + && (!wallpaperTarget.mObscured || (wallpaperTarget.mAppToken != null + && wallpaperTarget.mAppToken.mAppAnimator.animation != null))) + || mUpperWallpaperTarget != null + || mLowerWallpaperTarget != null; + } + + boolean isWallpaperTargetAnimating() { + return mWallpaperTarget != null && mWallpaperTarget.mWinAnimator.isAnimating() + && !mWallpaperTarget.mWinAnimator.isDummyAnimation(); + } + + void updateWallpaperVisibility() { + final boolean visible = isWallpaperVisible(mWallpaperTarget); + final DisplayContent displayContent = mWallpaperTarget.getDisplayContent(); + if (displayContent == null) { + return; + } + final DisplayInfo displayInfo = displayContent.getDisplayInfo(); + final int dw = displayInfo.logicalWidth; + final int dh = displayInfo.logicalHeight; + + for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { + WindowToken token = mWallpaperTokens.get(curTokenNdx); + if (token.hidden == visible) { + token.hidden = !visible; + // Need to do a layout to ensure the wallpaper now has the + // correct size. + displayContent.layoutNeeded = true; + } + + final WindowList windows = token.windows; + for (int wallpaperNdx = windows.size() - 1; wallpaperNdx >= 0; wallpaperNdx--) { + WindowState wallpaper = windows.get(wallpaperNdx); + if (visible) { + updateWallpaperOffset(wallpaper, dw, dh, false); + } + + dispatchWallpaperVisibility(wallpaper, visible); + } + } + } + + void hideDeferredWallpapersIfNeeded() { + if (mDeferredHideWallpaper != null) { + hideWallpapers(mDeferredHideWallpaper); + mDeferredHideWallpaper = null; + } + } + + void hideWallpapers(final WindowState winGoingAway) { + if (mWallpaperTarget != null + && (mWallpaperTarget != winGoingAway || mLowerWallpaperTarget != null)) { + return; + } + if (mService.mAppTransition.isRunning()) { + // Defer hiding the wallpaper when app transition is running until the animations + // are done. + mDeferredHideWallpaper = winGoingAway; + return; + } + + final boolean wasDeferred = (mDeferredHideWallpaper == winGoingAway); + for (int i = mWallpaperTokens.size() - 1; i >= 0; i--) { + final WindowToken token = mWallpaperTokens.get(i); + for (int j = token.windows.size() - 1; j >= 0; j--) { + final WindowState wallpaper = token.windows.get(j); + final WindowStateAnimator winAnimator = wallpaper.mWinAnimator; + if (!winAnimator.mLastHidden || wasDeferred) { + winAnimator.hide(); + dispatchWallpaperVisibility(wallpaper, false); + final DisplayContent displayContent = wallpaper.getDisplayContent(); + if (displayContent != null) { + displayContent.pendingLayoutChanges |= + WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; + } + } + } + if (DEBUG_WALLPAPER_LIGHT && !token.hidden) Slog.d(TAG, "Hiding wallpaper " + token + + " from " + winGoingAway + " target=" + mWallpaperTarget + " lower=" + + mLowerWallpaperTarget + "\n" + Debug.getCallers(5, " ")); + token.hidden = true; + } + } + + /** + * Check wallpaper for visibility change and notify window if so. + * @param wallpaper The wallpaper to test and notify. + * @param visible Current visibility. + */ + void dispatchWallpaperVisibility(final WindowState wallpaper, final boolean visible) { + // Only send notification if the visibility actually changed and we are not trying to hide + // the wallpaper when we are deferring hiding of the wallpaper. + if (wallpaper.mWallpaperVisible != visible + && (mDeferredHideWallpaper == null || visible)) { + wallpaper.mWallpaperVisible = visible; + try { + if (DEBUG_VISIBILITY || DEBUG_WALLPAPER_LIGHT) Slog.v(TAG, + "Updating vis of wallpaper " + wallpaper + + ": " + visible + " from:\n" + Debug.getCallers(4, " ")); + wallpaper.mClient.dispatchAppVisibility(visible); + } catch (RemoteException e) { + } + } + } + + boolean updateWallpaperOffset(WindowState wallpaperWin, int dw, int dh, boolean sync) { + boolean rawChanged = false; + float wpx = mLastWallpaperX >= 0 ? mLastWallpaperX : 0.5f; + float wpxs = mLastWallpaperXStep >= 0 ? mLastWallpaperXStep : -1.0f; + int availw = wallpaperWin.mFrame.right - wallpaperWin.mFrame.left - dw; + int offset = availw > 0 ? -(int)(availw * wpx + .5f) : 0; + if (mLastWallpaperDisplayOffsetX != Integer.MIN_VALUE) { + offset += mLastWallpaperDisplayOffsetX; + } + boolean changed = wallpaperWin.mXOffset != offset; + if (changed) { + if (DEBUG_WALLPAPER) Slog.v(TAG, "Update wallpaper " + wallpaperWin + " x: " + offset); + wallpaperWin.mXOffset = offset; + } + if (wallpaperWin.mWallpaperX != wpx || wallpaperWin.mWallpaperXStep != wpxs) { + wallpaperWin.mWallpaperX = wpx; + wallpaperWin.mWallpaperXStep = wpxs; + rawChanged = true; + } + + float wpy = mLastWallpaperY >= 0 ? mLastWallpaperY : 0.5f; + float wpys = mLastWallpaperYStep >= 0 ? mLastWallpaperYStep : -1.0f; + int availh = wallpaperWin.mFrame.bottom - wallpaperWin.mFrame.top - dh; + offset = availh > 0 ? -(int)(availh * wpy + .5f) : 0; + if (mLastWallpaperDisplayOffsetY != Integer.MIN_VALUE) { + offset += mLastWallpaperDisplayOffsetY; + } + if (wallpaperWin.mYOffset != offset) { + if (DEBUG_WALLPAPER) Slog.v(TAG, "Update wallpaper " + wallpaperWin + " y: " + offset); + changed = true; + wallpaperWin.mYOffset = offset; + } + if (wallpaperWin.mWallpaperY != wpy || wallpaperWin.mWallpaperYStep != wpys) { + wallpaperWin.mWallpaperY = wpy; + wallpaperWin.mWallpaperYStep = wpys; + rawChanged = true; + } + + if (rawChanged && (wallpaperWin.mAttrs.privateFlags & + WindowManager.LayoutParams.PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS) != 0) { + try { + if (DEBUG_WALLPAPER) Slog.v(TAG, "Report new wp offset " + + wallpaperWin + " x=" + wallpaperWin.mWallpaperX + + " y=" + wallpaperWin.mWallpaperY); + if (sync) { + mWaitingOnWallpaper = wallpaperWin; + } + wallpaperWin.mClient.dispatchWallpaperOffsets( + wallpaperWin.mWallpaperX, wallpaperWin.mWallpaperY, + wallpaperWin.mWallpaperXStep, wallpaperWin.mWallpaperYStep, sync); + if (sync) { + if (mWaitingOnWallpaper != null) { + long start = SystemClock.uptimeMillis(); + if ((mLastWallpaperTimeoutTime + WALLPAPER_TIMEOUT_RECOVERY) + < start) { + try { + if (DEBUG_WALLPAPER) Slog.v(TAG, + "Waiting for offset complete..."); + mService.mWindowMap.wait(WALLPAPER_TIMEOUT); + } catch (InterruptedException e) { + } + if (DEBUG_WALLPAPER) Slog.v(TAG, "Offset complete!"); + if ((start + WALLPAPER_TIMEOUT) < SystemClock.uptimeMillis()) { + Slog.i(TAG, "Timeout waiting for wallpaper to offset: " + + wallpaperWin); + mLastWallpaperTimeoutTime = start; + } + } + mWaitingOnWallpaper = null; + } + } + } catch (RemoteException e) { + } + } + + return changed; + } + + void setWindowWallpaperPosition( + WindowState window, float x, float y, float xStep, float yStep) { + if (window.mWallpaperX != x || window.mWallpaperY != y) { + window.mWallpaperX = x; + window.mWallpaperY = y; + window.mWallpaperXStep = xStep; + window.mWallpaperYStep = yStep; + updateWallpaperOffsetLocked(window, true); + } + } + + void setWindowWallpaperDisplayOffset(WindowState window, int x, int y) { + if (window.mWallpaperDisplayOffsetX != x || window.mWallpaperDisplayOffsetY != y) { + window.mWallpaperDisplayOffsetX = x; + window.mWallpaperDisplayOffsetY = y; + updateWallpaperOffsetLocked(window, true); + } + } + + Bundle sendWindowWallpaperCommand( + WindowState window, String action, int x, int y, int z, Bundle extras, boolean sync) { + if (window == mWallpaperTarget + || window == mLowerWallpaperTarget + || window == mUpperWallpaperTarget) { + boolean doWait = sync; + for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { + final WindowList windows = mWallpaperTokens.get(curTokenNdx).windows; + for (int wallpaperNdx = windows.size() - 1; wallpaperNdx >= 0; wallpaperNdx--) { + WindowState wallpaper = windows.get(wallpaperNdx); + try { + wallpaper.mClient.dispatchWallpaperCommand(action, + x, y, z, extras, sync); + // We only want to be synchronous with one wallpaper. + sync = false; + } catch (RemoteException e) { + } + } + } + + if (doWait) { + // TODO: Need to wait for result. + } + } + + return null; + } + + void updateWallpaperOffsetLocked(WindowState changingTarget, boolean sync) { + final DisplayContent displayContent = changingTarget.getDisplayContent(); + if (displayContent == null) { + return; + } + final DisplayInfo displayInfo = displayContent.getDisplayInfo(); + final int dw = displayInfo.logicalWidth; + final int dh = displayInfo.logicalHeight; + + WindowState target = mWallpaperTarget; + if (target != null) { + if (target.mWallpaperX >= 0) { + mLastWallpaperX = target.mWallpaperX; + } else if (changingTarget.mWallpaperX >= 0) { + mLastWallpaperX = changingTarget.mWallpaperX; + } + if (target.mWallpaperY >= 0) { + mLastWallpaperY = target.mWallpaperY; + } else if (changingTarget.mWallpaperY >= 0) { + mLastWallpaperY = changingTarget.mWallpaperY; + } + if (target.mWallpaperDisplayOffsetX != Integer.MIN_VALUE) { + mLastWallpaperDisplayOffsetX = target.mWallpaperDisplayOffsetX; + } else if (changingTarget.mWallpaperDisplayOffsetX != Integer.MIN_VALUE) { + mLastWallpaperDisplayOffsetX = changingTarget.mWallpaperDisplayOffsetX; + } + if (target.mWallpaperDisplayOffsetY != Integer.MIN_VALUE) { + mLastWallpaperDisplayOffsetY = target.mWallpaperDisplayOffsetY; + } else if (changingTarget.mWallpaperDisplayOffsetY != Integer.MIN_VALUE) { + mLastWallpaperDisplayOffsetY = changingTarget.mWallpaperDisplayOffsetY; + } + if (target.mWallpaperXStep >= 0) { + mLastWallpaperXStep = target.mWallpaperXStep; + } else if (changingTarget.mWallpaperXStep >= 0) { + mLastWallpaperXStep = changingTarget.mWallpaperXStep; + } + if (target.mWallpaperYStep >= 0) { + mLastWallpaperYStep = target.mWallpaperYStep; + } else if (changingTarget.mWallpaperYStep >= 0) { + mLastWallpaperYStep = changingTarget.mWallpaperYStep; + } + } + + for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { + WindowList windows = mWallpaperTokens.get(curTokenNdx).windows; + for (int wallpaperNdx = windows.size() - 1; wallpaperNdx >= 0; wallpaperNdx--) { + WindowState wallpaper = windows.get(wallpaperNdx); + if (updateWallpaperOffset(wallpaper, dw, dh, sync)) { + WindowStateAnimator winAnimator = wallpaper.mWinAnimator; + winAnimator.computeShownFrameLocked(); + // No need to lay out the windows - we can just set the wallpaper position + // directly. + winAnimator.setWallpaperOffset(wallpaper.mShownFrame); + // We only want to be synchronous with one wallpaper. + sync = false; + } + } + } + } + + void clearLastWallpaperTimeoutTime() { + mLastWallpaperTimeoutTime = 0; + } + + void wallpaperCommandComplete(IBinder window) { + if (mWaitingOnWallpaper != null && + mWaitingOnWallpaper.mClient.asBinder() == window) { + mWaitingOnWallpaper = null; + mService.mWindowMap.notifyAll(); + } + } + + void wallpaperOffsetsComplete(IBinder window) { + if (mWaitingOnWallpaper != null && + mWaitingOnWallpaper.mClient.asBinder() == window) { + mWaitingOnWallpaper = null; + mService.mWindowMap.notifyAll(); + } + } + + int getAnimLayerAdjustment() { + return mWallpaperAnimLayerAdjustment; + } + + void setAnimLayerAdjustment(WindowState win, int adj) { + if (win != mWallpaperTarget || mLowerWallpaperTarget != null) { + return; + } + + if (DEBUG_LAYERS || DEBUG_WALLPAPER) Slog.v(TAG, "Setting wallpaper layer adj to " + adj); + mWallpaperAnimLayerAdjustment = adj; + for (int i = mWallpaperTokens.size() - 1; i >= 0; i--) { + WindowList windows = mWallpaperTokens.get(i).windows; + for (int j = windows.size() - 1; j >= 0; j--) { + WindowState wallpaper = windows.get(j); + wallpaper.mWinAnimator.mAnimLayer = wallpaper.mLayer + adj; + if (DEBUG_LAYERS || DEBUG_WALLPAPER) Slog.v(TAG, "setWallpaper win " + + wallpaper + " anim layer: " + wallpaper.mWinAnimator.mAnimLayer); + } + } + } + + boolean adjustWallpaperWindows() { + mService.mInnerFields.mWallpaperMayChange = false; + boolean targetChanged = false; + + // TODO(multidisplay): Wallpapers on main screen only. + final DisplayInfo displayInfo = mService.getDefaultDisplayContentLocked().getDisplayInfo(); + final int dw = displayInfo.logicalWidth; + final int dh = displayInfo.logicalHeight; + + final WindowAnimator winAnimator = mService.mAnimator; + + // First find top-most window that has asked to be on top of the + // wallpaper; all wallpapers go behind it. + final WindowList windows = mService.getDefaultWindowListLocked(); + int N = windows.size(); + WindowState w = null; + WindowState foundW = null; + int foundI = 0; + WindowState topCurW = null; + int topCurI = 0; + int windowDetachedI = -1; + int i = N; + while (i > 0) { + i--; + w = windows.get(i); + if ((w.mAttrs.type == TYPE_WALLPAPER)) { + if (topCurW == null) { + topCurW = w; + topCurI = i; + } + continue; + } + topCurW = null; + if (w != winAnimator.mWindowDetachedWallpaper && w.mAppToken != null) { + // If this window's app token is hidden and not animating, + // it is of no interest to us. + if (w.mAppToken.hidden && w.mAppToken.mAppAnimator.animation == null) { + if (DEBUG_WALLPAPER) Slog.v(TAG, + "Skipping hidden and not animating token: " + w); + continue; + } + } + if (DEBUG_WALLPAPER) Slog.v(TAG, "Win #" + i + " " + w + ": isOnScreen=" + + w.isOnScreen() + " mDrawState=" + w.mWinAnimator.mDrawState); + + // If the app is executing an animation because the keyguard is going away, keep the + // wallpaper during the animation so it doesn't flicker out. + final boolean hasWallpaper = (w.mAttrs.flags&FLAG_SHOW_WALLPAPER) != 0 + || (w.mAppToken != null + && w.mWinAnimator.mKeyguardGoingAwayAnimation); + if (hasWallpaper && w.isOnScreen() + && (mWallpaperTarget == w || w.isDrawFinishedLw())) { + if (DEBUG_WALLPAPER) Slog.v(TAG, + "Found wallpaper target: #" + i + "=" + w); + foundW = w; + foundI = i; + if (w == mWallpaperTarget && w.mWinAnimator.isAnimating()) { + // The current wallpaper target is animating, so we'll + // look behind it for another possible target and figure + // out what is going on below. + if (DEBUG_WALLPAPER) Slog.v(TAG, "Win " + w + + ": token animating, looking behind."); + continue; + } + break; + } else if (w == winAnimator.mWindowDetachedWallpaper) { + windowDetachedI = i; + } + } + + if (foundW == null && windowDetachedI >= 0) { + if (DEBUG_WALLPAPER_LIGHT) Slog.v(TAG, + "Found animating detached wallpaper activity: #" + i + "=" + w); + foundW = w; + foundI = windowDetachedI; + } + + if (mWallpaperTarget != foundW + && (mLowerWallpaperTarget == null || mLowerWallpaperTarget != foundW)) { + if (DEBUG_WALLPAPER_LIGHT) { + Slog.v(TAG, "New wallpaper target: " + foundW + + " oldTarget: " + mWallpaperTarget); + } + + mLowerWallpaperTarget = null; + mUpperWallpaperTarget = null; + + WindowState oldW = mWallpaperTarget; + mWallpaperTarget = foundW; + targetChanged = true; + + // Now what is happening... if the current and new targets are + // animating, then we are in our super special mode! + if (foundW != null && oldW != null) { + boolean oldAnim = oldW.isAnimatingLw(); + boolean foundAnim = foundW.isAnimatingLw(); + if (DEBUG_WALLPAPER_LIGHT) { + Slog.v(TAG, "New animation: " + foundAnim + + " old animation: " + oldAnim); + } + if (foundAnim && oldAnim) { + int oldI = windows.indexOf(oldW); + if (DEBUG_WALLPAPER_LIGHT) { + Slog.v(TAG, "New i: " + foundI + " old i: " + oldI); + } + if (oldI >= 0) { + if (DEBUG_WALLPAPER_LIGHT) { + Slog.v(TAG, "Animating wallpapers: old#" + oldI + + "=" + oldW + "; new#" + foundI + + "=" + foundW); + } + + // Set the new target correctly. + if (foundW.mAppToken != null && foundW.mAppToken.hiddenRequested) { + if (DEBUG_WALLPAPER_LIGHT) { + Slog.v(TAG, "Old wallpaper still the target."); + } + mWallpaperTarget = oldW; + foundW = oldW; + foundI = oldI; + } + // Now set the upper and lower wallpaper targets + // correctly, and make sure that we are positioning + // the wallpaper below the lower. + else if (foundI > oldI) { + // The new target is on top of the old one. + if (DEBUG_WALLPAPER_LIGHT) { + Slog.v(TAG, "Found target above old target."); + } + mUpperWallpaperTarget = foundW; + mLowerWallpaperTarget = oldW; + foundW = oldW; + foundI = oldI; + } else { + // The new target is below the old one. + if (DEBUG_WALLPAPER_LIGHT) { + Slog.v(TAG, "Found target below old target."); + } + mUpperWallpaperTarget = oldW; + mLowerWallpaperTarget = foundW; + } + } + } + } + + } else if (mLowerWallpaperTarget != null) { + // Is it time to stop animating? + if (!mLowerWallpaperTarget.isAnimatingLw() || !mUpperWallpaperTarget.isAnimatingLw()) { + if (DEBUG_WALLPAPER_LIGHT) { + Slog.v(TAG, "No longer animating wallpaper targets!"); + } + mLowerWallpaperTarget = null; + mUpperWallpaperTarget = null; + mWallpaperTarget = foundW; + targetChanged = true; + } + } + + boolean visible = foundW != null; + if (visible) { + // The window is visible to the compositor... but is it visible + // to the user? That is what the wallpaper cares about. + visible = isWallpaperVisible(foundW); + if (DEBUG_WALLPAPER) Slog.v(TAG, "Wallpaper visibility: " + visible); + + // If the wallpaper target is animating, we may need to copy + // its layer adjustment. Only do this if we are not transfering + // between two wallpaper targets. + mWallpaperAnimLayerAdjustment = + (mLowerWallpaperTarget == null && foundW.mAppToken != null) + ? foundW.mAppToken.mAppAnimator.animLayerAdjustment : 0; + + final int maxLayer = (mService.mPolicy.getMaxWallpaperLayer() * TYPE_LAYER_MULTIPLIER) + + TYPE_LAYER_OFFSET; + + // Now w is the window we are supposed to be behind... but we + // need to be sure to also be behind any of its attached windows, + // AND any starting window associated with it, AND below the + // maximum layer the policy allows for wallpapers. + while (foundI > 0) { + WindowState wb = windows.get(foundI - 1); + if (wb.mBaseLayer < maxLayer && + wb.mAttachedWindow != foundW && + (foundW.mAttachedWindow == null || + wb.mAttachedWindow != foundW.mAttachedWindow) && + (wb.mAttrs.type != TYPE_APPLICATION_STARTING || + foundW.mToken == null || wb.mToken != foundW.mToken)) { + // This window is not related to the previous one in any + // interesting way, so stop here. + break; + } + foundW = wb; + foundI--; + } + } else { + if (DEBUG_WALLPAPER) Slog.v(TAG, "No wallpaper target"); + } + + if (foundW == null && topCurW != null) { + // There is no wallpaper target, so it goes at the bottom. + // We will assume it is the same place as last time, if known. + foundW = topCurW; + foundI = topCurI+1; + } else { + // Okay i is the position immediately above the wallpaper. Look at + // what is below it for later. + foundW = foundI > 0 ? windows.get(foundI - 1) : null; + } + + if (visible) { + if (mWallpaperTarget.mWallpaperX >= 0) { + mLastWallpaperX = mWallpaperTarget.mWallpaperX; + mLastWallpaperXStep = mWallpaperTarget.mWallpaperXStep; + } + if (mWallpaperTarget.mWallpaperY >= 0) { + mLastWallpaperY = mWallpaperTarget.mWallpaperY; + mLastWallpaperYStep = mWallpaperTarget.mWallpaperYStep; + } + if (mWallpaperTarget.mWallpaperDisplayOffsetX != Integer.MIN_VALUE) { + mLastWallpaperDisplayOffsetX = mWallpaperTarget.mWallpaperDisplayOffsetX; + } + if (mWallpaperTarget.mWallpaperDisplayOffsetY != Integer.MIN_VALUE) { + mLastWallpaperDisplayOffsetY = mWallpaperTarget.mWallpaperDisplayOffsetY; + } + } + + // Start stepping backwards from here, ensuring that our wallpaper windows + // are correctly placed. + boolean changed = false; + for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { + WindowToken token = mWallpaperTokens.get(curTokenNdx); + if (token.hidden == visible) { + if (DEBUG_WALLPAPER_LIGHT) Slog.d(TAG, + "Wallpaper token " + token + " hidden=" + !visible); + token.hidden = !visible; + // Need to do a layout to ensure the wallpaper now has the correct size. + mService.getDefaultDisplayContentLocked().layoutNeeded = true; + } + + final WindowList tokenWindows = token.windows; + for (int wallpaperNdx = tokenWindows.size() - 1; wallpaperNdx >= 0; wallpaperNdx--) { + WindowState wallpaper = tokenWindows.get(wallpaperNdx); + + if (visible) { + updateWallpaperOffset(wallpaper, dw, dh, false); + } + + // First, make sure the client has the current visibility state. + dispatchWallpaperVisibility(wallpaper, visible); + + wallpaper.mWinAnimator.mAnimLayer = + wallpaper.mLayer + mWallpaperAnimLayerAdjustment; + if (DEBUG_LAYERS || DEBUG_WALLPAPER_LIGHT) Slog.v(TAG, "adjustWallpaper win " + + wallpaper + " anim layer: " + wallpaper.mWinAnimator.mAnimLayer); + + // First, if this window is at the current index, then all is well. + if (wallpaper == foundW) { + foundI--; + foundW = foundI > 0 ? windows.get(foundI - 1) : null; + continue; + } + + // The window didn't match... the current wallpaper window, + // wherever it is, is in the wrong place, so make sure it is + // not in the list. + int oldIndex = windows.indexOf(wallpaper); + if (oldIndex >= 0) { + if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Wallpaper removing at " + + oldIndex + ": " + wallpaper); + windows.remove(oldIndex); + mService.mWindowsChanged = true; + if (oldIndex < foundI) { + foundI--; + } + } + + // Now stick it in. For apps over wallpaper keep the wallpaper at the bottommost + // layer. For keyguard over wallpaper put the wallpaper under the keyguard. + int insertionIndex = 0; + if (visible && foundW != null) { + final int type = foundW.mAttrs.type; + final int privateFlags = foundW.mAttrs.privateFlags; + if ((privateFlags & PRIVATE_FLAG_KEYGUARD) != 0 + || type == TYPE_KEYGUARD_SCRIM) { + insertionIndex = windows.indexOf(foundW); + } + } + if (DEBUG_WALLPAPER_LIGHT || DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) { + Slog.v(TAG, "Moving wallpaper " + wallpaper + + " from " + oldIndex + " to " + insertionIndex); + } + + windows.add(insertionIndex, wallpaper); + mService.mWindowsChanged = true; + changed = true; + } + } + + if (targetChanged && DEBUG_WALLPAPER_LIGHT) Slog.d(TAG, "New wallpaper: target=" + + mWallpaperTarget + " lower=" + mLowerWallpaperTarget + " upper=" + + mUpperWallpaperTarget); + + return changed; + } + + boolean processWallpaperDrawPendingTimeout() { + if (mWallpaperDrawState == WALLPAPER_DRAW_PENDING) { + mWallpaperDrawState = WALLPAPER_DRAW_TIMEOUT; + if (DEBUG_APP_TRANSITIONS || DEBUG_WALLPAPER) Slog.v(TAG, + "*** WALLPAPER DRAW TIMEOUT"); + return true; + } + return false; + } + + boolean wallpaperTransitionReady() { + boolean transitionReady = true; + boolean wallpaperReady = true; + for (int curTokenIndex = mWallpaperTokens.size() - 1; + curTokenIndex >= 0 && wallpaperReady; curTokenIndex--) { + WindowToken token = mWallpaperTokens.get(curTokenIndex); + for (int curWallpaperIndex = token.windows.size() - 1; curWallpaperIndex >= 0; + curWallpaperIndex--) { + WindowState wallpaper = token.windows.get(curWallpaperIndex); + if (wallpaper.mWallpaperVisible && !wallpaper.isDrawnLw()) { + // We've told this wallpaper to be visible, but it is not drawn yet + wallpaperReady = false; + if (mWallpaperDrawState != WALLPAPER_DRAW_TIMEOUT) { + // wait for this wallpaper until it is drawn or timeout + transitionReady = false; + } + if (mWallpaperDrawState == WALLPAPER_DRAW_NORMAL) { + mWallpaperDrawState = WALLPAPER_DRAW_PENDING; + mService.mH.removeMessages(WALLPAPER_DRAW_PENDING_TIMEOUT); + mService.mH.sendEmptyMessageDelayed(WALLPAPER_DRAW_PENDING_TIMEOUT, + WALLPAPER_DRAW_PENDING_TIMEOUT_DURATION); + } + if (DEBUG_APP_TRANSITIONS || DEBUG_WALLPAPER) Slog.v(TAG, + "Wallpaper should be visible but has not been drawn yet. " + + "mWallpaperDrawState=" + mWallpaperDrawState); + break; + } + } + } + if (wallpaperReady) { + mWallpaperDrawState = WALLPAPER_DRAW_NORMAL; + mService.mH.removeMessages(WALLPAPER_DRAW_PENDING_TIMEOUT); + } + + return transitionReady; + } + + void addWallpaperToken(WindowToken token) { + mWallpaperTokens.add(token); + } + + void removeWallpaperToken(WindowToken token) { + mWallpaperTokens.remove(token); + } + + void dump(PrintWriter pw, String prefix) { + pw.print(prefix); pw.print("mWallpaperTarget="); pw.println(mWallpaperTarget); + if (mLowerWallpaperTarget != null || mUpperWallpaperTarget != null) { + pw.print(prefix); pw.print("mLowerWallpaperTarget="); pw.println(mLowerWallpaperTarget); + pw.print(prefix); pw.print("mUpperWallpaperTarget="); pw.println(mUpperWallpaperTarget); + } + pw.print(prefix); pw.print("mLastWallpaperX="); pw.print(mLastWallpaperX); + pw.print(" mLastWallpaperY="); pw.println(mLastWallpaperY); + if (mLastWallpaperDisplayOffsetX != Integer.MIN_VALUE + || mLastWallpaperDisplayOffsetY != Integer.MIN_VALUE) { + pw.print(prefix); + pw.print("mLastWallpaperDisplayOffsetX="); pw.print(mLastWallpaperDisplayOffsetX); + pw.print(" mLastWallpaperDisplayOffsetY="); pw.println(mLastWallpaperDisplayOffsetY); + } + } + + void dumpTokens(PrintWriter pw, String prefix, boolean dumpAll) { + if (!mWallpaperTokens.isEmpty()) { + pw.println(); + pw.print(prefix); pw.println("Wallpaper tokens:"); + for (int i = mWallpaperTokens.size() - 1; i >= 0; i--) { + WindowToken token = mWallpaperTokens.get(i); + pw.print(prefix); pw.print("Wallpaper #"); pw.print(i); + pw.print(' '); pw.print(token); + if (dumpAll) { + pw.println(':'); + token.dump(pw, " "); + } else { + pw.println(); + } + } + } + } +} diff --git a/services/core/java/com/android/server/wm/WindowAnimator.java b/services/core/java/com/android/server/wm/WindowAnimator.java index 75782563eac2..e6a1be11a4c6 100644 --- a/services/core/java/com/android/server/wm/WindowAnimator.java +++ b/services/core/java/com/android/server/wm/WindowAnimator.java @@ -258,6 +258,7 @@ public class WindowAnimator { boolean startingInUnForceHiding = false; ArrayList<WindowStateAnimator> unForceHiding = null; WindowState wallpaper = null; + final WallpaperController wallpaperController = mService.mWallpaperControllerLocked; for (int i = windows.size() - 1; i >= 0; i--) { WindowState win = windows.get(i); WindowStateAnimator winAnimator = win.mWinAnimator; @@ -294,7 +295,8 @@ public class WindowAnimator { ", nowAnimating=" + nowAnimating); } - if (wasAnimating && !winAnimator.mAnimating && mService.mWallpaperTarget == win) { + if (wasAnimating && !winAnimator.mAnimating + && wallpaperController.isWallpaperTarget(win)) { mBulkUpdateParams |= SET_WALLPAPER_MAY_CHANGE; setPendingLayoutChanges(Display.DEFAULT_DISPLAY, WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER); diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 355b09b555d7..7e7d009a8675 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -78,6 +78,7 @@ import android.util.SparseArray; import android.util.SparseIntArray; import android.util.TimeUtils; import android.util.TypedValue; +import android.view.AppTransitionAnimationSpec; import android.view.Choreographer; import android.view.Display; import android.view.DisplayInfo; @@ -176,7 +177,6 @@ import static android.view.WindowManager.LayoutParams.TYPE_DREAM; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG; import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG; -import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_SCRIM; import static android.view.WindowManager.LayoutParams.TYPE_PRIVATE_PRESENTATION; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR; import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG; @@ -443,6 +443,7 @@ public class WindowManagerService extends IWindowManager.Stub final float[] mTmpFloats = new float[9]; final Rect mTmpContentRect = new Rect(); + private final Rect mTmpStartRect = new Rect(); boolean mDisplayReady; boolean mSafeMode; @@ -579,47 +580,9 @@ public class WindowManagerService extends IWindowManager.Stub } } - private final ArrayList<WindowToken> mWallpaperTokens = new ArrayList<WindowToken>(); - - // If non-null, this is the currently visible window that is associated - // with the wallpaper. - WindowState mWallpaperTarget = null; - // If non-null, we are in the middle of animating from one wallpaper target - // to another, and this is the lower one in Z-order. - WindowState mLowerWallpaperTarget = null; - // If non-null, we are in the middle of animating from one wallpaper target - // to another, and this is the higher one in Z-order. - WindowState mUpperWallpaperTarget = null; - int mWallpaperAnimLayerAdjustment; - float mLastWallpaperX = -1; - float mLastWallpaperY = -1; - float mLastWallpaperXStep = -1; - float mLastWallpaperYStep = -1; - int mLastWallpaperDisplayOffsetX = Integer.MIN_VALUE; - int mLastWallpaperDisplayOffsetY = Integer.MIN_VALUE; - // This is set when we are waiting for a wallpaper to tell us it is done - // changing its scroll position. - WindowState mWaitingOnWallpaper; - // The last time we had a timeout when waiting for a wallpaper. - long mLastWallpaperTimeoutTime; - // We give a wallpaper up to 150ms to finish scrolling. - static final long WALLPAPER_TIMEOUT = 150; - // Time we wait after a timeout before trying to wait again. - static final long WALLPAPER_TIMEOUT_RECOVERY = 10000; - boolean mAnimateWallpaperWithTarget; - - // We give a wallpaper up to 500ms to finish drawing before playing app transitions. - static final long WALLPAPER_DRAW_PENDING_TIMEOUT_DURATION = 500; - static final int WALLPAPER_DRAW_NORMAL = 0; - static final int WALLPAPER_DRAW_PENDING = 1; - static final int WALLPAPER_DRAW_TIMEOUT = 2; - int mWallpaperDrawState = WALLPAPER_DRAW_NORMAL; + WallpaperController mWallpaperControllerLocked; - // Set to the wallpaper window we would like to hide once the transition animations are done. - // This is useful in cases where we don't want the wallpaper to be hidden when the close app - // is a wallpaper target and is done animating out, but the opening app isn't a wallpaper - // target and isn't done animating in. - WindowState mDeferredHideWallpaper = null; + boolean mAnimateWallpaperWithTarget; AppWindowToken mFocusedApp = null; @@ -804,7 +767,7 @@ public class WindowManagerService extends IWindowManager.Stub private ViewServer mViewServer; private final ArrayList<WindowChangeListener> mWindowChangeListeners = new ArrayList<>(); - private boolean mWindowsChanged = false; + boolean mWindowsChanged = false; public interface WindowChangeListener { public void windowsChanged(); @@ -988,6 +951,8 @@ public class WindowManagerService extends IWindowManager.Stub updateCircularDisplayMaskIfNeeded(); showEmulatorDisplayOverlayIfNeeded(); + + mWallpaperControllerLocked = new WallpaperController(this); } public InputMonitor getInputMonitor() { @@ -1767,578 +1732,6 @@ public class WindowManagerService extends IWindowManager.Stub return true; } - private boolean isWallpaperVisible(WindowState wallpaperTarget) { - if (DEBUG_WALLPAPER) Slog.v(TAG, "Wallpaper vis: target " + wallpaperTarget + ", obscured=" - + (wallpaperTarget != null ? Boolean.toString(wallpaperTarget.mObscured) : "??") - + " anim=" + ((wallpaperTarget != null && wallpaperTarget.mAppToken != null) - ? wallpaperTarget.mAppToken.mAppAnimator.animation : null) - + " upper=" + mUpperWallpaperTarget - + " lower=" + mLowerWallpaperTarget); - return (wallpaperTarget != null - && (!wallpaperTarget.mObscured || (wallpaperTarget.mAppToken != null - && wallpaperTarget.mAppToken.mAppAnimator.animation != null))) - || mUpperWallpaperTarget != null - || mLowerWallpaperTarget != null; - } - - void hideWallpapersLocked(final WindowState winGoingAway) { - if (mWallpaperTarget != null - && (mWallpaperTarget != winGoingAway || mLowerWallpaperTarget != null)) { - return; - } - if (mAppTransition.isRunning()) { - // Defer hiding the wallpaper when app transition is running until the animations - // are done. - mDeferredHideWallpaper = winGoingAway; - return; - } - - final boolean wasDeferred = (mDeferredHideWallpaper == winGoingAway); - for (int i = mWallpaperTokens.size() - 1; i >= 0; i--) { - final WindowToken token = mWallpaperTokens.get(i); - for (int j = token.windows.size() - 1; j >= 0; j--) { - final WindowState wallpaper = token.windows.get(j); - final WindowStateAnimator winAnimator = wallpaper.mWinAnimator; - if (!winAnimator.mLastHidden || wasDeferred) { - winAnimator.hide(); - dispatchWallpaperVisibility(wallpaper, false); - final DisplayContent displayContent = wallpaper.getDisplayContent(); - if (displayContent != null) { - displayContent.pendingLayoutChanges |= - WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; - } - } - } - if (DEBUG_WALLPAPER_LIGHT && !token.hidden) Slog.d(TAG, "Hiding wallpaper " + token - + " from " + winGoingAway + " target=" + mWallpaperTarget + " lower=" - + mLowerWallpaperTarget + "\n" + Debug.getCallers(5, " ")); - token.hidden = true; - } - } - - boolean adjustWallpaperWindowsLocked() { - mInnerFields.mWallpaperMayChange = false; - boolean targetChanged = false; - - // TODO(multidisplay): Wallpapers on main screen only. - final DisplayInfo displayInfo = getDefaultDisplayContentLocked().getDisplayInfo(); - final int dw = displayInfo.logicalWidth; - final int dh = displayInfo.logicalHeight; - - // First find top-most window that has asked to be on top of the - // wallpaper; all wallpapers go behind it. - final WindowList windows = getDefaultWindowListLocked(); - int N = windows.size(); - WindowState w = null; - WindowState foundW = null; - int foundI = 0; - WindowState topCurW = null; - int topCurI = 0; - int windowDetachedI = -1; - int i = N; - while (i > 0) { - i--; - w = windows.get(i); - if ((w.mAttrs.type == TYPE_WALLPAPER)) { - if (topCurW == null) { - topCurW = w; - topCurI = i; - } - continue; - } - topCurW = null; - if (w != mAnimator.mWindowDetachedWallpaper && w.mAppToken != null) { - // If this window's app token is hidden and not animating, - // it is of no interest to us. - if (w.mAppToken.hidden && w.mAppToken.mAppAnimator.animation == null) { - if (DEBUG_WALLPAPER) Slog.v(TAG, - "Skipping hidden and not animating token: " + w); - continue; - } - } - if (DEBUG_WALLPAPER) Slog.v(TAG, "Win #" + i + " " + w + ": isOnScreen=" - + w.isOnScreen() + " mDrawState=" + w.mWinAnimator.mDrawState); - - // If the app is executing an animation because the keyguard is going away, keep the - // wallpaper during the animation so it doesn't flicker out. - final boolean hasWallpaper = (w.mAttrs.flags&FLAG_SHOW_WALLPAPER) != 0 - || (w.mAppToken != null - && w.mWinAnimator.mKeyguardGoingAwayAnimation); - if (hasWallpaper && w.isOnScreen() - && (mWallpaperTarget == w || w.isDrawFinishedLw())) { - if (DEBUG_WALLPAPER) Slog.v(TAG, - "Found wallpaper target: #" + i + "=" + w); - foundW = w; - foundI = i; - if (w == mWallpaperTarget && w.mWinAnimator.isAnimating()) { - // The current wallpaper target is animating, so we'll - // look behind it for another possible target and figure - // out what is going on below. - if (DEBUG_WALLPAPER) Slog.v(TAG, "Win " + w - + ": token animating, looking behind."); - continue; - } - break; - } else if (w == mAnimator.mWindowDetachedWallpaper) { - windowDetachedI = i; - } - } - - if (foundW == null && windowDetachedI >= 0) { - if (DEBUG_WALLPAPER_LIGHT) Slog.v(TAG, - "Found animating detached wallpaper activity: #" + i + "=" + w); - foundW = w; - foundI = windowDetachedI; - } - - if (mWallpaperTarget != foundW - && (mLowerWallpaperTarget == null || mLowerWallpaperTarget != foundW)) { - if (DEBUG_WALLPAPER_LIGHT) { - Slog.v(TAG, "New wallpaper target: " + foundW - + " oldTarget: " + mWallpaperTarget); - } - - mLowerWallpaperTarget = null; - mUpperWallpaperTarget = null; - - WindowState oldW = mWallpaperTarget; - mWallpaperTarget = foundW; - targetChanged = true; - - // Now what is happening... if the current and new targets are - // animating, then we are in our super special mode! - if (foundW != null && oldW != null) { - boolean oldAnim = oldW.isAnimatingLw(); - boolean foundAnim = foundW.isAnimatingLw(); - if (DEBUG_WALLPAPER_LIGHT) { - Slog.v(TAG, "New animation: " + foundAnim - + " old animation: " + oldAnim); - } - if (foundAnim && oldAnim) { - int oldI = windows.indexOf(oldW); - if (DEBUG_WALLPAPER_LIGHT) { - Slog.v(TAG, "New i: " + foundI + " old i: " + oldI); - } - if (oldI >= 0) { - if (DEBUG_WALLPAPER_LIGHT) { - Slog.v(TAG, "Animating wallpapers: old#" + oldI - + "=" + oldW + "; new#" + foundI - + "=" + foundW); - } - - // Set the new target correctly. - if (foundW.mAppToken != null && foundW.mAppToken.hiddenRequested) { - if (DEBUG_WALLPAPER_LIGHT) { - Slog.v(TAG, "Old wallpaper still the target."); - } - mWallpaperTarget = oldW; - foundW = oldW; - foundI = oldI; - } - // Now set the upper and lower wallpaper targets - // correctly, and make sure that we are positioning - // the wallpaper below the lower. - else if (foundI > oldI) { - // The new target is on top of the old one. - if (DEBUG_WALLPAPER_LIGHT) { - Slog.v(TAG, "Found target above old target."); - } - mUpperWallpaperTarget = foundW; - mLowerWallpaperTarget = oldW; - foundW = oldW; - foundI = oldI; - } else { - // The new target is below the old one. - if (DEBUG_WALLPAPER_LIGHT) { - Slog.v(TAG, "Found target below old target."); - } - mUpperWallpaperTarget = oldW; - mLowerWallpaperTarget = foundW; - } - } - } - } - - } else if (mLowerWallpaperTarget != null) { - // Is it time to stop animating? - if (!mLowerWallpaperTarget.isAnimatingLw() || !mUpperWallpaperTarget.isAnimatingLw()) { - if (DEBUG_WALLPAPER_LIGHT) { - Slog.v(TAG, "No longer animating wallpaper targets!"); - } - mLowerWallpaperTarget = null; - mUpperWallpaperTarget = null; - mWallpaperTarget = foundW; - targetChanged = true; - } - } - - boolean visible = foundW != null; - if (visible) { - // The window is visible to the compositor... but is it visible - // to the user? That is what the wallpaper cares about. - visible = isWallpaperVisible(foundW); - if (DEBUG_WALLPAPER) Slog.v(TAG, "Wallpaper visibility: " + visible); - - // If the wallpaper target is animating, we may need to copy - // its layer adjustment. Only do this if we are not transfering - // between two wallpaper targets. - mWallpaperAnimLayerAdjustment = - (mLowerWallpaperTarget == null && foundW.mAppToken != null) - ? foundW.mAppToken.mAppAnimator.animLayerAdjustment : 0; - - final int maxLayer = mPolicy.getMaxWallpaperLayer() - * TYPE_LAYER_MULTIPLIER - + TYPE_LAYER_OFFSET; - - // Now w is the window we are supposed to be behind... but we - // need to be sure to also be behind any of its attached windows, - // AND any starting window associated with it, AND below the - // maximum layer the policy allows for wallpapers. - while (foundI > 0) { - WindowState wb = windows.get(foundI - 1); - if (wb.mBaseLayer < maxLayer && - wb.mAttachedWindow != foundW && - (foundW.mAttachedWindow == null || - wb.mAttachedWindow != foundW.mAttachedWindow) && - (wb.mAttrs.type != TYPE_APPLICATION_STARTING || - foundW.mToken == null || wb.mToken != foundW.mToken)) { - // This window is not related to the previous one in any - // interesting way, so stop here. - break; - } - foundW = wb; - foundI--; - } - } else { - if (DEBUG_WALLPAPER) Slog.v(TAG, "No wallpaper target"); - } - - if (foundW == null && topCurW != null) { - // There is no wallpaper target, so it goes at the bottom. - // We will assume it is the same place as last time, if known. - foundW = topCurW; - foundI = topCurI+1; - } else { - // Okay i is the position immediately above the wallpaper. Look at - // what is below it for later. - foundW = foundI > 0 ? windows.get(foundI - 1) : null; - } - - if (visible) { - if (mWallpaperTarget.mWallpaperX >= 0) { - mLastWallpaperX = mWallpaperTarget.mWallpaperX; - mLastWallpaperXStep = mWallpaperTarget.mWallpaperXStep; - } - if (mWallpaperTarget.mWallpaperY >= 0) { - mLastWallpaperY = mWallpaperTarget.mWallpaperY; - mLastWallpaperYStep = mWallpaperTarget.mWallpaperYStep; - } - if (mWallpaperTarget.mWallpaperDisplayOffsetX != Integer.MIN_VALUE) { - mLastWallpaperDisplayOffsetX = mWallpaperTarget.mWallpaperDisplayOffsetX; - } - if (mWallpaperTarget.mWallpaperDisplayOffsetY != Integer.MIN_VALUE) { - mLastWallpaperDisplayOffsetY = mWallpaperTarget.mWallpaperDisplayOffsetY; - } - } - - // Start stepping backwards from here, ensuring that our wallpaper windows - // are correctly placed. - boolean changed = false; - for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { - WindowToken token = mWallpaperTokens.get(curTokenNdx); - if (token.hidden == visible) { - if (DEBUG_WALLPAPER_LIGHT) Slog.d(TAG, - "Wallpaper token " + token + " hidden=" + !visible); - token.hidden = !visible; - // Need to do a layout to ensure the wallpaper now has the correct size. - getDefaultDisplayContentLocked().layoutNeeded = true; - } - - final WindowList tokenWindows = token.windows; - for (int wallpaperNdx = tokenWindows.size() - 1; wallpaperNdx >= 0; wallpaperNdx--) { - WindowState wallpaper = tokenWindows.get(wallpaperNdx); - - if (visible) { - updateWallpaperOffsetLocked(wallpaper, dw, dh, false); - } - - // First, make sure the client has the current visibility state. - dispatchWallpaperVisibility(wallpaper, visible); - - wallpaper.mWinAnimator.mAnimLayer = - wallpaper.mLayer + mWallpaperAnimLayerAdjustment; - if (DEBUG_LAYERS || DEBUG_WALLPAPER_LIGHT) Slog.v(TAG, "adjustWallpaper win " - + wallpaper + " anim layer: " + wallpaper.mWinAnimator.mAnimLayer); - - // First, if this window is at the current index, then all is well. - if (wallpaper == foundW) { - foundI--; - foundW = foundI > 0 ? windows.get(foundI - 1) : null; - continue; - } - - // The window didn't match... the current wallpaper window, - // wherever it is, is in the wrong place, so make sure it is - // not in the list. - int oldIndex = windows.indexOf(wallpaper); - if (oldIndex >= 0) { - if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Wallpaper removing at " - + oldIndex + ": " + wallpaper); - windows.remove(oldIndex); - mWindowsChanged = true; - if (oldIndex < foundI) { - foundI--; - } - } - - // Now stick it in. For apps over wallpaper keep the wallpaper at the bottommost - // layer. For keyguard over wallpaper put the wallpaper under the keyguard. - int insertionIndex = 0; - if (visible && foundW != null) { - final int type = foundW.mAttrs.type; - final int privateFlags = foundW.mAttrs.privateFlags; - if ((privateFlags & PRIVATE_FLAG_KEYGUARD) != 0 - || type == TYPE_KEYGUARD_SCRIM) { - insertionIndex = windows.indexOf(foundW); - } - } - if (DEBUG_WALLPAPER_LIGHT || DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) { - Slog.v(TAG, "Moving wallpaper " + wallpaper - + " from " + oldIndex + " to " + insertionIndex); - } - - windows.add(insertionIndex, wallpaper); - mWindowsChanged = true; - changed = true; - } - } - - if (targetChanged && DEBUG_WALLPAPER_LIGHT) Slog.d(TAG, "New wallpaper: target=" - + mWallpaperTarget + " lower=" + mLowerWallpaperTarget + " upper=" - + mUpperWallpaperTarget); - - return changed; - } - - void setWallpaperAnimLayerAdjustmentLocked(int adj) { - if (DEBUG_LAYERS || DEBUG_WALLPAPER) Slog.v(TAG, "Setting wallpaper layer adj to " + adj); - mWallpaperAnimLayerAdjustment = adj; - for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { - WindowList windows = mWallpaperTokens.get(curTokenNdx).windows; - for (int wallpaperNdx = windows.size() - 1; wallpaperNdx >= 0; wallpaperNdx--) { - WindowState wallpaper = windows.get(wallpaperNdx); - wallpaper.mWinAnimator.mAnimLayer = wallpaper.mLayer + adj; - if (DEBUG_LAYERS || DEBUG_WALLPAPER) Slog.v(TAG, "setWallpaper win " - + wallpaper + " anim layer: " + wallpaper.mWinAnimator.mAnimLayer); - } - } - } - - boolean updateWallpaperOffsetLocked(WindowState wallpaperWin, int dw, int dh, - boolean sync) { - boolean changed = false; - boolean rawChanged = false; - float wpx = mLastWallpaperX >= 0 ? mLastWallpaperX : 0.5f; - float wpxs = mLastWallpaperXStep >= 0 ? mLastWallpaperXStep : -1.0f; - int availw = wallpaperWin.mFrame.right-wallpaperWin.mFrame.left-dw; - int offset = availw > 0 ? -(int)(availw*wpx+.5f) : 0; - if (mLastWallpaperDisplayOffsetX != Integer.MIN_VALUE) { - offset += mLastWallpaperDisplayOffsetX; - } - changed = wallpaperWin.mXOffset != offset; - if (changed) { - if (DEBUG_WALLPAPER) Slog.v(TAG, "Update wallpaper " - + wallpaperWin + " x: " + offset); - wallpaperWin.mXOffset = offset; - } - if (wallpaperWin.mWallpaperX != wpx || wallpaperWin.mWallpaperXStep != wpxs) { - wallpaperWin.mWallpaperX = wpx; - wallpaperWin.mWallpaperXStep = wpxs; - rawChanged = true; - } - - float wpy = mLastWallpaperY >= 0 ? mLastWallpaperY : 0.5f; - float wpys = mLastWallpaperYStep >= 0 ? mLastWallpaperYStep : -1.0f; - int availh = wallpaperWin.mFrame.bottom-wallpaperWin.mFrame.top-dh; - offset = availh > 0 ? -(int)(availh*wpy+.5f) : 0; - if (mLastWallpaperDisplayOffsetY != Integer.MIN_VALUE) { - offset += mLastWallpaperDisplayOffsetY; - } - if (wallpaperWin.mYOffset != offset) { - if (DEBUG_WALLPAPER) Slog.v(TAG, "Update wallpaper " - + wallpaperWin + " y: " + offset); - changed = true; - wallpaperWin.mYOffset = offset; - } - if (wallpaperWin.mWallpaperY != wpy || wallpaperWin.mWallpaperYStep != wpys) { - wallpaperWin.mWallpaperY = wpy; - wallpaperWin.mWallpaperYStep = wpys; - rawChanged = true; - } - - if (rawChanged && (wallpaperWin.mAttrs.privateFlags & - WindowManager.LayoutParams.PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS) != 0) { - try { - if (DEBUG_WALLPAPER) Slog.v(TAG, "Report new wp offset " - + wallpaperWin + " x=" + wallpaperWin.mWallpaperX - + " y=" + wallpaperWin.mWallpaperY); - if (sync) { - mWaitingOnWallpaper = wallpaperWin; - } - wallpaperWin.mClient.dispatchWallpaperOffsets( - wallpaperWin.mWallpaperX, wallpaperWin.mWallpaperY, - wallpaperWin.mWallpaperXStep, wallpaperWin.mWallpaperYStep, sync); - if (sync) { - if (mWaitingOnWallpaper != null) { - long start = SystemClock.uptimeMillis(); - if ((mLastWallpaperTimeoutTime+WALLPAPER_TIMEOUT_RECOVERY) - < start) { - try { - if (DEBUG_WALLPAPER) Slog.v(TAG, - "Waiting for offset complete..."); - mWindowMap.wait(WALLPAPER_TIMEOUT); - } catch (InterruptedException e) { - } - if (DEBUG_WALLPAPER) Slog.v(TAG, "Offset complete!"); - if ((start+WALLPAPER_TIMEOUT) - < SystemClock.uptimeMillis()) { - Slog.i(TAG, "Timeout waiting for wallpaper to offset: " - + wallpaperWin); - mLastWallpaperTimeoutTime = start; - } - } - mWaitingOnWallpaper = null; - } - } - } catch (RemoteException e) { - } - } - - return changed; - } - - void wallpaperOffsetsComplete(IBinder window) { - synchronized (mWindowMap) { - if (mWaitingOnWallpaper != null && - mWaitingOnWallpaper.mClient.asBinder() == window) { - mWaitingOnWallpaper = null; - mWindowMap.notifyAll(); - } - } - } - - void updateWallpaperOffsetLocked(WindowState changingTarget, boolean sync) { - final DisplayContent displayContent = changingTarget.getDisplayContent(); - if (displayContent == null) { - return; - } - final DisplayInfo displayInfo = displayContent.getDisplayInfo(); - final int dw = displayInfo.logicalWidth; - final int dh = displayInfo.logicalHeight; - - WindowState target = mWallpaperTarget; - if (target != null) { - if (target.mWallpaperX >= 0) { - mLastWallpaperX = target.mWallpaperX; - } else if (changingTarget.mWallpaperX >= 0) { - mLastWallpaperX = changingTarget.mWallpaperX; - } - if (target.mWallpaperY >= 0) { - mLastWallpaperY = target.mWallpaperY; - } else if (changingTarget.mWallpaperY >= 0) { - mLastWallpaperY = changingTarget.mWallpaperY; - } - if (target.mWallpaperDisplayOffsetX != Integer.MIN_VALUE) { - mLastWallpaperDisplayOffsetX = target.mWallpaperDisplayOffsetX; - } else if (changingTarget.mWallpaperDisplayOffsetX != Integer.MIN_VALUE) { - mLastWallpaperDisplayOffsetX = changingTarget.mWallpaperDisplayOffsetX; - } - if (target.mWallpaperDisplayOffsetY != Integer.MIN_VALUE) { - mLastWallpaperDisplayOffsetY = target.mWallpaperDisplayOffsetY; - } else if (changingTarget.mWallpaperDisplayOffsetY != Integer.MIN_VALUE) { - mLastWallpaperDisplayOffsetY = changingTarget.mWallpaperDisplayOffsetY; - } - if (target.mWallpaperXStep >= 0) { - mLastWallpaperXStep = target.mWallpaperXStep; - } else if (changingTarget.mWallpaperXStep >= 0) { - mLastWallpaperXStep = changingTarget.mWallpaperXStep; - } - if (target.mWallpaperYStep >= 0) { - mLastWallpaperYStep = target.mWallpaperYStep; - } else if (changingTarget.mWallpaperYStep >= 0) { - mLastWallpaperYStep = changingTarget.mWallpaperYStep; - } - } - - for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { - WindowList windows = mWallpaperTokens.get(curTokenNdx).windows; - for (int wallpaperNdx = windows.size() - 1; wallpaperNdx >= 0; wallpaperNdx--) { - WindowState wallpaper = windows.get(wallpaperNdx); - if (updateWallpaperOffsetLocked(wallpaper, dw, dh, sync)) { - WindowStateAnimator winAnimator = wallpaper.mWinAnimator; - winAnimator.computeShownFrameLocked(); - // No need to lay out the windows - we can just set the wallpaper position - // directly. - winAnimator.setWallpaperOffset(wallpaper.mShownFrame); - // We only want to be synchronous with one wallpaper. - sync = false; - } - } - } - } - - /** - * Check wallpaper for visibility change and notify window if so. - * @param wallpaper The wallpaper to test and notify. - * @param visible Current visibility. - */ - void dispatchWallpaperVisibility(final WindowState wallpaper, final boolean visible) { - // Only send notification if the visibility actually changed and we are not trying to hide - // the wallpaper when we are deferring hiding of the wallpaper. - if (wallpaper.mWallpaperVisible != visible - && (mDeferredHideWallpaper == null || visible)) { - wallpaper.mWallpaperVisible = visible; - try { - if (DEBUG_VISIBILITY || DEBUG_WALLPAPER_LIGHT) Slog.v(TAG, - "Updating vis of wallpaper " + wallpaper - + ": " + visible + " from:\n" + Debug.getCallers(4, " ")); - wallpaper.mClient.dispatchAppVisibility(visible); - } catch (RemoteException e) { - } - } - } - - private void updateWallpaperVisibilityLocked() { - final boolean visible = isWallpaperVisible(mWallpaperTarget); - final DisplayContent displayContent = mWallpaperTarget.getDisplayContent(); - if (displayContent == null) { - return; - } - final DisplayInfo displayInfo = displayContent.getDisplayInfo(); - final int dw = displayInfo.logicalWidth; - final int dh = displayInfo.logicalHeight; - - for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { - WindowToken token = mWallpaperTokens.get(curTokenNdx); - if (token.hidden == visible) { - token.hidden = !visible; - // Need to do a layout to ensure the wallpaper now has the - // correct size. - displayContent.layoutNeeded = true; - } - - final WindowList windows = token.windows; - for (int wallpaperNdx = windows.size() - 1; wallpaperNdx >= 0; wallpaperNdx--) { - WindowState wallpaper = windows.get(wallpaperNdx); - if (visible) { - updateWallpaperOffsetLocked(wallpaper, dw, dh, false); - } - - dispatchWallpaperVisibility(wallpaper, visible); - } - } - } - public int addWindow(Session session, IWindow client, int seq, WindowManager.LayoutParams attrs, int viewVisibility, int displayId, Rect outContentInsets, Rect outStableInsets, Rect outOutsets, @@ -2561,12 +1954,11 @@ public class WindowManagerService extends IWindowManager.Stub } else { addWindowToListInOrderLocked(win, true); if (type == TYPE_WALLPAPER) { - mLastWallpaperTimeoutTime = 0; + mWallpaperControllerLocked.clearLastWallpaperTimeoutTime(); displayContent.pendingLayoutChanges |= FINISH_LAYOUT_REDO_WALLPAPER; } else if ((attrs.flags&FLAG_SHOW_WALLPAPER) != 0) { displayContent.pendingLayoutChanges |= FINISH_LAYOUT_REDO_WALLPAPER; - } else if (mWallpaperTarget != null - && mWallpaperTarget.mLayer >= win.mBaseLayer) { + } else if (mWallpaperControllerLocked.isBelowWallpaperTarget(win)) { // If there is currently a wallpaper being shown, and // the base layer of the new window is below the current // layer of the target window, then adjust the wallpaper. @@ -2863,7 +2255,7 @@ public class WindowManagerService extends IWindowManager.Stub } if (win.mAttrs.type == TYPE_WALLPAPER) { - mLastWallpaperTimeoutTime = 0; + mWallpaperControllerLocked.clearLastWallpaperTimeoutTime(); getDefaultDisplayContentLocked().pendingLayoutChanges |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; } else if ((win.mAttrs.flags&FLAG_SHOW_WALLPAPER) != 0) { @@ -2983,62 +2375,6 @@ public class WindowManagerService extends IWindowManager.Stub } } - public void setWindowWallpaperPositionLocked(WindowState window, float x, float y, - float xStep, float yStep) { - if (window.mWallpaperX != x || window.mWallpaperY != y) { - window.mWallpaperX = x; - window.mWallpaperY = y; - window.mWallpaperXStep = xStep; - window.mWallpaperYStep = yStep; - updateWallpaperOffsetLocked(window, true); - } - } - - void wallpaperCommandComplete(IBinder window, Bundle result) { - synchronized (mWindowMap) { - if (mWaitingOnWallpaper != null && - mWaitingOnWallpaper.mClient.asBinder() == window) { - mWaitingOnWallpaper = null; - mWindowMap.notifyAll(); - } - } - } - - public void setWindowWallpaperDisplayOffsetLocked(WindowState window, int x, int y) { - if (window.mWallpaperDisplayOffsetX != x || window.mWallpaperDisplayOffsetY != y) { - window.mWallpaperDisplayOffsetX = x; - window.mWallpaperDisplayOffsetY = y; - updateWallpaperOffsetLocked(window, true); - } - } - - public Bundle sendWindowWallpaperCommandLocked(WindowState window, - String action, int x, int y, int z, Bundle extras, boolean sync) { - if (window == mWallpaperTarget || window == mLowerWallpaperTarget - || window == mUpperWallpaperTarget) { - boolean doWait = sync; - for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { - final WindowList windows = mWallpaperTokens.get(curTokenNdx).windows; - for (int wallpaperNdx = windows.size() - 1; wallpaperNdx >= 0; wallpaperNdx--) { - WindowState wallpaper = windows.get(wallpaperNdx); - try { - wallpaper.mClient.dispatchWallpaperCommand(action, - x, y, z, extras, sync); - // We only want to be synchronous with one wallpaper. - sync = false; - } catch (RemoteException e) { - } - } - } - - if (doWait) { - // XXX Need to wait for result. - } - } - - return null; - } - public void onRectangleOnScreenRequested(IBinder token, Rect rectangle) { synchronized (mWindowMap) { if (mAccessibilityController != null) { @@ -3293,7 +2629,7 @@ public class WindowManagerService extends IWindowManager.Stub // Currently in a hide animation... turn this into // an exit. win.mExiting = true; - } else if (win == mWallpaperTarget) { + } else if (mWallpaperControllerLocked.isWallpaperTarget(win)) { // If the wallpaper is currently behind this // window, we need to change both of them inside // of a transaction to avoid artifacts. @@ -3351,8 +2687,8 @@ public class WindowManagerService extends IWindowManager.Stub performLayoutAndPlaceSurfacesLocked(); if (toBeDisplayed && win.mIsWallpaper) { DisplayInfo displayInfo = getDefaultDisplayInfoLocked(); - updateWallpaperOffsetLocked(win, - displayInfo.logicalWidth, displayInfo.logicalHeight, false); + mWallpaperControllerLocked.updateWallpaperOffset( + win, displayInfo.logicalWidth, displayInfo.logicalHeight, false); } if (win.mAppToken != null) { win.mAppToken.updateReportedVisibilityLocked(); @@ -3495,7 +2831,8 @@ public class WindowManagerService extends IWindowManager.Stub final boolean resizedWindow = !fullscreen && !dialogWindow; Animation a = mAppTransition.loadAnimation(lp, transit, enter, containingWidth, containingHeight, mCurConfiguration.orientation, containingFrame, contentInsets, - surfaceInsets, appFrame, isVoiceInteraction, resizedWindow); + surfaceInsets, appFrame, isVoiceInteraction, resizedWindow, + atoken.mTask.mTaskId); if (a != null) { if (DEBUG_ANIM) { RuntimeException e = null; @@ -3629,7 +2966,7 @@ public class WindowManagerService extends IWindowManager.Stub wtoken = new WindowToken(this, token, type, true); mTokenMap.put(token, wtoken); if (type == TYPE_WALLPAPER) { - mWallpaperTokens.add(wtoken); + mWallpaperControllerLocked.addWallpaperToken(wtoken); } } } @@ -3685,10 +3022,10 @@ public class WindowManagerService extends IWindowManager.Stub if (delayed && displayContent != null) { displayContent.mExitingTokens.add(wtoken); } else if (wtoken.windowType == TYPE_WALLPAPER) { - mWallpaperTokens.remove(wtoken); + mWallpaperControllerLocked.removeWallpaperToken(wtoken); } } else if (wtoken.windowType == TYPE_WALLPAPER) { - mWallpaperTokens.remove(wtoken); + mWallpaperControllerLocked.removeWallpaperToken(wtoken); } mInputMonitor.updateInputWindowsLw(true /*force*/); @@ -4219,6 +3556,14 @@ public class WindowManagerService extends IWindowManager.Stub } @Override + public void overridePendingAppTransitionMultiThumb(AppTransitionAnimationSpec[] specs, + IRemoteCallback callback, boolean scaleUp) { + synchronized (mWindowMap) { + mAppTransition.overridePendingAppTransitionMultiThumb(specs, callback, scaleUp); + } + } + + @Override public void overridePendingAppTransitionInPlace(String packageName, int anim) { synchronized(mWindowMap) { mAppTransition.overrideInPlaceAppTransition(packageName, anim); @@ -4427,7 +3772,7 @@ public class WindowManagerService extends IWindowManager.Stub } if (ent.array.getBoolean( com.android.internal.R.styleable.Window_windowShowWallpaper, false)) { - if (mWallpaperTarget == null) { + if (mWallpaperControllerLocked.getWallpaperTarget() == null) { // If this theme is requesting a wallpaper, and the wallpaper // is not curently visible, then this effectively serves as // an opaque window and our starting window transition animation @@ -5853,6 +5198,7 @@ public class WindowManagerService extends IWindowManager.Stub if (!mBootAnimationStopped) { // Do this one time. + Trace.asyncTraceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "Stop bootanim", 0); try { IBinder surfaceFlinger = ServiceManager.getService("SurfaceFlinger"); if (surfaceFlinger != null) { @@ -5875,6 +5221,7 @@ public class WindowManagerService extends IWindowManager.Stub } EventLog.writeEvent(EventLogTags.WM_BOOT_ANIMATION_DONE, SystemClock.uptimeMillis()); + Trace.asyncTraceEnd(Trace.TRACE_TAG_WINDOW_MANAGER, "Stop bootanim", 0); mDisplayEnabled = true; if (DEBUG_SCREEN_ON || DEBUG_BOOT) Slog.i(TAG, "******************** ENABLING SCREEN!"); @@ -8282,10 +7629,7 @@ public class WindowManagerService extends IWindowManager.Stub break; case WALLPAPER_DRAW_PENDING_TIMEOUT: { synchronized (mWindowMap) { - if (mWallpaperDrawState == WALLPAPER_DRAW_PENDING) { - mWallpaperDrawState = WALLPAPER_DRAW_TIMEOUT; - if (DEBUG_APP_TRANSITIONS || DEBUG_WALLPAPER) Slog.v(TAG, - "*** WALLPAPER DRAW TIMEOUT"); + if (mWallpaperControllerLocked.processWallpaperDrawPendingTimeout()) { performLayoutAndPlaceSurfacesLocked(); } } @@ -8908,7 +8252,7 @@ public class WindowManagerService extends IWindowManager.Stub if (w.mIsImWindow) { winAnimator.mAnimLayer += mInputMethodAnimLayerAdjustment; } else if (w.mIsWallpaper) { - winAnimator.mAnimLayer += mWallpaperAnimLayerAdjustment; + winAnimator.mAnimLayer += mWallpaperControllerLocked.getAnimLayerAdjustment(); } if (winAnimator.mAnimLayer != oldLayer) { layerChanged = true; @@ -9231,38 +8575,8 @@ public class WindowManagerService extends IWindowManager.Stub } } - if (goodToGo && isWallpaperVisible(mWallpaperTarget)) { - boolean wallpaperGoodToGo = true; - for (int curTokenIndex = mWallpaperTokens.size() - 1; - curTokenIndex >= 0 && wallpaperGoodToGo; curTokenIndex--) { - WindowToken token = mWallpaperTokens.get(curTokenIndex); - for (int curWallpaperIndex = token.windows.size() - 1; curWallpaperIndex >= 0; - curWallpaperIndex--) { - WindowState wallpaper = token.windows.get(curWallpaperIndex); - if (wallpaper.mWallpaperVisible && !wallpaper.isDrawnLw()) { - // We've told this wallpaper to be visible, but it is not drawn yet - wallpaperGoodToGo = false; - if (mWallpaperDrawState != WALLPAPER_DRAW_TIMEOUT) { - // wait for this wallpaper until it is drawn or timeout - goodToGo = false; - } - if (mWallpaperDrawState == WALLPAPER_DRAW_NORMAL) { - mWallpaperDrawState = WALLPAPER_DRAW_PENDING; - mH.removeMessages(H.WALLPAPER_DRAW_PENDING_TIMEOUT); - mH.sendEmptyMessageDelayed(H.WALLPAPER_DRAW_PENDING_TIMEOUT, - WALLPAPER_DRAW_PENDING_TIMEOUT_DURATION); - } - if (DEBUG_APP_TRANSITIONS || DEBUG_WALLPAPER) Slog.v(TAG, - "Wallpaper should be visible but has not been drawn yet. " + - "mWallpaperDrawState=" + mWallpaperDrawState); - break; - } - } - } - if (wallpaperGoodToGo) { - mWallpaperDrawState = WALLPAPER_DRAW_NORMAL; - mH.removeMessages(H.WALLPAPER_DRAW_PENDING_TIMEOUT); - } + if (goodToGo && mWallpaperControllerLocked.isWallpaperVisible()) { + goodToGo &= mWallpaperControllerLocked.wallpaperTransitionReady(); } } if (goodToGo) { @@ -9279,10 +8593,9 @@ public class WindowManagerService extends IWindowManager.Stub rebuildAppWindowListLocked(); // if wallpaper is animating in or out set oldWallpaper to null else to wallpaper - WindowState oldWallpaper = - mWallpaperTarget != null && mWallpaperTarget.mWinAnimator.isAnimating() - && !mWallpaperTarget.mWinAnimator.isDummyAnimation() - ? null : mWallpaperTarget; + final WindowState wallpaperTarget = mWallpaperControllerLocked.getWallpaperTarget(); + final WindowState oldWallpaper = mWallpaperControllerLocked.isWallpaperTargetAnimating() + ? null : wallpaperTarget; mInnerFields.mWallpaperMayChange = false; @@ -9293,21 +8606,26 @@ public class WindowManagerService extends IWindowManager.Stub boolean fullscreenAnim = false; boolean voiceInteraction = false; + final WindowState lowerWallpaperTarget = + mWallpaperControllerLocked.getLowerWallpaperTarget(); + final WindowState upperWallpaperTarget = + mWallpaperControllerLocked.getUpperWallpaperTarget(); + if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, - "New wallpaper target=" + mWallpaperTarget + "New wallpaper target=" + wallpaperTarget + ", oldWallpaper=" + oldWallpaper - + ", lower target=" + mLowerWallpaperTarget - + ", upper target=" + mUpperWallpaperTarget); + + ", lower target=" + lowerWallpaperTarget + + ", upper target=" + upperWallpaperTarget); boolean openingAppHasWallpaper = false; boolean closingAppHasWallpaper = false; final AppWindowToken lowerWallpaperAppToken; final AppWindowToken upperWallpaperAppToken; - if (mLowerWallpaperTarget == null) { + if (lowerWallpaperTarget == null) { lowerWallpaperAppToken = upperWallpaperAppToken = null; } else { - lowerWallpaperAppToken = mLowerWallpaperTarget.mAppToken; - upperWallpaperAppToken = mUpperWallpaperTarget.mAppToken; + lowerWallpaperAppToken = lowerWallpaperTarget.mAppToken; + upperWallpaperAppToken = upperWallpaperTarget.mAppToken; } // Do a first pass through the tokens for two @@ -9381,7 +8699,7 @@ public class WindowManagerService extends IWindowManager.Stub if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "New transit away from wallpaper: " + AppTransition.appTransitionToString(transit)); - } else if (mWallpaperTarget != null && mWallpaperTarget.isVisibleLw()) { + } else if (wallpaperTarget != null && wallpaperTarget.isVisibleLw()) { // We are transitioning from an activity without // a wallpaper to now showing the wallpaper transit = AppTransition.TRANSIT_WALLPAPER_OPEN; @@ -9402,11 +8720,6 @@ public class WindowManagerService extends IWindowManager.Stub animLp = null; } - AppWindowToken topOpeningApp = null; - AppWindowToken topClosingApp = null; - int topOpeningLayer = 0; - int topClosingLayer = 0; - // Process all applications animating in place if (transit == AppTransition.TRANSIT_TASK_IN_PLACE) { // Find the focused window @@ -9431,6 +8744,46 @@ public class WindowManagerService extends IWindowManager.Stub } } + AppWindowToken topClosingApp = null; + int topClosingLayer = 0; + appsCount = mClosingApps.size(); + for (i = 0; i < appsCount; i++) { + AppWindowToken wtoken = mClosingApps.valueAt(i); + final AppWindowAnimator appAnimator = wtoken.mAppAnimator; + if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Now closing app " + wtoken); + appAnimator.clearThumbnail(); + appAnimator.animation = null; + wtoken.inPendingTransaction = false; + setTokenVisibilityLocked(wtoken, animLp, false, transit, false, voiceInteraction); + wtoken.updateReportedVisibilityLocked(); + // Force the allDrawn flag, because we want to start + // this guy's animations regardless of whether it's + // gotten drawn. + wtoken.allDrawn = true; + wtoken.deferClearAllDrawn = false; + // Ensure that apps that are mid-starting are also scheduled to have their + // starting windows removed after the animation is complete + if (wtoken.startingWindow != null && !wtoken.startingWindow.mExiting) { + scheduleRemoveStartingWindowLocked(wtoken); + } + mAnimator.mAppWindowAnimating |= appAnimator.isAnimating(); + + if (animLp != null) { + int layer = -1; + for (int j = 0; j < wtoken.windows.size(); j++) { + WindowState win = wtoken.windows.get(j); + if (win.mWinAnimator.mAnimLayer > layer) { + layer = win.mWinAnimator.mAnimLayer; + } + } + if (topClosingApp == null || layer > topClosingLayer) { + topClosingApp = wtoken; + topClosingLayer = layer; + } + } + } + + AppWindowToken topOpeningApp = null; appsCount = mOpeningApps.size(); for (i = 0; i < appsCount; i++) { AppWindowToken wtoken = mOpeningApps.valueAt(i); @@ -9460,6 +8813,7 @@ public class WindowManagerService extends IWindowManager.Stub mAnimator.mAnimating |= appAnimator.showAllWindowsLocked(); mAnimator.mAppWindowAnimating |= appAnimator.isAnimating(); + int topOpeningLayer = 0; if (animLp != null) { int layer = -1; for (int j = 0; j < wtoken.windows.size(); j++) { @@ -9473,115 +8827,13 @@ public class WindowManagerService extends IWindowManager.Stub topOpeningLayer = layer; } } + createThumbnailAppAnimator(transit, wtoken, topOpeningLayer, topClosingLayer); } - appsCount = mClosingApps.size(); - for (i = 0; i < appsCount; i++) { - AppWindowToken wtoken = mClosingApps.valueAt(i); - final AppWindowAnimator appAnimator = wtoken.mAppAnimator; - if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Now closing app " + wtoken); - appAnimator.clearThumbnail(); - appAnimator.animation = null; - wtoken.inPendingTransaction = false; - setTokenVisibilityLocked(wtoken, animLp, false, transit, false, voiceInteraction); - wtoken.updateReportedVisibilityLocked(); - // Force the allDrawn flag, because we want to start - // this guy's animations regardless of whether it's - // gotten drawn. - wtoken.allDrawn = true; - wtoken.deferClearAllDrawn = false; - // Ensure that apps that are mid-starting are also scheduled to have their - // starting windows removed after the animation is complete - if (wtoken.startingWindow != null && !wtoken.startingWindow.mExiting) { - scheduleRemoveStartingWindowLocked(wtoken); - } - mAnimator.mAppWindowAnimating |= appAnimator.isAnimating(); - if (animLp != null) { - int layer = -1; - for (int j = 0; j < wtoken.windows.size(); j++) { - WindowState win = wtoken.windows.get(j); - if (win.mWinAnimator.mAnimLayer > layer) { - layer = win.mWinAnimator.mAnimLayer; - } - } - if (topClosingApp == null || layer > topClosingLayer) { - topClosingApp = wtoken; - topClosingLayer = layer; - } - } - } - - AppWindowAnimator openingAppAnimator = (topOpeningApp == null) ? null : + AppWindowAnimator openingAppAnimator = (topOpeningApp == null) ? null : topOpeningApp.mAppAnimator; AppWindowAnimator closingAppAnimator = (topClosingApp == null) ? null : topClosingApp.mAppAnimator; - Bitmap nextAppTransitionThumbnail = mAppTransition.getNextAppTransitionThumbnail(); - if (nextAppTransitionThumbnail != null - && openingAppAnimator != null && openingAppAnimator.animation != null && - nextAppTransitionThumbnail.getConfig() != Config.ALPHA_8) { - // This thumbnail animation is very special, we need to have - // an extra surface with the thumbnail included with the animation. - Rect dirty = new Rect(0, 0, nextAppTransitionThumbnail.getWidth(), - nextAppTransitionThumbnail.getHeight()); - try { - // TODO(multi-display): support other displays - final DisplayContent displayContent = getDefaultDisplayContentLocked(); - final Display display = displayContent.getDisplay(); - final DisplayInfo displayInfo = displayContent.getDisplayInfo(); - - // Create a new surface for the thumbnail - SurfaceControl surfaceControl = new SurfaceControl(mFxSession, - "thumbnail anim", dirty.width(), dirty.height(), - PixelFormat.TRANSLUCENT, SurfaceControl.HIDDEN); - surfaceControl.setLayerStack(display.getLayerStack()); - if (SHOW_TRANSACTIONS) { - Slog.i(TAG, " THUMBNAIL " + surfaceControl + ": CREATE"); - } - - // Draw the thumbnail onto the surface - Surface drawSurface = new Surface(); - drawSurface.copyFrom(surfaceControl); - Canvas c = drawSurface.lockCanvas(dirty); - c.drawBitmap(nextAppTransitionThumbnail, 0, 0, null); - drawSurface.unlockCanvasAndPost(c); - drawSurface.release(); - - // Get the thumbnail animation - Animation anim; - if (mAppTransition.isNextThumbnailTransitionAspectScaled()) { - // If this is a multi-window scenario, we use the windows frame as - // destination of the thumbnail header animation. If this is a full screen - // window scenario, we use the whole display as the target. - WindowState win = topOpeningApp.findMainWindow(); - Rect appRect = win != null ? win.getContentFrameLw() : - new Rect(0, 0, displayInfo.appWidth, displayInfo.appHeight); - // For the new aspect-scaled transition, we want it to always show - // above the animating opening/closing window, and we want to - // synchronize its thumbnail surface with the surface for the - // open/close animation (only on the way down) - anim = mAppTransition.createThumbnailAspectScaleAnimationLocked(appRect); - openingAppAnimator.thumbnailForceAboveLayer = Math.max(topOpeningLayer, - topClosingLayer); - openingAppAnimator.deferThumbnailDestruction = - !mAppTransition.isNextThumbnailTransitionScaleUp(); - } else { - anim = mAppTransition.createThumbnailScaleAnimationLocked( - displayInfo.appWidth, displayInfo.appHeight, transit); - } - anim.restrictDuration(MAX_ANIMATION_DURATION); - anim.scaleCurrentDuration(getTransitionAnimationScaleLocked()); - - openingAppAnimator.thumbnail = surfaceControl; - openingAppAnimator.thumbnailLayer = topOpeningLayer; - openingAppAnimator.thumbnailAnimation = anim; - openingAppAnimator.thumbnailX = mAppTransition.getStartingX(); - openingAppAnimator.thumbnailY = mAppTransition.getStartingY(); - } catch (OutOfResourcesException e) { - Slog.e(TAG, "Can't allocate thumbnail/Canvas surface w=" + dirty.width() - + " h=" + dirty.height(), e); - openingAppAnimator.clearThumbnail(); - } - } mAppTransition.goodToGo(openingAppAnimator, closingAppAnimator); mAppTransition.postAnimationCallback(); @@ -9609,6 +8861,83 @@ public class WindowManagerService extends IWindowManager.Stub return changes; } + private void createThumbnailAppAnimator(int transit, AppWindowToken appToken, + int openingLayer, int closingLayer) { + AppWindowAnimator openingAppAnimator = (appToken == null) ? null : appToken.mAppAnimator; + if (openingAppAnimator == null || openingAppAnimator.animation == null) { + return; + } + final int taskId = appToken.mTask.mTaskId; + Bitmap thumbnailHeader = mAppTransition.getAppTransitionThumbnailHeader(taskId); + if (thumbnailHeader == null || thumbnailHeader.getConfig() == Config.ALPHA_8) { + return; + } + // This thumbnail animation is very special, we need to have + // an extra surface with the thumbnail included with the animation. + Rect dirty = new Rect(0, 0, thumbnailHeader.getWidth(), thumbnailHeader.getHeight()); + try { + // TODO(multi-display): support other displays + final DisplayContent displayContent = getDefaultDisplayContentLocked(); + final Display display = displayContent.getDisplay(); + final DisplayInfo displayInfo = displayContent.getDisplayInfo(); + + // Create a new surface for the thumbnail + SurfaceControl surfaceControl = new SurfaceControl(mFxSession, + "thumbnail anim", dirty.width(), dirty.height(), + PixelFormat.TRANSLUCENT, SurfaceControl.HIDDEN); + surfaceControl.setLayerStack(display.getLayerStack()); + if (SHOW_TRANSACTIONS) { + Slog.i(TAG, " THUMBNAIL " + surfaceControl + ": CREATE"); + } + + // Draw the thumbnail onto the surface + Surface drawSurface = new Surface(); + drawSurface.copyFrom(surfaceControl); + Canvas c = drawSurface.lockCanvas(dirty); + c.drawBitmap(thumbnailHeader, 0, 0, null); + drawSurface.unlockCanvasAndPost(c); + drawSurface.release(); + + // Get the thumbnail animation + Animation anim; + if (mAppTransition.isNextThumbnailTransitionAspectScaled()) { + // If this is a multi-window scenario, we use the windows frame as + // destination of the thumbnail header animation. If this is a full screen + // window scenario, we use the whole display as the target. + WindowState win = appToken.findMainWindow(); + Rect appRect = win != null ? win.getContentFrameLw() : + new Rect(0, 0, displayInfo.appWidth, displayInfo.appHeight); + // For the new aspect-scaled transition, we want it to always show + // above the animating opening/closing window, and we want to + // synchronize its thumbnail surface with the surface for the + // open/close animation (only on the way down) + anim = mAppTransition.createThumbnailAspectScaleAnimationLocked(appRect, + thumbnailHeader, taskId); + Log.d(TAG, "assigning thumbnail force above layer: " + openingLayer + " " + + closingLayer); + openingAppAnimator.thumbnailForceAboveLayer = Math.max(openingLayer, closingLayer); + openingAppAnimator.deferThumbnailDestruction = + !mAppTransition.isNextThumbnailTransitionScaleUp(); + } else { + anim = mAppTransition.createThumbnailScaleAnimationLocked( + displayInfo.appWidth, displayInfo.appHeight, transit, thumbnailHeader); + } + anim.restrictDuration(MAX_ANIMATION_DURATION); + anim.scaleCurrentDuration(getTransitionAnimationScaleLocked()); + + openingAppAnimator.thumbnail = surfaceControl; + openingAppAnimator.thumbnailLayer = openingLayer; + openingAppAnimator.thumbnailAnimation = anim; + mAppTransition.getNextAppTransitionStartRect(taskId, mTmpStartRect); + openingAppAnimator.thumbnailX = mTmpStartRect.left; + openingAppAnimator.thumbnailY = mTmpStartRect.top; + } catch (OutOfResourcesException e) { + Slog.e(TAG, "Can't allocate thumbnail/Canvas surface w=" + dirty.width() + + " h=" + dirty.height(), e); + openingAppAnimator.clearThumbnail(); + } + } + /** * Extracted from {@link #performLayoutAndPlaceSurfacesLockedInner} to reduce size of method. * @return bitmap indicating if another pass through layout must be made. @@ -9624,10 +8953,7 @@ public class WindowManagerService extends IWindowManager.Stub } mNoAnimationNotifyOnTransitionFinished.clear(); - if (mDeferredHideWallpaper != null) { - hideWallpapersLocked(mDeferredHideWallpaper); - mDeferredHideWallpaper = null; - } + mWallpaperControllerLocked.hideDeferredWallpapersIfNeeded(); // Restore window app tokens to the ActivityManager views ArrayList<TaskStack> stacks = getDefaultDisplayContentLocked().getStacks(); @@ -9948,7 +9274,7 @@ public class WindowManagerService extends IWindowManager.Stub if ((displayContent.pendingLayoutChanges & WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER) != 0 && - adjustWallpaperWindowsLocked()) { + mWallpaperControllerLocked.adjustWallpaperWindows()) { assignLayersLocked(windows); displayContent.layoutNeeded = true; } @@ -10020,12 +9346,12 @@ public class WindowManagerService extends IWindowManager.Stub handleFlagDimBehind(w); } - if (isDefaultDisplay && obscuredChanged && (mWallpaperTarget == w) - && w.isVisibleLw()) { + if (isDefaultDisplay && obscuredChanged + && mWallpaperControllerLocked.isWallpaperTarget(w) && w.isVisibleLw()) { // This is the wallpaper target and its obscured state // changed... make sure the current wallaper's visibility // has been updated accordingly. - updateWallpaperVisibilityLocked(); + mWallpaperControllerLocked.updateWallpaperVisibility(); } final WindowStateAnimator winAnimator = w.mWinAnimator; @@ -10274,7 +9600,7 @@ public class WindowManagerService extends IWindowManager.Stub if (mInputMethodWindow == win) { mInputMethodWindow = null; } - if (win == mWallpaperTarget) { + if (mWallpaperControllerLocked.isWallpaperTarget(win)) { wallpaperDestroyed = true; } win.mWinAnimator.destroySurfaceLocked(); @@ -10291,7 +9617,7 @@ public class WindowManagerService extends IWindowManager.Stub if (!token.hasVisible) { exitingTokens.remove(i); if (token.windowType == TYPE_WALLPAPER) { - mWallpaperTokens.remove(token); + mWallpaperControllerLocked.removeWallpaperToken(token); } } } @@ -11198,21 +10524,7 @@ public class WindowManagerService extends IWindowManager.Stub } } } - if (!mWallpaperTokens.isEmpty()) { - pw.println(); - pw.println(" Wallpaper tokens:"); - for (int i=mWallpaperTokens.size()-1; i>=0; i--) { - WindowToken token = mWallpaperTokens.get(i); - pw.print(" Wallpaper #"); pw.print(i); - pw.print(' '); pw.print(token); - if (dumpAll) { - pw.println(':'); - token.dump(pw, " "); - } else { - pw.println(); - } - } - } + mWallpaperControllerLocked.dumpTokens(pw, " ", dumpAll); if (!mFinishedStarting.isEmpty()) { pw.println(); pw.println(" Finishing start of application tokens:"); @@ -11412,25 +10724,13 @@ public class WindowManagerService extends IWindowManager.Stub if (mInputMethodWindow != null) { pw.print(" mInputMethodWindow="); pw.println(mInputMethodWindow); } - pw.print(" mWallpaperTarget="); pw.println(mWallpaperTarget); - if (mLowerWallpaperTarget != null || mUpperWallpaperTarget != null) { - pw.print(" mLowerWallpaperTarget="); pw.println(mLowerWallpaperTarget); - pw.print(" mUpperWallpaperTarget="); pw.println(mUpperWallpaperTarget); - } - pw.print(" mLastWallpaperX="); pw.print(mLastWallpaperX); - pw.print(" mLastWallpaperY="); pw.println(mLastWallpaperY); - if (mLastWallpaperDisplayOffsetX != Integer.MIN_VALUE - || mLastWallpaperDisplayOffsetY != Integer.MIN_VALUE) { - pw.print(" mLastWallpaperDisplayOffsetX="); pw.print(mLastWallpaperDisplayOffsetX); - pw.print(" mLastWallpaperDisplayOffsetY="); - pw.println(mLastWallpaperDisplayOffsetY); - } + mWallpaperControllerLocked.dump(pw, " "); if (mInputMethodAnimLayerAdjustment != 0 || - mWallpaperAnimLayerAdjustment != 0) { + mWallpaperControllerLocked.getAnimLayerAdjustment() != 0) { pw.print(" mInputMethodAnimLayerAdjustment="); pw.print(mInputMethodAnimLayerAdjustment); pw.print(" mWallpaperAnimLayerAdjustment="); - pw.println(mWallpaperAnimLayerAdjustment); + pw.println(mWallpaperControllerLocked.getAnimLayerAdjustment()); } pw.print(" mSystemBooted="); pw.print(mSystemBooted); pw.print(" mDisplayEnabled="); pw.println(mDisplayEnabled); diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 40611492c6b1..b56b1f9cadc6 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -16,6 +16,7 @@ package com.android.server.wm; +import static android.app.ActivityManager.FREEFORM_WORKSPACE_STACK_ID; import static android.view.WindowManager.LayoutParams.FIRST_SUB_WINDOW; import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED; import static android.view.WindowManager.LayoutParams.LAST_SUB_WINDOW; @@ -33,11 +34,11 @@ import static com.android.server.wm.WindowManagerService.DEBUG_RESIZE; import static com.android.server.wm.WindowManagerService.DEBUG_VISIBILITY; import android.app.AppOpsManager; -import android.os.Debug; import android.os.PowerManager; import android.os.RemoteCallbackList; import android.os.SystemClock; import android.os.WorkSource; +import android.util.DisplayMetrics; import android.util.TimeUtils; import android.view.Display; import android.view.IWindowFocusObserver; @@ -78,6 +79,10 @@ class WindowList extends ArrayList<WindowState> { final class WindowState implements WindowManagerPolicy.WindowState { static final String TAG = "WindowState"; + // The minimal size of a window within the usable area of the freeform stack. + static final int MINIMUM_VISIBLE_WIDTH_IN_DP = 48; + static final int MINIMUM_VISIBLE_HEIGHT_IN_DP = 32; + final WindowManagerService mService; final WindowManagerPolicy mPolicy; final Context mContext; @@ -536,6 +541,8 @@ final class WindowState implements WindowManagerPolicy.WindowState { mHaveFrame = true; final Task task = mAppToken != null ? getTask() : null; + final boolean isFreeFormWorkspace = task != null && task.mStack != null && + task.mStack.mStackId == FREEFORM_WORKSPACE_STACK_ID; final boolean nonFullscreenTask = task != null && !task.isFullscreen(); if (nonFullscreenTask) { task.getBounds(mContainingFrame); @@ -545,10 +552,20 @@ final class WindowState implements WindowManagerPolicy.WindowState { // IME is up and obscuring this window. Adjust the window position so it is visible. mContainingFrame.top -= mContainingFrame.bottom - cf.bottom; } - // Make sure the containing frame is within the content frame so we don't layout - // resized window under screen decorations. - if (!mContainingFrame.intersect(cf)) { - mContainingFrame.set(cf); + + if (isFreeFormWorkspace) { + // In free form mode we have only to set the rectangle if it wasn't set already. No + // need to intersect it with the (visible) "content frame" since it is allowed to + // be outside the visible desktop. + if (mContainingFrame.isEmpty()) { + mContainingFrame.set(cf); + } + } else { + // Make sure the containing frame is within the content frame so we don't layout + // resized window under screen decorations. + if (!mContainingFrame.intersect(cf)) { + mContainingFrame.set(cf); + } } mDisplayFrame.set(mContainingFrame); } else { @@ -652,20 +669,38 @@ final class WindowState implements WindowManagerPolicy.WindowState { // Make sure the content and visible frames are inside of the // final window frame. - mContentFrame.set(Math.max(mContentFrame.left, mFrame.left), - Math.max(mContentFrame.top, mFrame.top), - Math.min(mContentFrame.right, mFrame.right), - Math.min(mContentFrame.bottom, mFrame.bottom)); + if (isFreeFormWorkspace && !mFrame.isEmpty()) { + // Keep the frame out of the blocked system area, limit it in size to the content area + // and make sure that there is always a minimum visible so that the user can drag it + // into a usable area.. + final int height = Math.min(mFrame.height(), mContentFrame.height()); + final int width = Math.min(mContentFrame.width(), mFrame.width()); + final int minVisibleHeight = calculatePixelFromDp(MINIMUM_VISIBLE_HEIGHT_IN_DP); + final int minVisibleWidth = calculatePixelFromDp(MINIMUM_VISIBLE_WIDTH_IN_DP); + final int top = Math.max(mContentFrame.top, + Math.min(mFrame.top, mContentFrame.bottom - minVisibleHeight)); + final int left = Math.max(mContentFrame.left + minVisibleWidth - width, + Math.min(mFrame.left, mContentFrame.right - minVisibleWidth)); + mFrame.set(left, top, left + width, top + height); + mContentFrame.set(mFrame); + mVisibleFrame.set(mContentFrame); + mStableFrame.set(mContentFrame); + } else { + mContentFrame.set(Math.max(mContentFrame.left, mFrame.left), + Math.max(mContentFrame.top, mFrame.top), + Math.min(mContentFrame.right, mFrame.right), + Math.min(mContentFrame.bottom, mFrame.bottom)); - mVisibleFrame.set(Math.max(mVisibleFrame.left, mFrame.left), - Math.max(mVisibleFrame.top, mFrame.top), - Math.min(mVisibleFrame.right, mFrame.right), - Math.min(mVisibleFrame.bottom, mFrame.bottom)); + mVisibleFrame.set(Math.max(mVisibleFrame.left, mFrame.left), + Math.max(mVisibleFrame.top, mFrame.top), + Math.min(mVisibleFrame.right, mFrame.right), + Math.min(mVisibleFrame.bottom, mFrame.bottom)); - mStableFrame.set(Math.max(mStableFrame.left, mFrame.left), - Math.max(mStableFrame.top, mFrame.top), - Math.min(mStableFrame.right, mFrame.right), - Math.min(mStableFrame.bottom, mFrame.bottom)); + mStableFrame.set(Math.max(mStableFrame.left, mFrame.left), + Math.max(mStableFrame.top, mFrame.top), + Math.min(mStableFrame.right, mFrame.right), + Math.min(mStableFrame.bottom, mFrame.bottom)); + } mOverscanInsets.set(Math.max(mOverscanFrame.left - mFrame.left, 0), Math.max(mOverscanFrame.top - mFrame.top, 0), @@ -707,8 +742,8 @@ final class WindowState implements WindowManagerPolicy.WindowState { final DisplayContent displayContent = getDisplayContent(); if (displayContent != null) { final DisplayInfo displayInfo = displayContent.getDisplayInfo(); - mService.updateWallpaperOffsetLocked(this, - displayInfo.logicalWidth, displayInfo.logicalHeight, false); + mService.mWallpaperControllerLocked.updateWallpaperOffset( + this, displayInfo.logicalWidth, displayInfo.logicalHeight, false); } } @@ -1577,6 +1612,13 @@ final class WindowState implements WindowManagerPolicy.WindowState { } } + private int calculatePixelFromDp(int dp) { + final Configuration serviceConfig = mService.mCurConfiguration; + // TODO(multidisplay): Update Dp to that of display stack is on. + final float density = serviceConfig.densityDpi * DisplayMetrics.DENSITY_DEFAULT_SCALE; + return (int)(dp * density); + } + void dump(PrintWriter pw, String prefix, boolean dumpAll) { final TaskStack stack = getStack(); pw.print(prefix); pw.print("mDisplayId="); pw.print(getDisplayId()); diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java index 28491e42b746..7aa48ab5119f 100644 --- a/services/core/java/com/android/server/wm/WindowStateAnimator.java +++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java @@ -47,7 +47,6 @@ import android.view.MagnificationSpec; import android.view.Surface.OutOfResourcesException; import android.view.SurfaceControl; import android.view.SurfaceSession; -import android.view.View; import android.view.WindowManager; import android.view.WindowManagerPolicy; import android.view.WindowManager.LayoutParams; @@ -77,6 +76,7 @@ class WindowStateAnimator { final WindowManagerPolicy mPolicy; final Context mContext; final boolean mIsWallpaper; + final WallpaperController mWallpaperControllerLocked; // Currently running animation. boolean mAnimating; @@ -209,6 +209,7 @@ class WindowStateAnimator { mSession = win.mSession; mAttrType = win.mAttrs.type; mIsWallpaper = win.mIsWallpaper; + mWallpaperControllerLocked = mService.mWallpaperControllerLocked; } public void setAnimation(Animation anim, long startTime) { @@ -375,7 +376,7 @@ class WindowStateAnimator { if (mWin.mIsImWindow) { mAnimLayer += mService.mInputMethodAnimLayerAdjustment; } else if (mIsWallpaper) { - mAnimLayer += mService.mWallpaperAnimLayerAdjustment; + mAnimLayer += mWallpaperControllerLocked.getAnimLayerAdjustment(); } if (DEBUG_LAYERS) Slog.v(TAG, "Stepping win " + this + " anim layer: " + mAnimLayer); @@ -484,7 +485,7 @@ class WindowStateAnimator { mService.mPendingRemove.add(mWin); mWin.mRemoveOnExit = false; } - mService.hideWallpapersLocked(mWin); + mWallpaperControllerLocked.hideWallpapers(mWin); } void hide() { @@ -986,7 +987,7 @@ class WindowStateAnimator { } mSurfaceControl.destroy(); } - mService.hideWallpapersLocked(mWin); + mWallpaperControllerLocked.hideWallpapers(mWin); } catch (RuntimeException e) { Slog.w(TAG, "Exception thrown when destroying Window " + this + " surface " + mSurfaceControl + " session " + mSession @@ -1012,7 +1013,7 @@ class WindowStateAnimator { WindowManagerService.logSurface(mWin, "DESTROY PENDING", e); } mPendingDestroySurface.destroy(); - mService.hideWallpapersLocked(mWin); + mWallpaperControllerLocked.hideWallpapers(mWin); } } catch (RuntimeException e) { Slog.w(TAG, "Exception thrown when destroying Window " @@ -1033,7 +1034,7 @@ class WindowStateAnimator { // Wallpapers are animated based on the "real" window they // are currently targeting. - final WindowState wallpaperTarget = mService.mWallpaperTarget; + final WindowState wallpaperTarget = mWallpaperControllerLocked.getWallpaperTarget(); if (mIsWallpaper && wallpaperTarget != null && mService.mAnimateWallpaperWithTarget) { final WindowStateAnimator wallpaperAnimator = wallpaperTarget.mWinAnimator; if (wallpaperAnimator.mHasLocalTransformation && @@ -1467,7 +1468,7 @@ class WindowStateAnimator { hide(); } else if (w.mAttachedHidden || !w.isOnScreen()) { hide(); - mService.hideWallpapersLocked(w); + mWallpaperControllerLocked.hideWallpapers(w); // If we are waiting for this window to handle an // orientation change, well, it is hidden, so @@ -1522,7 +1523,7 @@ class WindowStateAnimator { if (showSurfaceRobustlyLocked()) { mLastHidden = false; if (mIsWallpaper) { - mService.dispatchWallpaperVisibility(w, true); + mWallpaperControllerLocked.dispatchWallpaperVisibility(w, true); } // This draw means the difference between unique content and mirroring. // Run another pass through performLayout to set mHasContent in the diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index cd2885b9fdd4..7fc56ec6c294 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -4523,12 +4523,12 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { long id = Binder.clearCallingIdentity(); try { mUserManager.setUserEnabled(userId); + UserInfo parent = mUserManager.getProfileParent(userId); Intent intent = new Intent(Intent.ACTION_MANAGED_PROFILE_ADDED); intent.putExtra(Intent.EXTRA_USER, new UserHandle(userHandle)); intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY | Intent.FLAG_RECEIVER_FOREGROUND); - // TODO This should send to parent of profile (which is always owner at the moment). - mContext.sendBroadcastAsUser(intent, UserHandle.OWNER); + mContext.sendBroadcastAsUser(intent, new UserHandle(parent.id)); } finally { restoreCallingIdentity(id); } @@ -4963,13 +4963,19 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { IPackageManager pm = AppGlobals.getPackageManager(); long id = Binder.clearCallingIdentity(); try { + UserInfo parent = mUserManager.getProfileParent(callingUserId); + if (parent == null) { + Slog.e(LOG_TAG, "Cannot call addCrossProfileIntentFilter if there is no " + + "parent"); + return; + } if ((flags & DevicePolicyManager.FLAG_PARENT_CAN_ACCESS_MANAGED) != 0) { pm.addCrossProfileIntentFilter(filter, who.getPackageName(), callingUserId, - UserHandle.USER_OWNER, 0); + parent.id, 0); } if ((flags & DevicePolicyManager.FLAG_MANAGED_CAN_ACCESS_PARENT) != 0) { pm.addCrossProfileIntentFilter(filter, who.getPackageName(), - UserHandle.USER_OWNER, callingUserId, 0); + parent.id, callingUserId, 0); } } catch (RemoteException re) { // Shouldn't happen diff --git a/services/tests/servicestests/Android.mk b/services/tests/servicestests/Android.mk index 33979b11d7a7..3ad26d38abaa 100644 --- a/services/tests/servicestests/Android.mk +++ b/services/tests/servicestests/Android.mk @@ -13,6 +13,7 @@ LOCAL_STATIC_JAVA_LIBRARIES := \ services.net \ easymocklib \ guava \ + android-support-test \ mockito-target LOCAL_JAVA_LIBRARIES := android.test.runner diff --git a/services/tests/servicestests/AndroidManifest.xml b/services/tests/servicestests/AndroidManifest.xml index 919293a5c0e9..386a9cbb9dc6 100644 --- a/services/tests/servicestests/AndroidManifest.xml +++ b/services/tests/servicestests/AndroidManifest.xml @@ -69,7 +69,7 @@ </application> <instrumentation - android:name="android.test.InstrumentationTestRunner" + android:name="android.support.test.runner.AndroidJUnitRunner" android:targetPackage="com.android.frameworks.servicestests" android:label="Frameworks Services Tests" /> </manifest> diff --git a/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java b/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java index 696f106bceca..b4c76b7faaae 100644 --- a/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java @@ -943,8 +943,7 @@ public class ConnectivityServiceTest extends AndroidTestCase { if (capability == NET_CAPABILITY_CBS || capability == NET_CAPABILITY_DUN || capability == NET_CAPABILITY_EIMS || capability == NET_CAPABILITY_FOTA || capability == NET_CAPABILITY_IA || capability == NET_CAPABILITY_IMS || - capability == NET_CAPABILITY_RCS || capability == NET_CAPABILITY_XCAP || - capability == NET_CAPABILITY_TRUSTED || capability == NET_CAPABILITY_NOT_VPN) { + capability == NET_CAPABILITY_RCS || capability == NET_CAPABILITY_XCAP) { assertFalse(nc.hasCapability(NET_CAPABILITY_NOT_RESTRICTED)); } else { assertTrue(nc.hasCapability(NET_CAPABILITY_NOT_RESTRICTED)); diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java index d91fa906f0af..2d31a78bb617 100644 --- a/telecomm/java/android/telecom/Call.java +++ b/telecomm/java/android/telecom/Call.java @@ -512,8 +512,8 @@ public final class Call { Objects.equals(mGatewayInfo, d.mGatewayInfo) && Objects.equals(mVideoState, d.mVideoState) && Objects.equals(mStatusHints, d.mStatusHints) && - Objects.equals(mExtras, d.mExtras) && - Objects.equals(mIntentExtras, d.mIntentExtras); + areBundlesEqual(mExtras, d.mExtras) && + areBundlesEqual(mIntentExtras, d.mIntentExtras); } return false; } @@ -1253,4 +1253,32 @@ public final class Call { }); } } + + /** + * Determines if two bundles are equal. + * + * @param bundle The original bundle. + * @param newBundle The bundle to compare with. + * @retrun {@code true} if the bundles are equal, {@code false} otherwise. + */ + private static boolean areBundlesEqual(Bundle bundle, Bundle newBundle) { + if (bundle == null || newBundle == null) { + return bundle == newBundle; + } + + if (bundle.size() != newBundle.size()) { + return false; + } + + for(String key : bundle.keySet()) { + if (key != null) { + final Object value = bundle.get(key); + final Object newValue = newBundle.get(key); + if (!Objects.equals(value, newValue)) { + return false; + } + } + } + return true; + } } diff --git a/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java b/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java index 62859ecca9d4..a8fd91c3a607 100644 --- a/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java +++ b/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java @@ -30,6 +30,7 @@ import android.os.IBinder; import android.os.IRemoteCallback; import android.os.RemoteException; import android.util.DisplayMetrics; +import android.view.AppTransitionAnimationSpec; import java.lang.Override; @@ -241,6 +242,12 @@ public class IWindowManagerImpl implements IWindowManager { } @Override + public void overridePendingAppTransitionMultiThumb(AppTransitionAnimationSpec[] specs, + IRemoteCallback callback, boolean scaleUp) { + // TODO Auto-generated method stub + } + + @Override public void pauseKeyDispatching(IBinder arg0) throws RemoteException { // TODO Auto-generated method stub |