summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorNick Chameyev <nickchameyev@google.com>2021-09-28 10:06:27 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-09-28 10:06:27 +0000
commitb85da640d13ced31165c543e686bb47027bff54f (patch)
treef3570f3e0b68c1d7fe33d97c8f5a492fb117edc4 /core/java
parent3dce047981dfd35b1d3301c1f79f90685208d239 (diff)
parent10b13e85058e06f6390da298fd06daa0135de7e9 (diff)
Merge "Rename shouldUseDefaultUnfoldTransition attribute and update docs" into sc-v2-dev
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/WallpaperInfo.java34
1 files changed, 18 insertions, 16 deletions
diff --git a/core/java/android/app/WallpaperInfo.java b/core/java/android/app/WallpaperInfo.java
index 4dff4e0e84d6..c552cb62749b 100644
--- a/core/java/android/app/WallpaperInfo.java
+++ b/core/java/android/app/WallpaperInfo.java
@@ -81,7 +81,7 @@ public final class WallpaperInfo implements Parcelable {
final int mContextDescriptionResource;
final boolean mShowMetadataInPreview;
final boolean mSupportsAmbientMode;
- final boolean mShouldUseDefaultUnfoldTransition;
+ final boolean mShouldUseDefaultDeviceStateChangeTransition;
final String mSettingsSliceUri;
final boolean mSupportMultipleDisplays;
@@ -146,9 +146,9 @@ public final class WallpaperInfo implements Parcelable {
mSupportsAmbientMode = sa.getBoolean(
com.android.internal.R.styleable.Wallpaper_supportsAmbientMode,
false);
- mShouldUseDefaultUnfoldTransition = sa.getBoolean(
- com.android.internal.R.styleable.Wallpaper_shouldUseDefaultUnfoldTransition,
- true);
+ mShouldUseDefaultDeviceStateChangeTransition = sa.getBoolean(
+ com.android.internal.R.styleable
+ .Wallpaper_shouldUseDefaultDeviceStateChangeTransition, true);
mSettingsSliceUri = sa.getString(
com.android.internal.R.styleable.Wallpaper_settingsSliceUri);
mSupportMultipleDisplays = sa.getBoolean(
@@ -175,7 +175,7 @@ public final class WallpaperInfo implements Parcelable {
mSupportsAmbientMode = source.readInt() != 0;
mSettingsSliceUri = source.readString();
mSupportMultipleDisplays = source.readInt() != 0;
- mShouldUseDefaultUnfoldTransition = source.readInt() != 0;
+ mShouldUseDefaultDeviceStateChangeTransition = source.readInt() != 0;
mService = ResolveInfo.CREATOR.createFromParcel(source);
}
@@ -399,23 +399,25 @@ public final class WallpaperInfo implements Parcelable {
}
/**
- * Returns whether this wallpaper should receive default zooming updates when unfolding.
- * If set to false the wallpaper will not receive zoom events when folding or unfolding
- * a foldable device, so it can implement its own unfold transition.
+ * Returns whether this wallpaper should receive default zooming updates when the device
+ * changes its state (e.g. when folding or unfolding a foldable device).
+ * If set to false the wallpaper will not receive zoom events when changing the device state,
+ * so it can implement its own transition instead.
* <p>
* This corresponds to the value {@link
- * android.R.styleable#Wallpaper_shouldUseDefaultUnfoldTransition} in the XML description
- * of the wallpaper.
+ * android.R.styleable#Wallpaper_shouldUseDefaultDeviceStateChangeTransition} in the
+ * XML description of the wallpaper.
* <p>
* The default value is {@code true}.
*
- * @see android.R.styleable#Wallpaper_shouldUseDefaultUnfoldTransition
- * @return {@code true} if wallpaper should receive default fold/unfold transition updates
+ * @see android.R.styleable#Wallpaper_shouldUseDefaultDeviceStateChangeTransition
+ * @return {@code true} if wallpaper should receive default device state change
+ * transition updates
*
- * @attr ref android.R.styleable#Wallpaper_shouldUseDefaultUnfoldTransition
+ * @attr ref android.R.styleable#Wallpaper_shouldUseDefaultDeviceStateChangeTransition
*/
- public boolean shouldUseDefaultUnfoldTransition() {
- return mShouldUseDefaultUnfoldTransition;
+ public boolean shouldUseDefaultDeviceStateChangeTransition() {
+ return mShouldUseDefaultDeviceStateChangeTransition;
}
public void dump(Printer pw, String prefix) {
@@ -448,7 +450,7 @@ public final class WallpaperInfo implements Parcelable {
dest.writeInt(mSupportsAmbientMode ? 1 : 0);
dest.writeString(mSettingsSliceUri);
dest.writeInt(mSupportMultipleDisplays ? 1 : 0);
- dest.writeInt(mShouldUseDefaultUnfoldTransition ? 1 : 0);
+ dest.writeInt(mShouldUseDefaultDeviceStateChangeTransition ? 1 : 0);
mService.writeToParcel(dest, flags);
}