Merge changes from topic "split-shade-cherry-pick-v2" into sc-v2-dev
* changes: Always have QS expanded on split shade Remove split shade drag handle Always show collapsed media on split shade Split shade should always have 6 tiles
This commit is contained in:
committed by
Android (Google) Code Review
commit
52bbb0feb1
@@ -1,24 +0,0 @@
|
|||||||
<!--
|
|
||||||
~ Copyright (C) 2021 The Android Open Source Project
|
|
||||||
~
|
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
~ you may not use this file except in compliance with the License.
|
|
||||||
~ You may obtain a copy of the License at
|
|
||||||
~
|
|
||||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
~
|
|
||||||
~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
~ See the License for the specific language governing permissions and
|
|
||||||
~ limitations under the License
|
|
||||||
-->
|
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="36dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24.0"
|
|
||||||
android:viewportHeight="24.0">
|
|
||||||
<path
|
|
||||||
android:fillColor="?android:attr/textColorPrimary"
|
|
||||||
android:pathData="M5.41,7.59L4,9l8,8 8,-8 -1.41,-1.41L12,14.17" />
|
|
||||||
</vector>
|
|
||||||
@@ -56,17 +56,4 @@
|
|||||||
layout="@layout/qs_customize_panel"
|
layout="@layout/qs_customize_panel"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/qs_drag_handle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:elevation="4dp"
|
|
||||||
android:importantForAccessibility="no"
|
|
||||||
android:scaleType="center"
|
|
||||||
android:src="@drawable/ic_qs_drag_handle"
|
|
||||||
android:tint="@color/qs_detail_button_white"
|
|
||||||
tools:ignore="UseAppTint" />
|
|
||||||
|
|
||||||
</com.android.systemui.qs.QSContainerImpl>
|
</com.android.systemui.qs.QSContainerImpl>
|
||||||
|
|||||||
@@ -18,11 +18,14 @@
|
|||||||
<!-- Max number of columns for quick controls area -->
|
<!-- Max number of columns for quick controls area -->
|
||||||
<integer name="controls_max_columns">2</integer>
|
<integer name="controls_max_columns">2</integer>
|
||||||
|
|
||||||
|
<!-- The maximum number of rows in the QSPanel -->
|
||||||
|
<integer name="quick_settings_max_rows">3</integer>
|
||||||
|
|
||||||
<!-- The maximum number of rows in the QuickQSPanel -->
|
<!-- The maximum number of rows in the QuickQSPanel -->
|
||||||
<integer name="quick_qs_panel_max_rows">4</integer>
|
<integer name="quick_qs_panel_max_rows">3</integer>
|
||||||
|
|
||||||
<!-- The maximum number of tiles in the QuickQSPanel -->
|
<!-- The maximum number of tiles in the QuickQSPanel -->
|
||||||
<integer name="quick_qs_panel_max_tiles">8</integer>
|
<integer name="quick_qs_panel_max_tiles">6</integer>
|
||||||
|
|
||||||
<!-- Whether to use the split 2-column notification shade -->
|
<!-- Whether to use the split 2-column notification shade -->
|
||||||
<bool name="config_use_split_notification_shade">true</bool>
|
<bool name="config_use_split_notification_shade">true</bool>
|
||||||
|
|||||||
@@ -18,11 +18,14 @@
|
|||||||
<!-- Max number of columns for quick controls area -->
|
<!-- Max number of columns for quick controls area -->
|
||||||
<integer name="controls_max_columns">2</integer>
|
<integer name="controls_max_columns">2</integer>
|
||||||
|
|
||||||
|
<!-- The maximum number of rows in the QSPanel -->
|
||||||
|
<integer name="quick_settings_max_rows">3</integer>
|
||||||
|
|
||||||
<!-- The maximum number of rows in the QuickQSPanel -->
|
<!-- The maximum number of rows in the QuickQSPanel -->
|
||||||
<integer name="quick_qs_panel_max_rows">4</integer>
|
<integer name="quick_qs_panel_max_rows">3</integer>
|
||||||
|
|
||||||
<!-- The maximum number of tiles in the QuickQSPanel -->
|
<!-- The maximum number of tiles in the QuickQSPanel -->
|
||||||
<integer name="quick_qs_panel_max_tiles">8</integer>
|
<integer name="quick_qs_panel_max_tiles">6</integer>
|
||||||
|
|
||||||
<!-- Whether to use the split 2-column notification shade -->
|
<!-- Whether to use the split 2-column notification shade -->
|
||||||
<bool name="config_use_split_notification_shade">true</bool>
|
<bool name="config_use_split_notification_shade">true</bool>
|
||||||
|
|||||||
@@ -109,6 +109,16 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {
|
|||||||
mPageToRestore = savedInstanceState.getInt(CURRENT_PAGE, -1);
|
mPageToRestore = savedInstanceState.getInt(CURRENT_PAGE, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getTilesHeight() {
|
||||||
|
// Use the first page as that is the maximum height we need to show.
|
||||||
|
TileLayout tileLayout = mPages.get(0);
|
||||||
|
if (tileLayout == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return tileLayout.getTilesHeight();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onConfigurationChanged(Configuration newConfig) {
|
protected void onConfigurationChanged(Configuration newConfig) {
|
||||||
super.onConfigurationChanged(newConfig);
|
super.onConfigurationChanged(newConfig);
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ import android.graphics.PointF;
|
|||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
|
||||||
|
|
||||||
import com.android.systemui.Dumpable;
|
import com.android.systemui.Dumpable;
|
||||||
import com.android.systemui.R;
|
import com.android.systemui.R;
|
||||||
@@ -53,7 +52,6 @@ public class QSContainerImpl extends FrameLayout implements Dumpable {
|
|||||||
private float mQsExpansion;
|
private float mQsExpansion;
|
||||||
private QSCustomizer mQSCustomizer;
|
private QSCustomizer mQSCustomizer;
|
||||||
private NonInterceptingScrollView mQSPanelContainer;
|
private NonInterceptingScrollView mQSPanelContainer;
|
||||||
private ImageView mDragHandle;
|
|
||||||
|
|
||||||
private int mSideMargins;
|
private int mSideMargins;
|
||||||
private boolean mQsDisabled;
|
private boolean mQsDisabled;
|
||||||
@@ -71,7 +69,6 @@ public class QSContainerImpl extends FrameLayout implements Dumpable {
|
|||||||
mQSDetail = findViewById(R.id.qs_detail);
|
mQSDetail = findViewById(R.id.qs_detail);
|
||||||
mHeader = findViewById(R.id.header);
|
mHeader = findViewById(R.id.header);
|
||||||
mQSCustomizer = findViewById(R.id.qs_customize);
|
mQSCustomizer = findViewById(R.id.qs_customize);
|
||||||
mDragHandle = findViewById(R.id.qs_drag_handle);
|
|
||||||
setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
|
setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,23 +187,14 @@ public class QSContainerImpl extends FrameLayout implements Dumpable {
|
|||||||
mQSDetail.setBottom(getTop() + scrollBottom);
|
mQSDetail.setBottom(getTop() + scrollBottom);
|
||||||
int qsDetailBottomMargin = ((MarginLayoutParams) mQSDetail.getLayoutParams()).bottomMargin;
|
int qsDetailBottomMargin = ((MarginLayoutParams) mQSDetail.getLayoutParams()).bottomMargin;
|
||||||
mQSDetail.setBottom(getTop() + scrollBottom - qsDetailBottomMargin);
|
mQSDetail.setBottom(getTop() + scrollBottom - qsDetailBottomMargin);
|
||||||
// Pin the drag handle to the bottom of the panel.
|
|
||||||
mDragHandle.setTranslationY(scrollBottom - mDragHandle.getHeight());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int calculateContainerHeight() {
|
protected int calculateContainerHeight() {
|
||||||
int heightOverride = mHeightOverride != -1 ? mHeightOverride : getMeasuredHeight();
|
int heightOverride = mHeightOverride != -1 ? mHeightOverride : getMeasuredHeight();
|
||||||
// Need to add the dragHandle height so touches will be intercepted by it.
|
// Need to add the dragHandle height so touches will be intercepted by it.
|
||||||
int dragHandleHeight;
|
|
||||||
if (mDragHandle.getVisibility() == VISIBLE) {
|
|
||||||
dragHandleHeight = Math.round((1 - mQsExpansion) * mDragHandle.getHeight());
|
|
||||||
} else {
|
|
||||||
dragHandleHeight = 0;
|
|
||||||
}
|
|
||||||
return mQSCustomizer.isCustomizing() ? mQSCustomizer.getHeight()
|
return mQSCustomizer.isCustomizing() ? mQSCustomizer.getHeight()
|
||||||
: Math.round(mQsExpansion * (heightOverride - mHeader.getHeight()))
|
: Math.round(mQsExpansion * (heightOverride - mHeader.getHeight()))
|
||||||
+ mHeader.getHeight()
|
+ mHeader.getHeight();
|
||||||
+ dragHandleHeight;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int calculateContainerBottom() {
|
int calculateContainerBottom() {
|
||||||
@@ -221,8 +209,6 @@ public class QSContainerImpl extends FrameLayout implements Dumpable {
|
|||||||
public void setExpansion(float expansion) {
|
public void setExpansion(float expansion) {
|
||||||
mQsExpansion = expansion;
|
mQsExpansion = expansion;
|
||||||
mQSPanelContainer.setScrollingEnabled(expansion > 0f);
|
mQSPanelContainer.setScrollingEnabled(expansion > 0f);
|
||||||
mDragHandle.setAlpha(1.0f - expansion);
|
|
||||||
mDragHandle.setClickable(expansion == 0f); // Only clickable when fully collapsed
|
|
||||||
updateExpansion();
|
updateExpansion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ import android.view.View.OnClickListener;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.ViewTreeObserver;
|
import android.view.ViewTreeObserver;
|
||||||
import android.widget.FrameLayout.LayoutParams;
|
import android.widget.FrameLayout.LayoutParams;
|
||||||
import android.widget.ImageView;
|
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.VisibleForTesting;
|
import androidx.annotation.VisibleForTesting;
|
||||||
@@ -94,7 +93,6 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
|
|||||||
private float mLastPanelFraction;
|
private float mLastPanelFraction;
|
||||||
private float mSquishinessFraction = 1;
|
private float mSquishinessFraction = 1;
|
||||||
private boolean mQsDisabled;
|
private boolean mQsDisabled;
|
||||||
private ImageView mQsDragHandler;
|
|
||||||
|
|
||||||
private final RemoteInputQuickSettingsDisabler mRemoteInputQuickSettingsDisabler;
|
private final RemoteInputQuickSettingsDisabler mRemoteInputQuickSettingsDisabler;
|
||||||
private final CommandQueue mCommandQueue;
|
private final CommandQueue mCommandQueue;
|
||||||
@@ -205,7 +203,6 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
|
|||||||
mHeader = view.findViewById(R.id.header);
|
mHeader = view.findViewById(R.id.header);
|
||||||
mQSPanelController.setHeaderContainer(view.findViewById(R.id.header_text_container));
|
mQSPanelController.setHeaderContainer(view.findViewById(R.id.header_text_container));
|
||||||
mFooter = qsFragmentComponent.getQSFooter();
|
mFooter = qsFragmentComponent.getQSFooter();
|
||||||
mQsDragHandler = view.findViewById(R.id.qs_drag_handle);
|
|
||||||
|
|
||||||
mQsDetailDisplayer.setQsPanelController(mQSPanelController);
|
mQsDetailDisplayer.setQsPanelController(mQSPanelController);
|
||||||
|
|
||||||
@@ -249,11 +246,6 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
|
|||||||
mQSPanelController.getMediaHost().getHostView().setAlpha(1.0f);
|
mQSPanelController.getMediaHost().getHostView().setAlpha(1.0f);
|
||||||
mQSAnimator.requestAnimatorUpdate();
|
mQSAnimator.requestAnimatorUpdate();
|
||||||
});
|
});
|
||||||
|
|
||||||
mQsDragHandler.setOnClickListener(v -> {
|
|
||||||
Log.d(TAG, "drag handler clicked");
|
|
||||||
mCommandQueue.animateExpandSettingsPanel(null);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -385,30 +377,26 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateQsState() {
|
private void updateQsState() {
|
||||||
final boolean expandVisually = mQsExpanded || mStackScrollerOverscrolling
|
final boolean expanded = mQsExpanded || mInSplitShade;
|
||||||
|
final boolean expandVisually = expanded || mStackScrollerOverscrolling
|
||||||
|| mHeaderAnimating;
|
|| mHeaderAnimating;
|
||||||
mQSPanelController.setExpanded(mQsExpanded);
|
mQSPanelController.setExpanded(expanded);
|
||||||
mQSDetail.setExpanded(mQsExpanded);
|
mQSDetail.setExpanded(expanded);
|
||||||
boolean keyguardShowing = isKeyguardState();
|
boolean keyguardShowing = isKeyguardState();
|
||||||
mHeader.setVisibility((mQsExpanded || !keyguardShowing || mHeaderAnimating
|
mHeader.setVisibility((expanded || !keyguardShowing || mHeaderAnimating
|
||||||
|| mShowCollapsedOnKeyguard)
|
|| mShowCollapsedOnKeyguard)
|
||||||
? View.VISIBLE
|
? View.VISIBLE
|
||||||
: View.INVISIBLE);
|
: View.INVISIBLE);
|
||||||
mHeader.setExpanded((keyguardShowing && !mHeaderAnimating && !mShowCollapsedOnKeyguard)
|
mHeader.setExpanded((keyguardShowing && !mHeaderAnimating && !mShowCollapsedOnKeyguard)
|
||||||
|| (mQsExpanded && !mStackScrollerOverscrolling), mQuickQSPanelController);
|
|| (expanded && !mStackScrollerOverscrolling), mQuickQSPanelController);
|
||||||
mFooter.setVisibility(!mQsDisabled && (mQsExpanded || !keyguardShowing || mHeaderAnimating
|
mFooter.setVisibility(!mQsDisabled && (expanded || !keyguardShowing || mHeaderAnimating
|
||||||
|| mShowCollapsedOnKeyguard)
|
|| mShowCollapsedOnKeyguard)
|
||||||
? View.VISIBLE
|
? View.VISIBLE
|
||||||
: View.INVISIBLE);
|
: View.INVISIBLE);
|
||||||
mFooter.setExpanded((keyguardShowing && !mHeaderAnimating && !mShowCollapsedOnKeyguard)
|
mFooter.setExpanded((keyguardShowing && !mHeaderAnimating && !mShowCollapsedOnKeyguard)
|
||||||
|| (mQsExpanded && !mStackScrollerOverscrolling));
|
|| (expanded && !mStackScrollerOverscrolling));
|
||||||
mQSPanelController.setVisibility(
|
mQSPanelController.setVisibility(
|
||||||
!mQsDisabled && expandVisually ? View.VISIBLE : View.INVISIBLE);
|
!mQsDisabled && expandVisually ? View.VISIBLE : View.INVISIBLE);
|
||||||
mQsDragHandler.setVisibility((mQsExpanded || !keyguardShowing || mHeaderAnimating
|
|
||||||
|| mShowCollapsedOnKeyguard)
|
|
||||||
&& Utils.shouldUseSplitNotificationShade(getResources())
|
|
||||||
? View.VISIBLE
|
|
||||||
: View.GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isKeyguardState() {
|
private boolean isKeyguardState() {
|
||||||
@@ -418,7 +406,8 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateShowCollapsedOnKeyguard() {
|
private void updateShowCollapsedOnKeyguard() {
|
||||||
boolean showCollapsed = mBypassController.getBypassEnabled() || mTransitioningToFullShade;
|
boolean showCollapsed = mBypassController.getBypassEnabled()
|
||||||
|
|| (mTransitioningToFullShade && !mInSplitShade);
|
||||||
if (showCollapsed != mShowCollapsedOnKeyguard) {
|
if (showCollapsed != mShowCollapsedOnKeyguard) {
|
||||||
mShowCollapsedOnKeyguard = showCollapsed;
|
mShowCollapsedOnKeyguard = showCollapsed;
|
||||||
updateQsState();
|
updateQsState();
|
||||||
@@ -498,6 +487,8 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
|
|||||||
public void setInSplitShade(boolean inSplitShade) {
|
public void setInSplitShade(boolean inSplitShade) {
|
||||||
mInSplitShade = inSplitShade;
|
mInSplitShade = inSplitShade;
|
||||||
mQSAnimator.setTranslateWhileExpanding(inSplitShade);
|
mQSAnimator.setTranslateWhileExpanding(inSplitShade);
|
||||||
|
updateShowCollapsedOnKeyguard();
|
||||||
|
updateQsState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -516,7 +507,8 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
|
|||||||
public void setQsExpansion(float expansion, float panelExpansionFraction,
|
public void setQsExpansion(float expansion, float panelExpansionFraction,
|
||||||
float proposedTranslation, float squishinessFraction) {
|
float proposedTranslation, float squishinessFraction) {
|
||||||
float headerTranslation = mTransitioningToFullShade ? 0 : proposedTranslation;
|
float headerTranslation = mTransitioningToFullShade ? 0 : proposedTranslation;
|
||||||
float progress = mTransitioningToFullShade ? mFullShadeProgress : panelExpansionFraction;
|
float progress = mTransitioningToFullShade || mState == StatusBarState.KEYGUARD
|
||||||
|
? mFullShadeProgress : panelExpansionFraction;
|
||||||
setAlphaAnimationProgress(mInSplitShade ? progress : 1);
|
setAlphaAnimationProgress(mInSplitShade ? progress : 1);
|
||||||
mContainer.setExpansion(expansion);
|
mContainer.setExpansion(expansion);
|
||||||
final float translationScaleY = (mInSplitShade
|
final float translationScaleY = (mInSplitShade
|
||||||
|
|||||||
@@ -258,13 +258,8 @@ public class QSPanel extends LinearLayout implements Tunable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateViewPositions() {
|
private void updateViewPositions() {
|
||||||
if (!(mTileLayout instanceof TileLayout)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
TileLayout layout = (TileLayout) mTileLayout;
|
|
||||||
|
|
||||||
// Adjust view positions based on tile squishing
|
// Adjust view positions based on tile squishing
|
||||||
int tileHeightOffset = layout.getTilesHeight() - layout.getHeight();
|
int tileHeightOffset = mTileLayout.getTilesHeight() - mTileLayout.getHeight();
|
||||||
|
|
||||||
boolean move = false;
|
boolean move = false;
|
||||||
for (int i = 0; i < getChildCount(); i++) {
|
for (int i = 0; i < getChildCount(); i++) {
|
||||||
@@ -787,6 +782,12 @@ public class QSPanel extends LinearLayout implements Tunable {
|
|||||||
/** */
|
/** */
|
||||||
void setListening(boolean listening, UiEventLogger uiEventLogger);
|
void setListening(boolean listening, UiEventLogger uiEventLogger);
|
||||||
|
|
||||||
|
/** */
|
||||||
|
int getHeight();
|
||||||
|
|
||||||
|
/** */
|
||||||
|
int getTilesHeight();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a size modifier for the tile. Where 0 means collapsed, and 1 expanded.
|
* Sets a size modifier for the tile. Where 0 means collapsed, and 1 expanded.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ import com.android.systemui.settings.brightness.BrightnessSliderController;
|
|||||||
import com.android.systemui.statusbar.CommandQueue;
|
import com.android.systemui.statusbar.CommandQueue;
|
||||||
import com.android.systemui.statusbar.policy.BrightnessMirrorController;
|
import com.android.systemui.statusbar.policy.BrightnessMirrorController;
|
||||||
import com.android.systemui.tuner.TunerService;
|
import com.android.systemui.tuner.TunerService;
|
||||||
|
import com.android.systemui.util.Utils;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
@@ -72,6 +73,7 @@ public class QSPanelController extends QSPanelControllerBase<QSPanel> {
|
|||||||
new QSPanel.OnConfigurationChangedListener() {
|
new QSPanel.OnConfigurationChangedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onConfigurationChange(Configuration newConfig) {
|
public void onConfigurationChange(Configuration newConfig) {
|
||||||
|
updateMediaExpansion();
|
||||||
mView.updateResources();
|
mView.updateResources();
|
||||||
mQsSecurityFooter.onConfigurationChanged();
|
mQsSecurityFooter.onConfigurationChanged();
|
||||||
if (mView.isListening()) {
|
if (mView.isListening()) {
|
||||||
@@ -121,13 +123,17 @@ public class QSPanelController extends QSPanelControllerBase<QSPanel> {
|
|||||||
@Override
|
@Override
|
||||||
public void onInit() {
|
public void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
mMediaHost.setExpansion(1);
|
updateMediaExpansion();
|
||||||
mMediaHost.setShowsOnlyActiveMedia(false);
|
mMediaHost.setShowsOnlyActiveMedia(false);
|
||||||
mMediaHost.init(MediaHierarchyManager.LOCATION_QS);
|
mMediaHost.init(MediaHierarchyManager.LOCATION_QS);
|
||||||
mQsCustomizerController.init();
|
mQsCustomizerController.init();
|
||||||
mBrightnessSliderController.init();
|
mBrightnessSliderController.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateMediaExpansion() {
|
||||||
|
mMediaHost.setExpansion(Utils.shouldUseSplitNotificationShade(getResources()) ? 0 : 1);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onViewAttached() {
|
protected void onViewAttached() {
|
||||||
super.onViewAttached();
|
super.onViewAttached();
|
||||||
|
|||||||
@@ -275,6 +275,7 @@ public class TileLayout extends ViewGroup implements QSTileLayout {
|
|||||||
return Math.max(mColumns * mRows, 1);
|
return Math.max(mColumns * mRows, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getTilesHeight() {
|
public int getTilesHeight() {
|
||||||
return mLastTileBottom + getPaddingBottom();
|
return mLastTileBottom + getPaddingBottom();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ class LockscreenShadeTransitionController @Inject constructor(
|
|||||||
internal fun canDragDown(): Boolean {
|
internal fun canDragDown(): Boolean {
|
||||||
return (statusBarStateController.state == StatusBarState.KEYGUARD ||
|
return (statusBarStateController.state == StatusBarState.KEYGUARD ||
|
||||||
nsslController.isInLockedDownShade()) &&
|
nsslController.isInLockedDownShade()) &&
|
||||||
qS.isFullyCollapsed
|
(qS.isFullyCollapsed || useSplitShade)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -285,7 +285,7 @@ class LockscreenShadeTransitionController @Inject constructor(
|
|||||||
internal val isDragDownAnywhereEnabled: Boolean
|
internal val isDragDownAnywhereEnabled: Boolean
|
||||||
get() = (statusBarStateController.getState() == StatusBarState.KEYGUARD &&
|
get() = (statusBarStateController.getState() == StatusBarState.KEYGUARD &&
|
||||||
!keyguardBypassController.bypassEnabled &&
|
!keyguardBypassController.bypassEnabled &&
|
||||||
qS.isFullyCollapsed)
|
(qS.isFullyCollapsed || useSplitShade))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The amount in pixels that the user has dragged down.
|
* The amount in pixels that the user has dragged down.
|
||||||
|
|||||||
@@ -2246,11 +2246,14 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
|
|
||||||
private void updateQsExpansion() {
|
private void updateQsExpansion() {
|
||||||
if (mQs == null) return;
|
if (mQs == null) return;
|
||||||
float qsExpansionFraction = computeQsExpansionFraction();
|
final float squishiness =
|
||||||
float squishiness = mNotificationStackScrollLayoutController
|
mQsExpandImmediate || mQsExpanded ? 1f : mNotificationStackScrollLayoutController
|
||||||
.getNotificationSquishinessFraction();
|
.getNotificationSquishinessFraction();
|
||||||
mQs.setQsExpansion(qsExpansionFraction, getExpandedFraction(), getHeaderTranslation(),
|
final float qsExpansionFraction = computeQsExpansionFraction();
|
||||||
mQsExpandImmediate || mQsExpanded ? 1f : squishiness);
|
final float adjustedExpansionFraction = mShouldUseSplitNotificationShade
|
||||||
|
? 1f : computeQsExpansionFraction();
|
||||||
|
mQs.setQsExpansion(adjustedExpansionFraction, getExpandedFraction(), getHeaderTranslation(),
|
||||||
|
squishiness);
|
||||||
mSplitShadeHeaderController.setQsExpandedFraction(qsExpansionFraction);
|
mSplitShadeHeaderController.setQsExpandedFraction(qsExpansionFraction);
|
||||||
mMediaHierarchyManager.setQsExpansion(qsExpansionFraction);
|
mMediaHierarchyManager.setQsExpansion(qsExpansionFraction);
|
||||||
int qsPanelBottomY = calculateQsBottomPosition(qsExpansionFraction);
|
int qsPanelBottomY = calculateQsBottomPosition(qsExpansionFraction);
|
||||||
|
|||||||
Reference in New Issue
Block a user