Fix inconsist color filling on collapsing toolbar
Some pages are updating the background color for action bar after action bar is created, which will break the animation of collapsing toolbar. It also causes the different color filled in the status bar and collapsing toolbar area separately. Removing the styleActionbar method from EntityHeaderController can fix this issue. Fix: 187019164 Test: robotests && visual verified 1) Settings -> Apps -> See all apps -> pick up either app -> Mobile data & Wi-Fi 2) Scrolling the content and see if the toolbar has the different color between status bar and toolbar Change-Id: Ic0842b9e6c48662872694534a3696c4b8900481f
This commit is contained in:
@@ -17,13 +17,9 @@
|
||||
|
||||
package com.android.settings.fuelgauge;
|
||||
|
||||
import static androidx.lifecycle.Lifecycle.Event.ON_START;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.ArgumentMatchers.nullable;
|
||||
import static org.mockito.Mockito.doReturn;
|
||||
import static org.mockito.Mockito.spy;
|
||||
import static org.mockito.Mockito.verify;
|
||||
@@ -41,7 +37,6 @@ import android.text.TextUtils;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
import androidx.preference.PreferenceFragmentCompat;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
@@ -283,17 +278,6 @@ public class BatteryHeaderPreferenceControllerTest {
|
||||
verify(mBatteryUsageProgressBarPref).setBottomSummary(null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void onStart_shouldStyleActionBar() {
|
||||
when(mEntityHeaderController.setRecyclerView(nullable(RecyclerView.class), eq(mLifecycle)))
|
||||
.thenReturn(mEntityHeaderController);
|
||||
|
||||
mController.displayPreference(mPreferenceScreen);
|
||||
mLifecycle.handleLifecycleEvent(ON_START);
|
||||
|
||||
verify(mEntityHeaderController).styleActionBar(mActivity);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void quickUpdateHeaderPreference_onlyUpdateBatteryLevelAndChargingState() {
|
||||
mController.quickUpdateHeaderPreference();
|
||||
|
Reference in New Issue
Block a user