Merge "Remove vestiges of old notification swipe logic from dream overlay." into tm-dev

This commit is contained in:
William Leshner
2022-03-09 22:03:26 +00:00
committed by Android (Google) Code Review
3 changed files with 0 additions and 29 deletions

View File

@@ -1367,9 +1367,6 @@
<dimen name="dream_overlay_status_icon_margin">8dp</dimen> <dimen name="dream_overlay_status_icon_margin">8dp</dimen>
<dimen name="dream_overlay_status_bar_icon_size"> <dimen name="dream_overlay_status_bar_icon_size">
@*android:dimen/status_bar_system_icon_size</dimen> @*android:dimen/status_bar_system_icon_size</dimen>
<!-- Height of the area at the top of the dream overlay to allow dragging down the notifications
shade. -->
<dimen name="dream_overlay_notifications_drag_area_height">100dp</dimen>
<dimen name="dream_overlay_camera_mic_off_indicator_size">8dp</dimen> <dimen name="dream_overlay_camera_mic_off_indicator_size">8dp</dimen>
<dimen name="dream_overlay_notification_indicator_size">6dp</dimen> <dimen name="dream_overlay_notification_indicator_size">6dp</dimen>

View File

@@ -23,8 +23,6 @@ import android.util.MathUtils;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import com.android.internal.annotations.VisibleForTesting;
import com.android.systemui.R;
import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.dreams.complication.ComplicationHostViewController; import com.android.systemui.dreams.complication.ComplicationHostViewController;
import com.android.systemui.dreams.dagger.DreamOverlayComponent; import com.android.systemui.dreams.dagger.DreamOverlayComponent;
@@ -39,9 +37,6 @@ import javax.inject.Named;
*/ */
@DreamOverlayComponent.DreamOverlayScope @DreamOverlayComponent.DreamOverlayScope
public class DreamOverlayContainerViewController extends ViewController<DreamOverlayContainerView> { public class DreamOverlayContainerViewController extends ViewController<DreamOverlayContainerView> {
// The height of the area at the top of the dream overlay to allow dragging down the
// notifications shade.
private final int mDreamOverlayNotificationsDragAreaHeight;
private final DreamOverlayStatusBarViewController mStatusBarViewController; private final DreamOverlayStatusBarViewController mStatusBarViewController;
private final ComplicationHostViewController mComplicationHostViewController; private final ComplicationHostViewController mComplicationHostViewController;
@@ -79,9 +74,6 @@ public class DreamOverlayContainerViewController extends ViewController<DreamOve
super(containerView); super(containerView);
mDreamOverlayContentView = contentView; mDreamOverlayContentView = contentView;
mStatusBarViewController = statusBarViewController; mStatusBarViewController = statusBarViewController;
mDreamOverlayNotificationsDragAreaHeight =
mView.getResources().getDimensionPixelSize(
R.dimen.dream_overlay_notifications_drag_area_height);
mComplicationHostViewController = complicationHostViewController; mComplicationHostViewController = complicationHostViewController;
final View view = mComplicationHostViewController.getView(); final View view = mComplicationHostViewController.getView();
@@ -117,11 +109,6 @@ public class DreamOverlayContainerViewController extends ViewController<DreamOve
return mView; return mView;
} }
@VisibleForTesting
int getDreamOverlayNotificationsDragAreaHeight() {
return mDreamOverlayNotificationsDragAreaHeight;
}
private void updateBurnInOffsets() { private void updateBurnInOffsets() {
int burnInOffset = mMaxBurnInOffset; int burnInOffset = mMaxBurnInOffset;

View File

@@ -16,7 +16,6 @@
package com.android.systemui.dreams; package com.android.systemui.dreams;
import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify;
@@ -30,7 +29,6 @@ import android.view.ViewTreeObserver;
import androidx.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import com.android.systemui.R;
import com.android.systemui.SysuiTestCase; import com.android.systemui.SysuiTestCase;
import com.android.systemui.dreams.complication.ComplicationHostViewController; import com.android.systemui.dreams.complication.ComplicationHostViewController;
@@ -44,7 +42,6 @@ import org.mockito.MockitoAnnotations;
@SmallTest @SmallTest
@RunWith(AndroidTestingRunner.class) @RunWith(AndroidTestingRunner.class)
public class DreamOverlayContainerViewControllerTest extends SysuiTestCase { public class DreamOverlayContainerViewControllerTest extends SysuiTestCase {
private static final int DREAM_OVERLAY_NOTIFICATIONS_DRAG_AREA_HEIGHT = 100;
private static final int MAX_BURN_IN_OFFSET = 20; private static final int MAX_BURN_IN_OFFSET = 20;
private static final long BURN_IN_PROTECTION_UPDATE_INTERVAL = 10; private static final long BURN_IN_PROTECTION_UPDATE_INTERVAL = 10;
private static final long MILLIS_UNTIL_FULL_JITTER = 240 * 1000; private static final long MILLIS_UNTIL_FULL_JITTER = 240 * 1000;
@@ -76,9 +73,6 @@ public class DreamOverlayContainerViewControllerTest extends SysuiTestCase {
public void setup() { public void setup() {
MockitoAnnotations.initMocks(this); MockitoAnnotations.initMocks(this);
when(mResources.getDimensionPixelSize(
R.dimen.dream_overlay_notifications_drag_area_height)).thenReturn(
DREAM_OVERLAY_NOTIFICATIONS_DRAG_AREA_HEIGHT);
when(mDreamOverlayContainerView.getResources()).thenReturn(mResources); when(mDreamOverlayContainerView.getResources()).thenReturn(mResources);
when(mDreamOverlayContainerView.getViewTreeObserver()).thenReturn(mViewTreeObserver); when(mDreamOverlayContainerView.getViewTreeObserver()).thenReturn(mViewTreeObserver);
@@ -99,13 +93,6 @@ public class DreamOverlayContainerViewControllerTest extends SysuiTestCase {
verify(mDreamOverlayStatusBarViewController).init(); verify(mDreamOverlayStatusBarViewController).init();
} }
@Test
public void testSetsDreamOverlayNotificationsDragAreaHeight() {
assertEquals(
mController.getDreamOverlayNotificationsDragAreaHeight(),
DREAM_OVERLAY_NOTIFICATIONS_DRAG_AREA_HEIGHT);
}
@Test @Test
public void testBurnInProtectionStartsWhenContentViewAttached() { public void testBurnInProtectionStartsWhenContentViewAttached() {
mController.onViewAttached(); mController.onViewAttached();