Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5918eab2 authored by William Leshner's avatar William Leshner Committed by Automerger Merge Worker
Browse files

Merge "Remove vestiges of old notification swipe logic from dream overlay."...

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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17110359

Change-Id: I8a07ace7b7c4253dd8d336cc436342e20b4a97d6
parents 0005468f e5bdb0f9
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -1367,9 +1367,6 @@
    <dimen name="dream_overlay_status_icon_margin">8dp</dimen>
    <dimen name="dream_overlay_status_bar_icon_size">
        @*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_notification_indicator_size">6dp</dimen>

+0 −13
Original line number Diff line number Diff line
@@ -23,8 +23,6 @@ import android.util.MathUtils;
import android.view.View;
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.dreams.complication.ComplicationHostViewController;
import com.android.systemui.dreams.dagger.DreamOverlayComponent;
@@ -39,9 +37,6 @@ import javax.inject.Named;
 */
@DreamOverlayComponent.DreamOverlayScope
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 ComplicationHostViewController mComplicationHostViewController;
@@ -79,9 +74,6 @@ public class DreamOverlayContainerViewController extends ViewController<DreamOve
        super(containerView);
        mDreamOverlayContentView = contentView;
        mStatusBarViewController = statusBarViewController;
        mDreamOverlayNotificationsDragAreaHeight =
                mView.getResources().getDimensionPixelSize(
                        R.dimen.dream_overlay_notifications_drag_area_height);

        mComplicationHostViewController = complicationHostViewController;
        final View view = mComplicationHostViewController.getView();
@@ -117,11 +109,6 @@ public class DreamOverlayContainerViewController extends ViewController<DreamOve
        return mView;
    }

    @VisibleForTesting
    int getDreamOverlayNotificationsDragAreaHeight() {
        return mDreamOverlayNotificationsDragAreaHeight;
    }

    private void updateBurnInOffsets() {
        int burnInOffset = mMaxBurnInOffset;

+0 −13
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.systemui.dreams;

import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.verify;
@@ -30,7 +29,6 @@ import android.view.ViewTreeObserver;

import androidx.test.filters.SmallTest;

import com.android.systemui.R;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.dreams.complication.ComplicationHostViewController;

@@ -44,7 +42,6 @@ import org.mockito.MockitoAnnotations;
@SmallTest
@RunWith(AndroidTestingRunner.class)
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 long BURN_IN_PROTECTION_UPDATE_INTERVAL = 10;
    private static final long MILLIS_UNTIL_FULL_JITTER = 240 * 1000;
@@ -76,9 +73,6 @@ public class DreamOverlayContainerViewControllerTest extends SysuiTestCase {
    public void setup() {
        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.getViewTreeObserver()).thenReturn(mViewTreeObserver);

@@ -99,13 +93,6 @@ public class DreamOverlayContainerViewControllerTest extends SysuiTestCase {
        verify(mDreamOverlayStatusBarViewController).init();
    }

    @Test
    public void testSetsDreamOverlayNotificationsDragAreaHeight() {
        assertEquals(
                mController.getDreamOverlayNotificationsDragAreaHeight(),
                DREAM_OVERLAY_NOTIFICATIONS_DRAG_AREA_HEIGHT);
    }

    @Test
    public void testBurnInProtectionStartsWhenContentViewAttached() {
        mController.onViewAttached();