Loading packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +4 −4 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.NotificationViewHierarchyManager; import com.android.systemui.statusbar.PulseExpansionHandler; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.SuperStatusBarViewFactory; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.VibratorHelper; import com.android.systemui.statusbar.notification.BypassHeadsUpNotifier; Loading Loading @@ -131,7 +132,6 @@ import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler; import com.android.systemui.statusbar.policy.RemoteInputUriController; import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.statusbar.policy.ZenModeController; import com.android.systemui.util.InjectionInflationController; import java.io.FileDescriptor; import java.io.PrintWriter; Loading Loading @@ -244,7 +244,6 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt KeyguardUpdateMonitor keyguardUpdateMonitor, StatusBarIconController statusBarIconController, DozeLog dozeLog, InjectionInflationController injectionInflationController, PulseExpansionHandler pulseExpansionHandler, NotificationWakeUpCoordinator notificationWakeUpCoordinator, KeyguardBypassController keyguardBypassController, Loading Loading @@ -303,6 +302,7 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt CommandQueue commandQueue, PluginManager pluginManager, RemoteInputUriController remoteInputUriController, SuperStatusBarViewFactory superStatusBarViewFactory, /* Car Settings injected components. */ CarNavigationBarController carNavigationBarController) { super( Loading @@ -313,7 +313,6 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt keyguardUpdateMonitor, statusBarIconController, dozeLog, injectionInflationController, pulseExpansionHandler, notificationWakeUpCoordinator, keyguardBypassController, Loading Loading @@ -372,7 +371,8 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt dozeScrimController, commandQueue, pluginManager, remoteInputUriController); remoteInputUriController, superStatusBarViewFactory); mScrimController = scrimController; mCarNavigationBarController = carNavigationBarController; } Loading packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBarModule.java +3 −3 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.NotificationViewHierarchyManager; import com.android.systemui.statusbar.PulseExpansionHandler; import com.android.systemui.statusbar.StatusBarDependenciesModule; import com.android.systemui.statusbar.SuperStatusBarViewFactory; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.VibratorHelper; import com.android.systemui.statusbar.notification.BypassHeadsUpNotifier; Loading Loading @@ -85,7 +86,6 @@ import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler; import com.android.systemui.statusbar.policy.RemoteInputUriController; import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.statusbar.policy.ZenModeController; import com.android.systemui.util.InjectionInflationController; import javax.inject.Named; import javax.inject.Singleton; Loading @@ -112,7 +112,6 @@ public class CarStatusBarModule { KeyguardUpdateMonitor keyguardUpdateMonitor, StatusBarIconController statusBarIconController, DozeLog dozeLog, InjectionInflationController injectionInflationController, PulseExpansionHandler pulseExpansionHandler, NotificationWakeUpCoordinator notificationWakeUpCoordinator, KeyguardBypassController keyguardBypassController, Loading Loading @@ -171,6 +170,7 @@ public class CarStatusBarModule { CommandQueue commandQueue, PluginManager pluginManager, RemoteInputUriController remoteInputUriController, SuperStatusBarViewFactory superStatusBarViewFactory, CarNavigationBarController carNavigationBarController) { return new CarStatusBar( context, Loading @@ -180,7 +180,6 @@ public class CarStatusBarModule { keyguardUpdateMonitor, statusBarIconController, dozeLog, injectionInflationController, pulseExpansionHandler, notificationWakeUpCoordinator, keyguardBypassController, Loading Loading @@ -239,6 +238,7 @@ public class CarStatusBarModule { commandQueue, pluginManager, remoteInputUriController, superStatusBarViewFactory, carNavigationBarController); } } packages/SystemUI/src/com/android/systemui/statusbar/SuperStatusBarViewFactory.java 0 → 100644 +92 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 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. */ package com.android.systemui.statusbar; import android.content.Context; import android.view.LayoutInflater; import android.view.ViewGroup; import com.android.systemui.R; import com.android.systemui.statusbar.phone.StatusBarWindowView; import com.android.systemui.util.InjectionInflationController; import javax.inject.Inject; import javax.inject.Singleton; /** * Creates a single instance of super_status_bar that can be shared across various system ui * objects. */ @Singleton public class SuperStatusBarViewFactory { private final Context mContext; private final InjectionInflationController mInjectionInflationController; private StatusBarWindowView mStatusBarWindowView; private NotificationShelf mNotificationShelf; @Inject public SuperStatusBarViewFactory(Context context, InjectionInflationController injectionInflationController) { mContext = context; mInjectionInflationController = injectionInflationController; } /** * Gets the inflated {@link StatusBarWindowView} from {@link R.layout#super_status_bar}. Returns * a cached instance, if it has already been inflated. */ public StatusBarWindowView getStatusBarWindowView() { if (mStatusBarWindowView != null) { return mStatusBarWindowView; } mStatusBarWindowView = (StatusBarWindowView) mInjectionInflationController.injectable( LayoutInflater.from(mContext)).inflate(R.layout.super_status_bar, /* root= */ null); if (mStatusBarWindowView == null) { throw new IllegalStateException( "R.layout.super_status_bar could not be properly inflated"); } return mStatusBarWindowView; } /** * Gets the inflated {@link NotificationShelf} from * {@link R.layout#status_bar_notification_shelf}. * Returns a cached instance, if it has already been inflated. * * @param container the expected container to hold the {@link NotificationShelf}. The view * isn't immediately attached, but the layout params of this view is used * during inflation. */ public NotificationShelf getNotificationShelf(ViewGroup container) { if (mNotificationShelf != null) { return mNotificationShelf; } mNotificationShelf = (NotificationShelf) mInjectionInflationController.injectable( LayoutInflater.from(mContext)).inflate(R.layout.status_bar_notification_shelf, container, /* attachToRoot= */ false); if (mNotificationShelf == null) { throw new IllegalStateException( "R.layout.status_bar_notification_shelf could not be properly inflated"); } return mNotificationShelf; } } packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +11 −37 Original line number Diff line number Diff line Loading @@ -75,7 +75,6 @@ import android.content.pm.IPackageManager; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.Point; import android.graphics.PointF; import android.media.AudioAttributes; Loading Loading @@ -109,7 +108,6 @@ import android.view.Display; import android.view.IWindowManager; import android.view.InsetsState.InternalInsetType; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.RemoteAnimationAdapter; import android.view.ThreadedRenderer; Loading Loading @@ -201,6 +199,7 @@ import com.android.systemui.statusbar.NotificationViewHierarchyManager; import com.android.systemui.statusbar.PulseExpansionHandler; import com.android.systemui.statusbar.ScrimView; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.SuperStatusBarViewFactory; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.VibratorHelper; import com.android.systemui.statusbar.notification.ActivityLaunchAnimator; Loading Loading @@ -242,7 +241,6 @@ import com.android.systemui.statusbar.policy.UserInfoController; import com.android.systemui.statusbar.policy.UserInfoControllerImpl; import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.statusbar.policy.ZenModeController; import com.android.systemui.util.InjectionInflationController; import com.android.systemui.volume.VolumeComponent; import java.io.FileDescriptor; Loading Loading @@ -363,8 +361,6 @@ public class StatusBar extends SystemUI implements DemoMode, @Nullable private final KeyguardLiftController mKeyguardLiftController; private int mNaturalBarHeight = -1; private final Point mCurrentDisplaySize = new Point(); protected StatusBarWindowViewController mStatusBarWindowViewController; Loading @@ -383,7 +379,6 @@ public class StatusBar extends SystemUI implements DemoMode, private final FeatureFlags mFeatureFlags; private final StatusBarIconController mIconController; private final DozeLog mDozeLog; private final InjectionInflationController mInjectionInflater; private final PulseExpansionHandler mPulseExpansionHandler; private final NotificationWakeUpCoordinator mWakeUpCoordinator; private final KeyguardBypassController mKeyguardBypassController; Loading @@ -402,6 +397,7 @@ public class StatusBar extends SystemUI implements DemoMode, private final Lazy<BiometricUnlockController> mBiometricUnlockControllerLazy; private final PluginManager mPluginManager; private final RemoteInputUriController mRemoteInputUriController; private final SuperStatusBarViewFactory mSuperStatusBarViewFactory; // expanded notifications protected NotificationPanelView mNotificationPanel; // the sliding/resizing panel within the notification window Loading Loading @@ -646,7 +642,6 @@ public class StatusBar extends SystemUI implements DemoMode, KeyguardUpdateMonitor keyguardUpdateMonitor, StatusBarIconController statusBarIconController, DozeLog dozeLog, InjectionInflationController injectionInflationController, PulseExpansionHandler pulseExpansionHandler, NotificationWakeUpCoordinator notificationWakeUpCoordinator, KeyguardBypassController keyguardBypassController, Loading Loading @@ -705,7 +700,8 @@ public class StatusBar extends SystemUI implements DemoMode, DozeScrimController dozeScrimController, CommandQueue commandQueue, PluginManager pluginManager, RemoteInputUriController remoteInputUriController) { RemoteInputUriController remoteInputUriController, SuperStatusBarViewFactory superStatusBarViewFactory) { super(context); mFeatureFlags = featureFlags; mLightBarController = lightBarController; Loading @@ -713,7 +709,6 @@ public class StatusBar extends SystemUI implements DemoMode, mKeyguardUpdateMonitor = keyguardUpdateMonitor; mIconController = statusBarIconController; mDozeLog = dozeLog; mInjectionInflater = injectionInflationController; mPulseExpansionHandler = pulseExpansionHandler; mWakeUpCoordinator = notificationWakeUpCoordinator; mKeyguardBypassController = keyguardBypassController; Loading Loading @@ -773,6 +768,8 @@ public class StatusBar extends SystemUI implements DemoMode, mCommandQueue = commandQueue; mPluginManager = pluginManager; mRemoteInputUriController = remoteInputUriController; mSuperStatusBarViewFactory = superStatusBarViewFactory; mBubbleExpandListener = (isExpanding, key) -> { mEntryManager.updateNotifications("onBubbleExpandChanged"); Loading Loading @@ -1367,10 +1364,7 @@ public class StatusBar extends SystemUI implements DemoMode, } private void inflateShelf() { mNotificationShelf = (NotificationShelf) mInjectionInflater.injectable( LayoutInflater.from(mContext)).inflate( R.layout.status_bar_notification_shelf, mStackScroller, false); mNotificationShelf = mSuperStatusBarViewFactory.getNotificationShelf(mStackScroller); mNotificationShelf.setOnClickListener(mGoToLockedShadeListener); } Loading Loading @@ -1428,10 +1422,8 @@ public class StatusBar extends SystemUI implements DemoMode, } protected void inflateStatusBarWindow(Context context) { mStatusBarWindow = (StatusBarWindowView) mInjectionInflater.injectable( LayoutInflater.from(context)).inflate(R.layout.super_status_bar, null); mStatusBarWindow = mSuperStatusBarViewFactory.getStatusBarWindowView(); mStatusBarWindowViewController = mStatusBarWindowViewControllerBuilder .setStatusBarWindowView(mStatusBarWindow) .setShadeController(this) .build(); } Loading Loading @@ -1469,12 +1461,7 @@ public class StatusBar extends SystemUI implements DemoMode, } public int getStatusBarHeight() { if (mNaturalBarHeight < 0) { final Resources res = mContext.getResources(); mNaturalBarHeight = res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_height); } return mNaturalBarHeight; return mStatusBarWindowController.getStatusBarHeight(); } protected boolean toggleSplitScreenMode(int metricsDockAction, int metricsUndockAction) { Loading Loading @@ -2648,7 +2635,7 @@ public class StatusBar extends SystemUI implements DemoMode, public void createAndAddWindows(@Nullable RegisterStatusBarResult result) { makeStatusBarView(result); mStatusBarWindowController.add(mStatusBarWindow, getStatusBarHeight()); mStatusBarWindowController.attach(); } // called by makeStatusbar and also by PhoneStatusBarView Loading Loading @@ -2926,7 +2913,7 @@ public class StatusBar extends SystemUI implements DemoMode, mQSPanel.updateResources(); } loadDimens(); mStatusBarWindowController.refreshStatusBarHeight(); if (mStatusBarView != null) { mStatusBarView.updateResources(); Loading @@ -2939,19 +2926,6 @@ public class StatusBar extends SystemUI implements DemoMode, } } protected void loadDimens() { final Resources res = mContext.getResources(); int oldBarHeight = mNaturalBarHeight; mNaturalBarHeight = res.getDimensionPixelSize( com.android.internal.R.dimen.status_bar_height); if (mStatusBarWindowController != null && mNaturalBarHeight != oldBarHeight) { mStatusBarWindowController.setBarHeight(mNaturalBarHeight); } if (DEBUG) Log.v(TAG, "defineSlots"); } // Visibility reporting protected void handleVisibleToUserChanged(boolean visibleToUser) { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarModule.java +5 −5 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.NotificationViewHierarchyManager; import com.android.systemui.statusbar.PulseExpansionHandler; import com.android.systemui.statusbar.StatusBarDependenciesModule; import com.android.systemui.statusbar.SuperStatusBarViewFactory; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.VibratorHelper; import com.android.systemui.statusbar.notification.BypassHeadsUpNotifier; Loading @@ -71,7 +72,6 @@ import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler; import com.android.systemui.statusbar.policy.RemoteInputUriController; import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.statusbar.policy.ZenModeController; import com.android.systemui.util.InjectionInflationController; import javax.inject.Named; import javax.inject.Singleton; Loading @@ -98,7 +98,6 @@ public class StatusBarModule { KeyguardUpdateMonitor keyguardUpdateMonitor, StatusBarIconController statusBarIconController, DozeLog dozeLog, InjectionInflationController injectionInflationController, PulseExpansionHandler pulseExpansionHandler, NotificationWakeUpCoordinator notificationWakeUpCoordinator, KeyguardBypassController keyguardBypassController, Loading Loading @@ -157,7 +156,8 @@ public class StatusBarModule { DozeScrimController dozeScrimController, CommandQueue commandQueue, PluginManager pluginManager, RemoteInputUriController remoteInputUriController) { RemoteInputUriController remoteInputUriController, SuperStatusBarViewFactory superStatusBarViewFactory) { return new StatusBar( context, featureFlags, Loading @@ -166,7 +166,6 @@ public class StatusBarModule { keyguardUpdateMonitor, statusBarIconController, dozeLog, injectionInflationController, pulseExpansionHandler, notificationWakeUpCoordinator, keyguardBypassController, Loading Loading @@ -225,6 +224,7 @@ public class StatusBarModule { dozeScrimController, commandQueue, pluginManager, remoteInputUriController); remoteInputUriController, superStatusBarViewFactory); } } Loading
packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +4 −4 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.NotificationViewHierarchyManager; import com.android.systemui.statusbar.PulseExpansionHandler; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.SuperStatusBarViewFactory; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.VibratorHelper; import com.android.systemui.statusbar.notification.BypassHeadsUpNotifier; Loading Loading @@ -131,7 +132,6 @@ import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler; import com.android.systemui.statusbar.policy.RemoteInputUriController; import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.statusbar.policy.ZenModeController; import com.android.systemui.util.InjectionInflationController; import java.io.FileDescriptor; import java.io.PrintWriter; Loading Loading @@ -244,7 +244,6 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt KeyguardUpdateMonitor keyguardUpdateMonitor, StatusBarIconController statusBarIconController, DozeLog dozeLog, InjectionInflationController injectionInflationController, PulseExpansionHandler pulseExpansionHandler, NotificationWakeUpCoordinator notificationWakeUpCoordinator, KeyguardBypassController keyguardBypassController, Loading Loading @@ -303,6 +302,7 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt CommandQueue commandQueue, PluginManager pluginManager, RemoteInputUriController remoteInputUriController, SuperStatusBarViewFactory superStatusBarViewFactory, /* Car Settings injected components. */ CarNavigationBarController carNavigationBarController) { super( Loading @@ -313,7 +313,6 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt keyguardUpdateMonitor, statusBarIconController, dozeLog, injectionInflationController, pulseExpansionHandler, notificationWakeUpCoordinator, keyguardBypassController, Loading Loading @@ -372,7 +371,8 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt dozeScrimController, commandQueue, pluginManager, remoteInputUriController); remoteInputUriController, superStatusBarViewFactory); mScrimController = scrimController; mCarNavigationBarController = carNavigationBarController; } Loading
packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBarModule.java +3 −3 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.NotificationViewHierarchyManager; import com.android.systemui.statusbar.PulseExpansionHandler; import com.android.systemui.statusbar.StatusBarDependenciesModule; import com.android.systemui.statusbar.SuperStatusBarViewFactory; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.VibratorHelper; import com.android.systemui.statusbar.notification.BypassHeadsUpNotifier; Loading Loading @@ -85,7 +86,6 @@ import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler; import com.android.systemui.statusbar.policy.RemoteInputUriController; import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.statusbar.policy.ZenModeController; import com.android.systemui.util.InjectionInflationController; import javax.inject.Named; import javax.inject.Singleton; Loading @@ -112,7 +112,6 @@ public class CarStatusBarModule { KeyguardUpdateMonitor keyguardUpdateMonitor, StatusBarIconController statusBarIconController, DozeLog dozeLog, InjectionInflationController injectionInflationController, PulseExpansionHandler pulseExpansionHandler, NotificationWakeUpCoordinator notificationWakeUpCoordinator, KeyguardBypassController keyguardBypassController, Loading Loading @@ -171,6 +170,7 @@ public class CarStatusBarModule { CommandQueue commandQueue, PluginManager pluginManager, RemoteInputUriController remoteInputUriController, SuperStatusBarViewFactory superStatusBarViewFactory, CarNavigationBarController carNavigationBarController) { return new CarStatusBar( context, Loading @@ -180,7 +180,6 @@ public class CarStatusBarModule { keyguardUpdateMonitor, statusBarIconController, dozeLog, injectionInflationController, pulseExpansionHandler, notificationWakeUpCoordinator, keyguardBypassController, Loading Loading @@ -239,6 +238,7 @@ public class CarStatusBarModule { commandQueue, pluginManager, remoteInputUriController, superStatusBarViewFactory, carNavigationBarController); } }
packages/SystemUI/src/com/android/systemui/statusbar/SuperStatusBarViewFactory.java 0 → 100644 +92 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 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. */ package com.android.systemui.statusbar; import android.content.Context; import android.view.LayoutInflater; import android.view.ViewGroup; import com.android.systemui.R; import com.android.systemui.statusbar.phone.StatusBarWindowView; import com.android.systemui.util.InjectionInflationController; import javax.inject.Inject; import javax.inject.Singleton; /** * Creates a single instance of super_status_bar that can be shared across various system ui * objects. */ @Singleton public class SuperStatusBarViewFactory { private final Context mContext; private final InjectionInflationController mInjectionInflationController; private StatusBarWindowView mStatusBarWindowView; private NotificationShelf mNotificationShelf; @Inject public SuperStatusBarViewFactory(Context context, InjectionInflationController injectionInflationController) { mContext = context; mInjectionInflationController = injectionInflationController; } /** * Gets the inflated {@link StatusBarWindowView} from {@link R.layout#super_status_bar}. Returns * a cached instance, if it has already been inflated. */ public StatusBarWindowView getStatusBarWindowView() { if (mStatusBarWindowView != null) { return mStatusBarWindowView; } mStatusBarWindowView = (StatusBarWindowView) mInjectionInflationController.injectable( LayoutInflater.from(mContext)).inflate(R.layout.super_status_bar, /* root= */ null); if (mStatusBarWindowView == null) { throw new IllegalStateException( "R.layout.super_status_bar could not be properly inflated"); } return mStatusBarWindowView; } /** * Gets the inflated {@link NotificationShelf} from * {@link R.layout#status_bar_notification_shelf}. * Returns a cached instance, if it has already been inflated. * * @param container the expected container to hold the {@link NotificationShelf}. The view * isn't immediately attached, but the layout params of this view is used * during inflation. */ public NotificationShelf getNotificationShelf(ViewGroup container) { if (mNotificationShelf != null) { return mNotificationShelf; } mNotificationShelf = (NotificationShelf) mInjectionInflationController.injectable( LayoutInflater.from(mContext)).inflate(R.layout.status_bar_notification_shelf, container, /* attachToRoot= */ false); if (mNotificationShelf == null) { throw new IllegalStateException( "R.layout.status_bar_notification_shelf could not be properly inflated"); } return mNotificationShelf; } }
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +11 −37 Original line number Diff line number Diff line Loading @@ -75,7 +75,6 @@ import android.content.pm.IPackageManager; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.Point; import android.graphics.PointF; import android.media.AudioAttributes; Loading Loading @@ -109,7 +108,6 @@ import android.view.Display; import android.view.IWindowManager; import android.view.InsetsState.InternalInsetType; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.RemoteAnimationAdapter; import android.view.ThreadedRenderer; Loading Loading @@ -201,6 +199,7 @@ import com.android.systemui.statusbar.NotificationViewHierarchyManager; import com.android.systemui.statusbar.PulseExpansionHandler; import com.android.systemui.statusbar.ScrimView; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.SuperStatusBarViewFactory; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.VibratorHelper; import com.android.systemui.statusbar.notification.ActivityLaunchAnimator; Loading Loading @@ -242,7 +241,6 @@ import com.android.systemui.statusbar.policy.UserInfoController; import com.android.systemui.statusbar.policy.UserInfoControllerImpl; import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.statusbar.policy.ZenModeController; import com.android.systemui.util.InjectionInflationController; import com.android.systemui.volume.VolumeComponent; import java.io.FileDescriptor; Loading Loading @@ -363,8 +361,6 @@ public class StatusBar extends SystemUI implements DemoMode, @Nullable private final KeyguardLiftController mKeyguardLiftController; private int mNaturalBarHeight = -1; private final Point mCurrentDisplaySize = new Point(); protected StatusBarWindowViewController mStatusBarWindowViewController; Loading @@ -383,7 +379,6 @@ public class StatusBar extends SystemUI implements DemoMode, private final FeatureFlags mFeatureFlags; private final StatusBarIconController mIconController; private final DozeLog mDozeLog; private final InjectionInflationController mInjectionInflater; private final PulseExpansionHandler mPulseExpansionHandler; private final NotificationWakeUpCoordinator mWakeUpCoordinator; private final KeyguardBypassController mKeyguardBypassController; Loading @@ -402,6 +397,7 @@ public class StatusBar extends SystemUI implements DemoMode, private final Lazy<BiometricUnlockController> mBiometricUnlockControllerLazy; private final PluginManager mPluginManager; private final RemoteInputUriController mRemoteInputUriController; private final SuperStatusBarViewFactory mSuperStatusBarViewFactory; // expanded notifications protected NotificationPanelView mNotificationPanel; // the sliding/resizing panel within the notification window Loading Loading @@ -646,7 +642,6 @@ public class StatusBar extends SystemUI implements DemoMode, KeyguardUpdateMonitor keyguardUpdateMonitor, StatusBarIconController statusBarIconController, DozeLog dozeLog, InjectionInflationController injectionInflationController, PulseExpansionHandler pulseExpansionHandler, NotificationWakeUpCoordinator notificationWakeUpCoordinator, KeyguardBypassController keyguardBypassController, Loading Loading @@ -705,7 +700,8 @@ public class StatusBar extends SystemUI implements DemoMode, DozeScrimController dozeScrimController, CommandQueue commandQueue, PluginManager pluginManager, RemoteInputUriController remoteInputUriController) { RemoteInputUriController remoteInputUriController, SuperStatusBarViewFactory superStatusBarViewFactory) { super(context); mFeatureFlags = featureFlags; mLightBarController = lightBarController; Loading @@ -713,7 +709,6 @@ public class StatusBar extends SystemUI implements DemoMode, mKeyguardUpdateMonitor = keyguardUpdateMonitor; mIconController = statusBarIconController; mDozeLog = dozeLog; mInjectionInflater = injectionInflationController; mPulseExpansionHandler = pulseExpansionHandler; mWakeUpCoordinator = notificationWakeUpCoordinator; mKeyguardBypassController = keyguardBypassController; Loading Loading @@ -773,6 +768,8 @@ public class StatusBar extends SystemUI implements DemoMode, mCommandQueue = commandQueue; mPluginManager = pluginManager; mRemoteInputUriController = remoteInputUriController; mSuperStatusBarViewFactory = superStatusBarViewFactory; mBubbleExpandListener = (isExpanding, key) -> { mEntryManager.updateNotifications("onBubbleExpandChanged"); Loading Loading @@ -1367,10 +1364,7 @@ public class StatusBar extends SystemUI implements DemoMode, } private void inflateShelf() { mNotificationShelf = (NotificationShelf) mInjectionInflater.injectable( LayoutInflater.from(mContext)).inflate( R.layout.status_bar_notification_shelf, mStackScroller, false); mNotificationShelf = mSuperStatusBarViewFactory.getNotificationShelf(mStackScroller); mNotificationShelf.setOnClickListener(mGoToLockedShadeListener); } Loading Loading @@ -1428,10 +1422,8 @@ public class StatusBar extends SystemUI implements DemoMode, } protected void inflateStatusBarWindow(Context context) { mStatusBarWindow = (StatusBarWindowView) mInjectionInflater.injectable( LayoutInflater.from(context)).inflate(R.layout.super_status_bar, null); mStatusBarWindow = mSuperStatusBarViewFactory.getStatusBarWindowView(); mStatusBarWindowViewController = mStatusBarWindowViewControllerBuilder .setStatusBarWindowView(mStatusBarWindow) .setShadeController(this) .build(); } Loading Loading @@ -1469,12 +1461,7 @@ public class StatusBar extends SystemUI implements DemoMode, } public int getStatusBarHeight() { if (mNaturalBarHeight < 0) { final Resources res = mContext.getResources(); mNaturalBarHeight = res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_height); } return mNaturalBarHeight; return mStatusBarWindowController.getStatusBarHeight(); } protected boolean toggleSplitScreenMode(int metricsDockAction, int metricsUndockAction) { Loading Loading @@ -2648,7 +2635,7 @@ public class StatusBar extends SystemUI implements DemoMode, public void createAndAddWindows(@Nullable RegisterStatusBarResult result) { makeStatusBarView(result); mStatusBarWindowController.add(mStatusBarWindow, getStatusBarHeight()); mStatusBarWindowController.attach(); } // called by makeStatusbar and also by PhoneStatusBarView Loading Loading @@ -2926,7 +2913,7 @@ public class StatusBar extends SystemUI implements DemoMode, mQSPanel.updateResources(); } loadDimens(); mStatusBarWindowController.refreshStatusBarHeight(); if (mStatusBarView != null) { mStatusBarView.updateResources(); Loading @@ -2939,19 +2926,6 @@ public class StatusBar extends SystemUI implements DemoMode, } } protected void loadDimens() { final Resources res = mContext.getResources(); int oldBarHeight = mNaturalBarHeight; mNaturalBarHeight = res.getDimensionPixelSize( com.android.internal.R.dimen.status_bar_height); if (mStatusBarWindowController != null && mNaturalBarHeight != oldBarHeight) { mStatusBarWindowController.setBarHeight(mNaturalBarHeight); } if (DEBUG) Log.v(TAG, "defineSlots"); } // Visibility reporting protected void handleVisibleToUserChanged(boolean visibleToUser) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarModule.java +5 −5 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.NotificationViewHierarchyManager; import com.android.systemui.statusbar.PulseExpansionHandler; import com.android.systemui.statusbar.StatusBarDependenciesModule; import com.android.systemui.statusbar.SuperStatusBarViewFactory; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.VibratorHelper; import com.android.systemui.statusbar.notification.BypassHeadsUpNotifier; Loading @@ -71,7 +72,6 @@ import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler; import com.android.systemui.statusbar.policy.RemoteInputUriController; import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.statusbar.policy.ZenModeController; import com.android.systemui.util.InjectionInflationController; import javax.inject.Named; import javax.inject.Singleton; Loading @@ -98,7 +98,6 @@ public class StatusBarModule { KeyguardUpdateMonitor keyguardUpdateMonitor, StatusBarIconController statusBarIconController, DozeLog dozeLog, InjectionInflationController injectionInflationController, PulseExpansionHandler pulseExpansionHandler, NotificationWakeUpCoordinator notificationWakeUpCoordinator, KeyguardBypassController keyguardBypassController, Loading Loading @@ -157,7 +156,8 @@ public class StatusBarModule { DozeScrimController dozeScrimController, CommandQueue commandQueue, PluginManager pluginManager, RemoteInputUriController remoteInputUriController) { RemoteInputUriController remoteInputUriController, SuperStatusBarViewFactory superStatusBarViewFactory) { return new StatusBar( context, featureFlags, Loading @@ -166,7 +166,6 @@ public class StatusBarModule { keyguardUpdateMonitor, statusBarIconController, dozeLog, injectionInflationController, pulseExpansionHandler, notificationWakeUpCoordinator, keyguardBypassController, Loading Loading @@ -225,6 +224,7 @@ public class StatusBarModule { dozeScrimController, commandQueue, pluginManager, remoteInputUriController); remoteInputUriController, superStatusBarViewFactory); } }