Skip to content

Commit

Permalink
Merge pull request #3355 from TeamAmaze/hotfix/3.7.1
Browse files Browse the repository at this point in the history
Hotfix/3.7.1 to master
  • Loading branch information
VishalNehra committed Jun 15, 2022
2 parents 57859b4 + 660bce2 commit 6eec21a
Show file tree
Hide file tree
Showing 334 changed files with 7,256 additions and 5,363 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android-debug-artifact-ondemand.yml
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
apk:
runs-on: ubuntu-20.04
if: github.event.comment.body == 'Build test apk' && (github.actor == 'VishalNehra' || github.actor == 'TranceLove' || github.actor == 'EmmanuelMess')
if: github.event.comment.body == 'Build test apk' && (github.actor == 'VishalNehra' || github.actor == 'TranceLove' || github.actor == 'EmmanuelMess' || github.actor == 'VishnuSanal')
steps:
- name: Github API Request
id: request
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/android-main.yml
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- 'master'
- 'release/*'
- 'hotfix/*'

concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
Expand Down
8 changes: 8 additions & 0 deletions README.md
Expand Up @@ -49,6 +49,14 @@ Support
<a href="https://www.paypal.me/vishalnehra"><img width="20%" src="paypal.svg" alt="PayPal"></a>
<a href="https://liberapay.com/Team-Amaze/donate"><img src="https://upload.wikimedia.org/wikipedia/commons/2/27/Liberapay_logo_v2_white-on-yellow.svg" alt="Liberapay" width="80px" ></a>
Or buy the [Cloud Plugin](https://play.google.com/store/apps/details?id=com.filemanager.amazecloud) supports Google Drive™, Dropbox, OneDrive and Box accounts.
Try our app - [Amaze File Utilities](https://play.google.com/store/apps/details?id=com.amaze.fileutilities)
1. List videos / images / music documents in your device in a interactive UI where you're able to group / sort and quickly jump to any headers.
2. Open videos / images / music / documents (pdf / docx / epub) with inbuilt player.
3. Share / delete / cast on your tv
4. Analyse internal storage for junk files, duplicate files, large videos / old downloads / screenshots or recordings.
5. Analyse and group images between memes, low light / blurry / selfies / group pics.
7. Transfer files directly between two mobile devices on same wifi network using high speed peer to peer network
8. Gesture support in image / video player, play in background, picture in picture mode, download subtitles within the player.

Warning
---
Expand Down
13 changes: 4 additions & 9 deletions app/build.gradle
Expand Up @@ -18,8 +18,8 @@ android {
applicationId "com.amaze.filemanager"
minSdkVersion 14
targetSdkVersion 30
versionCode 108
versionName "3.7.0"
versionCode 109
versionName "3.7.1"
multiDexEnabled true

vectorDrawables.useSupportLibrary = true
Expand Down Expand Up @@ -172,14 +172,7 @@ dependencies {
implementation "com.afollestad.material-dialogs:commons:$materialDialogsVersion"

// https://mvnrepository.com/artifact/org.apache.mina/mina-core

implementation group: 'org.apache.mina', name: 'mina-core', version: '2.0.16'
// https://mvnrepository.com/artifact/org.slf4j/slf4j-api
implementation group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
// https://mvnrepository.com/artifact/org.slf4j/slf4j-simple
implementation group: 'org.slf4j', name: 'slf4j-simple', version: slf4jVersion
// https://mvnrepository.com/artifact/org.slf4j/jcl-over-slf4j
implementation group: 'org.slf4j', name: 'jcl-over-slf4j', version: slf4jVersion

//implementation files('libs/ftplet-api-1.1.0-SNAPSHOT.jar')
// https://mvnrepository.com/artifact/org.apache.ftpserver/ftplet-api
Expand Down Expand Up @@ -245,6 +238,8 @@ dependencies {
implementation "androidx.core:core-ktx:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "ch.acra:acra-core:5.7.0"
implementation 'org.slf4j:slf4j-api:1.7.32'
implementation 'com.github.tony19:logback-android:2.0.0'
}

configurations.all {
Expand Down
Expand Up @@ -55,11 +55,11 @@ import java.net.SocketException
import java.security.SecureRandom
import java.util.concurrent.TimeUnit

// Require UIAutomator if need to run test on Android 11
// in order to obtain MANAGE_EXTERNAL_STORAGE permission
@RunWith(AndroidJUnit4::class)
@Suppress("StringLiteralDuplication")
@androidx.test.filters.Suppress
// Require UIAutomator if need to run test on Android 11
// in order to obtain MANAGE_EXTERNAL_STORAGE permission
class FtpServiceEspressoTest {

@get:Rule
Expand Down
Expand Up @@ -53,8 +53,9 @@ class FtpServiceStaticMethodsTest {
*/
if (SDK_INT >= N_MR1) {
ApplicationProvider.getApplicationContext<Context>().run {
if (!FtpService.isConnectedToLocalNetwork(this))
if (!FtpService.isConnectedToLocalNetwork(this)) {
fail("Please connect your device to network to run this test!")
}

FtpService.getLocalInetAddress(this).also {
assertNotNull(it)
Expand Down
Expand Up @@ -23,6 +23,18 @@
import static org.awaitility.Awaitility.await;
import static org.junit.Assert.assertEquals;

import java.io.File;
import java.util.List;
import java.util.concurrent.TimeUnit;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

import com.amaze.filemanager.database.models.OperationData;
import com.amaze.filemanager.filesystem.ssh.SshClientUtils;

import android.content.Context;
import android.os.Environment;

Expand All @@ -31,18 +43,6 @@
import androidx.test.filters.Suppress;
import androidx.test.platform.app.InstrumentationRegistry;

import com.amaze.filemanager.database.models.OperationData;
import com.amaze.filemanager.filesystem.ssh.SshClientUtils;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

import java.io.File;
import java.util.List;
import java.util.concurrent.TimeUnit;

@RunWith(AndroidJUnit4.class)
public class UtilsHandlerTest {

Expand Down Expand Up @@ -129,16 +129,14 @@ private void performEncryptUriTest(@NonNull final String origPath) {
null,
null));

await()
.atMost(10, TimeUnit.SECONDS)
.until(() -> utilsHandler.getSftpList().size() > 0);
await().atMost(10, TimeUnit.SECONDS).until(() -> utilsHandler.getSftpList().size() > 0);

List<String[]> result = utilsHandler.getSftpList();
assertEquals(1, result.size());
assertEquals("Test", result.get(0)[0]);
assertEquals(encryptedPath, result.get(0)[1]);
assertEquals(
"00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff",
utilsHandler.getSshHostKey(encryptedPath));
"00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff",
utilsHandler.getSshHostKey(encryptedPath));
}
}
Expand Up @@ -25,7 +25,7 @@
import org.junit.Before;
import org.junit.Test;

import com.amaze.filemanager.file_operations.filesystem.OpenMode;
import com.amaze.filemanager.fileoperations.filesystem.OpenMode;

import android.os.Parcel;

Expand Down
@@ -1,3 +1,23 @@
/*
* Copyright (C) 2014-2022 Arpit Khurana <arpitkh96@gmail.com>, Vishal Nehra <vishalmeham2@gmail.com>,
* Emmanuel Messulam<emmanuelbendavid@gmail.com>, Raymond Lai <airwave209gt at gmail.com> and Contributors.
*
* This file is part of Amaze File Manager.
*
* Amaze File Manager 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/>.
*/

package com.amaze.filemanager.test

// import android.content.Intent
Expand Down
@@ -1,3 +1,23 @@
/*
* Copyright (C) 2014-2022 Arpit Khurana <arpitkh96@gmail.com>, Vishal Nehra <vishalmeham2@gmail.com>,
* Emmanuel Messulam<emmanuelbendavid@gmail.com>, Raymond Lai <airwave209gt at gmail.com> and Contributors.
*
* This file is part of Amaze File Manager.
*
* Amaze File Manager 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/>.
*/

package com.amaze.filemanager.utils

import android.os.Build.VERSION.SDK_INT
Expand Down Expand Up @@ -50,7 +70,10 @@ class CryptUtilEspressoTest {
false,
null
)
val targetFile = File(Environment.getExternalStorageDirectory(), "test.bin${CryptUtil.CRYPT_EXTENSION}")
val targetFile = File(
Environment.getExternalStorageDirectory(),
"test.bin${CryptUtil.CRYPT_EXTENSION}"
)
assertTrue(targetFile.exists())
if (SDK_INT < JELLY_BEAN_MR2) {
// Quirks for SDK < 18. File is not encrypted at all.
Expand Down Expand Up @@ -98,9 +121,15 @@ class CryptUtilEspressoTest {
true,
"12345678"
)
val targetFile = File(Environment.getExternalStorageDirectory(), "test.bin${CryptUtil.AESCRYPT_EXTENSION}")
val targetFile = File(
Environment.getExternalStorageDirectory(),
"test.bin${CryptUtil.AESCRYPT_EXTENSION}"
)
assertTrue(targetFile.exists())
assertTrue("Source size = ${source.size} target file size = ${targetFile.length()}", targetFile.length() > source.size)
assertTrue(
"Source size = ${source.size} target file size = ${targetFile.length()}",
targetFile.length() > source.size
)
sourceFile.delete()
CryptUtil(
AppConfig.getInstance(),
Expand Down
@@ -1,3 +1,23 @@
/*
* Copyright (C) 2014-2022 Arpit Khurana <arpitkh96@gmail.com>, Vishal Nehra <vishalmeham2@gmail.com>,
* Emmanuel Messulam<emmanuelbendavid@gmail.com>, Raymond Lai <airwave209gt at gmail.com> and Contributors.
*
* This file is part of Amaze File Manager.
*
* Amaze File Manager 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/>.
*/

package com.amaze.filemanager.utils.security

import android.os.Build.VERSION.SDK_INT
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/AndroidManifest.xml
Expand Up @@ -105,11 +105,17 @@
<data android:scheme="com.amaze.filemanager" />
</intent-filter>

<intent-filter android:label="@string/open_with_amaze">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" android:host="teamamaze.xyz" android:pathPrefix="/open_file" />
</intent-filter>

<intent-filter tools:ignore="AppLinkUrlError">
<action android:name="android.intent.action.VIEW" />
<data android:mimeType="resource/folder" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="com.amaze.filemanager" />
</intent-filter>

<intent-filter android:label="@string/intent_save_as">
Expand Down
28 changes: 28 additions & 0 deletions app/src/main/assets/logback.xml
@@ -0,0 +1,28 @@
<configuration>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<!-- lazy initialization: don't create the file until 1st write -->
<!--<lazy>true</lazy>-->

<file>/data/data/${PACKAGE_NAME}/cache/logs.txt</file>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
</appender>
<appender name='ASYNC' class='ch.qos.logback.classic.AsyncAppender'>
<appender-ref ref='FILE' />
</appender>
<appender name="LOGCAT" class="ch.qos.logback.classic.android.LogcatAppender">
<tagEncoder>
<pattern>%logger{12}</pattern>
</tagEncoder>
<encoder>
<pattern>[%-20thread] %msg</pattern>
</encoder>
</appender>

<root level="WARN">
<appender-ref ref="ASYNC" />
<appender-ref ref="LOGCAT" />
</root>
<shutdownHook/>
</configuration>
9 changes: 6 additions & 3 deletions app/src/main/java/com/amaze/filemanager/LogHelper.java
Expand Up @@ -20,16 +20,19 @@

package com.amaze.filemanager;

import android.util.Log;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public final class LogHelper {
private static final Logger LOG = LoggerFactory.getLogger(LogHelper.class);

private LogHelper() {}

public static final void logOnProductionOrCrash(String tag, String message) {
public static final void logOnProductionOrCrash(String message) {
if (BuildConfig.DEBUG) {
throw new IllegalStateException(message);
} else {
Log.e(tag, message);
LOG.error(message);
}
}
}

0 comments on commit 6eec21a

Please sign in to comment.