1 package com.android.app.viewcapture
2 
3 import android.media.permission.SafeCloseable
4 import android.os.HandlerThread
5 import android.view.View
6 import android.view.Window
7 
8 /**
9  * We don't want to enable the ViewCapture for release builds, since it currently only serves
10  * 1p apps, and has memory / cpu load that we don't want to risk negatively impacting release builds
11  */
12 class NoOpViewCapture: ViewCapture(0, 0,
13         createAndStartNewLooperExecutor("NoOpViewCapture", HandlerThread.MIN_PRIORITY)) {
startCapturenull14     override fun startCapture(view: View, name: String): SafeCloseable {
15         return SafeCloseable { }
16     }
17 
startCapturenull18     override fun startCapture(window: Window): SafeCloseable {
19         return SafeCloseable { }
20     }
21 }