-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1940 from oasisprotocol/mz/secureFlag
Prevent app content from being captured in screenshots or apps view
- Loading branch information
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Prevent app content from being captured in screenshots or apps view |
13 changes: 12 additions & 1 deletion
13
android/app/src/main/java/com/oasisprotocol/wallet/MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
package com.oasisprotocol.wallet; | ||
|
||
import android.os.Bundle; | ||
import android.view.WindowManager; | ||
import com.getcapacitor.BridgeActivity; | ||
|
||
public class MainActivity extends BridgeActivity {} | ||
public class MainActivity extends BridgeActivity { | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
|
||
// Set secure flag to prevent app content from being captured in screenshots or recent apps view | ||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, | ||
WindowManager.LayoutParams.FLAG_SECURE); | ||
} | ||
} |