Loading packages/SystemUI/res/values-sw720dp/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -39,5 +39,8 @@ <!-- The maximum count of notifications on Keyguard. The rest will be collapsed in an overflow card. --> <integer name="keyguard_max_notification_count">5</integer> <!-- Transposes the recents layout in landscape. --> <bool name="recents_transpose_layout_with_orientation">false</bool> </resources> packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java +9 −12 Original line number Diff line number Diff line Loading @@ -37,8 +37,6 @@ public class RecentsConfiguration { static RecentsConfiguration sInstance; static int sPrevConfigurationHashCode; DisplayMetrics mDisplayMetrics; /** Animations */ public float animationPxMovementPerSecond; Loading Loading @@ -156,7 +154,6 @@ public class RecentsConfiguration { SharedPreferences settings = context.getSharedPreferences(context.getPackageName(), 0); Resources res = context.getResources(); DisplayMetrics dm = res.getDisplayMetrics(); mDisplayMetrics = dm; // Debug mode debugModeEnabled = settings.getBoolean(Constants.Values.App.Key_DebugModeEnabled, false); Loading @@ -164,6 +161,15 @@ public class RecentsConfiguration { Console.Enabled = true; } // Layout isLandscape = res.getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; transposeRecentsLayoutWithOrientation = res.getBoolean(R.bool.recents_transpose_layout_with_orientation); // Insets displayRect.set(0, 0, dm.widthPixels, dm.heightPixels); // Animations animationPxMovementPerSecond = res.getDimensionPixelSize(R.dimen.recents_animation_movement_in_dps_per_second); Loading @@ -174,15 +180,6 @@ public class RecentsConfiguration { filteringNewViewsAnimDuration = res.getInteger(R.integer.recents_filter_animate_new_views_duration); // Insets displayRect.set(0, 0, dm.widthPixels, dm.heightPixels); // Layout isLandscape = res.getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; transposeRecentsLayoutWithOrientation = res.getBoolean(R.bool.recents_transpose_layout_with_orientation); // Search Bar searchBarSpaceHeightPx = res.getDimensionPixelSize(R.dimen.recents_search_bar_space_height); searchBarAppWidgetId = settings.getInt(Constants.Values.App.Key_SearchAppWidgetId, -1); Loading packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewLayoutAlgorithm.java +9 −6 Original line number Diff line number Diff line Loading @@ -60,8 +60,6 @@ public class TaskStackViewLayoutAlgorithm { public TaskStackViewLayoutAlgorithm(RecentsConfiguration config) { mConfig = config; mWithinAffiliationOffset = mConfig.taskBarHeight; mBetweenAffiliationOffset = 4 * mConfig.taskBarHeight; // Precompute the path initializeCurve(); Loading @@ -84,6 +82,11 @@ public class TaskStackViewLayoutAlgorithm { int left = mStackRect.left + (mStackRect.width() - size) / 2; mTaskRect.set(left, mStackRect.top, left + size, mStackRect.top + size); // Update the affiliation offsets float visibleTaskPct = 0.55f; mWithinAffiliationOffset = mConfig.taskBarHeight; mBetweenAffiliationOffset = (int) (visibleTaskPct * mTaskRect.height()); } /** Computes the minimum and maximum scroll progress values. This method may be called before Loading @@ -110,8 +113,7 @@ public class TaskStackViewLayoutAlgorithm { screenYToCurveProgress(mStackVisibleRect.bottom - (mStackVisibleRect.bottom - mStackRect.bottom)); // Update the task offsets float pAtBackMostCardTop = screenYToCurveProgress(mStackVisibleRect.top + (mStackVisibleRect.height() - taskHeight) / 2); float pAtBackMostCardTop = 0.5f; float pAtFrontMostCardTop = pAtBackMostCardTop; float pAtSecondFrontMostCardTop = pAtBackMostCardTop; int taskCount = tasks.size(); Loading @@ -128,14 +130,15 @@ public class TaskStackViewLayoutAlgorithm { } } mMinScrollP = 0f; mMaxScrollP = pAtFrontMostCardTop - ((1f - pTaskHeightOffset - pNavBarOffset)); mMinScrollP = tasks.size() == 1 ? Math.max(mMaxScrollP, 0f) : 0f; if (launchedWithAltTab) { // Center the second most task, since that will be focused first mInitialScrollP = pAtSecondFrontMostCardTop - 0.5f; } else { mInitialScrollP = pAtSecondFrontMostCardTop - ((1f - pTaskHeightOffset - pNavBarOffset)); mInitialScrollP = pAtFrontMostCardTop - 0.825f; } mInitialScrollP = Math.max(0, mInitialScrollP); } /** Update/get the transform */ Loading Loading
packages/SystemUI/res/values-sw720dp/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -39,5 +39,8 @@ <!-- The maximum count of notifications on Keyguard. The rest will be collapsed in an overflow card. --> <integer name="keyguard_max_notification_count">5</integer> <!-- Transposes the recents layout in landscape. --> <bool name="recents_transpose_layout_with_orientation">false</bool> </resources>
packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java +9 −12 Original line number Diff line number Diff line Loading @@ -37,8 +37,6 @@ public class RecentsConfiguration { static RecentsConfiguration sInstance; static int sPrevConfigurationHashCode; DisplayMetrics mDisplayMetrics; /** Animations */ public float animationPxMovementPerSecond; Loading Loading @@ -156,7 +154,6 @@ public class RecentsConfiguration { SharedPreferences settings = context.getSharedPreferences(context.getPackageName(), 0); Resources res = context.getResources(); DisplayMetrics dm = res.getDisplayMetrics(); mDisplayMetrics = dm; // Debug mode debugModeEnabled = settings.getBoolean(Constants.Values.App.Key_DebugModeEnabled, false); Loading @@ -164,6 +161,15 @@ public class RecentsConfiguration { Console.Enabled = true; } // Layout isLandscape = res.getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; transposeRecentsLayoutWithOrientation = res.getBoolean(R.bool.recents_transpose_layout_with_orientation); // Insets displayRect.set(0, 0, dm.widthPixels, dm.heightPixels); // Animations animationPxMovementPerSecond = res.getDimensionPixelSize(R.dimen.recents_animation_movement_in_dps_per_second); Loading @@ -174,15 +180,6 @@ public class RecentsConfiguration { filteringNewViewsAnimDuration = res.getInteger(R.integer.recents_filter_animate_new_views_duration); // Insets displayRect.set(0, 0, dm.widthPixels, dm.heightPixels); // Layout isLandscape = res.getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; transposeRecentsLayoutWithOrientation = res.getBoolean(R.bool.recents_transpose_layout_with_orientation); // Search Bar searchBarSpaceHeightPx = res.getDimensionPixelSize(R.dimen.recents_search_bar_space_height); searchBarAppWidgetId = settings.getInt(Constants.Values.App.Key_SearchAppWidgetId, -1); Loading
packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewLayoutAlgorithm.java +9 −6 Original line number Diff line number Diff line Loading @@ -60,8 +60,6 @@ public class TaskStackViewLayoutAlgorithm { public TaskStackViewLayoutAlgorithm(RecentsConfiguration config) { mConfig = config; mWithinAffiliationOffset = mConfig.taskBarHeight; mBetweenAffiliationOffset = 4 * mConfig.taskBarHeight; // Precompute the path initializeCurve(); Loading @@ -84,6 +82,11 @@ public class TaskStackViewLayoutAlgorithm { int left = mStackRect.left + (mStackRect.width() - size) / 2; mTaskRect.set(left, mStackRect.top, left + size, mStackRect.top + size); // Update the affiliation offsets float visibleTaskPct = 0.55f; mWithinAffiliationOffset = mConfig.taskBarHeight; mBetweenAffiliationOffset = (int) (visibleTaskPct * mTaskRect.height()); } /** Computes the minimum and maximum scroll progress values. This method may be called before Loading @@ -110,8 +113,7 @@ public class TaskStackViewLayoutAlgorithm { screenYToCurveProgress(mStackVisibleRect.bottom - (mStackVisibleRect.bottom - mStackRect.bottom)); // Update the task offsets float pAtBackMostCardTop = screenYToCurveProgress(mStackVisibleRect.top + (mStackVisibleRect.height() - taskHeight) / 2); float pAtBackMostCardTop = 0.5f; float pAtFrontMostCardTop = pAtBackMostCardTop; float pAtSecondFrontMostCardTop = pAtBackMostCardTop; int taskCount = tasks.size(); Loading @@ -128,14 +130,15 @@ public class TaskStackViewLayoutAlgorithm { } } mMinScrollP = 0f; mMaxScrollP = pAtFrontMostCardTop - ((1f - pTaskHeightOffset - pNavBarOffset)); mMinScrollP = tasks.size() == 1 ? Math.max(mMaxScrollP, 0f) : 0f; if (launchedWithAltTab) { // Center the second most task, since that will be focused first mInitialScrollP = pAtSecondFrontMostCardTop - 0.5f; } else { mInitialScrollP = pAtSecondFrontMostCardTop - ((1f - pTaskHeightOffset - pNavBarOffset)); mInitialScrollP = pAtFrontMostCardTop - 0.825f; } mInitialScrollP = Math.max(0, mInitialScrollP); } /** Update/get the transform */ Loading