+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program. If not, see .
+ */
+package com.nextcloud.client.di;
+
+import com.owncloud.android.ui.activity.HuaweiCommunityActivity;
+
+import dagger.Module;
+import dagger.android.ContributesAndroidInjector;
+
+@Module
+abstract class VariantComponentsModule {
+ @ContributesAndroidInjector
+ abstract HuaweiCommunityActivity participateActivity();
+}
diff --git a/src/huawei/java/com/owncloud/android/ui.activity/HuaweiCommunityActivity.kt b/src/huawei/java/com/owncloud/android/ui.activity/HuaweiCommunityActivity.kt
new file mode 100644
index 0000000000..46ce50b819
--- /dev/null
+++ b/src/huawei/java/com/owncloud/android/ui.activity/HuaweiCommunityActivity.kt
@@ -0,0 +1,32 @@
+/*
+ * Nextcloud Android client application
+ *
+ * @author Tobias Kaminsky
+ * Copyright (C) 2021 Nextcloud
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program. If not, see .
+ */
+package com.owncloud.android.ui.activity
+
+import android.view.View
+
+/**
+ * Activity providing information about ways to participate in the app's development.
+ */
+class HuaweiCommunityActivity : CommunityActivity() {
+ override fun setupContent() {
+ super.setupContent()
+ binding.communityReleaseCandidatePlaystore.visibility = View.GONE
+ }
+}
diff --git a/src/huawei/java/com/owncloud/android/utils/PushUtils.java b/src/huawei/java/com/owncloud/android/utils/PushUtils.java
new file mode 100644
index 0000000000..2ae3f798e8
--- /dev/null
+++ b/src/huawei/java/com/owncloud/android/utils/PushUtils.java
@@ -0,0 +1,58 @@
+/**
+ * Nextcloud Android client application
+ *
+ * @author Mario Danic
+ * @author Chris Narkiewicz Copyright (C) 2017 Mario Danic Copyright (C) 2019 Chris Narkiewicz
+ *
+ * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
+ * Public License as published by the Free Software Foundation, either version 3 of the License, or at your option) any
+ * later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Affero General Public License along with this program. If not, see
+ * .
+ */
+
+package com.owncloud.android.utils;
+
+import android.content.Context;
+
+import com.nextcloud.client.account.UserAccountManager;
+import com.nextcloud.client.preferences.AppPreferencesImpl;
+import com.owncloud.android.MainApp;
+import com.owncloud.android.datamodel.SignatureVerification;
+
+import java.security.Key;
+
+public final class PushUtils {
+ public static final String KEY_PUSH = "push";
+
+ private PushUtils() {
+ }
+
+ public static void pushRegistrationToServer(final UserAccountManager accountManager, final String pushToken) {
+ // do nothing
+ }
+
+ public static void reinitKeys(UserAccountManager accountManager) {
+ Context context = MainApp.getAppContext();
+ AppPreferencesImpl.fromContext(context).setKeysReInitEnabled();
+ }
+
+ public static Key readKeyFromFile(boolean readPublicKey) {
+ return null;
+ }
+
+ public static SignatureVerification verifySignature(
+ final Context context,
+ final UserAccountManager accountManager,
+ final byte[] signatureBytes,
+ final byte[] subjectBytes
+ ) {
+ return null;
+ }
+
+}
diff --git a/src/huawei/java/com/owncloud/android/utils/SecurityUtils.java b/src/huawei/java/com/owncloud/android/utils/SecurityUtils.java
new file mode 100644
index 0000000000..f3d6ac234b
--- /dev/null
+++ b/src/huawei/java/com/owncloud/android/utils/SecurityUtils.java
@@ -0,0 +1,20 @@
+/**
+ * Nextcloud Android client application
+ *
+ * @author Mario Danic Copyright (C) 2018 Mario Danic
+ *
+ * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
+ * Public License as published by the Free Software Foundation, either version 3 of the License, or at your option) any
+ * later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Affero General Public License along with this program. If not, see
+ * .
+ */
+package com.owncloud.android.utils;
+
+public class SecurityUtils {
+}
diff --git a/src/huawei/res/values/bools.xml b/src/huawei/res/values/bools.xml
new file mode 100644
index 0000000000..ace4d8552d
--- /dev/null
+++ b/src/huawei/res/values/bools.xml
@@ -0,0 +1,23 @@
+
+
+ false
+
diff --git a/src/main/java/com/owncloud/android/ui/activity/CommunityActivity.java b/src/main/java/com/owncloud/android/ui/activity/CommunityActivity.java
index 11ad51cf26..ba6cdb6898 100644
--- a/src/main/java/com/owncloud/android/ui/activity/CommunityActivity.java
+++ b/src/main/java/com/owncloud/android/ui/activity/CommunityActivity.java
@@ -39,7 +39,7 @@ import com.owncloud.android.utils.theme.ThemeColorUtils;
*/
public class CommunityActivity extends DrawerActivity {
- private CommunityLayoutBinding binding;
+ protected CommunityLayoutBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -59,7 +59,7 @@ public class CommunityActivity extends DrawerActivity {
setupContent();
}
- private void setupContent() {
+ protected void setupContent() {
binding.communityReleaseCandidateText.setMovementMethod(LinkMovementMethod.getInstance());
TextView contributeIrcView = binding.communityContributeIrcText;
diff --git a/src/main/java/com/owncloud/android/ui/activity/NotificationsActivity.java b/src/main/java/com/owncloud/android/ui/activity/NotificationsActivity.java
index 4e4dcfcf6f..c2f0290cee 100644
--- a/src/main/java/com/owncloud/android/ui/activity/NotificationsActivity.java
+++ b/src/main/java/com/owncloud/android/ui/activity/NotificationsActivity.java
@@ -132,6 +132,9 @@ public class NotificationsActivity extends DrawerActivity implements Notificatio
}
private void setupPushWarning() {
+ if (!getResources().getBoolean(R.bool.show_push_warning)) {
+ return;
+ }
if (snackbar != null) {
if (!snackbar.isShown()) {
snackbar.show();
diff --git a/src/main/res/values/bools.xml b/src/main/res/values/bools.xml
index 1e15f53708..2b7e733acf 100644
--- a/src/main/res/values/bools.xml
+++ b/src/main/res/values/bools.xml
@@ -19,4 +19,5 @@
false
+ true