[TIMOB-12925] Android: Support FLAG_SECURE window flag
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-03-04T23:22:54.000+0000 |
Affected Version/s | Release 3.0.0, Release 3.0.2 |
Fix Version/s | 2014 Sprint 05, 2014 Sprint 05 API, Release 3.3.0 |
Components | Android |
Labels | SupportTeam, module_window, qe-closed-3.3.0, qe-testadded |
Reporter | Daniel Sefton |
Assignee | Biju pm |
Created | 2013-03-01T20:40:28.000+0000 |
Updated | 2017-12-20T17:13:53.000+0000 |
Description
Currently Titanium doesn't support the following:
*Native example*
getWindow().setFlags(LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE);
From: http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html
{quote}Treat the content of the window as secure, preventing it from appearing in screenshots or from being viewed on non-secure displays.{quote}
PR: https://github.com/appcelerator/titanium_mobile/pull/5360
Test case
1. Run code 2. Attempt to take a SS on the red window. You shouldn't be able to.
Verified the issue with environment: Appc-Studio:3.3.0.201404211130 sdk:3.3.0.v20140423155715 acs:1.0.14 alloy:1.4.0-dev npm:1.3.2 titanium:3.3.0-dev titanium-code-processor:1.1.1-beta1 xCODE:5.1.1 Device:Iphone5(7.1),Nexus7(v4.4.2) Window flagSecure property working fine. Was not able to take screen Shot when window assigned with flagSecure property. Hence closing the issue.
AMAZING. This should be documented a bit better on the official documentation on how to do it for either iOS or Android. I was trying to fiddle with activity events pause/resume but this is much better. Any equivalent for iOS or Ti.App events are still the best?