Add UiBlocker for DashboardFragment
If DashboardFragment detects blocker controllers, it won't display until: 1. All blocking controllers finish bg works. 2. Timeout This CL adds UiBlockerController to control this behavior and BlockingSlicePreferenceController as an example. Bug: 120803703 Test: atest SettingsUnitTests Change-Id: I66fc194776d46ee49b3ec7685f3167834e673ba2
This commit is contained in:
@@ -26,6 +26,8 @@ import static org.mockito.Mockito.when;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.testutils.FakeFeatureFactory;
|
||||
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
|
||||
import com.android.settingslib.bluetooth.LocalBluetoothManager;
|
||||
@@ -49,9 +51,10 @@ public class BluetoothDeviceDetailsFragmentTest {
|
||||
|
||||
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
|
||||
private CachedBluetoothDevice mCachedDevice;
|
||||
|
||||
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
|
||||
private LocalBluetoothManager mLocalManager;
|
||||
@Mock
|
||||
private PreferenceScreen mPreferenceScreen;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
@@ -62,6 +65,7 @@ public class BluetoothDeviceDetailsFragmentTest {
|
||||
mFragment = spy(BluetoothDeviceDetailsFragment.newInstance(TEST_ADDRESS));
|
||||
doReturn(mLocalManager).when(mFragment).getLocalBluetoothManager(any());
|
||||
doReturn(mCachedDevice).when(mFragment).getCachedDevice(any());
|
||||
doReturn(mPreferenceScreen).when(mFragment).getPreferenceScreen();
|
||||
|
||||
when(mCachedDevice.getAddress()).thenReturn(TEST_ADDRESS);
|
||||
Bundle args = new Bundle();
|
||||
|
Reference in New Issue
Block a user