diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2019-04-30 12:04:37 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2019-05-02 10:59:28 -0700 |
commit | ae6e318711239601fdd11a14c3cf8c542b808f19 (patch) | |
tree | cc648803791d551f80202267b1c05ca6f1084517 /src/com/android/launcher3/views/ActivityContext.java | |
parent | c2803ec5b272c902b6ab314d782afe852163b4ff (diff) | |
download | android_packages_apps_Trebuchet-ae6e318711239601fdd11a14c3cf8c542b808f19.tar.gz android_packages_apps_Trebuchet-ae6e318711239601fdd11a14c3cf8c542b808f19.tar.bz2 android_packages_apps_Trebuchet-ae6e318711239601fdd11a14c3cf8c542b808f19.zip |
Initial changes to creating a fake landscape Launcher UI
Workspace and hotseat are drawn in rotated UI giving the impression that the
device is in Portrait, even though it is in landscape
Bug: 131360075
Change-Id: I29c4068af25fd4dcf7039b9a45886e864a137977
Diffstat (limited to 'src/com/android/launcher3/views/ActivityContext.java')
-rw-r--r-- | src/com/android/launcher3/views/ActivityContext.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/launcher3/views/ActivityContext.java b/src/com/android/launcher3/views/ActivityContext.java index c9cdeffb9..0331a86cd 100644 --- a/src/com/android/launcher3/views/ActivityContext.java +++ b/src/com/android/launcher3/views/ActivityContext.java @@ -22,6 +22,7 @@ import android.view.View.AccessibilityDelegate; import com.android.launcher3.DeviceProfile; import com.android.launcher3.ItemInfo; +import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.dot.DotInfo; /** @@ -56,6 +57,19 @@ public interface ActivityContext { DeviceProfile getDeviceProfile(); + /** + * Device profile to be used by UI elements which are shown directly on top of the wallpaper + * and whose presentation is tied to the wallpaper (and physical device) and not the activity + * configuration. + */ + default DeviceProfile getWallpaperDeviceProfile() { + return getDeviceProfile(); + } + + default RotationMode getRotationMode() { + return RotationMode.NORMAL; + } + static ActivityContext lookupContext(Context context) { if (context instanceof ActivityContext) { return (ActivityContext) context; |