Loading packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +11 −5 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD private RecentsPackageMonitor mPackageMonitor; private long mLastTabKeyEventTime; private int mLastDeviceOrientation = Configuration.ORIENTATION_UNDEFINED; private int mLastDisplayDensity; private boolean mFinishedOnStartup; private boolean mIgnoreAltTabRelease; private boolean mIsVisible; Loading Loading @@ -276,7 +277,9 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD getWindow().getAttributes().privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY; mLastDeviceOrientation = Utilities.getAppConfiguration(this).orientation; Configuration appConfiguration = Utilities.getAppConfiguration(this); mLastDeviceOrientation = appConfiguration.orientation; mLastDisplayDensity = appConfiguration.densityDpi; mFocusTimerDuration = getResources().getInteger(R.integer.recents_auto_advance_duration); mIterateTrigger = new DozeTrigger(mFocusTimerDuration, new Runnable() { @Override Loading Loading @@ -427,11 +430,13 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD super.onConfigurationChanged(newConfig); // Notify of the config change int newDeviceOrientation = Utilities.getAppConfiguration(this).orientation; Configuration newDeviceConfiguration = Utilities.getAppConfiguration(this); int numStackTasks = mRecentsView.getStack().getStackTaskCount(); EventBus.getDefault().send(new ConfigurationChangedEvent(false /* fromMultiWindow */, (mLastDeviceOrientation != newDeviceOrientation), numStackTasks > 0)); mLastDeviceOrientation = newDeviceOrientation; mLastDeviceOrientation != newDeviceConfiguration.orientation, mLastDisplayDensity != newDeviceConfiguration.densityDpi, numStackTasks > 0)); mLastDeviceOrientation = newDeviceConfiguration.orientation; mLastDisplayDensity = newDeviceConfiguration.densityDpi; } @Override Loading @@ -454,7 +459,8 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD int numStackTasks = stack.getStackTaskCount(); EventBus.getDefault().send(new ConfigurationChangedEvent(true /* fromMultiWindow */, false /* fromDeviceOrientationChange */, numStackTasks > 0)); false /* fromDeviceOrientationChange */, false /* fromDisplayDensityChange */, numStackTasks > 0)); EventBus.getDefault().send(new MultiWindowStateChangedEvent(isInMultiWindowMode, stack)); } Loading packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -560,7 +560,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener com.android.internal.R.dimen.navigation_bar_height); mNavBarWidth = res.getDimensionPixelSize( com.android.internal.R.dimen.navigation_bar_width); mTaskBarHeight = TaskStackLayoutAlgorithm.getDimensionForDevice(res, mTaskBarHeight = TaskStackLayoutAlgorithm.getDimensionForDevice(mContext, R.dimen.recents_task_view_header_height, R.dimen.recents_task_view_header_height, R.dimen.recents_task_view_header_height, Loading packages/SystemUI/src/com/android/systemui/recents/events/activity/ConfigurationChangedEvent.java +3 −1 Original line number Diff line number Diff line Loading @@ -25,12 +25,14 @@ public class ConfigurationChangedEvent extends EventBus.AnimatedEvent { public final boolean fromMultiWindow; public final boolean fromDeviceOrientationChange; public final boolean fromDisplayDensityChange; public final boolean hasStackTasks; public ConfigurationChangedEvent(boolean fromMultiWindow, boolean fromDeviceOrientationChange, boolean hasStackTasks) { boolean fromDisplayDensityChange, boolean hasStackTasks) { this.fromMultiWindow = fromMultiWindow; this.fromDeviceOrientationChange = fromDeviceOrientationChange; this.fromDisplayDensityChange = fromDisplayDensityChange; this.hasStackTasks = hasStackTasks; } } packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java +0 −12 Original line number Diff line number Diff line Loading @@ -950,18 +950,6 @@ public class SystemServicesProxy { return displayRect; } /** * Returns the current display orientation. */ public int getDisplayOrientation() { // Because of multi-window, the configuration orientation does not necessarily reflect the // orientation of the display, instead we just use the display's real-size. Rect displayRect = getDisplayRect(); return displayRect.width() > displayRect.height() ? Configuration.ORIENTATION_LANDSCAPE : Configuration.ORIENTATION_PORTRAIT; } /** * Returns the window rect for the RecentsActivity, based on the dimensions of the home stack. */ Loading packages/SystemUI/src/com/android/systemui/recents/views/RecentsViewTouchHandler.java +3 −1 Original line number Diff line number Diff line Loading @@ -193,8 +193,10 @@ public class RecentsViewTouchHandler { } public final void onBusEvent(ConfigurationChangedEvent event) { if (event.fromDisplayDensityChange) { updateSnapAlgorithm(); } } /** * Handles dragging touch events Loading Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +11 −5 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD private RecentsPackageMonitor mPackageMonitor; private long mLastTabKeyEventTime; private int mLastDeviceOrientation = Configuration.ORIENTATION_UNDEFINED; private int mLastDisplayDensity; private boolean mFinishedOnStartup; private boolean mIgnoreAltTabRelease; private boolean mIsVisible; Loading Loading @@ -276,7 +277,9 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD getWindow().getAttributes().privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY; mLastDeviceOrientation = Utilities.getAppConfiguration(this).orientation; Configuration appConfiguration = Utilities.getAppConfiguration(this); mLastDeviceOrientation = appConfiguration.orientation; mLastDisplayDensity = appConfiguration.densityDpi; mFocusTimerDuration = getResources().getInteger(R.integer.recents_auto_advance_duration); mIterateTrigger = new DozeTrigger(mFocusTimerDuration, new Runnable() { @Override Loading Loading @@ -427,11 +430,13 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD super.onConfigurationChanged(newConfig); // Notify of the config change int newDeviceOrientation = Utilities.getAppConfiguration(this).orientation; Configuration newDeviceConfiguration = Utilities.getAppConfiguration(this); int numStackTasks = mRecentsView.getStack().getStackTaskCount(); EventBus.getDefault().send(new ConfigurationChangedEvent(false /* fromMultiWindow */, (mLastDeviceOrientation != newDeviceOrientation), numStackTasks > 0)); mLastDeviceOrientation = newDeviceOrientation; mLastDeviceOrientation != newDeviceConfiguration.orientation, mLastDisplayDensity != newDeviceConfiguration.densityDpi, numStackTasks > 0)); mLastDeviceOrientation = newDeviceConfiguration.orientation; mLastDisplayDensity = newDeviceConfiguration.densityDpi; } @Override Loading @@ -454,7 +459,8 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD int numStackTasks = stack.getStackTaskCount(); EventBus.getDefault().send(new ConfigurationChangedEvent(true /* fromMultiWindow */, false /* fromDeviceOrientationChange */, numStackTasks > 0)); false /* fromDeviceOrientationChange */, false /* fromDisplayDensityChange */, numStackTasks > 0)); EventBus.getDefault().send(new MultiWindowStateChangedEvent(isInMultiWindowMode, stack)); } Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -560,7 +560,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener com.android.internal.R.dimen.navigation_bar_height); mNavBarWidth = res.getDimensionPixelSize( com.android.internal.R.dimen.navigation_bar_width); mTaskBarHeight = TaskStackLayoutAlgorithm.getDimensionForDevice(res, mTaskBarHeight = TaskStackLayoutAlgorithm.getDimensionForDevice(mContext, R.dimen.recents_task_view_header_height, R.dimen.recents_task_view_header_height, R.dimen.recents_task_view_header_height, Loading
packages/SystemUI/src/com/android/systemui/recents/events/activity/ConfigurationChangedEvent.java +3 −1 Original line number Diff line number Diff line Loading @@ -25,12 +25,14 @@ public class ConfigurationChangedEvent extends EventBus.AnimatedEvent { public final boolean fromMultiWindow; public final boolean fromDeviceOrientationChange; public final boolean fromDisplayDensityChange; public final boolean hasStackTasks; public ConfigurationChangedEvent(boolean fromMultiWindow, boolean fromDeviceOrientationChange, boolean hasStackTasks) { boolean fromDisplayDensityChange, boolean hasStackTasks) { this.fromMultiWindow = fromMultiWindow; this.fromDeviceOrientationChange = fromDeviceOrientationChange; this.fromDisplayDensityChange = fromDisplayDensityChange; this.hasStackTasks = hasStackTasks; } }
packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java +0 −12 Original line number Diff line number Diff line Loading @@ -950,18 +950,6 @@ public class SystemServicesProxy { return displayRect; } /** * Returns the current display orientation. */ public int getDisplayOrientation() { // Because of multi-window, the configuration orientation does not necessarily reflect the // orientation of the display, instead we just use the display's real-size. Rect displayRect = getDisplayRect(); return displayRect.width() > displayRect.height() ? Configuration.ORIENTATION_LANDSCAPE : Configuration.ORIENTATION_PORTRAIT; } /** * Returns the window rect for the RecentsActivity, based on the dimensions of the home stack. */ Loading
packages/SystemUI/src/com/android/systemui/recents/views/RecentsViewTouchHandler.java +3 −1 Original line number Diff line number Diff line Loading @@ -193,8 +193,10 @@ public class RecentsViewTouchHandler { } public final void onBusEvent(ConfigurationChangedEvent event) { if (event.fromDisplayDensityChange) { updateSnapAlgorithm(); } } /** * Handles dragging touch events Loading