Skip to content

Commit

Permalink
Merge pull request #1940 from oasisprotocol/mz/secureFlag
Browse files Browse the repository at this point in the history
Prevent app content from being captured in screenshots or apps view
  • Loading branch information
buberdds committed May 16, 2024
2 parents 2ab4f84 + 925e36d commit 83b58ff
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions .changelog/1940.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Prevent app content from being captured in screenshots or apps view
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);
}
}

0 comments on commit 83b58ff

Please sign in to comment.