mirror of
https://github.com/nextcloud/android.git
synced 2024-11-21 20:55:31 +03:00
Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
d8e8d012f3
commit
40a343e895
54 changed files with 342 additions and 861 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 .
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,7 +157,7 @@ public class PreviewImageActivity extends FileActivity implements
|
|||
if (virtualFolderType != null && virtualFolderType != VirtualFolderType.NONE) {
|
||||
VirtualFolderType type = (VirtualFolderType) virtualFolderType;
|
||||
|
||||
mPreviewImagePagerAdapter = new PreviewImagePagerAdapter(getSupportFragmentManager(),
|
||||
previewImagePagerAdapter = new PreviewImagePagerAdapter(getSupportFragmentManager(),
|
||||
type,
|
||||
user,
|
||||
getStorageManager());
|
||||
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
-->
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue