summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrleix <rayx.lei@intel.com>2018-08-14 02:57:39 (GMT)
committerLuca Stefani <luca.stefani.ge1@gmail.com>2019-07-27 20:57:26 (GMT)
commit48c89fb287d526f2212a516eee44765f90e4aed6 (patch)
tree683fafa545790d2f6d72ed69025fbc4b251ad31e
parente18c1188eee6678c1301a9194dc6400a28ab69c6 (diff)
downloadframeworks_base-48c89fb287d526f2212a516eee44765f90e4aed6.zip
frameworks_base-48c89fb287d526f2212a516eee44765f90e4aed6.tar.gz
frameworks_base-48c89fb287d526f2212a516eee44765f90e4aed6.tar.bz2
Update navigation bar upon change of display density
Restart the navigation bar upon change of density or font scale, then the facet buttons of navigation bar will be scaled properly. Test: Settings->Display->Advanced->Display size->Largest bug: 122563094 Change-Id: I6d2d7ac4a801fac6f30bb78acee4c00ec2c4e507 Merged-In: I6d2d7ac4a801fac6f30bb78acee4c00ec2c4e507 Signed-off-by: Lei,RayX <rayx.lei@intel.com> Signed-off-by: Guobin Zhang <guobin.zhang@intel.com> Exempt-from-Owner-Approval: Car specific file
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
index 83021ca..66ef757 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
@@ -99,7 +99,6 @@ public class CarStatusBar extends StatusBar implements
Log.d(TAG, "Connecting to HVAC service");
Dependency.get(HvacController.class).connectToCarService();
}
- mCarFacetButtonController = Dependency.get(CarFacetButtonController.class);
mDeviceProvisionedController = Dependency.get(DeviceProvisionedController.class);
mDeviceIsProvisioned = mDeviceProvisionedController.isDeviceProvisioned();
if (!mDeviceIsProvisioned) {
@@ -117,7 +116,7 @@ public class CarStatusBar extends StatusBar implements
/**
* Remove all content from navbars and rebuild them. Used to allow for different nav bars
- * before and after the device is provisioned
+ * before and after the device is provisioned. Also for change of density and font size.
*/
private void restartNavBars() {
mCarFacetButtonController.removeAll();
@@ -216,6 +215,7 @@ public class CarStatusBar extends StatusBar implements
protected void makeStatusBarView() {
super.makeStatusBarView();
+ mCarFacetButtonController = Dependency.get(CarFacetButtonController.class);
mNotificationPanelBackground = getDefaultWallpaper();
mScrimController.setScrimBehindDrawable(mNotificationPanelBackground);
@@ -513,6 +513,7 @@ public class CarStatusBar extends StatusBar implements
@Override
public void onDensityOrFontScaleChanged() {
super.onDensityOrFontScaleChanged();
+ restartNavBars();
// Need to update the background on density changed in case the change was due to night
// mode.
mNotificationPanelBackground = getDefaultWallpaper();