Merge "Refactor around NSSL to open up some more APIs for subcomponents." into tm-qpr-dev
This commit is contained in:
@@ -28,6 +28,7 @@ import com.android.systemui.keyguard.KeyguardSliceProvider;
|
|||||||
import com.android.systemui.media.muteawait.MediaMuteAwaitConnectionCli;
|
import com.android.systemui.media.muteawait.MediaMuteAwaitConnectionCli;
|
||||||
import com.android.systemui.media.nearby.NearbyMediaDevicesManager;
|
import com.android.systemui.media.nearby.NearbyMediaDevicesManager;
|
||||||
import com.android.systemui.people.PeopleProvider;
|
import com.android.systemui.people.PeopleProvider;
|
||||||
|
import com.android.systemui.statusbar.QsFrameTranslateModule;
|
||||||
import com.android.systemui.statusbar.policy.ConfigurationController;
|
import com.android.systemui.statusbar.policy.ConfigurationController;
|
||||||
import com.android.systemui.unfold.FoldStateLogger;
|
import com.android.systemui.unfold.FoldStateLogger;
|
||||||
import com.android.systemui.unfold.FoldStateLoggingProvider;
|
import com.android.systemui.unfold.FoldStateLoggingProvider;
|
||||||
@@ -63,6 +64,7 @@ import dagger.Subcomponent;
|
|||||||
@Subcomponent(modules = {
|
@Subcomponent(modules = {
|
||||||
DefaultComponentBinder.class,
|
DefaultComponentBinder.class,
|
||||||
DependencyProvider.class,
|
DependencyProvider.class,
|
||||||
|
QsFrameTranslateModule.class,
|
||||||
SystemUIBinder.class,
|
SystemUIBinder.class,
|
||||||
SystemUIModule.class,
|
SystemUIModule.class,
|
||||||
SystemUICoreStartableModule.class,
|
SystemUICoreStartableModule.class,
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ import com.android.systemui.smartspace.dagger.SmartspaceModule;
|
|||||||
import com.android.systemui.statusbar.CommandQueue;
|
import com.android.systemui.statusbar.CommandQueue;
|
||||||
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
|
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
|
||||||
import com.android.systemui.statusbar.NotificationShadeWindowController;
|
import com.android.systemui.statusbar.NotificationShadeWindowController;
|
||||||
import com.android.systemui.statusbar.QsFrameTranslateModule;
|
|
||||||
import com.android.systemui.statusbar.notification.collection.NotifPipeline;
|
import com.android.systemui.statusbar.notification.collection.NotifPipeline;
|
||||||
import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinder;
|
import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinder;
|
||||||
import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinderImpl;
|
import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinderImpl;
|
||||||
@@ -133,7 +132,6 @@ import dagger.Provides;
|
|||||||
PeopleModule.class,
|
PeopleModule.class,
|
||||||
PluginModule.class,
|
PluginModule.class,
|
||||||
PrivacyModule.class,
|
PrivacyModule.class,
|
||||||
QsFrameTranslateModule.class,
|
|
||||||
ScreenshotModule.class,
|
ScreenshotModule.class,
|
||||||
SensorModule.class,
|
SensorModule.class,
|
||||||
MultiUserUtilsModule.class,
|
MultiUserUtilsModule.class,
|
||||||
|
|||||||
@@ -3383,8 +3383,9 @@ public final class NotificationPanelViewController extends PanelViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateQsFrameTranslation() {
|
private void updateQsFrameTranslation() {
|
||||||
mQsFrameTranslateController.translateQsFrame(mQsFrame, mQs, mOverExpansion,
|
mQsFrameTranslateController.translateQsFrame(mQsFrame, mQs,
|
||||||
mQsTranslationForFullShadeTransition);
|
mNavigationBarBottomHeight + mAmbientState.getStackTopMargin());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ public abstract class QsFrameTranslateController {
|
|||||||
/**
|
/**
|
||||||
* Calculate and translate the QS Frame on the Y-axis.
|
* Calculate and translate the QS Frame on the Y-axis.
|
||||||
*/
|
*/
|
||||||
public abstract void translateQsFrame(View qsFrame, QS qs, float overExpansion,
|
public abstract void translateQsFrame(View qsFrame, QS qs, int bottomInset);
|
||||||
float qsTranslationForFullShadeTransition);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculate the top padding for notifications panel. This could be the supplied
|
* Calculate the top padding for notifications panel. This could be the supplied
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ import javax.inject.Inject;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Default implementation of QS Translation. This by default does not do much.
|
* Default implementation of QS Translation. This by default does not do much.
|
||||||
|
* This class can be subclassed to allow System UI variants the flexibility to change position of
|
||||||
|
* the Quick Settings frame.
|
||||||
*/
|
*/
|
||||||
@SysUISingleton
|
@SysUISingleton
|
||||||
public class QsFrameTranslateImpl extends QsFrameTranslateController {
|
public class QsFrameTranslateImpl extends QsFrameTranslateController {
|
||||||
@@ -37,8 +39,8 @@ public class QsFrameTranslateImpl extends QsFrameTranslateController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translateQsFrame(View qsFrame, QS qs, float overExpansion,
|
public void translateQsFrame(View qsFrame, QS qs, int bottomInset) {
|
||||||
float qsTranslationForFullShadeTransition) {
|
// Empty implementation by default, meant to be overridden by subclasses.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1115,6 +1115,10 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
|||||||
updateAlgorithmLayoutMinHeight();
|
updateAlgorithmLayoutMinHeight();
|
||||||
updateOwnTranslationZ();
|
updateOwnTranslationZ();
|
||||||
|
|
||||||
|
// Give The Algorithm information regarding the QS height so it can layout notifications
|
||||||
|
// properly. Needed for some devices that grows notifications down-to-top
|
||||||
|
mStackScrollAlgorithm.updateQSFrameTop(mQsHeader == null ? 0 : mQsHeader.getHeight());
|
||||||
|
|
||||||
// Once the layout has finished, we don't need to animate any scrolling clampings anymore.
|
// Once the layout has finished, we don't need to animate any scrolling clampings anymore.
|
||||||
mAnimateStackYForContentHeightChange = false;
|
mAnimateStackYForContentHeightChange = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -416,13 +416,20 @@ public class StackScrollAlgorithm {
|
|||||||
return i > 0 ? algorithmState.visibleChildren.get(i - 1) : null;
|
return i > 0 ? algorithmState.visibleChildren.get(i - 1) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the position of QS Frame.
|
||||||
|
*/
|
||||||
|
public void updateQSFrameTop(int qsHeight) {
|
||||||
|
// Intentionally empty for sub-classes in other device form factors to override
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine the positions for the views. This is the main part of the algorithm.
|
* Determine the positions for the views. This is the main part of the algorithm.
|
||||||
*
|
*
|
||||||
* @param algorithmState The state in which the current pass of the algorithm is currently in
|
* @param algorithmState The state in which the current pass of the algorithm is currently in
|
||||||
* @param ambientState The current ambient state
|
* @param ambientState The current ambient state
|
||||||
*/
|
*/
|
||||||
private void updatePositionsForState(StackScrollAlgorithmState algorithmState,
|
protected void updatePositionsForState(StackScrollAlgorithmState algorithmState,
|
||||||
AmbientState ambientState) {
|
AmbientState ambientState) {
|
||||||
if (!ambientState.isOnKeyguard()
|
if (!ambientState.isOnKeyguard()
|
||||||
|| (ambientState.isBypassEnabled() && ambientState.isPulseExpanding())) {
|
|| (ambientState.isBypassEnabled() && ambientState.isPulseExpanding())) {
|
||||||
@@ -448,7 +455,7 @@ public class StackScrollAlgorithm {
|
|||||||
* @return Fraction to apply to view height and gap between views.
|
* @return Fraction to apply to view height and gap between views.
|
||||||
* Does not include shelf height even if shelf is showing.
|
* Does not include shelf height even if shelf is showing.
|
||||||
*/
|
*/
|
||||||
private float getExpansionFractionWithoutShelf(
|
protected float getExpansionFractionWithoutShelf(
|
||||||
StackScrollAlgorithmState algorithmState,
|
StackScrollAlgorithmState algorithmState,
|
||||||
AmbientState ambientState) {
|
AmbientState ambientState) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user