Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update currentActivity variable to final #53

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ if(!__DEV__) RNScreenshotPrevent.enableSecureView();
* creates a hidden secureTextField which prevents Application UI capture on screenshots
* and uses imgUri as the source of the background image (can be both https://, file:///)
*/
if(!__DEV__) RNPreventScreenshot.enableSecureView(imgUri);
if(!__DEV__) RNScreenshotPrevent.enableSecureView(imgUri);

/* (IOS) disableSecureView for IOS13+
* remove a hidden secureTextField which prevents Application UI capture on screenshots
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private void createOverlay(Activity activity, String imagePath) {

@Override
public void onHostResume() {
Activity currentActivity = this.reactContext.getCurrentActivity();
final Activity currentActivity = this.reactContext.getCurrentActivity();
if (currentActivity != null && overlayLayout != null) {
currentActivity.runOnUiThread(new Runnable() {
@Override
Expand All @@ -142,7 +142,7 @@ public void run() {

@Override
public void onHostPause() {
Activity currentActivity = this.reactContext.getCurrentActivity();
final Activity currentActivity = this.reactContext.getCurrentActivity();
if (currentActivity != null && overlayLayout != null) {
currentActivity.runOnUiThread(new Runnable() {
@Override
Expand Down