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

Commit cc28d7b6 authored by Dave Mankoff's avatar Dave Mankoff
Browse files

Turn off BrightLineClassifier tests until memory leaks can be identified.

Bug: 135715570
Test: atest SystemUITests
Change-Id: I334ffe87dc7c28367e4f238a9f7928839b7d831c
parent 18fff174
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -56,18 +57,21 @@ public class DiagonalClassifierTest extends SysuiTestCase {
    private FalsingClassifier mClassifier;

    @Before
    @Ignore("Memory Leak?")
    public void setup() {
        MockitoAnnotations.initMocks(this);
        mClassifier = new DiagonalClassifier(mDataProvider);
    }

    @Test
    @Ignore("Memory Leak?")
    public void testPass_UnknownAngle() {
        when(mDataProvider.getAngle()).thenReturn(Float.MAX_VALUE);
        assertThat(mClassifier.isFalseTouch(), is(false));
    }

    @Test
    @Ignore("Memory Leak?")
    public void testPass_VerticalSwipe() {
        when(mDataProvider.getAngle()).thenReturn(UP_IN_RADIANS);
        assertThat(mClassifier.isFalseTouch(), is(false));
@@ -77,6 +81,7 @@ public class DiagonalClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testPass_MostlyVerticalSwipe() {
        when(mDataProvider.getAngle()).thenReturn(UP_IN_RADIANS + 2 * FIVE_DEG_IN_RADIANS);
        assertThat(mClassifier.isFalseTouch(), is(false));
@@ -92,6 +97,7 @@ public class DiagonalClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testPass_BarelyVerticalSwipe() {
        when(mDataProvider.getAngle()).thenReturn(
                UP_IN_RADIANS - FORTY_FIVE_DEG_IN_RADIANS + 2 * FIVE_DEG_IN_RADIANS);
@@ -111,6 +117,7 @@ public class DiagonalClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testPass_HorizontalSwipe() {
        when(mDataProvider.getAngle()).thenReturn(RIGHT_IN_RADIANS);
        assertThat(mClassifier.isFalseTouch(), is(false));
@@ -120,6 +127,7 @@ public class DiagonalClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testPass_MostlyHorizontalSwipe() {
        when(mDataProvider.getAngle()).thenReturn(RIGHT_IN_RADIANS + 2 * FIVE_DEG_IN_RADIANS);
        assertThat(mClassifier.isFalseTouch(), is(false));
@@ -135,6 +143,7 @@ public class DiagonalClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testPass_BarelyHorizontalSwipe() {
        when(mDataProvider.getAngle()).thenReturn(
                RIGHT_IN_RADIANS + FORTY_FIVE_DEG_IN_RADIANS - 2 * FIVE_DEG_IN_RADIANS);
@@ -154,6 +163,7 @@ public class DiagonalClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testPass_AffordanceSwipe() {
        when(mDataProvider.getInteractionType()).thenReturn(LEFT_AFFORDANCE);
        when(mDataProvider.getAngle()).thenReturn(
@@ -172,6 +182,7 @@ public class DiagonalClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testFail_DiagonalSwipe() {
        // Horizontal Swipes
        when(mDataProvider.isVertical()).thenReturn(false);
+6 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -61,11 +62,13 @@ public class DistanceClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testPass_noPointer() {
        assertThat(mClassifier.isFalseTouch(), is(true));
    }

    @Test
    @Ignore("Memory Leak?")
    public void testPass_fling() {
        MotionEvent motionEventA = MotionEvent.obtain(1, 1, MotionEvent.ACTION_DOWN, 1, 1, 0);
        MotionEvent motionEventB = MotionEvent.obtain(1, 2, MotionEvent.ACTION_MOVE, 1, 2, 0);
@@ -86,6 +89,7 @@ public class DistanceClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testFail_flingShort() {
        MotionEvent motionEventA = MotionEvent.obtain(1, 1, MotionEvent.ACTION_DOWN, 1, 1, 0);
        MotionEvent motionEventB = MotionEvent.obtain(1, 2, MotionEvent.ACTION_MOVE, 1, 2, 0);
@@ -106,6 +110,7 @@ public class DistanceClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testFail_flingSlowly() {
        // These events, in testing, result in a fling that falls just short of the threshold.
        MotionEvent motionEventA = MotionEvent.obtain(1, 1, MotionEvent.ACTION_DOWN, 1, 1, 0);
@@ -136,6 +141,7 @@ public class DistanceClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testPass_swipe() {
        MotionEvent motionEventA = MotionEvent.obtain(1, 1, MotionEvent.ACTION_DOWN, 1, 1, 0);
        MotionEvent motionEventB = MotionEvent.obtain(1, 3, MotionEvent.ACTION_MOVE, 1, DPI * 3, 0);
+9 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;

@@ -47,6 +48,7 @@ public class FalsingDataProviderTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void test_trackMotionEvents() {
        MotionEvent motionEventA = obtainMotionEvent(MotionEvent.ACTION_DOWN, 1, 2, 9);
        MotionEvent motionEventB = obtainMotionEvent(MotionEvent.ACTION_MOVE, 2, 4, 7);
@@ -77,6 +79,7 @@ public class FalsingDataProviderTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void test_trackRecentMotionEvents() {
        MotionEvent motionEventA = obtainMotionEvent(MotionEvent.ACTION_DOWN, 1, 2, 9);
        MotionEvent motionEventB = obtainMotionEvent(MotionEvent.ACTION_MOVE, 800, 4, 7);
@@ -122,6 +125,7 @@ public class FalsingDataProviderTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void test_unpackMotionEvents() {
        // Batching only works for motion events of the same type.
        MotionEvent motionEventA = obtainMotionEvent(MotionEvent.ACTION_MOVE, 1, 2, 9);
@@ -155,6 +159,7 @@ public class FalsingDataProviderTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void test_getAngle() {
        MotionEvent motionEventOrigin = obtainMotionEvent(MotionEvent.ACTION_DOWN, 1, 0, 0);

@@ -182,6 +187,7 @@ public class FalsingDataProviderTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void test_isHorizontal() {
        MotionEvent motionEventOrigin = obtainMotionEvent(MotionEvent.ACTION_DOWN, 1, 0, 0);

@@ -208,6 +214,7 @@ public class FalsingDataProviderTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void test_isVertical() {
        MotionEvent motionEventOrigin = obtainMotionEvent(MotionEvent.ACTION_DOWN, 1, 0, 0);

@@ -234,6 +241,7 @@ public class FalsingDataProviderTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void test_isRight() {
        MotionEvent motionEventOrigin = obtainMotionEvent(MotionEvent.ACTION_DOWN, 1, 0, 0);

@@ -260,6 +268,7 @@ public class FalsingDataProviderTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void test_isUp() {
        // Remember that our y axis is flipped.

+4 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -47,11 +48,13 @@ public class PointerCountClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testPass_noPointer() {
        assertThat(mClassifier.isFalseTouch(), is(false));
    }

    @Test
    @Ignore("Memory Leak?")
    public void testPass_singlePointer() {
        MotionEvent motionEvent = MotionEvent.obtain(1, 1, MotionEvent.ACTION_DOWN, 1, 1, 0);
        mClassifier.onTouchEvent(motionEvent);
@@ -60,6 +63,7 @@ public class PointerCountClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testFail_multiPointer() {
        MotionEvent.PointerProperties[] pointerProperties =
                MotionEvent.PointerProperties.createArray(2);
+7 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -64,6 +65,7 @@ public class ProximityClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testPass_uncovered() {
        touchDown();
        touchUp(10);
@@ -71,6 +73,7 @@ public class ProximityClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testPass_mostlyUncovered() {
        touchDown();
        mClassifier.onSensorEvent(createSensorEvent(true, 1));
@@ -80,6 +83,7 @@ public class ProximityClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testPass_quickSettings() {
        touchDown();
        when(mDataProvider.getInteractionType()).thenReturn(QUICK_SETTINGS);
@@ -90,6 +94,7 @@ public class ProximityClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testFail_covered() {
        touchDown();
        mClassifier.onSensorEvent(createSensorEvent(true, 1));
@@ -99,6 +104,7 @@ public class ProximityClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testFail_mostlyCovered() {
        touchDown();
        mClassifier.onSensorEvent(createSensorEvent(true, 1));
@@ -110,6 +116,7 @@ public class ProximityClassifierTest extends SysuiTestCase {
    }

    @Test
    @Ignore("Memory Leak?")
    public void testPass_coveredWithLongSwipe() {
        touchDown();
        mClassifier.onSensorEvent(createSensorEvent(true, 1));
Loading