SF: compile libsurfaceflingerflags_test as test

Bug: 304338314
Test: presubmit
Change-Id: I63daf9be78af684db11f3c6fc6207c69bb17a865
diff --git a/services/surfaceflinger/tests/unittests/Android.bp b/services/surfaceflinger/tests/unittests/Android.bp
index 91910c7..ec21eaf 100644
--- a/services/surfaceflinger/tests/unittests/Android.bp
+++ b/services/surfaceflinger/tests/unittests/Android.bp
@@ -45,8 +45,7 @@
 cc_aconfig_library {
     name: "libsurfaceflingerflags_test",
     aconfig_declarations: "surfaceflinger_flags",
-    // TODO(b/304338314): uncomment the below line once the bug is fixed
-    // test: true,
+    test: true,
 }
 
 cc_test {
diff --git a/services/surfaceflinger/tests/unittests/VSyncDispatchTimerQueueTest.cpp b/services/surfaceflinger/tests/unittests/VSyncDispatchTimerQueueTest.cpp
index a1eda94..b8fdce1 100644
--- a/services/surfaceflinger/tests/unittests/VSyncDispatchTimerQueueTest.cpp
+++ b/services/surfaceflinger/tests/unittests/VSyncDispatchTimerQueueTest.cpp
@@ -1065,10 +1065,8 @@
     EXPECT_THAT(cb.mReadyTime[0], Eq(2000));
 }
 
-// TODO(b/304338314): Set the flag value instead of skipping the test
 TEST_F(VSyncDispatchTimerQueueTest, skipAVsyc) {
-    // SET_FLAG_FOR_TEST(flags::dont_skip_on_early, false);
-    if (flags::dont_skip_on_early()) GTEST_SKIP();
+    SET_FLAG_FOR_TEST(flags::dont_skip_on_early, false);
 
     EXPECT_CALL(mMockClock, alarmAt(_, 500));
     CountingCallback cb(mDispatch);
@@ -1088,10 +1086,8 @@
     ASSERT_THAT(cb.mCalls.size(), Eq(1));
 }
 
-// TODO(b/304338314): Set the flag value instead of skipping the test
 TEST_F(VSyncDispatchTimerQueueTest, dontskipAVsyc) {
-    // SET_FLAG_FOR_TEST(flags::dont_skip_on_early, true);
-    if (!flags::dont_skip_on_early()) GTEST_SKIP();
+    SET_FLAG_FOR_TEST(flags::dont_skip_on_early, true);
 
     EXPECT_CALL(mMockClock, alarmAt(_, 500));
     CountingCallback cb(mDispatch);