探索抖音禁止录屏
探索抖音禁止录屏
# FLAG_SECURE
在播放付费短剧内容是,执行 adb shell dumpsys window windows | grep -A 30 -E 'Window #|mCurrentFocus' 发现当前 window 设置了 flag SECURE. 其定义在 /WindowManager.LayoutParams (opens new window) 中, 此 flag: Added in API level 1.
/** Window flag: treat the content of the window as secure, preventing
* it from appearing in screenshots or from being viewed on non-secure
* displays.
*
* <p>See {@link android.view.Display#FLAG_SECURE} for more details about
* secure surfaces and secure displays.
*/
public static final int FLAG_SECURE = 0x00002000;
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
--
Window #13 Window{8c106d1 u0 com.ss.android.ugc.aweme/com.ss.android.ugc.aweme.playlet.videodetail.PlayletVideoPlayActivity}:
mDisplayId=0 rootTaskId=11350 mSession=Session{7a1d86 21483:u0a10517} mClient=android.os.BinderProxy@cea31f8
mOwnerUid=10517 showForAllUsers=false package=com.ss.android.ugc.aweme appop=NONE
mAttrs={(0,0)(fillxfill) sim={adjust=nothing forwardNavigation} ty=BASE_APPLICATION hwFlags=#0 isEmuiStyle=0 statusBarColor=#0 navigationBarColor=#ff000000 wanim=0x10302fe
fl=KEEP_SCREEN_ON LAYOUT_IN_SCREEN SECURE LAYOUT_INSET_DECOR SPLIT_TOUCH HARDWARE_ACCELERATED DRAWS_SYSTEM_BAR_BACKGROUNDS
pfl=FIT_INSETS_CONTROLLED
vsysui=LAYOUT_STABLE LAYOUT_FULLSCREEN
fitSides=}
Requested w=720 h=1600 mLayoutSeq=25844
mBaseLayer=21000 mSubLayer=0 mToken=ActivityRecord{70e4774 u0 com.ss.android.ugc.aweme/.playlet.videodetail.PlayletVideoPlayActivity t11350}
mActivityRecord=ActivityRecord{70e4774 u0 com.ss.android.ugc.aweme/.playlet.videodetail.PlayletVideoPlayActivity t11350}
mAppDied=false drawnStateEvaluated=true mightAffectAllDrawn=true
mViewVisibility=0x0 mHaveFrame=true mObscured=false
mSeq=0 mSystemUiVisibility=0x500
mGivenContentInsets=[0,0][0,0] mGivenVisibleInsets=[0,0][0,0]
mFullConfiguration={1.15 ?mcc?mnc [zh_CN_#Hans] ldltr sw360dp w360dp h776dp 320dpi nrml long port finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 720, 1600) mAppBounds=Rect(0, 48 - 720, 1600) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} suim:1 fontWeightScale:100changeUserFlag:0 s.1 fontWeightAdjustment=0}
mLastReportedConfiguration={1.15 ?mcc?mnc [zh_CN_#Hans] ldltr sw360dp w360dp h776dp 320dpi nrml long port finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 720, 1600) mAppBounds=Rect(0, 48 - 720, 1600) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} suim:1 fontWeightScale:100changeUserFlag:0 s.1 fontWeightAdjustment=0}
mHasSurface=true isReadyForDisplay()=true mWindowRemovalAllowed=false
Frames: containing=[0,0][720,1600] parent=[0,0][720,1600]
display=[0,0][720,1600]
content=[0,48][720,1600] visible=[0,48][720,1600]
decor=[0,0][720,1600]
mFrame=[0,0][720,1600] last=[0,0][720,1600]
cutout=DisplayCutout{insets=Rect(0, 48 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(310, 0 - 410, 48), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}} last=DisplayCutout{insets=Rect(0, 48 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(310, 0 - 410, 48), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}}
Cur insets: content=[0,48][0,0] visible=[0,48][0,0] stable=[0,48][0,0] Lst insets: content=[0,48][0,0] visible=[0,48][0,0] stable=[0,48][0,0]
surface=[0,0][0,0]
WindowStateAnimator{d0be7e6 com.ss.android.ugc.aweme/com.ss.android.ugc.aweme.playlet.videodetail.PlayletVideoPlayActivity}:
mSurface=Surface(name=com.ss.android.ugc.aweme/com.ss.android.ugc.aweme.playlet.videodetail.PlayletVideoPlayActivity)/@0x69fceef
Surface: shown=true layer=0 alpha=1.0 rect=(0.0,0.0) 720 x 1600 transform=(1.0, 0.0, 1.0, 0.0)
mDrawState=HAS_DRAWN mLastHidden=false
mEnterAnimationPending=false mSystemDecorRect=[0,0][720,1600] mLastClipRect=[0,0][720,1600]
--
Window #14 Window{13235d u0 com.ss.android.ugc.aweme/com.ss.android.ugc.aweme.detail.ui.DetailActivity}:
mDisplayId=0 rootTaskId=11350 mSession=Session{7a1d86 21483:u0a10517} mClient=android.os.BinderProxy@9aff934
mOwnerUid=10517 showForAllUsers=false package=com.ss.android.ugc.aweme appop=NONE
mAttrs={(0,0)(fillxfill) sim={adjust=nothing forwardNavigation} ty=BASE_APPLICATION hwFlags=#0 isEmuiStyle=0 statusBarColor=#0 navigationBarColor=#ff000000 wanim=0x10302fe
fl=KEEP_SCREEN_ON LAYOUT_IN_SCREEN SECURE LAYOUT_INSET_DECOR SPLIT_TOUCH HARDWARE_ACCELERATED DRAWS_SYSTEM_BAR_BACKGROUNDS
pfl=FIT_INSETS_CONTROLLED
vsysui=LAYOUT_STABLE LAYOUT_FULLSCREEN
fitSides=}
Requested w=720 h=1600 mLayoutSeq=25834
mBaseLayer=21000 mSubLayer=0 mToken=ActivityRecord{4894621 u0 com.ss.android.ugc.aweme/.detail.ui.DetailActivity t11350}
mActivityRecord=ActivityRecord{4894621 u0 com.ss.android.ugc.aweme/.detail.ui.DetailActivity t11350}
mAppDied=false drawnStateEvaluated=true mightAffectAllDrawn=true
mViewVisibility=0x8 mHaveFrame=true mObscured=true
mSeq=0 mSystemUiVisibility=0x500
mGivenContentInsets=[0,0][0,0] mGivenVisibleInsets=[0,0][0,0]
mFullConfiguration={1.15 ?mcc?mnc [zh_CN_#Hans] ldltr sw360dp w360dp h776dp 320dpi nrml long port finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 720, 1600) mAppBounds=Rect(0, 48 - 720, 1600) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} suim:1 fontWeightScale:100changeUserFlag:0 s.1 fontWeightAdjustment=0}
mLastReportedConfiguration={1.15 ?mcc?mnc [zh_CN_#Hans] ldltr sw360dp w360dp h776dp 320dpi nrml long port finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 720, 1600) mAppBounds=Rect(0, 48 - 720, 1600) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} suim:1 fontWeightScale:100changeUserFlag:0 s.1 fontWeightAdjustment=0}
mHasSurface=false isReadyForDisplay()=false mWindowRemovalAllowed=false
Frames: containing=[0,0][720,1600] parent=[0,0][720,1600]
display=[0,0][720,1600]
content=[0,48][720,1600] visible=[0,48][720,1600]
decor=[0,0][720,1600]
mFrame=[0,0][720,1600] last=[0,0][720,1600]
cutout=DisplayCutout{insets=Rect(0, 48 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(310, 0 - 410, 48), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}} last=DisplayCutout{insets=Rect(0, 48 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(310, 0 - 410, 48), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]}}
Cur insets: content=[0,48][0,0] visible=[0,48][0,0] stable=[0,48][0,0] Lst insets: content=[0,48][0,0] visible=[0,48][0,0] stable=[0,48][0,0]
surface=[0,0][0,0]
WindowStateAnimator{8d3acf7 com.ss.android.ugc.aweme/com.ss.android.ugc.aweme.detail.ui.DetailActivity}:
mDrawState=NO_SURFACE mLastHidden=true
mEnterAnimationPending=false mSystemDecorRect=[0,0][720,1600] mLastClipRect=[0,0][720,1600]
mTmpSize=[0,0][720,1600]
mForceSeamlesslyRotate=false seamlesslyRotate: pending=null finishedFrameNumber=0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
上次更新: 2025/10/08, 16:24:59