Loading core/java/android/app/WindowConfiguration.java +69 −4 Original line number Original line Diff line number Diff line Loading @@ -44,16 +44,43 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu */ */ private Rect mAppBounds; private Rect mAppBounds; /** The current windowing mode of the configuration. */ private @WindowingMode int mWindowingMode; /** Windowing mode is currently not defined. */ public static final int WINDOWING_MODE_UNDEFINED = 0; /** Occupies the full area of the screen or the parent container. */ public static final int WINDOWING_MODE_FULLSCREEN = 1; /** Always on-top (always visible). of other siblings in its parent container. */ public static final int WINDOWING_MODE_PINNED = 2; /** Occupies a dedicated region of the screen or its parent container. */ public static final int WINDOWING_MODE_DOCKED = 3; /** Can be freely resized within its parent container. */ public static final int WINDOWING_MODE_FREEFORM = 4; @IntDef(value = { WINDOWING_MODE_UNDEFINED, WINDOWING_MODE_FULLSCREEN, WINDOWING_MODE_PINNED, WINDOWING_MODE_DOCKED, WINDOWING_MODE_FREEFORM, }) @Retention(RetentionPolicy.SOURCE) public @interface WindowingMode {} /** Bit that indicates that the {@link #mAppBounds} changed. */ public static final int WINDOW_CONFIG_APP_BOUNDS = 1 << 0; /** Bit that indicates that the {@link #mWindowingMode} changed. */ public static final int WINDOW_CONFIG_WINDOWING_MODE = 1 << 1; @IntDef(flag = true, @IntDef(flag = true, value = { value = { WINDOW_CONFIG_APP_BOUNDS, WINDOW_CONFIG_APP_BOUNDS, WINDOW_CONFIG_WINDOWING_MODE, }) }) @Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE) public @interface WindowConfig {} public @interface WindowConfig {} /** Bit that indicates that the {@link #mAppBounds} changed. */ public static final int WINDOW_CONFIG_APP_BOUNDS = 1 << 0; public WindowConfiguration() { public WindowConfiguration() { unset(); unset(); } } Loading @@ -69,10 +96,12 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu @Override @Override public void writeToParcel(Parcel dest, int flags) { public void writeToParcel(Parcel dest, int flags) { dest.writeParcelable(mAppBounds, flags); dest.writeParcelable(mAppBounds, flags); dest.writeInt(mWindowingMode); } } private void readFromParcel(Parcel source) { private void readFromParcel(Parcel source) { mAppBounds = source.readParcelable(Rect.class.getClassLoader()); mAppBounds = source.readParcelable(Rect.class.getClassLoader()); mWindowingMode = source.readInt(); } } @Override @Override Loading Loading @@ -125,8 +154,18 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu return mAppBounds; return mAppBounds; } } public void setWindowingMode(@WindowingMode int windowingMode) { mWindowingMode = windowingMode; } @WindowingMode public int getWindowingMode() { return mWindowingMode; } public void setTo(WindowConfiguration other) { public void setTo(WindowConfiguration other) { setAppBounds(other.mAppBounds); setAppBounds(other.mAppBounds); setWindowingMode(other.mWindowingMode); } } /** Set this object to completely undefined. */ /** Set this object to completely undefined. */ Loading @@ -136,6 +175,7 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu public void setToDefaults() { public void setToDefaults() { setAppBounds(null); setAppBounds(null); setWindowingMode(WINDOWING_MODE_UNDEFINED); } } /** /** Loading @@ -151,6 +191,11 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu changed |= WINDOW_CONFIG_APP_BOUNDS; changed |= WINDOW_CONFIG_APP_BOUNDS; setAppBounds(delta.mAppBounds); setAppBounds(delta.mAppBounds); } } if (delta.mWindowingMode != WINDOWING_MODE_UNDEFINED && mWindowingMode != delta.mWindowingMode) { changed |= WINDOW_CONFIG_WINDOWING_MODE; setWindowingMode(delta.mWindowingMode); } return changed; return changed; } } Loading @@ -174,6 +219,11 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu changes |= WINDOW_CONFIG_APP_BOUNDS; changes |= WINDOW_CONFIG_APP_BOUNDS; } } if ((compareUndefined || other.mWindowingMode != WINDOWING_MODE_UNDEFINED) && mWindowingMode != other.mWindowingMode) { changes |= WINDOW_CONFIG_WINDOWING_MODE; } return changes; return changes; } } Loading @@ -194,6 +244,8 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu n = mAppBounds.bottom - that.mAppBounds.bottom; n = mAppBounds.bottom - that.mAppBounds.bottom; if (n != 0) return n; if (n != 0) return n; } } n = mWindowingMode - that.mWindowingMode; if (n != 0) return n; // if (n != 0) return n; // if (n != 0) return n; return n; return n; Loading @@ -215,11 +267,24 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu if (mAppBounds != null) { if (mAppBounds != null) { result = 31 * result + mAppBounds.hashCode(); result = 31 * result + mAppBounds.hashCode(); } } result = 31 * result + mWindowingMode; return result; return result; } } @Override @Override public String toString() { public String toString() { return "{mAppBounds=" + mAppBounds + "}"; return "{mAppBounds=" + mAppBounds + " mWindowingMode=" + windowingModeToString(mWindowingMode) + "}"; } private static String windowingModeToString(@WindowingMode int windowingMode) { switch (windowingMode) { case WINDOWING_MODE_UNDEFINED: return "undefined"; case WINDOWING_MODE_FULLSCREEN: return "fullscreen"; case WINDOWING_MODE_PINNED: return "pinned"; case WINDOWING_MODE_DOCKED: return "docked"; case WINDOWING_MODE_FREEFORM: return "freeform"; } return String.valueOf(windowingMode); } } } } services/core/java/com/android/server/am/ActivityStack.java +7 −3 Original line number Original line Diff line number Diff line Loading @@ -460,14 +460,18 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai mTaskPositioner = mStackId == FREEFORM_WORKSPACE_STACK_ID mTaskPositioner = mStackId == FREEFORM_WORKSPACE_STACK_ID ? new LaunchingTaskPositioner() : null; ? new LaunchingTaskPositioner() : null; mTmpRect2.setEmpty(); mTmpRect2.setEmpty(); final Configuration overrideConfig = getOverrideConfiguration(); mWindowContainerController = createStackWindowController(display.mDisplayId, onTop, mWindowContainerController = createStackWindowController(display.mDisplayId, onTop, mTmpRect2); mTmpRect2, overrideConfig); onOverrideConfigurationChanged(overrideConfig); mStackSupervisor.mStacks.put(mStackId, this); mStackSupervisor.mStacks.put(mStackId, this); postAddToDisplay(display, mTmpRect2.isEmpty() ? null : mTmpRect2, onTop); postAddToDisplay(display, mTmpRect2.isEmpty() ? null : mTmpRect2, onTop); } } T createStackWindowController(int displayId, boolean onTop, Rect outBounds) { T createStackWindowController(int displayId, boolean onTop, Rect outBounds, return (T) new StackWindowController(mStackId, this, displayId, onTop, outBounds); Configuration outOverrideConfig) { return (T) new StackWindowController(mStackId, this, displayId, onTop, outBounds, outOverrideConfig); } } T getWindowContainerController() { T getWindowContainerController() { Loading services/core/java/com/android/server/am/PinnedActivityStack.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -39,8 +39,9 @@ class PinnedActivityStack extends ActivityStack<PinnedStackWindowController> @Override @Override PinnedStackWindowController createStackWindowController(int displayId, boolean onTop, PinnedStackWindowController createStackWindowController(int displayId, boolean onTop, Rect outBounds) { Rect outBounds, Configuration outOverrideConfig) { return new PinnedStackWindowController(mStackId, this, displayId, onTop, outBounds); return new PinnedStackWindowController(mStackId, this, displayId, onTop, outBounds, outOverrideConfig); } } Rect getDefaultPictureInPictureBounds(float aspectRatio) { Rect getDefaultPictureInPictureBounds(float aspectRatio) { Loading services/core/java/com/android/server/wm/ConfigurationContainer.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.server.wm; package com.android.server.wm; import android.app.WindowConfiguration; import android.content.res.Configuration; import android.content.res.Configuration; /** /** Loading Loading @@ -109,6 +110,12 @@ public abstract class ConfigurationContainer<E extends ConfigurationContainer> { } } } } /** Sets the windowing mode for the configuration container. */ void setWindowingMode(@WindowConfiguration.WindowingMode int windowingMode) { mOverrideConfiguration.windowConfiguration.setWindowingMode(windowingMode); onOverrideConfigurationChanged(mOverrideConfiguration); } /** /** * Must be called when new parent for the container was set. * Must be called when new parent for the container was set. */ */ Loading services/core/java/com/android/server/wm/DisplayContent.java +8 −2 Original line number Original line Diff line number Diff line Loading @@ -20,9 +20,12 @@ import static android.app.ActivityManager.StackId.DOCKED_STACK_ID; import static android.app.ActivityManager.StackId.FREEFORM_WORKSPACE_STACK_ID; import static android.app.ActivityManager.StackId.FREEFORM_WORKSPACE_STACK_ID; import static android.app.ActivityManager.StackId.HOME_STACK_ID; import static android.app.ActivityManager.StackId.HOME_STACK_ID; import static android.app.ActivityManager.StackId.PINNED_STACK_ID; import static android.app.ActivityManager.StackId.PINNED_STACK_ID; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_BEHIND; import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_BEHIND; import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSET; import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSET; import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; import static android.content.res.Configuration.ORIENTATION_LANDSCAPE; import static android.content.res.Configuration.ORIENTATION_PORTRAIT; import static android.view.Display.DEFAULT_DISPLAY; import static android.view.Display.DEFAULT_DISPLAY; import static android.view.Display.FLAG_PRIVATE; import static android.view.Display.FLAG_PRIVATE; import static android.view.Surface.ROTATION_0; import static android.view.Surface.ROTATION_0; Loading Loading @@ -109,6 +112,7 @@ import static com.android.server.wm.proto.DisplayProto.STACKS; import android.annotation.NonNull; import android.annotation.NonNull; import android.app.ActivityManager.StackId; import android.app.ActivityManager.StackId; import android.app.WindowConfiguration; import android.content.res.CompatibilityInfo; import android.content.res.CompatibilityInfo; import android.content.res.Configuration; import android.content.res.Configuration; import android.graphics.Bitmap; import android.graphics.Bitmap; Loading Loading @@ -1191,8 +1195,10 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo final int dw = displayInfo.logicalWidth; final int dw = displayInfo.logicalWidth; final int dh = displayInfo.logicalHeight; final int dh = displayInfo.logicalHeight; config.orientation = (dw <= dh) ? Configuration.ORIENTATION_PORTRAIT : config.orientation = (dw <= dh) ? ORIENTATION_PORTRAIT : ORIENTATION_LANDSCAPE; Configuration.ORIENTATION_LANDSCAPE; // TODO: Probably best to set this based on some setting in the display content object, // so the display can be configured for things like fullscreen. config.windowConfiguration.setWindowingMode(WINDOWING_MODE_FULLSCREEN); config.screenWidthDp = config.screenWidthDp = (int)(mService.mPolicy.getConfigDisplayWidth(dw, dh, displayInfo.rotation, (int)(mService.mPolicy.getConfigDisplayWidth(dw, dh, displayInfo.rotation, Loading Loading
core/java/android/app/WindowConfiguration.java +69 −4 Original line number Original line Diff line number Diff line Loading @@ -44,16 +44,43 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu */ */ private Rect mAppBounds; private Rect mAppBounds; /** The current windowing mode of the configuration. */ private @WindowingMode int mWindowingMode; /** Windowing mode is currently not defined. */ public static final int WINDOWING_MODE_UNDEFINED = 0; /** Occupies the full area of the screen or the parent container. */ public static final int WINDOWING_MODE_FULLSCREEN = 1; /** Always on-top (always visible). of other siblings in its parent container. */ public static final int WINDOWING_MODE_PINNED = 2; /** Occupies a dedicated region of the screen or its parent container. */ public static final int WINDOWING_MODE_DOCKED = 3; /** Can be freely resized within its parent container. */ public static final int WINDOWING_MODE_FREEFORM = 4; @IntDef(value = { WINDOWING_MODE_UNDEFINED, WINDOWING_MODE_FULLSCREEN, WINDOWING_MODE_PINNED, WINDOWING_MODE_DOCKED, WINDOWING_MODE_FREEFORM, }) @Retention(RetentionPolicy.SOURCE) public @interface WindowingMode {} /** Bit that indicates that the {@link #mAppBounds} changed. */ public static final int WINDOW_CONFIG_APP_BOUNDS = 1 << 0; /** Bit that indicates that the {@link #mWindowingMode} changed. */ public static final int WINDOW_CONFIG_WINDOWING_MODE = 1 << 1; @IntDef(flag = true, @IntDef(flag = true, value = { value = { WINDOW_CONFIG_APP_BOUNDS, WINDOW_CONFIG_APP_BOUNDS, WINDOW_CONFIG_WINDOWING_MODE, }) }) @Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE) public @interface WindowConfig {} public @interface WindowConfig {} /** Bit that indicates that the {@link #mAppBounds} changed. */ public static final int WINDOW_CONFIG_APP_BOUNDS = 1 << 0; public WindowConfiguration() { public WindowConfiguration() { unset(); unset(); } } Loading @@ -69,10 +96,12 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu @Override @Override public void writeToParcel(Parcel dest, int flags) { public void writeToParcel(Parcel dest, int flags) { dest.writeParcelable(mAppBounds, flags); dest.writeParcelable(mAppBounds, flags); dest.writeInt(mWindowingMode); } } private void readFromParcel(Parcel source) { private void readFromParcel(Parcel source) { mAppBounds = source.readParcelable(Rect.class.getClassLoader()); mAppBounds = source.readParcelable(Rect.class.getClassLoader()); mWindowingMode = source.readInt(); } } @Override @Override Loading Loading @@ -125,8 +154,18 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu return mAppBounds; return mAppBounds; } } public void setWindowingMode(@WindowingMode int windowingMode) { mWindowingMode = windowingMode; } @WindowingMode public int getWindowingMode() { return mWindowingMode; } public void setTo(WindowConfiguration other) { public void setTo(WindowConfiguration other) { setAppBounds(other.mAppBounds); setAppBounds(other.mAppBounds); setWindowingMode(other.mWindowingMode); } } /** Set this object to completely undefined. */ /** Set this object to completely undefined. */ Loading @@ -136,6 +175,7 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu public void setToDefaults() { public void setToDefaults() { setAppBounds(null); setAppBounds(null); setWindowingMode(WINDOWING_MODE_UNDEFINED); } } /** /** Loading @@ -151,6 +191,11 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu changed |= WINDOW_CONFIG_APP_BOUNDS; changed |= WINDOW_CONFIG_APP_BOUNDS; setAppBounds(delta.mAppBounds); setAppBounds(delta.mAppBounds); } } if (delta.mWindowingMode != WINDOWING_MODE_UNDEFINED && mWindowingMode != delta.mWindowingMode) { changed |= WINDOW_CONFIG_WINDOWING_MODE; setWindowingMode(delta.mWindowingMode); } return changed; return changed; } } Loading @@ -174,6 +219,11 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu changes |= WINDOW_CONFIG_APP_BOUNDS; changes |= WINDOW_CONFIG_APP_BOUNDS; } } if ((compareUndefined || other.mWindowingMode != WINDOWING_MODE_UNDEFINED) && mWindowingMode != other.mWindowingMode) { changes |= WINDOW_CONFIG_WINDOWING_MODE; } return changes; return changes; } } Loading @@ -194,6 +244,8 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu n = mAppBounds.bottom - that.mAppBounds.bottom; n = mAppBounds.bottom - that.mAppBounds.bottom; if (n != 0) return n; if (n != 0) return n; } } n = mWindowingMode - that.mWindowingMode; if (n != 0) return n; // if (n != 0) return n; // if (n != 0) return n; return n; return n; Loading @@ -215,11 +267,24 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu if (mAppBounds != null) { if (mAppBounds != null) { result = 31 * result + mAppBounds.hashCode(); result = 31 * result + mAppBounds.hashCode(); } } result = 31 * result + mWindowingMode; return result; return result; } } @Override @Override public String toString() { public String toString() { return "{mAppBounds=" + mAppBounds + "}"; return "{mAppBounds=" + mAppBounds + " mWindowingMode=" + windowingModeToString(mWindowingMode) + "}"; } private static String windowingModeToString(@WindowingMode int windowingMode) { switch (windowingMode) { case WINDOWING_MODE_UNDEFINED: return "undefined"; case WINDOWING_MODE_FULLSCREEN: return "fullscreen"; case WINDOWING_MODE_PINNED: return "pinned"; case WINDOWING_MODE_DOCKED: return "docked"; case WINDOWING_MODE_FREEFORM: return "freeform"; } return String.valueOf(windowingMode); } } } }
services/core/java/com/android/server/am/ActivityStack.java +7 −3 Original line number Original line Diff line number Diff line Loading @@ -460,14 +460,18 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai mTaskPositioner = mStackId == FREEFORM_WORKSPACE_STACK_ID mTaskPositioner = mStackId == FREEFORM_WORKSPACE_STACK_ID ? new LaunchingTaskPositioner() : null; ? new LaunchingTaskPositioner() : null; mTmpRect2.setEmpty(); mTmpRect2.setEmpty(); final Configuration overrideConfig = getOverrideConfiguration(); mWindowContainerController = createStackWindowController(display.mDisplayId, onTop, mWindowContainerController = createStackWindowController(display.mDisplayId, onTop, mTmpRect2); mTmpRect2, overrideConfig); onOverrideConfigurationChanged(overrideConfig); mStackSupervisor.mStacks.put(mStackId, this); mStackSupervisor.mStacks.put(mStackId, this); postAddToDisplay(display, mTmpRect2.isEmpty() ? null : mTmpRect2, onTop); postAddToDisplay(display, mTmpRect2.isEmpty() ? null : mTmpRect2, onTop); } } T createStackWindowController(int displayId, boolean onTop, Rect outBounds) { T createStackWindowController(int displayId, boolean onTop, Rect outBounds, return (T) new StackWindowController(mStackId, this, displayId, onTop, outBounds); Configuration outOverrideConfig) { return (T) new StackWindowController(mStackId, this, displayId, onTop, outBounds, outOverrideConfig); } } T getWindowContainerController() { T getWindowContainerController() { Loading
services/core/java/com/android/server/am/PinnedActivityStack.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -39,8 +39,9 @@ class PinnedActivityStack extends ActivityStack<PinnedStackWindowController> @Override @Override PinnedStackWindowController createStackWindowController(int displayId, boolean onTop, PinnedStackWindowController createStackWindowController(int displayId, boolean onTop, Rect outBounds) { Rect outBounds, Configuration outOverrideConfig) { return new PinnedStackWindowController(mStackId, this, displayId, onTop, outBounds); return new PinnedStackWindowController(mStackId, this, displayId, onTop, outBounds, outOverrideConfig); } } Rect getDefaultPictureInPictureBounds(float aspectRatio) { Rect getDefaultPictureInPictureBounds(float aspectRatio) { Loading
services/core/java/com/android/server/wm/ConfigurationContainer.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.server.wm; package com.android.server.wm; import android.app.WindowConfiguration; import android.content.res.Configuration; import android.content.res.Configuration; /** /** Loading Loading @@ -109,6 +110,12 @@ public abstract class ConfigurationContainer<E extends ConfigurationContainer> { } } } } /** Sets the windowing mode for the configuration container. */ void setWindowingMode(@WindowConfiguration.WindowingMode int windowingMode) { mOverrideConfiguration.windowConfiguration.setWindowingMode(windowingMode); onOverrideConfigurationChanged(mOverrideConfiguration); } /** /** * Must be called when new parent for the container was set. * Must be called when new parent for the container was set. */ */ Loading
services/core/java/com/android/server/wm/DisplayContent.java +8 −2 Original line number Original line Diff line number Diff line Loading @@ -20,9 +20,12 @@ import static android.app.ActivityManager.StackId.DOCKED_STACK_ID; import static android.app.ActivityManager.StackId.FREEFORM_WORKSPACE_STACK_ID; import static android.app.ActivityManager.StackId.FREEFORM_WORKSPACE_STACK_ID; import static android.app.ActivityManager.StackId.HOME_STACK_ID; import static android.app.ActivityManager.StackId.HOME_STACK_ID; import static android.app.ActivityManager.StackId.PINNED_STACK_ID; import static android.app.ActivityManager.StackId.PINNED_STACK_ID; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_BEHIND; import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_BEHIND; import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSET; import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSET; import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; import static android.content.res.Configuration.ORIENTATION_LANDSCAPE; import static android.content.res.Configuration.ORIENTATION_PORTRAIT; import static android.view.Display.DEFAULT_DISPLAY; import static android.view.Display.DEFAULT_DISPLAY; import static android.view.Display.FLAG_PRIVATE; import static android.view.Display.FLAG_PRIVATE; import static android.view.Surface.ROTATION_0; import static android.view.Surface.ROTATION_0; Loading Loading @@ -109,6 +112,7 @@ import static com.android.server.wm.proto.DisplayProto.STACKS; import android.annotation.NonNull; import android.annotation.NonNull; import android.app.ActivityManager.StackId; import android.app.ActivityManager.StackId; import android.app.WindowConfiguration; import android.content.res.CompatibilityInfo; import android.content.res.CompatibilityInfo; import android.content.res.Configuration; import android.content.res.Configuration; import android.graphics.Bitmap; import android.graphics.Bitmap; Loading Loading @@ -1191,8 +1195,10 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo final int dw = displayInfo.logicalWidth; final int dw = displayInfo.logicalWidth; final int dh = displayInfo.logicalHeight; final int dh = displayInfo.logicalHeight; config.orientation = (dw <= dh) ? Configuration.ORIENTATION_PORTRAIT : config.orientation = (dw <= dh) ? ORIENTATION_PORTRAIT : ORIENTATION_LANDSCAPE; Configuration.ORIENTATION_LANDSCAPE; // TODO: Probably best to set this based on some setting in the display content object, // so the display can be configured for things like fullscreen. config.windowConfiguration.setWindowingMode(WINDOWING_MODE_FULLSCREEN); config.screenWidthDp = config.screenWidthDp = (int)(mService.mPolicy.getConfigDisplayWidth(dw, dh, displayInfo.rotation, (int)(mService.mPolicy.getConfigDisplayWidth(dw, dh, displayInfo.rotation, Loading