Skip to content

Commit

Permalink
GPLAY: do not show our custom uploader, due to lack of permission
Browse files Browse the repository at this point in the history
Signed-off-by: tobiasKaminsky <[email protected]>
  • Loading branch information
tobiasKaminsky authored and backportbot[bot] committed Jan 14, 2025
1 parent 9075b63 commit bc45e99
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
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 bc45e99

Please sign in to comment.