Merge pull request #12843 from nextcloud/chore/noid/spdxHeader20

Add SPDX header
This commit is contained in:
Andy Scherzinger 2024-04-08 16:06:11 +02:00 committed by GitHub
commit 17049720bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
64 changed files with 402 additions and 1114 deletions

View File

@ -1,99 +0,0 @@
Standard Google Material Design icons
Copyright (c) 2014, Google (http://www.google.com/design/)
uses the license at https://github.com/google/material-design-icons/blob/master/LICENSE
Twitter icon graphic
Copyright (c) 2014, Austin Andrews (http://materialdesignicons.com/),
with Reserved Font Name Material Design Icons.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@ -5,7 +5,7 @@
* SPDX-FileCopyrightText: 2024 Alper Ozturk <alper_ozturk@proton.me>
* SPDX-FileCopyrightText: 2024 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2024 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-FileCopyrightText: 2022 Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
* SPDX-FileCopyrightText: 2022 Álvaro Brey Vilas <alvaro@alvarobrey.com>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import com.github.spotbugs.snom.Confidence

View File

@ -3,7 +3,7 @@
*
* SPDX-FileCopyrightText: 2018 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2015 ownCloud Inc.
* SPDX-License-Identifier: GPL-2.0-only
* SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
*/
package com.owncloud.android.uiautomator;

View File

@ -1,22 +1,9 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Álvaro Brey Vilas
* Copyright (C) 2022 Álvaro Brey Vilas
* Copyright (C) 2022 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2022 Álvaro Brey Vilas
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package com.owncloud.android.files

View File

@ -1,7 +1,7 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro.brey@nextcloud.com>
* SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

View File

@ -1,7 +1,7 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro.brey@nextcloud.com>
* SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

View File

@ -1,24 +1,9 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Chris Narkiewicz
*
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2019 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.client.device
import android.content.Context

View File

@ -1,27 +1,11 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Chris Narkiewicz
* @author Tobias Kaminsky
*
* Copyright (C) 2020 Chris Narkiewicz <hello@ezaquarii.com>
* Copyright (C) 2019 Tobias Kaminsky
* Copyright (C) 2019 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2020 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2019 Tobias Kaminsky
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.client.device
import android.content.Context

View File

@ -1,24 +1,9 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Chris Narkiewicz
*
* Copyright (C) 2020 Chris Narkiewicz <hello@ezaquarii.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2020 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.client.device
/**

View File

@ -1,24 +1,9 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Chris Narkiewicz
*
* Copyright (C) 2020 Chris Narkiewicz <hello@ezaquarii.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2020 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.client.device
import android.content.Context

View File

@ -1,24 +1,9 @@
/*
* Nextcloud application
*
* @author Mario Danic
* @author Chris Narkiewicz
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
* Copyright (C) 2020 Chris Narkiewicz <hello@ezaquarii.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2020 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.client.jobs
import android.accounts.AuthenticatorException

View File

@ -1,10 +1,7 @@
/**
* Nextcloud Android client application
*
* @author Chris Narkiewicz
*
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2019 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.client.media

View File

@ -1,10 +1,7 @@
/*
* Nextcloud Android client application
*
* @author Chris Narkiewicz
*
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2019 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.client.media

View File

@ -1,13 +1,8 @@
/*
* Nextcloud Android client application
*
* @author David A. Velasco
* @author masensio
* @author Chris Narkiewicz
* Copyright (C) 2013 David A. Velasco
* Copyright (C) 2016 masensio
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2019 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.client.media

View File

@ -1,12 +1,8 @@
/*
* Nextcloud Android client application
*
* @author Chris Narkiewicz
* @author Tobias Kaminsky
*
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
* Copyright (C) 2018 Tobias Kaminsky
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2019 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2018 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.client.media

View File

@ -1,14 +1,9 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Bartosz Przybylski
* @author Chris Narkiewicz
* Copyright (C) 2015 Bartosz Przybylski
* Copyright (C) 2015 ownCloud Inc.
* Copyright (C) 2016 Nextcloud.
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
*
* SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
* SPDX-FileCopyrightText: 2023 Alper Ozturk <alper_ozturk@proton.me>
* SPDX-FileCopyrightText: 2018 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.client.onboarding

View File

@ -1,14 +1,11 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Bartosz Przybylski
* @author Chris Narkiewicz
* Copyright (C) 2015 Bartosz Przybylski
* Copyright (C) 2015 ownCloud Inc.
* Copyright (C) 2016 Nextcloud.
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
*
* SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
* SPDX-FileCopyrightText: 2023 Alper Ozturk <alper_ozturk@proton.me>
* SPDX-FileCopyrightText: 2023 Álvaro Brey <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2017 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2016 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.client.onboarding

View File

@ -1,26 +1,13 @@
/*
* ownCloud Android client application
* Nextcloud - Android Client
*
* @author David A. Velasco
* @author Chris Narkiewicz Chris Narkiewicz
* @author TSI-mc
* Copyright (C) 2016 ownCloud Inc.
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
* Copyright (C) 2023 TSI-mc
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2023 TSI-mc
* SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2019 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2019 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2016 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.client.preferences;
import android.annotation.SuppressLint;

View File

@ -1,25 +1,17 @@
/*
* ownCloud Android client application
* Nextcloud - Android Client
*
* @author masensio
* @author David A. Velasco
* @author Chris Narkiewicz
* @author TSI-mc
* Copyright (C) 2015 ownCloud Inc.
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
* Copyright (C) 2023 TSI-mc
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2023 Alper Ozturk <alper_ozturk@proton.me>
* SPDX-FileCopyrightText: 2023 TSI-mc
* SPDX-FileCopyrightText: 2022-2023 Álvaro Brey <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2016-2020 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2019 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2019 Alice Gaudon <alice@gaudon.pro>
* SPDX-FileCopyrightText: 2016 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-FileCopyrightText: 2015 ownCloud Inc.
* SPDX-FileCopyrightText: 2014 David A. Velasco <dvelasco@solidgear.es>
* SPDX-FileCopyrightText: 2013 masensio <masensio@solidgear.es>
* SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
*/
package com.owncloud.android;
@ -128,9 +120,8 @@ import static com.owncloud.android.ui.activity.ContactsPreferenceActivity.PREFER
/**
* Main Application of the project
* <p>
* Contains methods to build the "static" strings. These strings were before constants in different classes
* Main Application of the project.
* Contains methods to build the "static" strings. These strings were before constants in different classes.
*/
public class MainApp extends MultiDexApplication implements HasAndroidInjector {
public static final OwnCloudVersion OUTDATED_SERVER_VERSION = NextcloudVersion.nextcloud_23;

View File

@ -1,26 +1,14 @@
/*
* ownCloud Android client application
*
* @author Tobias Kaminsky
* @author David A. Velasco
* @author Chris Narkiewicz
* Copyright (C) 2015 ownCloud Inc.
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2022-2023 Álvaro Brey <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2017-2020 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2016-2020 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-FileCopyrightText: 2019 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2015 ownCloud Inc.
* SPDX-FileCopyrightText: 2014 David A. Velasco <dvelasco@solidgear.es>
* SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
*/
package com.owncloud.android.datamodel;
import android.content.Context;

View File

@ -1,25 +1,16 @@
/*
* ownCloud Android client application
* Nextcloud - Android Client
*
* @author LukeOwncloud
* @author David A. Velasco
* @author masensio
* @author Chris Narkiewicz
*
* Copyright (C) 2016 ownCloud Inc.
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2024 Jonas Mayer <jonas.a.mayer@gmx.net>
* SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2018-2020 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2019-2021 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2016-2020 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-FileCopyrightText: 2016 ownCloud Inc.
* SPDX-FileCopyrightText: 2016 masensio <masensio@solidgear.es>
* SPDX-FileCopyrightText: 2016 David A. Velasco <dvelasco@solidgear.es>
* SPDX-FileCopyrightText: 2014 Luke Owncloud <owncloud@ohrt.org>
* SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
*/
package com.owncloud.android.datamodel;

View File

@ -1,26 +1,12 @@
/*
* ownCloud Android client application
* Nextcloud - Android Client
*
* @author Andy Scherzinger
* @author Tobias Kaminsky
* @author Chris Narkiewicz
* Copyright (C) 2016 ownCloud Inc.
* Copyright (C) 2018 Andy Scherzinger
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2019-2021 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2015-2020 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2016-2018 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.owncloud.android.ui;
import android.graphics.Canvas;
@ -46,22 +32,22 @@ public class TextDrawable extends Drawable {
/**
* the text to be rendered.
*/
private String mText;
private String text;
/**
* the text paint to be rendered.
*/
private Paint mTextPaint;
private Paint textPaint;
/**
* the background to be rendered.
*/
private Paint mBackground;
private Paint background;
/**
* the radius of the circular background to be rendered.
*/
private float mRadius;
private float radius;
private boolean bigText = false;
@ -73,19 +59,19 @@ public class TextDrawable extends Drawable {
* @param radius circle radius
*/
public TextDrawable(String text, BitmapUtils.Color color, float radius) {
mRadius = radius;
mText = text;
this.radius = radius;
this.text = text;
mBackground = new Paint();
mBackground.setStyle(Paint.Style.FILL);
mBackground.setAntiAlias(true);
mBackground.setColor(Color.argb(color.a, color.r, color.g, color.b));
background = new Paint();
background.setStyle(Paint.Style.FILL);
background.setAntiAlias(true);
background.setColor(Color.argb(color.a, color.r, color.g, color.b));
mTextPaint = new Paint();
mTextPaint.setColor(Color.WHITE);
mTextPaint.setTextSize(radius);
mTextPaint.setAntiAlias(true);
mTextPaint.setTextAlign(Paint.Align.CENTER);
textPaint = new Paint();
textPaint.setColor(Color.WHITE);
textPaint.setTextSize(radius);
textPaint.setAntiAlias(true);
textPaint.setTextAlign(Paint.Align.CENTER);
setBounds(0, 0, (int) radius * 2, (int) radius * 2);
}
@ -155,23 +141,23 @@ public class TextDrawable extends Drawable {
*/
@Override
public void draw(@NonNull Canvas canvas) {
canvas.drawCircle(mRadius, mRadius, mRadius, mBackground);
canvas.drawCircle(radius, radius, radius, background);
if (bigText) {
mTextPaint.setTextSize(1.8f * mRadius);
textPaint.setTextSize(1.8f * radius);
}
canvas.drawText(mText, mRadius, mRadius - ((mTextPaint.descent() + mTextPaint.ascent()) / 2), mTextPaint);
canvas.drawText(text, radius, radius - ((textPaint.descent() + textPaint.ascent()) / 2), textPaint);
}
@Override
public void setAlpha(int alpha) {
mTextPaint.setAlpha(alpha);
textPaint.setAlpha(alpha);
}
@Override
public void setColorFilter(ColorFilter cf) {
mTextPaint.setColorFilter(cf);
textPaint.setColorFilter(cf);
}
@Override

View File

@ -1,12 +1,9 @@
/*
* Nextcloud Android client application
*
* @author Tobias Kaminsky
* @author Chris Narkiewicz <hello@ezaquarii.com>
* Copyright (C) 2017 Tobias Kaminsky
* Copyright (C) 2017 Nextcloud GmbH.
* Copyright (C) 2020 Chris Narkiewicz <hello@ezaquarii.com>
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2020 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2017 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.owncloud.android.ui.activity;

View File

@ -1,28 +1,17 @@
/*
* ownCloud Android client application
*
* @author David A. Velasco
* @author Chris Narkiewicz
* @author TSI-mc
* Copyright (C) 2011 Bartek Przybylski
* Copyright (C) 2016 ownCloud Inc.
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
* Copyright (C) 2021 TSI-mc
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2021 TSI-mc
* SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2017-2023 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2019 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2018 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-FileCopyrightText: 2016 ownCloud Inc.
* SPDX-FileCopyrightText: 2015 masensio <masensio@solidgear.es>
* SPDX-FileCopyrightText: 2013 David A. Velasco <dvelasco@solidgear.es>
* SPDX-FileCopyrightText: 2011 Bartek Przybylski
* SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
*/
package com.owncloud.android.ui.activity;
import android.accounts.Account;
@ -116,7 +105,6 @@ import androidx.fragment.app.FragmentTransaction;
import static com.owncloud.android.ui.activity.FileDisplayActivity.TAG_PUBLIC_LINK;
/**
* Activity with common behaviour for activities handling {@link OCFile}s in ownCloud {@link Account}s .
*/

View File

@ -1,25 +1,10 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Tobias Kaminsky
* @author Chris Narkiewicz
*
* Copyright (C) 2018 Tobias Kaminsky
* Copyright (C) 2018 Nextcloud GmbH.
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2019 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2018 Tobias Kaminsky
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.owncloud.android.ui.activity

View File

@ -1,29 +1,17 @@
/*
* ownCloud Android client application
*
* @author Bartek Przybylski
* @author David A. Velasco
* @author Chris Narkiewicz
* @author TSI-mc
*
* Copyright (C) 2011 Bartek Przybylski
* Copyright (C) 2016 ownCloud Inc.
* Copyright (C) 2016 Nextcloud
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
* Copyright (C) 2023 TSI-mc
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2023 Alper Ozturk <alper_ozturk@proton.me>
* SPDX-FileCopyrightText: 2023 TSI-mc
* SPDX-FileCopyrightText: 2022-2023 Álvaro Brey <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2017-2018 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2019 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2015-2017 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-FileCopyrightText: 2016 ownCloud Inc.
* SPDX-FileCopyrightText: 2014 jabarros <jabarros@solidgear.es>
* SPDX-FileCopyrightText: 2013 masensio <masensio@solidgear.es>
* SPDX-FileCopyrightText: 2011-2015 Bartosz Przybylski <bart.p.pl@gmail.com>
* SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
*/
package com.owncloud.android.ui.activity;
@ -101,7 +89,6 @@ import androidx.core.content.res.ResourcesCompat;
/**
* An Activity that allows the user to change the application's settings.
* <p>
* It proxies the necessary calls via {@link androidx.appcompat.app.AppCompatDelegate} to be used with AppCompat.
*/
public class SettingsActivity extends PreferenceActivity

View File

@ -1,15 +1,11 @@
/*
* Nextcloud Android client application
*
* @author Tobias Kaminsky
* @author Chris Narkiewicz
* Copyright (C) 2018 Tobias Kaminsky
* Copyright (C) 2018 Nextcloud
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2019 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2018 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.owncloud.android.ui.activity;
import android.accounts.Account;

View File

@ -1,19 +1,14 @@
/*
* Nextcloud Android client application
*
* @author Mario Danic
* @author Andy Scherzinger
* @author Chris Narkiewicz <hello@ezaquarii.com>
* @author Chawki Chouib <chouibc@gmail.com>
* Copyright (C) 2017 Mario Danic
* Copyright (C) 2017 Andy Scherzinger
* Copyright (C) 2017 Nextcloud GmbH.
* Copyright (C) 2020 Chris Narkiewicz <hello@ezaquarii.com>
* Copyright (C) 2020 Chawki Chouib <chouibc@gmail.com>
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2017-2020 Andy Scherzinger <info@andy-scherzinger>
* SPDX-FileCopyrightText: 2020 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2020 Chawki Chouib <chouibc@gmail.com>
* SPDX-FileCopyrightText: 2018 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2017 Mario Danic <mario@lovelyhq.com>
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.owncloud.android.ui.activity;
import android.graphics.drawable.Drawable;

View File

@ -1,17 +1,12 @@
/*
* Nextcloud Android client application
*
* @author Tobias Kaminsky
* @author Chris Narkiewicz <hello@ezaquarii.com>
* @author TSI-mc
* Copyright (C) 2018 Tobias Kaminsky
* Copyright (C) 2018 Nextcloud
* Copyright (C) 2020 Chris Narkiewicz <hello@ezaquarii.com>
* Copyright (C) 2023 TSI-mc
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2023 TSI-mc
* SPDX-FileCopyrightText: 2020 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2018 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2018 Nextcloud
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.owncloud.android.ui.adapter;
import android.accounts.AccountManager;

View File

@ -1,24 +1,10 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Álvaro Brey Vilas
* Copyright (C) 2022 Álvaro Brey Vilas
* Copyright (C) 2022 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2022 Álvaro Brey Vilas
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package com.owncloud.android.ui.adapter
import com.owncloud.android.datamodel.OCFile

View File

@ -1,28 +1,14 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author masensio
* @author Andy Scherzinger
* @author Chris Narkiewicz <hello@ezaquarii.com>
*
* Copyright (C) 2015 ownCloud GmbH
* Copyright (C) 2018 Andy Scherzinger
* Copyright (C) 2020 Chris Narkiewicz <hello@ezaquarii.com>
* Copyright (C) 2020 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2023 Alper Ozturk <alper_ozturk@proton.me>
* SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2017-2018 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2020 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH
* SPDX-FileCopyrightText: 2015-2018 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.owncloud.android.ui.adapter;
import android.annotation.SuppressLint;

View File

@ -1,17 +1,11 @@
/*
* ownCloud Android client application
* Nextcloud - Android Client
*
* Copyright (C) 2012 Bartek Przybylski Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation.
*
* 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 General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2023 Alper Ozturk <alper_ozturk@proton.me>
* SPDX-FileCopyrightText: 2020-2022 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2015 ownCloud Inc.
* SPDX-FileCopyrightText: 2012 Bartosz Przybylski <bart.p.pl@gmail.com>
* SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
*/
package com.owncloud.android.ui.dialog

View File

@ -1,24 +1,12 @@
/*
* ownCloud Android client application
*
* @author Bartek Przybylski
* Copyright (C) 2012 Bartek Przybylski
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2023 Alper Ozturk <alper_ozturk@proton.me>
* SPDX-FileCopyrightText: 2020-2022 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2015 ownCloud Inc.
* SPDX-FileCopyrightText: 2012 Bartosz Przybylski <bart.p.pl@gmail.com>
* SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
*/
package com.owncloud.android.ui.dialog;
import android.app.Dialog;
@ -58,7 +46,6 @@ import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
/**
* Dialog which will be displayed to user upon keep-in-sync file conflict.
*/

View File

@ -1,22 +1,14 @@
/*
* ownCloud Android client application
* Nextcloud - Android Client
*
* @author David A. Velasco
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2023 Alper Ozturk <alper_ozturk@proton.me>
* SPDX-FileCopyrightText: 2018 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-FileCopyrightText: 2018 Jessie Chatham Spencer <jessie@teainspace.com>
* SPDX-FileCopyrightText: 2016-2022 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2015 ownCloud Inc.
* SPDX-FileCopyrightText: 2015 David A. Velasco <dvelasco@solidgear.es>
* SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
*/
package com.owncloud.android.ui.dialog;
import android.app.Dialog;
@ -38,7 +30,6 @@ import androidx.appcompat.app.AlertDialog;
/**
* Dialog requiring confirmation before removing a collection of given OCFiles.
* <p>
* Triggers the removal according to the user response.
*/
public class RemoveFilesDialogFragment extends ConfirmationDialogFragment implements

View File

@ -1,31 +1,15 @@
/*
* ownCloud Android client application
*
* @author David A. Velasco
* Copyright (C) 2014 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2023 Alper Ozturk <alper_ozturk@proton.me>
* SPDX-FileCopyrightText: 2022 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-FileCopyrightText: 2017-2022 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2014 ownCloud Inc.
* SPDX-FileCopyrightText: 2014 David A. Velasco <dvelasco@solidgear.es>
* SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
*/
package com.owncloud.android.ui.dialog;
/*
* Dialog to input a new name for an {@link OCFile} being renamed.
*
* Triggers the rename operation.
*/
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
@ -59,11 +43,9 @@ import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.DialogFragment;
/**
* Dialog to input a new name for a file or folder to rename.
* <p>
* Triggers the rename operation when name is confirmed.
* Dialog to input a new name for an {@link OCFile} being renamed.
* Triggers the rename operation.
*/
public class RenameFileDialogFragment
extends DialogFragment implements DialogInterface.OnClickListener, TextWatcher, Injectable {

View File

@ -1,23 +1,12 @@
/*
* ownCloud Android client application
*
* @author David A. Velasco
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2017-2018 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-FileCopyrightText: 2017-2018 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2015 ownCloud Inc.
* SPDX-FileCopyrightText: 2015 David A. Velasco <dvelasco@solidgear.es>
* SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
*/
package com.owncloud.android.ui.dialog;
import android.app.Dialog;

View File

@ -1,22 +1,14 @@
/**
* ownCloud Android client application
*
* @author masensio
* @author David A. Velasco
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2018-2022 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-FileCopyrightText: 2020 Stefan Niedermann <info@niedermann.it>
* SPDX-FileCopyrightText: 2018 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2015 ownCloud Inc.
* SPDX-FileCopyrightText: 2014 David A. Velasco <dvelasco@solidgear.es>
* SPDX-FileCopyrightText: 2014 Masensio <masensio@solidgear.es>
* SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
*/
package com.owncloud.android.ui.dialog;
@ -53,11 +45,9 @@ import androidx.annotation.NonNull;
import androidx.fragment.app.DialogFragment;
/**
* Dialog to show information about an untrusted certificate and allow the user
* to decide trust on it or not.
*
* Abstract implementation of common functionality for different dialogs that
* get the information about the error and the certificate from different classes.
* Dialog to show information about an untrusted certificate and allow the user to decide trust on it or not.
* Abstract implementation of common functionality for different dialogs that get the information about the error and
* the certificate from different classes.
*/
public class SslUntrustedCertDialog extends DialogFragment implements Injectable {

View File

@ -1,22 +1,10 @@
/**
* ownCloud Android client application
*
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2015 ownCloud Inc.
* SPDX-FileCopyrightText: 2013 David A. Velasco <dvelasco@solidgear.es>
* SPDX-License-Identifier: GPL-2.0-only
*/
package com.owncloud.android.ui.dialog;
import android.content.Context;
@ -37,6 +25,4 @@ public class SsoWebView extends WebView {
public boolean onCheckIsTextEditor () {
return false;
}
}

View File

@ -1,22 +1,9 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Álvaro Brey Vilas
* Copyright (C) 2022 Álvaro Brey Vilas
* Copyright (C) 2022 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2022 Álvaro Brey Vilas
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package com.owncloud.android.ui.dialog

View File

@ -1,22 +1,9 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Álvaro Brey Vilas
* Copyright (C) 2022 Álvaro Brey Vilas
* Copyright (C) 2022 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2022 Álvaro Brey Vilas
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package com.owncloud.android.ui.events

View File

@ -1,15 +1,10 @@
/*
* Nextcloud Android client application
*
* @author Andy Scherzinger
* @author Chris Narkiewicz
*
* Copyright (C) 2018 Andy Scherzinger
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2019 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2018 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.owncloud.android.ui.fragment;
import android.content.ContentResolver;

View File

@ -1,28 +1,16 @@
/*
* ownCloud Android client application
* Nextcloud - Android Client
*
* @author Bartek Przybylski
* @author masensio
* @author David A. Velasco
* @author Andy Scherzinger
* @author Chris Narkiewicz
* @author TSI-mc
* Copyright (C) 2011 Bartek Przybylski
* Copyright (C) 2016 ownCloud Inc.
* Copyright (C) 2018 Andy Scherzinger
* Copyright (C) 2023 TSI-mc
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2023 TSI-mc
* SPDX-FileCopyrightText: 2018-2023 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2020 Joris Bodin <joris.bodin@infomaniak.com>
* SPDX-FileCopyrightText: 2019 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2016-2018 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-FileCopyrightText: 2015 ownCloud Inc.
* SPDX-FileCopyrightText: 2015 David A. Velasco <dvelasco@solidgear.es>
* SPDX-FileCopyrightText: 2011-2012 Bartosz Przybylski
* SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
*/
package com.owncloud.android.ui.fragment;

View File

@ -1,22 +1,9 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Álvaro Brey Vilas
* Copyright (C) 2022 Álvaro Brey Vilas
* Copyright (C) 2022 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2022 Álvaro Brey Vilas <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package com.owncloud.android.ui.fragment

View File

@ -1,20 +1,9 @@
/**
* ownCloud Android client application
*
* Copyright (C) 2016 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2016 ownCloud Inc.
* SPDX-FileCopyrightText: 2016 David A. Velasco <dvelasco@owncloud.com>
* SPDX-License-Identifier: GPL-2.0-only
*/
package com.owncloud.android.ui.fragment;

View File

@ -1,30 +1,10 @@
/*
* Nextcloud Android Library is available under MIT license
* Nextcloud - Android Client
*
* @author Álvaro Brey Vilas
* Copyright (C) 2022 Álvaro Brey Vilas
* Copyright (C) 2022 Nextcloud GmbH
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
* SPDX-FileCopyrightText: 2022 Álvaro Brey Vilas
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH
* SPDX-License-Identifier: MIT
*/
package com.owncloud.android.ui.fragment.util
import android.graphics.Canvas

View File

@ -1,31 +1,16 @@
/*
* ownCloud Android client application
* Nextcloud - Android Client
*
* @author masensio
* @author David A. Velasco
* @author Juan Carlos González Cabrero
* @author Andy Scherzinger
* @author Chris Narkiewicz
* @author TSI-mc
*
* Copyright (C) 2015 ownCloud Inc.
* Copyright (C) 2018 Andy Scherzinger
* Copyright (C) 2020 Chris Narkiewicz <hello@ezaquarii.com>
* Copyright (C) 2023 TSI-mc
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2023 TSI-mc
* SPDX-FileCopyrightText: 2020 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2018-2020 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2018-2020 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-FileCopyrightText: 2016 Atsushi Matsuo <matsuo@dds.co.jp>
* SPDX-FileCopyrightText: 2015 ownCloud Inc.
* SPDX-FileCopyrightText: 2014 masensio <masensio@solidgear.es>
* SPDX-FileCopyrightText: 2014 David A. Velasco <dvelasco@solidgear.es>
* SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
*/
package com.owncloud.android.ui.helpers;
import android.Manifest;

View File

@ -1,23 +1,10 @@
/**
* ownCloud Android client application
*
* @author David A. Velasco
* Copyright (C) 2016 ownCloud GmbH.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2016 David A. Velasco <dvelasco@owncloud.com>
* SPDX-FileCopyrightText: 2016 ownCloud GmbH
* SPDX-License-Identifier: GPL-2.0-only
*/
package com.owncloud.android.ui.helpers;
import android.os.Parcel;
@ -25,7 +12,7 @@ import android.os.Parcelable;
import android.util.SparseBooleanArray;
/**
* Wraps a SparseBooleanArrayParcelable to allow its serialization and desearialization
* Wraps a SparseBooleanArrayParcelable to allow its serialization and de-searialization
* through {@link Parcelable} interface.
*/
public class SparseBooleanArrayParcelable implements Parcelable {

View File

@ -1,24 +1,10 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Álvaro Brey Vilas
* Copyright (C) 2022 Álvaro Brey Vilas
* Copyright (C) 2022 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2022 Álvaro Brey Vilas <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package com.owncloud.android.ui.preview
import android.graphics.BitmapFactory

View File

@ -1,24 +1,15 @@
/*
* ownCloud Android client application
*
* @author David A. Velasco
* @author Chris Narkiewicz
*
* Copyright (C) 2016 ownCloud Inc.
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hd 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2020-2024 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-FileCopyrightText: 2023 Alper Ozturk <alper_ozturk@proton.me>
* SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2019 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2019 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2016 ownCloud Inc.
* SPDX-FileCopyrightText: 2015 masensio <masensio@solidgear.es>
* SPDX-FileCopyrightText: 2013 David A. Velasco <dvelasco@solidgear.es>
* SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
*/
package com.owncloud.android.ui.preview;
@ -71,9 +62,8 @@ import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.viewpager.widget.ViewPager;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
/**
* Holds a swiping galley where image files contained in an Nextcloud directory are shown
* Holds a swiping gallery where image files contained in an Nextcloud directory are shown.
*/
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
public class PreviewImageActivity extends FileActivity implements
@ -87,16 +77,15 @@ public class PreviewImageActivity extends FileActivity implements
private static final String KEY_WAITING_FOR_BINDER = "WAITING_FOR_BINDER";
private static final String KEY_SYSTEM_VISIBLE = "TRUE";
private OCFile livePhotoFile;
private ViewPager mViewPager;
private PreviewImagePagerAdapter mPreviewImagePagerAdapter;
private int mSavedPosition;
private boolean mHasSavedPosition;
private boolean mRequestWaitingForBinder;
private DownloadFinishReceiver mDownloadFinishReceiver;
private UploadFinishReceiver mUploadFinishReceiver;
private View mFullScreenAnchorView;
private ViewPager viewPager;
private PreviewImagePagerAdapter previewImagePagerAdapter;
private int savedPosition;
private boolean hasSavedPosition;
private boolean requestWaitingForBinder;
private DownloadFinishReceiver downloadFinishReceiver;
private UploadFinishReceiver uploadFinishReceiver;
private View fullScreenAnchorView;
private boolean isDownloadWorkStarted = false;
@Inject AppPreferences preferences;
@ -137,14 +126,14 @@ public class PreviewImageActivity extends FileActivity implements
actionBar.setDisplayHomeAsUpEnabled(true);
}
mFullScreenAnchorView = getWindow().getDecorView();
fullScreenAnchorView = getWindow().getDecorView();
// to keep our UI controls visibility in line with system bars visibility
setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
if (savedInstanceState != null) {
mRequestWaitingForBinder = savedInstanceState.getBoolean(KEY_WAITING_FOR_BINDER);
requestWaitingForBinder = savedInstanceState.getBoolean(KEY_WAITING_FOR_BINDER);
} else {
mRequestWaitingForBinder = false;
requestWaitingForBinder = false;
}
observeWorkerState();
@ -168,10 +157,10 @@ public class PreviewImageActivity extends FileActivity implements
if (virtualFolderType != null && virtualFolderType != VirtualFolderType.NONE) {
VirtualFolderType type = (VirtualFolderType) virtualFolderType;
mPreviewImagePagerAdapter = new PreviewImagePagerAdapter(getSupportFragmentManager(),
type,
user,
getStorageManager());
previewImagePagerAdapter = new PreviewImagePagerAdapter(getSupportFragmentManager(),
type,
user,
getStorageManager());
} else {
// get parent from path
OCFile parentFolder = getStorageManager().getFileById(getFile().getParentId());
@ -181,7 +170,7 @@ public class PreviewImageActivity extends FileActivity implements
parentFolder = getStorageManager().getFileByPath(OCFile.ROOT_PATH);
}
mPreviewImagePagerAdapter = new PreviewImagePagerAdapter(
previewImagePagerAdapter = new PreviewImagePagerAdapter(
getSupportFragmentManager(),
livePhotoFile,
parentFolder,
@ -192,19 +181,19 @@ public class PreviewImageActivity extends FileActivity implements
);
}
mViewPager = findViewById(R.id.fragmentPager);
viewPager = findViewById(R.id.fragmentPager);
int position = mHasSavedPosition ? mSavedPosition : mPreviewImagePagerAdapter.getFilePosition(getFile());
int position = hasSavedPosition ? savedPosition : previewImagePagerAdapter.getFilePosition(getFile());
position = position >= 0 ? position : 0;
mViewPager.setAdapter(mPreviewImagePagerAdapter);
mViewPager.addOnPageChangeListener(this);
mViewPager.setCurrentItem(position);
viewPager.setAdapter(previewImagePagerAdapter);
viewPager.addOnPageChangeListener(this);
viewPager.setCurrentItem(position);
if (position == 0 && !getFile().isDown()) {
// this is necessary because mViewPager.setCurrentItem(0) just after setting the
// adapter does not result in a call to #onPageSelected(0)
mRequestWaitingForBinder = true;
requestWaitingForBinder = true;
}
}
@ -272,7 +261,7 @@ public class PreviewImageActivity extends FileActivity implements
@Override
protected void onSaveInstanceState(@NonNull Bundle outState) {
super.onSaveInstanceState(outState);
outState.putBoolean(KEY_WAITING_FOR_BINDER, mRequestWaitingForBinder);
outState.putBoolean(KEY_WAITING_FOR_BINDER, requestWaitingForBinder);
outState.putBoolean(KEY_SYSTEM_VISIBLE, isSystemUIVisible());
}
@ -283,9 +272,9 @@ public class PreviewImageActivity extends FileActivity implements
if (operation instanceof RemoveFileOperation) {
// initialize the pager with the new file list
initViewPager(getUser().get());
if (mViewPager.getAdapter().getCount() > 0) {
if (viewPager.getAdapter().getCount() > 0) {
// Trigger page reselection, to update the title
onPageSelected(mViewPager.getCurrentItem());
onPageSelected(viewPager.getCurrentItem());
} else {
// Last file has been deleted, so finish the activity
finish();
@ -307,11 +296,11 @@ public class PreviewImageActivity extends FileActivity implements
Log_OC.d(TAG, "Download worker started");
isDownloadWorkStarted = true;
if (mRequestWaitingForBinder) {
mRequestWaitingForBinder = false;
if (requestWaitingForBinder) {
requestWaitingForBinder = false;
Log_OC.d(TAG, "Simulating reselection of current page after connection " +
"of download binder");
onPageSelected(mViewPager.getCurrentItem());
onPageSelected(viewPager.getCurrentItem());
}
} else {
Log_OC.d(TAG, "Download worker stopped");
@ -334,13 +323,13 @@ public class PreviewImageActivity extends FileActivity implements
protected void onResume() {
super.onResume();
mDownloadFinishReceiver = new DownloadFinishReceiver();
downloadFinishReceiver = new DownloadFinishReceiver();
IntentFilter downloadIntentFilter = new IntentFilter(FileDownloadWorker.Companion.getDownloadFinishMessage());
localBroadcastManager.registerReceiver(mDownloadFinishReceiver, downloadIntentFilter);
localBroadcastManager.registerReceiver(downloadFinishReceiver, downloadIntentFilter);
mUploadFinishReceiver = new UploadFinishReceiver();
uploadFinishReceiver = new UploadFinishReceiver();
IntentFilter uploadIntentFilter = new IntentFilter(FileUploadWorker.Companion.getUploadFinishMessage());
localBroadcastManager.registerReceiver(mUploadFinishReceiver, uploadIntentFilter);
localBroadcastManager.registerReceiver(uploadFinishReceiver, uploadIntentFilter);
}
@Override
@ -350,9 +339,9 @@ public class PreviewImageActivity extends FileActivity implements
@Override
public void onPause() {
if (mDownloadFinishReceiver != null){
localBroadcastManager.unregisterReceiver(mDownloadFinishReceiver);
mDownloadFinishReceiver = null;
if (downloadFinishReceiver != null){
localBroadcastManager.unregisterReceiver(downloadFinishReceiver);
downloadFinishReceiver = null;
}
super.onPause();
@ -396,12 +385,12 @@ public class PreviewImageActivity extends FileActivity implements
*/
@Override
public void onPageSelected(int position) {
mSavedPosition = position;
mHasSavedPosition = true;
savedPosition = position;
hasSavedPosition = true;
if (!isDownloadWorkStarted) {
mRequestWaitingForBinder = true;
requestWaitingForBinder = true;
} else {
OCFile currentFile = mPreviewImagePagerAdapter.getFileAt(position);
OCFile currentFile = previewImagePagerAdapter.getFileAt(position);
if (currentFile != null) {
if (getSupportActionBar() != null) {
@ -410,7 +399,7 @@ public class PreviewImageActivity extends FileActivity implements
setDrawerIndicatorEnabled(false);
if (currentFile.isEncrypted() && !currentFile.isDown() &&
!mPreviewImagePagerAdapter.pendingErrorAt(position)) {
!previewImagePagerAdapter.pendingErrorAt(position)) {
requestForDownload(currentFile);
}
@ -479,20 +468,20 @@ public class PreviewImageActivity extends FileActivity implements
if (EditImageActivity.OPEN_IMAGE_EDITOR.equals(downloadBehaviour)) {
startImageEditor(file);
} else {
int position = mPreviewImagePagerAdapter.getFilePosition(file);
int position = previewImagePagerAdapter.getFilePosition(file);
if (position >= 0) {
if (downloadWasFine) {
mPreviewImagePagerAdapter.updateFile(position, file);
previewImagePagerAdapter.updateFile(position, file);
} else {
mPreviewImagePagerAdapter.updateWithDownloadError(position);
previewImagePagerAdapter.updateWithDownloadError(position);
}
mPreviewImagePagerAdapter.notifyDataSetChanged(); // will trigger the creation of new fragments
previewImagePagerAdapter.notifyDataSetChanged(); // will trigger the creation of new fragments
} else if (downloadWasFine) {
initViewPager(getUser().get());
int newPosition = mPreviewImagePagerAdapter.getFilePosition(file);
int newPosition = previewImagePagerAdapter.getFilePosition(file);
if (newPosition >= 0) {
mViewPager.setCurrentItem(newPosition);
viewPager.setCurrentItem(newPosition);
}
}
}
@ -504,22 +493,22 @@ public class PreviewImageActivity extends FileActivity implements
}
public void toggleFullScreen() {
boolean visible = (mFullScreenAnchorView.getSystemUiVisibility()
boolean visible = (fullScreenAnchorView.getSystemUiVisibility()
& View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0;
if (visible) {
hideSystemUI(mFullScreenAnchorView);
hideSystemUI(fullScreenAnchorView);
// actionBar.hide(); // propagated through
// OnSystemUiVisibilityChangeListener()
} else {
showSystemUI(mFullScreenAnchorView);
showSystemUI(fullScreenAnchorView);
// actionBar.show(); // propagated through
// OnSystemUiVisibilityChangeListener()
}
}
public void switchToFullScreen() {
hideSystemUI(mFullScreenAnchorView);
hideSystemUI(fullScreenAnchorView);
}
public void startImageEditor(OCFile file) {

View File

@ -1,23 +1,14 @@
/*
* ownCloud Android client application
* Nextcloud - Android Client
*
* @author David A. Velasco
* @author Chris Narkiewicz
*
* Copyright (C) 2015 ownCloud Inc.
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2020-2024 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-FileCopyrightText: 2023 Alper Ozturk <alper_ozturk@proton.me>
* SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2017-2020 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2019 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2015 ownCloud Inc.
* SPDX-FileCopyrightText: 2013-2015 David A. Velasco <dvelasco@solidgear.es>
* SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
*/
package com.owncloud.android.ui.preview;
@ -95,12 +86,9 @@ import pl.droidsonroids.gif.GifDrawable;
import static com.owncloud.android.datamodel.ThumbnailsCacheManager.PREFIX_THUMBNAIL;
/**
* This fragment shows a preview of a downloaded image.
* <p>
* Trying to get an instance with a NULL {@link OCFile} will produce an {@link IllegalStateException}.
* <p>
* If the {@link OCFile} passed is not downloaded, an {@link IllegalStateException} is generated on instantiation too.
*/
public class PreviewImageFragment extends FileFragment implements Injectable {

View File

@ -1,24 +1,10 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Álvaro Brey Vilas
* Copyright (C) 2022 Álvaro Brey Vilas
* Copyright (C) 2022 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2022 Álvaro Brey Vilas <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package com.owncloud.android.ui.preview.pdf
import android.graphics.Bitmap

View File

@ -1,24 +1,10 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Álvaro Brey Vilas
* Copyright (C) 2022 Álvaro Brey Vilas
* Copyright (C) 2022 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2022 Álvaro Brey Vilas <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package com.owncloud.android.ui.preview.pdf
import android.content.Intent

View File

@ -1,24 +1,10 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Álvaro Brey Vilas
* Copyright (C) 2022 Álvaro Brey Vilas
* Copyright (C) 2022 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2022 Álvaro Brey Vilas <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package com.owncloud.android.ui.preview.pdf
import android.graphics.Bitmap

View File

@ -1,25 +1,10 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Tobias Kaminsky
* @author Chris Narkiewicz
*
* Copyright (C) 2018 Tobias Kaminsky
* Copyright (C) 2018 Nextcloud GmbH.
* Copyright (C) 2019 Chris Narkiewicz <hello@ezaquarii.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2019 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2018 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.owncloud.android.ui.trashbin

View File

@ -1,7 +1,7 @@
<!--
~ Nextcloud - Android Client
~
~ SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro.brey@nextcloud.com>
~ SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
~ SPDX-FileCopyrightText: 2022 Nextcloud GmbH
~ SPDX-License-Identifier: AGPL-3.0-or-later
-->

View File

@ -4,7 +4,7 @@
~
~ SPDX-FileCopyrightText: 2023 Alper Ozturk <alper_ozturk@proton.me>
~ SPDX-FileCopyrightText: 2018-2022 Tobias Kaminsky <tobias@kaminsky.me>
~ SPDX-FileCopyrightText: 2022 Álvaro Brey
~ SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
~ SPDX-License-Identifier: AGPL-3.0-or-later
-->
<LinearLayout

View File

@ -1,26 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Nextcloud Android client application
@author Tobias Kaminsky
@author TSI-mc
Copyright (C) 2023 Andy Scherzinger
Copyright (C) 2023 TSI-mc
Copyright (C) 2018 Tobias Kaminsky
Copyright (C) 2018 Nextcloud GmbH
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
~ Nextcloud Talk - Android Client
~
~ SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors
~ SPDX-FileCopyrightText: 2023 Andy Scherzinger <info@andy-scherzinger.de>
~ SPDX-FileCopyrightText: 2023 TSI-mc
~ SPDX-FileCopyrightText: 2018 Tobias Kaminsky <tobias@kaminsky.me>
~ SPDX-License-Identifier: GPL-3.0-or-later AND AGPL-3.0-or-later
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"

View File

@ -1,24 +1,11 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Nextcloud Android client application
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Nextcloud - Android Client
~
~ @author Álvaro Brey Vilas
~ Copyright (C) 2022 Álvaro Brey Vilas
~ Copyright (C) 2022 Nextcloud GmbH
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU 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 General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
~ SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
~ SPDX-FileCopyrightText: 2022 Nextcloud Gmbh
~ SPDX-License-Identifier: GPL-3.0-or-later
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"

View File

@ -1,24 +1,11 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Nextcloud Android client application
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Nextcloud - Android Client
~
~ @author Álvaro Brey Vilas
~ Copyright (C) 2022 Álvaro Brey Vilas
~ Copyright (C) 2022 Nextcloud GmbH
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU 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 General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
~ SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
~ SPDX-FileCopyrightText: 2022 Nextcloud Gmbh
~ SPDX-License-Identifier: GPL-3.0-or-later
-->
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/page"
android:layout_width="match_parent"

View File

@ -1,24 +1,9 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Chris Narkiewicz
*
* Copyright (C) 2020 Chris Narkiewicz <hello@ezaquarii.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2020 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
package com.nextcloud.client.device
import android.annotation.SuppressLint

View File

@ -1,24 +1,10 @@
/*
* Nextcloud Android client application
* Nextcloud - Android Client
*
* @author Álvaro Brey Vilas
* Copyright (C) 2022 Álvaro Brey Vilas
* Copyright (C) 2022 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package com.owncloud.android.ui.adapter
import com.owncloud.android.lib.resources.shares.OCShare

View File

@ -3,7 +3,7 @@
*
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2024 Alper Ozturk <alper_ozturk@proton.me>
* SPDX-FileCopyrightText: 2023 Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
* SPDX-FileCopyrightText: 2023 Álvaro Brey Vilas<alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2023 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

View File

@ -4,7 +4,7 @@
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2024 Alper Ozturk <alper_ozturk@proton.me>
* SPDX-FileCopyrightText: 2023 Tobias Kaminsky <tobias@kaminsky.me>
* SPDX-FileCopyrightText: 2022 Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
* SPDX-FileCopyrightText: 2022 Álvaro Brey Vilas<alvaro@alvarobrey.com>
* SPDX-FileCopyrightText: 2016 Andy Scherzinger <info@andy-scherzinger.de>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

View File

@ -1,5 +1,5 @@
<!--
~ SPDX-FileCopyrightText: 2023 Álvaro Brey <alvaro.brey@nextcloud.com>
~ SPDX-FileCopyrightText: 2023 Álvaro Brey <alvaro@alvarobrey.com>
~ SPDX-License-Identifier: AGPL-3.0-or-later
-->
This `src/` directory is only here for F-Droid, as it doesn't pick up per-flavor metadata in the app/ subdir.