Skip to content

Commit

Permalink
Merge pull request #14398 from nextcloud/backport/14396/stable-3.30
Browse files Browse the repository at this point in the history
[stable-3.30] GPLAY: do not show our custom uploader, due to lack of permission
  • Loading branch information
tobiasKaminsky authored Jan 14, 2025
2 parents 9075b63 + 99da248 commit 3f3a90f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/src/main/java/com/nextcloud/utils/BuildHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
*/
package com.nextcloud.utils

import com.owncloud.android.BuildConfig

object BuildHelper {
const val GPLAY: String = "gplay"

fun isFlavourGPlay(): Boolean = GPLAY == BuildConfig.FLAVOR
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.nextcloud.client.device.DeviceInfo;
import com.nextcloud.client.di.Injectable;
import com.nextcloud.client.documentscan.AppScanOptionalFeature;
import com.nextcloud.utils.BuildHelper;
import com.nextcloud.utils.EditorUtils;
import com.owncloud.android.R;
import com.owncloud.android.databinding.FileListActionsBottomSheetCreatorBinding;
Expand Down Expand Up @@ -156,6 +157,11 @@ protected void onCreate(Bundle savedInstanceState) {
binding.menuCreateRichWorkspaceDivider.setVisibility(View.GONE);
}

if (BuildHelper.INSTANCE.isFlavourGPlay()) {
binding.menuUploadFiles.setVisibility(View.GONE);
binding.uploadContentFromOtherApps.setText(getContext().getString(R.string.upload_files));
}

setupClickListener();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
app:tint="@color/primary" />

<TextView
android:id="@+id/upload_content_from_other_apps"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
Expand Down

0 comments on commit 3f3a90f

Please sign in to comment.