Merge remote-tracking branch 'origin/master' into dev

This commit is contained in:
Tobias Kaminsky 2024-07-02 03:49:40 +02:00
commit a36b5367d2
30 changed files with 98 additions and 20 deletions

View file

@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check if secrets are available - name: Check if secrets are available
run: echo "::set-output name=ok::${{ secrets.KS_PASS != '' }}" run: echo "ok=${{ secrets.KS_PASS != '' }}" >> "$GITHUB_OUTPUT"
id: check-secrets id: check-secrets
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
if: ${{ steps.check-secrets.outputs.ok == 'true' }} if: ${{ steps.check-secrets.outputs.ok == 'true' }}

View file

@ -25,6 +25,7 @@ import com.nextcloud.client.NominatimClient
import com.nextcloud.client.account.User import com.nextcloud.client.account.User
import com.nextcloud.client.di.Injectable import com.nextcloud.client.di.Injectable
import com.nextcloud.utils.extensions.getParcelableArgument import com.nextcloud.utils.extensions.getParcelableArgument
import com.nextcloud.utils.extensions.logFileSize
import com.owncloud.android.MainApp import com.owncloud.android.MainApp
import com.owncloud.android.R import com.owncloud.android.R
import com.owncloud.android.databinding.PreviewImageDetailsFragmentBinding import com.owncloud.android.databinding.PreviewImageDetailsFragmentBinding
@ -63,6 +64,8 @@ class ImageDetailFragment : Fragment(), Injectable {
@Inject @Inject
lateinit var viewThemeUtils: ViewThemeUtils lateinit var viewThemeUtils: ViewThemeUtils
private val tag = "ImageDetailFragment"
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
binding = PreviewImageDetailsFragmentBinding.inflate(layoutInflater, container, false) binding = PreviewImageDetailsFragmentBinding.inflate(layoutInflater, container, false)
@ -102,6 +105,7 @@ class ImageDetailFragment : Fragment(), Injectable {
override fun onSaveInstanceState(outState: Bundle) { override fun onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState) super.onSaveInstanceState(outState)
file.logFileSize(tag)
outState.putParcelable(ARG_FILE, file) outState.putParcelable(ARG_FILE, file)
outState.putParcelable(ARG_USER, user) outState.putParcelable(ARG_USER, user)
outState.putParcelable(ARG_METADATA, metadata) outState.putParcelable(ARG_METADATA, metadata)

View file

@ -0,0 +1,25 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2024 Alper Ozturk <alper.ozturk@nextcloud.com>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.utils.extensions
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.lib.common.utils.Log_OC
import com.owncloud.android.utils.DisplayUtils
import java.io.File
fun OCFile?.logFileSize(tag: String) {
val size = DisplayUtils.bytesToHumanReadable(this?.fileLength ?: -1)
val rawByte = this?.fileLength ?: -1
Log_OC.d(tag, "onSaveInstanceState: $size, raw byte $rawByte")
}
fun File?.logFileSize(tag: String) {
val size = DisplayUtils.bytesToHumanReadable(this?.length() ?: -1)
val rawByte = this?.length() ?: -1
Log_OC.d(tag, "onSaveInstanceState: $size, raw byte $rawByte")
}

View file

@ -20,6 +20,7 @@ import com.nextcloud.client.jobs.upload.FileUploadWorker
import com.nextcloud.client.jobs.upload.UploadNotificationManager import com.nextcloud.client.jobs.upload.UploadNotificationManager
import com.nextcloud.model.HTTPStatusCodes import com.nextcloud.model.HTTPStatusCodes
import com.nextcloud.utils.extensions.getParcelableArgument import com.nextcloud.utils.extensions.getParcelableArgument
import com.nextcloud.utils.extensions.logFileSize
import com.owncloud.android.R import com.owncloud.android.R
import com.owncloud.android.datamodel.FileDataStorageManager import com.owncloud.android.datamodel.FileDataStorageManager
import com.owncloud.android.datamodel.OCFile import com.owncloud.android.datamodel.OCFile
@ -143,6 +144,7 @@ class ConflictsResolveActivity : FileActivity(), OnConflictDecisionMadeListener
override fun onSaveInstanceState(outState: Bundle) { override fun onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState) super.onSaveInstanceState(outState)
existingFile.logFileSize(TAG)
outState.putLong(EXTRA_CONFLICT_UPLOAD_ID, conflictUploadId) outState.putLong(EXTRA_CONFLICT_UPLOAD_ID, conflictUploadId)
outState.putParcelable(EXTRA_EXISTING_FILE, existingFile) outState.putParcelable(EXTRA_EXISTING_FILE, existingFile)
outState.putInt(EXTRA_LOCAL_BEHAVIOUR, localBehaviour) outState.putInt(EXTRA_LOCAL_BEHAVIOUR, localBehaviour)

View file

@ -39,6 +39,7 @@ import com.nextcloud.client.network.ConnectivityService;
import com.nextcloud.utils.EditorUtils; import com.nextcloud.utils.EditorUtils;
import com.nextcloud.utils.extensions.ActivityExtensionsKt; import com.nextcloud.utils.extensions.ActivityExtensionsKt;
import com.nextcloud.utils.extensions.BundleExtensionsKt; import com.nextcloud.utils.extensions.BundleExtensionsKt;
import com.nextcloud.utils.extensions.FileExtensionsKt;
import com.nextcloud.utils.extensions.IntentExtensionsKt; import com.nextcloud.utils.extensions.IntentExtensionsKt;
import com.owncloud.android.MainApp; import com.owncloud.android.MainApp;
import com.owncloud.android.R; import com.owncloud.android.R;
@ -271,6 +272,7 @@ public abstract class FileActivity extends DrawerActivity
@Override @Override
protected void onSaveInstanceState(@NonNull Bundle outState) { protected void onSaveInstanceState(@NonNull Bundle outState) {
super.onSaveInstanceState(outState); super.onSaveInstanceState(outState);
FileExtensionsKt.logFileSize(mFile, TAG);
outState.putParcelable(FileActivity.EXTRA_FILE, mFile); outState.putParcelable(FileActivity.EXTRA_FILE, mFile);
outState.putBoolean(FileActivity.EXTRA_FROM_NOTIFICATION, mFromNotification); outState.putBoolean(FileActivity.EXTRA_FROM_NOTIFICATION, mFromNotification);
outState.putLong(KEY_WAITING_FOR_OP_ID, mFileOperationsHelper.getOpIdWaitingFor()); outState.putLong(KEY_WAITING_FOR_OP_ID, mFileOperationsHelper.getOpIdWaitingFor());

View file

@ -66,6 +66,7 @@ import com.nextcloud.model.WorkerState;
import com.nextcloud.model.WorkerStateLiveData; import com.nextcloud.model.WorkerStateLiveData;
import com.nextcloud.utils.extensions.ActivityExtensionsKt; import com.nextcloud.utils.extensions.ActivityExtensionsKt;
import com.nextcloud.utils.extensions.BundleExtensionsKt; import com.nextcloud.utils.extensions.BundleExtensionsKt;
import com.nextcloud.utils.extensions.FileExtensionsKt;
import com.nextcloud.utils.extensions.IntentExtensionsKt; import com.nextcloud.utils.extensions.IntentExtensionsKt;
import com.nextcloud.utils.view.FastScrollUtils; import com.nextcloud.utils.view.FastScrollUtils;
import com.owncloud.android.MainApp; import com.owncloud.android.MainApp;
@ -1067,8 +1068,8 @@ public class FileDisplayActivity extends FileActivity
protected void onSaveInstanceState(@NonNull Bundle outState) { protected void onSaveInstanceState(@NonNull Bundle outState) {
// responsibility of restore is preferred in onCreate() before than in // responsibility of restore is preferred in onCreate() before than in
// onRestoreInstanceState when there are Fragments involved // onRestoreInstanceState when there are Fragments involved
Log_OC.v(TAG, "onSaveInstanceState() start");
super.onSaveInstanceState(outState); super.onSaveInstanceState(outState);
FileExtensionsKt.logFileSize(mWaitingToPreview, TAG);
outState.putParcelable(FileDisplayActivity.KEY_WAITING_TO_PREVIEW, mWaitingToPreview); outState.putParcelable(FileDisplayActivity.KEY_WAITING_TO_PREVIEW, mWaitingToPreview);
outState.putBoolean(FileDisplayActivity.KEY_SYNC_IN_PROGRESS, mSyncInProgress); outState.putBoolean(FileDisplayActivity.KEY_SYNC_IN_PROGRESS, mSyncInProgress);
// outState.putBoolean(FileDisplayActivity.KEY_REFRESH_SHARES_IN_PROGRESS, // outState.putBoolean(FileDisplayActivity.KEY_REFRESH_SHARES_IN_PROGRESS,

View file

@ -52,6 +52,7 @@ import com.nextcloud.client.jobs.upload.FileUploadHelper;
import com.nextcloud.client.jobs.upload.FileUploadWorker; import com.nextcloud.client.jobs.upload.FileUploadWorker;
import com.nextcloud.client.preferences.AppPreferences; import com.nextcloud.client.preferences.AppPreferences;
import com.nextcloud.utils.extensions.BundleExtensionsKt; import com.nextcloud.utils.extensions.BundleExtensionsKt;
import com.nextcloud.utils.extensions.FileExtensionsKt;
import com.nextcloud.utils.extensions.IntentExtensionsKt; import com.nextcloud.utils.extensions.IntentExtensionsKt;
import com.owncloud.android.MainApp; import com.owncloud.android.MainApp;
import com.owncloud.android.R; import com.owncloud.android.R;
@ -264,7 +265,7 @@ public class ReceiveExternalFilesActivity extends FileActivity
@Override @Override
protected void onSaveInstanceState(@NonNull Bundle outState) { protected void onSaveInstanceState(@NonNull Bundle outState) {
Log_OC.d(TAG, "onSaveInstanceState() start"); FileExtensionsKt.logFileSize(mFile, TAG);
super.onSaveInstanceState(outState); super.onSaveInstanceState(outState);
outState.putString(KEY_PARENTS, generatePath(mParents)); outState.putString(KEY_PARENTS, generatePath(mParents));
outState.putParcelable(KEY_FILE, mFile); outState.putParcelable(KEY_FILE, mFile);

View file

@ -33,6 +33,7 @@ import com.nextcloud.client.di.Injectable;
import com.nextcloud.client.jobs.upload.FileUploadWorker; import com.nextcloud.client.jobs.upload.FileUploadWorker;
import com.nextcloud.client.preferences.AppPreferences; import com.nextcloud.client.preferences.AppPreferences;
import com.nextcloud.utils.extensions.ActivityExtensionsKt; import com.nextcloud.utils.extensions.ActivityExtensionsKt;
import com.nextcloud.utils.extensions.FileExtensionsKt;
import com.owncloud.android.R; import com.owncloud.android.R;
import com.owncloud.android.databinding.UploadFilesLayoutBinding; import com.owncloud.android.databinding.UploadFilesLayoutBinding;
import com.owncloud.android.lib.common.utils.Log_OC; import com.owncloud.android.lib.common.utils.Log_OC;
@ -410,7 +411,7 @@ public class UploadFilesActivity extends DrawerActivity implements LocalFileList
protected void onSaveInstanceState(@NonNull Bundle outState) { protected void onSaveInstanceState(@NonNull Bundle outState) {
// responsibility of restore is preferred in onCreate() before than in // responsibility of restore is preferred in onCreate() before than in
// onRestoreInstanceState when there are Fragments involved // onRestoreInstanceState when there are Fragments involved
Log_OC.d(TAG, "onSaveInstanceState() start"); FileExtensionsKt.logFileSize(mCurrentDir, TAG);
super.onSaveInstanceState(outState); super.onSaveInstanceState(outState);
outState.putString(UploadFilesActivity.KEY_DIRECTORY_PATH, mCurrentDir.getAbsolutePath()); outState.putString(UploadFilesActivity.KEY_DIRECTORY_PATH, mCurrentDir.getAbsolutePath());
if (mOptionsMenu != null && mOptionsMenu.findItem(R.id.action_select_all) != null) { if (mOptionsMenu != null && mOptionsMenu.findItem(R.id.action_select_all) != null) {

View file

@ -21,6 +21,7 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.nextcloud.client.account.User; import com.nextcloud.client.account.User;
import com.nextcloud.client.di.Injectable; import com.nextcloud.client.di.Injectable;
import com.nextcloud.utils.extensions.BundleExtensionsKt; import com.nextcloud.utils.extensions.BundleExtensionsKt;
import com.nextcloud.utils.extensions.FileExtensionsKt;
import com.owncloud.android.R; import com.owncloud.android.R;
import com.owncloud.android.databinding.ConflictResolveDialogBinding; import com.owncloud.android.databinding.ConflictResolveDialogBinding;
import com.owncloud.android.datamodel.FileDataStorageManager; import com.owncloud.android.datamodel.FileDataStorageManager;
@ -62,6 +63,7 @@ public class ConflictsResolveDialog extends DialogFragment implements Injectable
@Inject ViewThemeUtils viewThemeUtils; @Inject ViewThemeUtils viewThemeUtils;
@Inject SyncedFolderProvider syncedFolderProvider; @Inject SyncedFolderProvider syncedFolderProvider;
private static final String TAG = "ConflictsResolveDialog";
private static final String KEY_NEW_FILE = "file"; private static final String KEY_NEW_FILE = "file";
private static final String KEY_EXISTING_FILE = "ocfile"; private static final String KEY_EXISTING_FILE = "ocfile";
private static final String KEY_USER = "user"; private static final String KEY_USER = "user";
@ -78,7 +80,10 @@ public class ConflictsResolveDialog extends DialogFragment implements Injectable
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putParcelable(KEY_EXISTING_FILE, existingFile); args.putParcelable(KEY_EXISTING_FILE, existingFile);
args.putSerializable(KEY_NEW_FILE, new File(newFile.getStoragePath()));
File file = new File(newFile.getStoragePath());
FileExtensionsKt.logFileSize(file, TAG);
args.putSerializable(KEY_NEW_FILE, file);
args.putParcelable(KEY_USER, user); args.putParcelable(KEY_USER, user);
dialog.setArguments(args); dialog.setArguments(args);
@ -136,6 +141,8 @@ public class ConflictsResolveDialog extends DialogFragment implements Injectable
public void onSaveInstanceState(@NonNull Bundle outState) { public void onSaveInstanceState(@NonNull Bundle outState) {
super.onSaveInstanceState(outState); super.onSaveInstanceState(outState);
FileExtensionsKt.logFileSize(existingFile, TAG);
FileExtensionsKt.logFileSize(newFile, TAG);
outState.putParcelable(KEY_EXISTING_FILE, existingFile); outState.putParcelable(KEY_EXISTING_FILE, existingFile);
outState.putSerializable(KEY_NEW_FILE, newFile); outState.putSerializable(KEY_NEW_FILE, newFile);
outState.putParcelable(KEY_USER, user); outState.putParcelable(KEY_USER, user);

View file

@ -23,6 +23,7 @@ import com.nextcloud.client.di.Injectable;
import com.nextcloud.client.network.ClientFactory; import com.nextcloud.client.network.ClientFactory;
import com.nextcloud.common.NextcloudClient; import com.nextcloud.common.NextcloudClient;
import com.nextcloud.utils.extensions.BundleExtensionsKt; import com.nextcloud.utils.extensions.BundleExtensionsKt;
import com.nextcloud.utils.extensions.FileExtensionsKt;
import com.owncloud.android.R; import com.owncloud.android.R;
import com.owncloud.android.databinding.FileDetailsActivitiesFragmentBinding; import com.owncloud.android.databinding.FileDetailsActivitiesFragmentBinding;
import com.owncloud.android.datamodel.FileDataStorageManager; import com.owncloud.android.datamodel.FileDataStorageManager;
@ -431,7 +432,7 @@ public class FileDetailActivitiesFragment extends Fragment implements
@Override @Override
public void onSaveInstanceState(@NonNull Bundle outState) { public void onSaveInstanceState(@NonNull Bundle outState) {
super.onSaveInstanceState(outState); super.onSaveInstanceState(outState);
FileExtensionsKt.logFileSize(file, TAG);
outState.putParcelable(ARG_FILE, file); outState.putParcelable(ARG_FILE, file);
outState.putParcelable(ARG_USER, user); outState.putParcelable(ARG_USER, user);
} }

View file

@ -35,6 +35,7 @@ import com.nextcloud.client.preferences.AppPreferences;
import com.nextcloud.ui.fileactions.FileActionsBottomSheet; import com.nextcloud.ui.fileactions.FileActionsBottomSheet;
import com.nextcloud.utils.MenuUtils; import com.nextcloud.utils.MenuUtils;
import com.nextcloud.utils.extensions.BundleExtensionsKt; import com.nextcloud.utils.extensions.BundleExtensionsKt;
import com.nextcloud.utils.extensions.FileExtensionsKt;
import com.owncloud.android.MainApp; import com.owncloud.android.MainApp;
import com.owncloud.android.R; import com.owncloud.android.R;
import com.owncloud.android.databinding.FileDetailsFragmentBinding; import com.owncloud.android.databinding.FileDetailsFragmentBinding;
@ -355,6 +356,7 @@ public class FileDetailFragment extends FileFragment implements OnClickListener,
@Override @Override
public void onSaveInstanceState(@NonNull Bundle outState) { public void onSaveInstanceState(@NonNull Bundle outState) {
super.onSaveInstanceState(outState); super.onSaveInstanceState(outState);
FileExtensionsKt.logFileSize(getFile(), TAG);
outState.putParcelable(ARG_FILE, getFile()); outState.putParcelable(ARG_FILE, getFile());
outState.putParcelable(ARG_USER, user); outState.putParcelable(ARG_USER, user);
} }

View file

@ -36,6 +36,7 @@ import com.nextcloud.client.account.UserAccountManager;
import com.nextcloud.client.di.Injectable; import com.nextcloud.client.di.Injectable;
import com.nextcloud.client.network.ClientFactory; import com.nextcloud.client.network.ClientFactory;
import com.nextcloud.utils.extensions.BundleExtensionsKt; import com.nextcloud.utils.extensions.BundleExtensionsKt;
import com.nextcloud.utils.extensions.FileExtensionsKt;
import com.owncloud.android.R; import com.owncloud.android.R;
import com.owncloud.android.databinding.FileDetailsSharingFragmentBinding; import com.owncloud.android.databinding.FileDetailsSharingFragmentBinding;
import com.owncloud.android.datamodel.FileDataStorageManager; import com.owncloud.android.datamodel.FileDataStorageManager;
@ -80,6 +81,7 @@ public class FileDetailSharingFragment extends Fragment implements ShareeListAda
DisplayUtils.AvatarGenerationListener, DisplayUtils.AvatarGenerationListener,
Injectable, FileDetailsSharingMenuBottomSheetActions, QuickSharingPermissionsBottomSheetDialog.QuickPermissionSharingBottomSheetActions { Injectable, FileDetailsSharingMenuBottomSheetActions, QuickSharingPermissionsBottomSheetDialog.QuickPermissionSharingBottomSheetActions {
private static final String TAG = "FileDetailSharingFragment";
private static final String ARG_FILE = "FILE"; private static final String ARG_FILE = "FILE";
private static final String ARG_USER = "USER"; private static final String ARG_USER = "USER";
@ -541,7 +543,7 @@ public class FileDetailSharingFragment extends Fragment implements ShareeListAda
@Override @Override
public void onSaveInstanceState(@NonNull Bundle outState) { public void onSaveInstanceState(@NonNull Bundle outState) {
super.onSaveInstanceState(outState); super.onSaveInstanceState(outState);
FileExtensionsKt.logFileSize(file, TAG);
outState.putParcelable(ARG_FILE, file); outState.putParcelable(ARG_FILE, file);
outState.putParcelable(ARG_USER, user); outState.putParcelable(ARG_USER, user);
} }

View file

@ -67,8 +67,8 @@ public class GalleryFragment extends OCFileListFragment implements GalleryFragme
private GalleryFragmentBottomSheetDialog galleryFragmentBottomSheetDialog; private GalleryFragmentBottomSheetDialog galleryFragmentBottomSheetDialog;
@Inject FileDataStorageManager fileDataStorageManager; @Inject FileDataStorageManager fileDataStorageManager;
private final int maxColumnSizeLandscape = 5; private final static int maxColumnSizeLandscape = 5;
private final int maxColumnSizePortrait = 2; private final static int maxColumnSizePortrait = 2;
private int columnSize; private int columnSize;
protected void setPhotoSearchQueryRunning(boolean value) { protected void setPhotoSearchQueryRunning(boolean value) {

View file

@ -57,6 +57,7 @@ import com.nextcloud.ui.fileactions.FileActionsBottomSheet;
import com.nextcloud.utils.EditorUtils; import com.nextcloud.utils.EditorUtils;
import com.nextcloud.utils.ShortcutUtil; import com.nextcloud.utils.ShortcutUtil;
import com.nextcloud.utils.extensions.BundleExtensionsKt; import com.nextcloud.utils.extensions.BundleExtensionsKt;
import com.nextcloud.utils.extensions.FileExtensionsKt;
import com.nextcloud.utils.extensions.IntentExtensionsKt; import com.nextcloud.utils.extensions.IntentExtensionsKt;
import com.nextcloud.utils.view.FastScrollUtils; import com.nextcloud.utils.view.FastScrollUtils;
import com.owncloud.android.MainApp; import com.owncloud.android.MainApp;
@ -850,7 +851,7 @@ public class OCFileListFragment extends ExtendedListFragment implements
@Override @Override
public void onSaveInstanceState(@NonNull Bundle outState) { public void onSaveInstanceState(@NonNull Bundle outState) {
super.onSaveInstanceState(outState); super.onSaveInstanceState(outState);
FileExtensionsKt.logFileSize(mFile, TAG);
outState.putParcelable(KEY_FILE, mFile); outState.putParcelable(KEY_FILE, mFile);
if (searchFragment) { if (searchFragment) {
outState.putParcelable(KEY_CURRENT_SEARCH_TYPE, currentSearchType); outState.putParcelable(KEY_CURRENT_SEARCH_TYPE, currentSearchType);

View file

@ -24,6 +24,7 @@ import com.nextcloud.client.account.User;
import com.nextcloud.client.di.Injectable; import com.nextcloud.client.di.Injectable;
import com.nextcloud.client.jobs.download.FileDownloadHelper; import com.nextcloud.client.jobs.download.FileDownloadHelper;
import com.nextcloud.utils.extensions.BundleExtensionsKt; import com.nextcloud.utils.extensions.BundleExtensionsKt;
import com.nextcloud.utils.extensions.FileExtensionsKt;
import com.owncloud.android.R; import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.common.network.OnDatatransferProgressListener; import com.owncloud.android.lib.common.network.OnDatatransferProgressListener;
@ -163,6 +164,7 @@ public class FileDownloadFragment extends FileFragment implements OnClickListene
@Override @Override
public void onSaveInstanceState(@NonNull Bundle outState) { public void onSaveInstanceState(@NonNull Bundle outState) {
super.onSaveInstanceState(outState); super.onSaveInstanceState(outState);
FileExtensionsKt.logFileSize(getFile(), TAG);
outState.putParcelable(FileDownloadFragment.EXTRA_FILE, getFile()); outState.putParcelable(FileDownloadFragment.EXTRA_FILE, getFile());
outState.putParcelable(FileDownloadFragment.EXTRA_USER, user); outState.putParcelable(FileDownloadFragment.EXTRA_USER, user);
outState.putBoolean(FileDownloadFragment.EXTRA_ERROR, mError); outState.putBoolean(FileDownloadFragment.EXTRA_ERROR, mError);

View file

@ -65,6 +65,7 @@ import com.nextcloud.common.NextcloudClient
import com.nextcloud.ui.fileactions.FileActionsBottomSheet.Companion.newInstance import com.nextcloud.ui.fileactions.FileActionsBottomSheet.Companion.newInstance
import com.nextcloud.ui.fileactions.FileActionsBottomSheet.ResultListener import com.nextcloud.ui.fileactions.FileActionsBottomSheet.ResultListener
import com.nextcloud.utils.extensions.getParcelableArgument import com.nextcloud.utils.extensions.getParcelableArgument
import com.nextcloud.utils.extensions.logFileSize
import com.owncloud.android.R import com.owncloud.android.R
import com.owncloud.android.databinding.ActivityPreviewMediaBinding import com.owncloud.android.databinding.ActivityPreviewMediaBinding
import com.owncloud.android.datamodel.OCFile import com.owncloud.android.datamodel.OCFile
@ -327,7 +328,7 @@ class PreviewMediaActivity :
override fun onSaveInstanceState(outState: Bundle) { override fun onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState) super.onSaveInstanceState(outState)
Log_OC.v(TAG, "onSaveInstanceState") file.logFileSize(TAG)
outState.let { bundle -> outState.let { bundle ->
bundle.putParcelable(EXTRA_FILE, file) bundle.putParcelable(EXTRA_FILE, file)
bundle.putParcelable(EXTRA_USER, user) bundle.putParcelable(EXTRA_USER, user)

View file

@ -55,6 +55,7 @@ import com.nextcloud.client.network.ClientFactory.CreationException
import com.nextcloud.common.NextcloudClient import com.nextcloud.common.NextcloudClient
import com.nextcloud.ui.fileactions.FileActionsBottomSheet.Companion.newInstance import com.nextcloud.ui.fileactions.FileActionsBottomSheet.Companion.newInstance
import com.nextcloud.utils.extensions.getParcelableArgument import com.nextcloud.utils.extensions.getParcelableArgument
import com.nextcloud.utils.extensions.logFileSize
import com.owncloud.android.MainApp import com.owncloud.android.MainApp
import com.owncloud.android.R import com.owncloud.android.R
import com.owncloud.android.databinding.FragmentPreviewMediaBinding import com.owncloud.android.databinding.FragmentPreviewMediaBinding
@ -125,6 +126,7 @@ class PreviewMediaFragment : FileFragment(), OnTouchListener, Injectable {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
arguments?.let { bundle -> arguments?.let { bundle ->
file.logFileSize(TAG)
file = bundle.getParcelableArgument(FILE, OCFile::class.java) file = bundle.getParcelableArgument(FILE, OCFile::class.java)
user = bundle.getParcelableArgument(USER, User::class.java) user = bundle.getParcelableArgument(USER, User::class.java)
@ -254,7 +256,7 @@ class PreviewMediaFragment : FileFragment(), OnTouchListener, Injectable {
override fun onSaveInstanceState(outState: Bundle) { override fun onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState) super.onSaveInstanceState(outState)
Log_OC.v(TAG, "onSaveInstanceState") file.logFileSize(TAG)
toggleDrawerLockMode(containerActivity, DrawerLayout.LOCK_MODE_LOCKED_CLOSED) toggleDrawerLockMode(containerActivity, DrawerLayout.LOCK_MODE_LOCKED_CLOSED)
outState.run { outState.run {

View file

@ -21,6 +21,7 @@ import com.nextcloud.client.account.User;
import com.nextcloud.client.account.UserAccountManager; import com.nextcloud.client.account.UserAccountManager;
import com.nextcloud.ui.fileactions.FileActionsBottomSheet; import com.nextcloud.ui.fileactions.FileActionsBottomSheet;
import com.nextcloud.utils.extensions.BundleExtensionsKt; import com.nextcloud.utils.extensions.BundleExtensionsKt;
import com.nextcloud.utils.extensions.FileExtensionsKt;
import com.owncloud.android.R; import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.common.utils.Log_OC; import com.owncloud.android.lib.common.utils.Log_OC;
@ -136,6 +137,7 @@ public class PreviewTextFileFragment extends PreviewTextFragment {
*/ */
@Override @Override
public void onSaveInstanceState(@NonNull Bundle outState) { public void onSaveInstanceState(@NonNull Bundle outState) {
FileExtensionsKt.logFileSize(getFile(), TAG);
outState.putParcelable(PreviewTextFileFragment.EXTRA_FILE, getFile()); outState.putParcelable(PreviewTextFileFragment.EXTRA_FILE, getFile());
outState.putParcelable(PreviewTextFileFragment.EXTRA_USER, user); outState.putParcelable(PreviewTextFileFragment.EXTRA_USER, user);
super.onSaveInstanceState(outState); super.onSaveInstanceState(outState);

View file

@ -19,6 +19,7 @@ import android.view.ViewGroup;
import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.nextcloud.android.lib.richWorkspace.RichWorkspaceDirectEditingRemoteOperation; import com.nextcloud.android.lib.richWorkspace.RichWorkspaceDirectEditingRemoteOperation;
import com.nextcloud.client.account.UserAccountManager; import com.nextcloud.client.account.UserAccountManager;
import com.nextcloud.utils.extensions.FileExtensionsKt;
import com.owncloud.android.R; import com.owncloud.android.R;
import com.owncloud.android.lib.common.operations.RemoteOperationResult; import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.ui.activity.FileDisplayActivity; import com.owncloud.android.ui.activity.FileDisplayActivity;
@ -37,6 +38,7 @@ public class PreviewTextStringFragment extends PreviewTextFragment {
@Inject UserAccountManager accountManager; @Inject UserAccountManager accountManager;
@Inject ViewThemeUtils viewThemeUtils; @Inject ViewThemeUtils viewThemeUtils;
private final static String TAG = "PreviewTextStringFragment";
private boolean isEditorWebviewLaunched = false; private boolean isEditorWebviewLaunched = false;
/** /**
@ -70,6 +72,7 @@ public class PreviewTextStringFragment extends PreviewTextFragment {
*/ */
@Override @Override
public void onSaveInstanceState(@NonNull Bundle outState) { public void onSaveInstanceState(@NonNull Bundle outState) {
FileExtensionsKt.logFileSize(getFile(), TAG);
outState.putParcelable(PreviewTextStringFragment.EXTRA_FILE, getFile()); outState.putParcelable(PreviewTextStringFragment.EXTRA_FILE, getFile());
super.onSaveInstanceState(outState); super.onSaveInstanceState(outState);

View file

@ -354,6 +354,7 @@
<string name="failed_update_ui">فشل تحديث UI</string> <string name="failed_update_ui">فشل تحديث UI</string>
<string name="favorite">إضافة إلى المفضلة</string> <string name="favorite">إضافة إلى المفضلة</string>
<string name="favorite_icon">المفضلة</string> <string name="favorite_icon">المفضلة</string>
<string name="file_activity_shared_file_cannot_be_updated">ملف مشترك لا يمكن تحديثه</string>
<string name="file_already_exists">اسم الملف موجود مسبقاً</string> <string name="file_already_exists">اسم الملف موجود مسبقاً</string>
<string name="file_delete">حذف </string> <string name="file_delete">حذف </string>
<string name="file_detail_activity_error">خطأ في استرداد النشاطات للملف</string> <string name="file_detail_activity_error">خطأ في استرداد النشاطات للملف</string>

View file

@ -92,6 +92,7 @@
<string name="auth_unsupported_multiaccount">%1$s does not support multiple accounts</string> <string name="auth_unsupported_multiaccount">%1$s does not support multiple accounts</string>
<string name="auth_wrong_connection_title">Could not establish connection</string> <string name="auth_wrong_connection_title">Could not establish connection</string>
<string name="authenticator_activity_cancel_login">Cancel Login</string> <string name="authenticator_activity_cancel_login">Cancel Login</string>
<string name="authenticator_activity_login_error">There was an issue processing your login request. Please try again later.</string>
<string name="authenticator_activity_please_complete_login_process">Please complete login process in your browser</string> <string name="authenticator_activity_please_complete_login_process">Please complete login process in your browser</string>
<string name="auto_upload_file_behaviour_kept_in_folder">kept in original folder, as it is readonly</string> <string name="auto_upload_file_behaviour_kept_in_folder">kept in original folder, as it is readonly</string>
<string name="auto_upload_on_wifi">Only upload on unmetered Wi-Fi</string> <string name="auto_upload_on_wifi">Only upload on unmetered Wi-Fi</string>
@ -353,6 +354,7 @@
<string name="failed_update_ui">Failed to update UI</string> <string name="failed_update_ui">Failed to update UI</string>
<string name="favorite">Add to favourites</string> <string name="favorite">Add to favourites</string>
<string name="favorite_icon">Favourite</string> <string name="favorite_icon">Favourite</string>
<string name="file_activity_shared_file_cannot_be_updated">Shared file cannot be updated</string>
<string name="file_already_exists">Filename already exists</string> <string name="file_already_exists">Filename already exists</string>
<string name="file_delete">Delete</string> <string name="file_delete">Delete</string>
<string name="file_detail_activity_error">Error retrieving activities for file</string> <string name="file_detail_activity_error">Error retrieving activities for file</string>

View file

@ -354,6 +354,7 @@
<string name="failed_update_ui">Oberfläche konnte nicht aktualisiert werden</string> <string name="failed_update_ui">Oberfläche konnte nicht aktualisiert werden</string>
<string name="favorite">Zu den Favoriten hinzufügen</string> <string name="favorite">Zu den Favoriten hinzufügen</string>
<string name="favorite_icon">Favoriten</string> <string name="favorite_icon">Favoriten</string>
<string name="file_activity_shared_file_cannot_be_updated">Geteilte Datei kann nicht aktualisiert werden</string>
<string name="file_already_exists">Dateiname bereits vorhanden</string> <string name="file_already_exists">Dateiname bereits vorhanden</string>
<string name="file_delete">Löschen</string> <string name="file_delete">Löschen</string>
<string name="file_detail_activity_error">Fehler beim Abrufen der Aktivitäten für die Datei</string> <string name="file_detail_activity_error">Fehler beim Abrufen der Aktivitäten für die Datei</string>

View file

@ -354,6 +354,7 @@
<string name="failed_update_ui">Theip ar an Chomhéadain a nuashonrú</string> <string name="failed_update_ui">Theip ar an Chomhéadain a nuashonrú</string>
<string name="favorite">Cuir le ceanáin</string> <string name="favorite">Cuir le ceanáin</string>
<string name="favorite_icon">is fearr leat</string> <string name="favorite_icon">is fearr leat</string>
<string name="file_activity_shared_file_cannot_be_updated">Ní féidir an comhad roinnte a nuashonrú</string>
<string name="file_already_exists">Tá ainm an chomhaid ann cheana</string> <string name="file_already_exists">Tá ainm an chomhaid ann cheana</string>
<string name="file_delete">Scrios</string> <string name="file_delete">Scrios</string>
<string name="file_detail_activity_error">Earráid agus gníomhaíochtaí á aisghabháil don chomhad</string> <string name="file_detail_activity_error">Earráid agus gníomhaíochtaí á aisghabháil don chomhad</string>

View file

@ -354,6 +354,7 @@
<string name="failed_update_ui">Produciuse un fallo ao actualizar a IU</string> <string name="failed_update_ui">Produciuse un fallo ao actualizar a IU</string>
<string name="favorite">Engadir a favoritos</string> <string name="favorite">Engadir a favoritos</string>
<string name="favorite_icon">Favorito</string> <string name="favorite_icon">Favorito</string>
<string name="file_activity_shared_file_cannot_be_updated">Non foi posíbel actualizar o ficheiro compartido</string>
<string name="file_already_exists">O nome de ficheiro xa existe</string> <string name="file_already_exists">O nome de ficheiro xa existe</string>
<string name="file_delete">Eliminar</string> <string name="file_delete">Eliminar</string>
<string name="file_detail_activity_error">Produciuse un erro ao recuperar actividades para o ficheiro</string> <string name="file_detail_activity_error">Produciuse un erro ao recuperar actividades para o ficheiro</string>

View file

@ -197,6 +197,7 @@
<string name="create_new_folder">新しいフォルダー</string> <string name="create_new_folder">新しいフォルダー</string>
<string name="create_new_presentation">新規プレゼンテーション</string> <string name="create_new_presentation">新規プレゼンテーション</string>
<string name="create_new_spreadsheet">新規スプレッドシート</string> <string name="create_new_spreadsheet">新規スプレッドシート</string>
<string name="create_rich_workspace">フォルダの説明を追加</string>
<string name="credentials_disabled">資格情報が無効です</string> <string name="credentials_disabled">資格情報が無効です</string>
<string name="daily_backup">毎日のバックアップ</string> <string name="daily_backup">毎日のバックアップ</string>
<string name="data_to_back_up">バックアップするデータ</string> <string name="data_to_back_up">バックアップするデータ</string>

View file

@ -354,6 +354,7 @@
<string name="failed_update_ui">Kunne ikke oppdatere brukergrensesnittet</string> <string name="failed_update_ui">Kunne ikke oppdatere brukergrensesnittet</string>
<string name="favorite">Legg til i favoritter</string> <string name="favorite">Legg til i favoritter</string>
<string name="favorite_icon">Favoritt</string> <string name="favorite_icon">Favoritt</string>
<string name="file_activity_shared_file_cannot_be_updated">Delt fil kan ikke oppdateres</string>
<string name="file_already_exists">Filnavnet finnes allerede</string> <string name="file_already_exists">Filnavnet finnes allerede</string>
<string name="file_delete">Slett</string> <string name="file_delete">Slett</string>
<string name="file_detail_activity_error">Henting av aktiviteter for fil feilet</string> <string name="file_detail_activity_error">Henting av aktiviteter for fil feilet</string>

View file

@ -92,6 +92,7 @@
<string name="auth_unsupported_multiaccount">%1$s не подржава вишеструке налоге</string> <string name="auth_unsupported_multiaccount">%1$s не подржава вишеструке налоге</string>
<string name="auth_wrong_connection_title">Не могу да успоставим везу</string> <string name="auth_wrong_connection_title">Не могу да успоставим везу</string>
<string name="authenticator_activity_cancel_login">Откажи пријављивање</string> <string name="authenticator_activity_cancel_login">Откажи пријављивање</string>
<string name="authenticator_activity_login_error">Дошло је до проблема при обради вашег захтева за пријаву. Молимо вас да касније покушате поново.</string>
<string name="authenticator_activity_please_complete_login_process">Молимо вас да довршите процес пријаве у интернет прегледачу</string> <string name="authenticator_activity_please_complete_login_process">Молимо вас да довршите процес пријаве у интернет прегледачу</string>
<string name="auto_upload_file_behaviour_kept_in_folder">остављен у оригиналној фасцикли јер је само за читање</string> <string name="auto_upload_file_behaviour_kept_in_folder">остављен у оригиналној фасцикли јер је само за читање</string>
<string name="auto_upload_on_wifi">Отпремај само на бежичним мрежама без ограничења</string> <string name="auto_upload_on_wifi">Отпремај само на бежичним мрежама без ограничења</string>
@ -321,6 +322,7 @@
<string name="error_showing_encryption_dialog">Грешка приликом приказа дијалога за подешавање шифрирања!</string> <string name="error_showing_encryption_dialog">Грешка приликом приказа дијалога за подешавање шифрирања!</string>
<string name="error_starting_direct_camera_upload">Грешка при покретању камере</string> <string name="error_starting_direct_camera_upload">Грешка при покретању камере</string>
<string name="error_starting_doc_scan">Грешка приликом почетка скенирања документа</string> <string name="error_starting_doc_scan">Грешка приликом почетка скенирања документа</string>
<string name="error_uploading_direct_camera_upload">Није успело креиране медије</string>
<string name="etm_accounts">Налози</string> <string name="etm_accounts">Налози</string>
<string name="etm_background_execution_count">Покренуто пута 48 сати</string> <string name="etm_background_execution_count">Покренуто пута 48 сати</string>
<string name="etm_background_job_created">Направљен</string> <string name="etm_background_job_created">Направљен</string>
@ -352,6 +354,7 @@
<string name="failed_update_ui">Неуспело освежавање сучеља</string> <string name="failed_update_ui">Неуспело освежавање сучеља</string>
<string name="favorite">Додај у омиљене</string> <string name="favorite">Додај у омиљене</string>
<string name="favorite_icon">Омиљени</string> <string name="favorite_icon">Омиљени</string>
<string name="file_activity_shared_file_cannot_be_updated">Не може да се ажурира дељени фајл</string>
<string name="file_already_exists">Име фајла већ постоји</string> <string name="file_already_exists">Име фајла већ постоји</string>
<string name="file_delete">Обриши</string> <string name="file_delete">Обриши</string>
<string name="file_detail_activity_error">Грешка при добављању активности за фајл</string> <string name="file_detail_activity_error">Грешка при добављању активности за фајл</string>
@ -904,7 +907,9 @@
<string name="upload_chooser_title">Отпреми из…</string> <string name="upload_chooser_title">Отпреми из…</string>
<string name="upload_content_from_other_apps">Отпрема садржај из других апликација</string> <string name="upload_content_from_other_apps">Отпрема садржај из других апликација</string>
<string name="upload_direct_camera_photo">Фотографија</string> <string name="upload_direct_camera_photo">Фотографија</string>
<string name="upload_direct_camera_promt">Желите ли да направите фотографију или видео клип?</string>
<string name="upload_direct_camera_upload">Отпреми са камере</string> <string name="upload_direct_camera_upload">Отпреми са камере</string>
<string name="upload_direct_camera_video">Видео снимак</string>
<string name="upload_file_dialog_filename">Назив фајла</string> <string name="upload_file_dialog_filename">Назив фајла</string>
<string name="upload_file_dialog_filetype">Тип фајла</string> <string name="upload_file_dialog_filetype">Тип фајла</string>
<string name="upload_file_dialog_filetype_googlemap_shortcut">Пречица Гугл мапа (%s)</string> <string name="upload_file_dialog_filetype_googlemap_shortcut">Пречица Гугл мапа (%s)</string>

View file

@ -354,6 +354,7 @@
<string name="failed_update_ui">更新 UI 失敗</string> <string name="failed_update_ui">更新 UI 失敗</string>
<string name="favorite">加到我的最愛</string> <string name="favorite">加到我的最愛</string>
<string name="favorite_icon">我的最愛</string> <string name="favorite_icon">我的最愛</string>
<string name="file_activity_shared_file_cannot_be_updated">無法更新分享了的檔案</string>
<string name="file_already_exists">檔案名已存在</string> <string name="file_already_exists">檔案名已存在</string>
<string name="file_delete">刪除</string> <string name="file_delete">刪除</string>
<string name="file_detail_activity_error">取得檔案活動時發生錯誤</string> <string name="file_detail_activity_error">取得檔案活動時發生錯誤</string>
@ -927,6 +928,7 @@
<string name="upload_local_storage_not_copied">無法複製檔案到近端資料夾</string> <string name="upload_local_storage_not_copied">無法複製檔案到近端資料夾</string>
<string name="upload_lock_failed">鎖定資料夾失敗</string> <string name="upload_lock_failed">鎖定資料夾失敗</string>
<string name="upload_manually_cancelled">用戶已取消上傳</string> <string name="upload_manually_cancelled">用戶已取消上傳</string>
<string name="upload_notification_manager_start_text">%1$d / %2$d - %3$s</string>
<string name="upload_old_android">加密功能只適用於 Android 5.0 及以上版本</string> <string name="upload_old_android">加密功能只適用於 Android 5.0 及以上版本</string>
<string name="upload_query_move_foreign_files">空間不足導致無法將所選檔案複製到 %1$s 資料夾中。您想改為將檔案移到那裡嗎?</string> <string name="upload_query_move_foreign_files">空間不足導致無法將所選檔案複製到 %1$s 資料夾中。您想改為將檔案移到那裡嗎?</string>
<string name="upload_quota_exceeded">超過儲存空間配額</string> <string name="upload_quota_exceeded">超過儲存空間配額</string>

View file

@ -354,6 +354,7 @@
<string name="failed_update_ui">更新使用者介面失敗</string> <string name="failed_update_ui">更新使用者介面失敗</string>
<string name="favorite">加到我的最愛</string> <string name="favorite">加到我的最愛</string>
<string name="favorite_icon">我的最愛</string> <string name="favorite_icon">我的最愛</string>
<string name="file_activity_shared_file_cannot_be_updated">無法更新已分享的檔案</string>
<string name="file_already_exists">檔案名稱已存在</string> <string name="file_already_exists">檔案名稱已存在</string>
<string name="file_delete">刪除</string> <string name="file_delete">刪除</string>
<string name="file_detail_activity_error">取得檔案活動時發生錯誤</string> <string name="file_detail_activity_error">取得檔案活動時發生錯誤</string>

View file

@ -5962,14 +5962,17 @@
<sha256 value="66afb9f2eea39427f6f03c14c5b82ca240157e22b8b2a764f0a7c8ad87cb2d3e" origin="Generated by Gradle" reason="Artifact is not signed"/> <sha256 value="66afb9f2eea39427f6f03c14c5b82ca240157e22b8b2a764f0a7c8ad87cb2d3e" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact> </artifact>
</component> </component>
<component group="com.github.nextcloud" name="android-library" version="c2355d04a920e8dc69936e08670eca6880d98b28"> <component group="com.github.nextcloud" name="android-library"
<artifact name="android-library-c2355d04a920e8dc69936e08670eca6880d98b28.aar"> version="c2355d04a920e8dc69936e08670eca6880d98b28">
<sha256 value="c253a126ca3c32dd5b373ab1c64668e4603305b3113b052fc0fc5e3c833a913c" origin="Generated by Gradle" reason="Artifact is not signed"/> <artifact name="android-library-c2355d04a920e8dc69936e08670eca6880d98b28.aar">
</artifact> <sha256 value="c253a126ca3c32dd5b373ab1c64668e4603305b3113b052fc0fc5e3c833a913c"
<artifact name="android-library-c2355d04a920e8dc69936e08670eca6880d98b28.module"> origin="Generated by Gradle" reason="Artifact is not signed" />
<sha256 value="deb8a2ea9ddf5b4932f4a5eb61d2ae432efebab24e801dd03a636c5812f048a4" origin="Generated by Gradle" reason="Artifact is not signed"/> </artifact>
</artifact> <artifact name="android-library-c2355d04a920e8dc69936e08670eca6880d98b28.module">
</component> <sha256 value="deb8a2ea9ddf5b4932f4a5eb61d2ae432efebab24e801dd03a636c5812f048a4"
origin="Generated by Gradle" reason="Artifact is not signed" />
</artifact>
</component>
<component group="com.github.nextcloud" name="android-library" version="cda1b08aa81b74201177f29c2326abee62f32c15"> <component group="com.github.nextcloud" name="android-library" version="cda1b08aa81b74201177f29c2326abee62f32c15">
<artifact name="android-library-cda1b08aa81b74201177f29c2326abee62f32c15.aar"> <artifact name="android-library-cda1b08aa81b74201177f29c2326abee62f32c15.aar">
<sha256 value="39c76af292201a94cf0753f296a18deb5512d88e97537f7c4e9a766ec50c1520" origin="Generated by Gradle" reason="Artifact is not signed"/> <sha256 value="39c76af292201a94cf0753f296a18deb5512d88e97537f7c4e9a766ec50c1520" origin="Generated by Gradle" reason="Artifact is not signed"/>