Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit 813e744

Browse files
eavsievichsamtstern
authored andcommitted
Fix invalid cast in LowApiPermissionsHelper (#201)
1 parent ff31e33 commit 813e744

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

easypermissions/src/main/java/pub/devrel/easypermissions/helper/LowApiPermissionsHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public Context getContext() {
4141
} else if (getHost() instanceof Fragment) {
4242
return ((Fragment) getHost()).getContext();
4343
} else if (getHost() instanceof android.app.Fragment) {
44-
return ((Fragment) getHost()).getContext();
44+
return ((android.app.Fragment) getHost()).getActivity();
4545
} else {
4646
throw new IllegalStateException("Unknown host: " + getHost());
4747
}

0 commit comments

Comments
 (0)