Skip to content

Commit

Permalink
Merge pull request #13457 from nextcloud/backport/13258/stable-3.29
Browse files Browse the repository at this point in the history
[stable-3.29] Gplay: do not allow to download APK/AAB
  • Loading branch information
alperozturk96 authored Aug 26, 2024
2 parents 738f0dd + 93a38f4 commit 7feb8f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ public void setE2eCounter(@Nullable Long e2eCounter) {
}

public boolean isAPKorAAB() {
if (BuildConfig.FLAVOR.equals("gplay")) {
if ("gplay".equals(BuildConfig.FLAVOR)) {
return getFileName().endsWith(".apk") || getFileName().endsWith(".aab");
} else {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,12 @@ private void folderOnItemClick(OCFile file, int position) {
}

private void fileOnItemClick(OCFile file) {
if (isAPKorAAB(Set.of(file))) {
Snackbar.make(getRecyclerView(),
R.string.gplay_restriction,
Snackbar.LENGTH_LONG).show();
return;
}
if (PreviewImageFragment.canBePreviewed(file)) {
// preview image - it handles the download, if needed
if (searchFragment) {
Expand Down

0 comments on commit 7feb8f5

Please sign in to comment.