Merge "Destroy taskbar if it's not present in DeviceProfile" into tm-qpr-dev

This commit is contained in:
Alex Chau
2023-01-24 17:35:37 +00:00
committed by Android (Google) Code Review

View File

@@ -156,10 +156,14 @@ public class TaskbarManager {
} else {
// Config change might be handled without re-creating the taskbar
if (mTaskbarActivityContext != null) {
if (dp != null && isTaskbarPresent(dp)) {
mTaskbarActivityContext.updateDeviceProfile(dp, mNavMode);
if (dp != null && !isTaskbarPresent(dp)) {
destroyExistingTaskbar();
} else {
if (dp != null && isTaskbarPresent(dp)) {
mTaskbarActivityContext.updateDeviceProfile(dp, mNavMode);
}
mTaskbarActivityContext.onConfigurationChanged(configDiff);
}
mTaskbarActivityContext.onConfigurationChanged(configDiff);
}
}
mOldConfig = newConfig;