Loading packages/SystemUI/src/com/android/systemui/flags/Flags.kt +0 −3 Original line number Diff line number Diff line Loading @@ -483,9 +483,6 @@ object Flags { // TODO(b/264916608): Tracking Bug @JvmField val SCREENSHOT_METADATA = unreleasedFlag("screenshot_metadata") // TODO(b/266955521): Tracking bug @JvmField val SCREENSHOT_DETECTION = releasedFlag("screenshot_detection") // TODO(b/251205791): Tracking Bug @JvmField val SCREENSHOT_APP_CLIPS = releasedFlag("screenshot_app_clips") Loading packages/SystemUI/src/com/android/systemui/screenshot/MessageContainerController.kt +2 −7 Original line number Diff line number Diff line Loading @@ -11,8 +11,6 @@ import android.view.ViewTreeObserver import android.view.animation.AccelerateDecelerateInterpolator import androidx.constraintlayout.widget.Guideline import com.android.systemui.res.R import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags import javax.inject.Inject /** Loading @@ -23,7 +21,6 @@ class MessageContainerController constructor( private val workProfileMessageController: WorkProfileMessageController, private val screenshotDetectionController: ScreenshotDetectionController, private val featureFlags: FeatureFlags, ) { private lateinit var container: ViewGroup private lateinit var guideline: Guideline Loading Loading @@ -63,10 +60,8 @@ constructor( fun onScreenshotTaken(screenshot: ScreenshotData) { val workProfileData = workProfileMessageController.onScreenshotTaken(screenshot.userHandle) var notifiedApps: List<CharSequence> = listOf() if (featureFlags.isEnabled(Flags.SCREENSHOT_DETECTION)) { notifiedApps = screenshotDetectionController.maybeNotifyOfScreenshot(screenshot) } var notifiedApps: List<CharSequence> = screenshotDetectionController.maybeNotifyOfScreenshot(screenshot) // If work profile first run needs to show, bias towards that, otherwise show screenshot // detection notification if needed. Loading packages/SystemUI/tests/src/com/android/systemui/screenshot/MessageContainerControllerTest.kt +0 −6 Original line number Diff line number Diff line Loading @@ -10,8 +10,6 @@ import androidx.constraintlayout.widget.ConstraintLayout import androidx.constraintlayout.widget.Guideline import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.flags.FakeFeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.util.mockito.any import com.android.systemui.util.mockito.eq import com.android.systemui.util.mockito.whenever Loading Loading @@ -39,7 +37,6 @@ class MessageContainerControllerTest : SysuiTestCase() { lateinit var detectionNoticeView: ViewGroup lateinit var container: FrameLayout var featureFlags = FakeFeatureFlags() lateinit var screenshotView: ViewGroup val userHandle = UserHandle.of(5) Loading @@ -55,7 +52,6 @@ class MessageContainerControllerTest : SysuiTestCase() { MessageContainerController( workProfileMessageController, screenshotDetectionController, featureFlags ) screenshotView = ConstraintLayout(mContext) workProfileData = WorkProfileMessageController.WorkProfileFirstRunData(appName, icon) Loading Loading @@ -105,8 +101,6 @@ class MessageContainerControllerTest : SysuiTestCase() { @Test fun testOnScreenshotTakenScreenshotData_nothingToShow() { featureFlags.set(Flags.SCREENSHOT_DETECTION, true) messageContainer.onScreenshotTaken(screenshotData) verify(workProfileMessageController, never()).populateView(any(), any(), any()) Loading Loading
packages/SystemUI/src/com/android/systemui/flags/Flags.kt +0 −3 Original line number Diff line number Diff line Loading @@ -483,9 +483,6 @@ object Flags { // TODO(b/264916608): Tracking Bug @JvmField val SCREENSHOT_METADATA = unreleasedFlag("screenshot_metadata") // TODO(b/266955521): Tracking bug @JvmField val SCREENSHOT_DETECTION = releasedFlag("screenshot_detection") // TODO(b/251205791): Tracking Bug @JvmField val SCREENSHOT_APP_CLIPS = releasedFlag("screenshot_app_clips") Loading
packages/SystemUI/src/com/android/systemui/screenshot/MessageContainerController.kt +2 −7 Original line number Diff line number Diff line Loading @@ -11,8 +11,6 @@ import android.view.ViewTreeObserver import android.view.animation.AccelerateDecelerateInterpolator import androidx.constraintlayout.widget.Guideline import com.android.systemui.res.R import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags import javax.inject.Inject /** Loading @@ -23,7 +21,6 @@ class MessageContainerController constructor( private val workProfileMessageController: WorkProfileMessageController, private val screenshotDetectionController: ScreenshotDetectionController, private val featureFlags: FeatureFlags, ) { private lateinit var container: ViewGroup private lateinit var guideline: Guideline Loading Loading @@ -63,10 +60,8 @@ constructor( fun onScreenshotTaken(screenshot: ScreenshotData) { val workProfileData = workProfileMessageController.onScreenshotTaken(screenshot.userHandle) var notifiedApps: List<CharSequence> = listOf() if (featureFlags.isEnabled(Flags.SCREENSHOT_DETECTION)) { notifiedApps = screenshotDetectionController.maybeNotifyOfScreenshot(screenshot) } var notifiedApps: List<CharSequence> = screenshotDetectionController.maybeNotifyOfScreenshot(screenshot) // If work profile first run needs to show, bias towards that, otherwise show screenshot // detection notification if needed. Loading
packages/SystemUI/tests/src/com/android/systemui/screenshot/MessageContainerControllerTest.kt +0 −6 Original line number Diff line number Diff line Loading @@ -10,8 +10,6 @@ import androidx.constraintlayout.widget.ConstraintLayout import androidx.constraintlayout.widget.Guideline import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.flags.FakeFeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.util.mockito.any import com.android.systemui.util.mockito.eq import com.android.systemui.util.mockito.whenever Loading Loading @@ -39,7 +37,6 @@ class MessageContainerControllerTest : SysuiTestCase() { lateinit var detectionNoticeView: ViewGroup lateinit var container: FrameLayout var featureFlags = FakeFeatureFlags() lateinit var screenshotView: ViewGroup val userHandle = UserHandle.of(5) Loading @@ -55,7 +52,6 @@ class MessageContainerControllerTest : SysuiTestCase() { MessageContainerController( workProfileMessageController, screenshotDetectionController, featureFlags ) screenshotView = ConstraintLayout(mContext) workProfileData = WorkProfileMessageController.WorkProfileFirstRunData(appName, icon) Loading Loading @@ -105,8 +101,6 @@ class MessageContainerControllerTest : SysuiTestCase() { @Test fun testOnScreenshotTakenScreenshotData_nothingToShow() { featureFlags.set(Flags.SCREENSHOT_DETECTION, true) messageContainer.onScreenshotTaken(screenshotData) verify(workProfileMessageController, never()).populateView(any(), any(), any()) Loading