Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e564f934 authored by Abhisek Devkota's avatar Abhisek Devkota Committed by Gerrit Code Review
Browse files

Merge "SysUI: Don't recreate controllers." into cm-11.0

parents 708b62b4 e95bc124
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -194,7 +194,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
    DockBatteryController mDockBatteryController;
    LocationController mLocationController;
    NetworkController mNetworkController;
    RotationLockController mRotationLockController;
    MSimNetworkController mMSimNetworkController;

    int mNaturalBarHeight = -1;
@@ -522,6 +521,11 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
            mCurrentTheme = (CustomTheme)currentTheme.clone();
        }

        mLocationController = new LocationController(mContext);
        mBatteryController = new BatteryController(mContext);
        mDockBatteryController = new DockBatteryController(mContext);
        mBluetoothController = new BluetoothController(mContext);

        super.start(); // calls createAndAddWindows()

        addNavigationBar();
@@ -772,12 +776,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
        setAreThereNotifications();

        // Other icons
        mLocationController = new LocationController(mContext); // will post a notification
        mBatteryController = new BatteryController(mContext);
        mDockBatteryController = new DockBatteryController(mContext);
        mBluetoothController = new BluetoothController(mContext);
        mRotationLockController = new RotationLockController(mContext);

        mBatteryView = (BatteryMeterView) mStatusBarView.findViewById(R.id.battery);
        mDockBatteryView = (DockBatteryMeterView) mStatusBarView.findViewById(R.id.dock_battery);