Skip to content

Commit

Permalink
Merge master
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 committed Dec 6, 2023
2 parents 39ce4c4 + d3906c0 commit 34881ce
Show file tree
Hide file tree
Showing 40 changed files with 129 additions and 214 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/assembleFlavors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3
- name: set up JDK 17
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v3
with:
distribution: "temurin"
java-version: 17
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3
- name: Set up JDK 17
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v3
with:
distribution: "temurin"
java-version: 17
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/detectWrongSettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3
- name: Set up JDK 17
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v3
with:
distribution: "temurin"
java-version: 17
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3
if: ${{ steps.check-secrets.outputs.ok == 'true' }}
- name: set up JDK 17
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v3
if: ${{ steps.check-secrets.outputs.ok == 'true' }}
with:
distribution: "temurin"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/screenShotTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
~/.android/adb*
key: avd-${{ matrix.api-level }}

- uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3
- uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v3
with:
distribution: "temurin"
java-version: 17
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK 17
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
with:
distribution: "temurin"
java-version: 17
Expand Down
4 changes: 4 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ android {
}
}

buildFeatures {
buildConfig = true
}

productFlavors {
// used for f-droid
generic {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
import javax.inject.Inject;

import androidx.core.app.NotificationCompat;
import androidx.core.app.ServiceCompat;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import dagger.android.AndroidInjection;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
Expand Down Expand Up @@ -203,7 +204,11 @@ public int onStartCommand(Intent intent, int flags, int startId) {
Log_OC.d(TAG, "Starting command with id " + startId);

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
startForeground(FOREGROUND_SERVICE_ID, mNotification, ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC);
ServiceCompat.startForeground(
this,
FOREGROUND_SERVICE_ID,
mNotification,
ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC);
} else {
startForeground(FOREGROUND_SERVICE_ID, mNotification);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,18 @@ private void checkStoragePath() {
public void onConfigurationChanged(@NonNull Configuration newConfig) {
super.onConfigurationChanged(newConfig);

StoragePermissionDialogFragment fragment = (StoragePermissionDialogFragment) getSupportFragmentManager().findFragmentByTag(PERMISSION_CHOICE_DIALOG_TAG);
if (fragment != null) {
Dialog dialog = fragment.getDialog();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
StoragePermissionDialogFragment fragment =
(StoragePermissionDialogFragment) getSupportFragmentManager()
.findFragmentByTag(PERMISSION_CHOICE_DIALOG_TAG);
if (fragment != null) {
Dialog dialog = fragment.getDialog();

if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
getSupportFragmentManager().beginTransaction().remove(fragment).commitNowAllowingStateLoss();
PermissionUtil.requestExternalStoragePermission(this, viewThemeUtils);
if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
getSupportFragmentManager().beginTransaction().remove(fragment).commitNowAllowingStateLoss();
PermissionUtil.requestExternalStoragePermission(this, viewThemeUtils);
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,9 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.owncloud.android.ui.events;
package com.owncloud.android.ui.events

/**
* Event that notifies that an account was removed
*/

public class AccountRemovedEvent {

}
class AccountRemovedEvent
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
* 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 <http://www.gnu.org/licenses/>.
* along with this program. If not, see <http:></http:>//www.gnu.org/licenses/>.
*/
package com.owncloud.android.ui.events;
package com.owncloud.android.ui.events

/**
* Currently a dummy event to restore grid view, sort, and search
*/
public class ChangeMenuEvent {
}
class ChangeMenuEvent
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.owncloud.android.ui.events;
package com.owncloud.android.ui.events

/**
* Event for refreshing comment state of a file
*/
public class CommentsEvent {
public final String remoteId;

public CommentsEvent(String remoteId) {
this.remoteId = remoteId;
}
}
class CommentsEvent(val remoteId: String)
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
* 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 <http://www.gnu.org/licenses/>.
* along with this program. If not, see <http:></http:>//www.gnu.org/licenses/>.
*/
package com.owncloud.android.ui.events;
package com.owncloud.android.ui.events

/**
* Dummy drawer event
*/
public class DummyDrawerEvent {
}
class DummyDrawerEvent

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Nextcloud Android client application
*
* @author Tobias Kaminsky
* Copyright (C) 2017 Tobias Kaminsky
*
* 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 <http://www.gnu.org/licenses/>.
*/
package com.owncloud.android.ui.events

/**
* Event for set folder as encrypted/decrypted
*/
class EncryptionEvent(
val localId: Long,
val remoteId: String,
val remotePath: String,
val shouldBeEncrypted: Boolean
)

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@
* 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 <http://www.gnu.org/licenses/>.
* along with this program. If not, see <http:></http:>//www.gnu.org/licenses/>.
*/
package com.owncloud.android.ui.events;
package com.owncloud.android.ui.events

public class VCardToggleEvent {
public boolean showRestoreButton;

public VCardToggleEvent(boolean showRestore) {
this.showRestoreButton = showRestore;
}
}
/**
* Event for making favoriting work
*/
class FavoriteEvent(val remotePath: String, val shouldFavorite: Boolean)

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.owncloud.android.ui.events;
package com.owncloud.android.ui.events

/**
* Event to send push token where it belongs
*/
public class TokenPushEvent {
}
class TokenPushEvent
Loading

0 comments on commit 34881ce

Please sign in to comment.