Skip to content

Commit 63ffad7

Browse files
ahlem-jarrarraphmimwafalakhalAhlemcarohadad
authored
Merge develop into Main (#367)
* New translations from Lokalize for 2.15.0 (Feb 27 ) - Added Tsonga and PT_Mozambique (#364) * Fix 2.15.0 bugbash (#365) * Fix T-And-1608 T-And-1608 - Grid and List view layout brakes after going back from File Information while using Grid view * Add - T-And-1620 T-And-1620 - Add support for Tsonga and Portuguese(Mozambique) * Fix T-And-1607 T-And-1607 - Cannot select more than 1 favourite form * Fix :T-And-1612 - The top banner visual on a video behaves incorrectly * Fix T-And-1606 - Fix thumbnail When taking a photo/video, the thumbnail of the photo taken does not load * T-And-1618 Fix nextcloud date T-And-1618 - Fix the date of Nextcloud reports (on nextcloud) * Fix T-And-1604 - Correct the "Select files from Tella" button * Bug bash 2.15.0 fixes (#366) * fix T-And-1614 - Forms are not displayed in Outbox * fix T-And-1617 - Selecting all Checkboxes doesn't work on forms * Fix select mode --------- Co-authored-by: wafa <[email protected]> Co-authored-by: Ahlem <[email protected]> * Release 2.15.0 "200" * Restored README changes lost on merge (#306) --------- Co-authored-by: raphmim <[email protected]> Co-authored-by: wafa <[email protected]> Co-authored-by: Ahlem <[email protected]> Co-authored-by: Carolina Hadad <[email protected]>
1 parent 1ff75dc commit 63ffad7

29 files changed

+2538
-105
lines changed

README.md

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,24 @@
2222

2323
In challenging environments, with limited or no internet connectivity or in the face of repression, Tella is an app that makes it easier and safer to document human rights violations and collect data. Tella is available Android and iOS.
2424

25-
| ![Camouflage](docs/Camouflage.gif) | ![Encrypting](docs/Encrypting.gif) | ![Connection](docs/Server.gif) |
25+
More information about how to get Tella --including user guides-- can be found on our [documentation platform](https://tella-app.org/docs).
26+
27+
| [![Camouflage](docs/Camouflage.gif)](https://tella-app.org/features#encryption/) | [![Encrypting](docs/Encrypting.gif)](https://tella-app.org/) | [![Server Connections](docs/Server.gif)](https://tella-app.org/for-organizations) |
2628
|:---:|:---:|:---:|
2729
| [Tella camouflaged as a calculator](https://tella-app.org/features#camouflage) | [Taking and encrypting a video](https://tella-app.org/features#encryption) | [Sending data to a server](https://tella-app.org/for-organizations) |
2830

2931
Tella:
30-
- encrypts photo, video, audio and PDF files in a separate gallery so it cannot be accessed from the phone's regular gallery or file explorer.
31-
- hides itself by changing its name and icon in the list of apps or behind a working calculator.
32+
- encrypts photo, video, documents and audio files in a separate gallery so it cannot be accessed from the phone's regular gallery or file explorer.
33+
- hides itself by changing its name and icon in the list of apps.
3234
- captures metadata when taking photos, videos, and audio recordings to verify the origin of the files.
33-
- allows users to quickly delete all files in Tella's encrypted vault.
35+
- allows users to quickly delete all files in Tella's encrypted Gallery.
3436
- enables users working with a group or organization to collect and send data to a server without relying on third-party apps or servers.
3537

3638
You can watch a [short video demonstrating Tella's main features here](https://www.youtube.com/watch?v=aJIyWESxM_o&t=1s)
3739

3840

3941
## Why Tella? <a id="why-tella"></a>
4042

41-
Across the world, journalists and human rights defenders are facing increasing levels of physical repression, with mobile devices searched or seized at border crossings and airports, checkpoints, in the street, or in targeted raids. At the same time, digital surveillance and censorship threaten the flow of information out of repressive areas, particularly on violence, human rights abuse, or corruption.
42-
4343
Tella's goal is to protect at-risk individuals and groups--advocates, journalists, human rights defenders--from repressive surveillance, whether physical or digital. Tella aims to provide a highly usable solution, accessible to all with minimal or no training, to collect, safeguard, and communicate sensitive information in highly repressive environments.
4444

4545
Tella has three main objectives:
@@ -66,6 +66,26 @@ A detailed list of all Tella features can be found here: https://tella-app.org/f
6666

6767
Tella is currently available on Android, iOS and the F-Droid store. We also share the Tella .apk to be installed manually. [Here there is more information](https://tella-app.org/faq#general). A step-by-step guide on how to use Tella can be found [here](https://tella-app.org/get-started-android).
6868

69+
70+
## Detailed list of features <a id="features"></a>
71+
72+
A detailed list of features for Tella Android, Tella FOSS and Tella iOS can be found [on the documentation](https://tella-app.org/features).
73+
74+
## How to get Tella and start using it? <a id="use-tella"></a>
75+
76+
### Tella for Android
77+
Tella for Android can be downloaded:
78+
- directly from the [Google Play Store](https://play.google.com/store/apps/details?id=org.hzontal.tella).
79+
- from [this folder](https://web.tresorit.com/l/JgMjK#FV9IoIZdDxwAUPqtupJzsQ) or from our [Telegram channel](https://t.me/tellaapp), as an APK, to be installed manually.
80+
81+
### Tella FOSS (F-droid)
82+
We also maintain a version of Tella in the [F-droid store](https://f-droid.org/en/packages/org.hzontal.tellaFOSS/). And the code for it can be found here: https://github.com/Horizontal-org/Tella-Android-FOSS
83+
84+
85+
### Get started on Tella Android
86+
A get started guide for Tella Android is available [here](https://tella-app.org/get-started-android).
87+
88+
6989
## Tech & frameworks used <a id="tech-used"></a>
7090

7191
This software uses the following open source packages:
@@ -78,7 +98,7 @@ This software uses the following open source packages:
7898

7999
**Step 1: Get familiar with Tella.** The best way is simply to download Tella play with it and try the different features, or [read our documentation here](https://docs.tella-app.org).
80100

81-
**Step 2: Find an issue to work on.** Please find an issue that you would like to take on and comment to assign yourself if no one else has done so already. [All issues with the label `good first issue`](https://github.com/Horizontal-org/Tella-Android/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) are good ways to get started. Also, feel free to ask questions in the issues, and we will get back to you ASAP!
101+
**Step 2: Find an issue to work on.** Please find an issue that you would like to take on and comment to assign yourself if no one else has done so already. Also, feel free to ask us about priorities, general guidance, and we will get back to you ASAP!
82102

83103
**Step 3: Fork the repo** Click the "fork" button in the upper right of the Github repo page. A fork is a copy of the repository that allows you to freely explore & experiment without changing the original project. You can learn more about forking a repo [in this article](https://help.github.com/articles/fork-a-repo/).
84104

@@ -89,18 +109,15 @@ This software uses the following open source packages:
89109
**Step 6: Pushing your branch and creating a pull request** Push your branch up and create a pull request. Please indicate which issue your PR addresses in the title.
90110

91111
## Translating the app <a id="translating"></a>
92-
Tella is currently available in [17 languages](https://tella-app.org/translating-tella). We are always looking to translate Tella into more languages.
112+
Tella is currently available in [20 languages](https://tella-app.org/translating-tella). We are always looking to translate Tella into more languages.
93113

94114
If you are interested in adding a new language, or if you noticed a mistake or a missing translation, you can join [follow our contributing guidelines](https://tella-app.org/translating-tella/#how-do-i-become-a-translator).
95115

96-
If you are interested in adding a new language, or if you noticed a mistake or a missing translation, you can join [follow our contributing guidelines](https://tella-app.org/translating-tella/#how-do-i-become-a-translator).
97-
98-
99-
100116
## Contact us <a id="contact"></a>
101117
We love hearing from users, designers, and developers!
102118

103119
We host monthly [community meetings](https://tella-app.org/community-meetings) and we offer different ways to [contact-us](https://tella-app.org/contact-us).
104120

105121
If you have any question, ideas or suggestions on how we can improve or what new features we should add, or if you need support deploying Tella, don't hesitate to reach out!
106122

123+

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ buildscript {
5555
versions.cameraview = '2.7.2'
5656
versions.exifinterface = '1.3.3'
5757
versions.simplifyInk = '1.0.3'
58-
versions.circularimageview = '4.3.0'
58+
versions.circularimageview = '3.0.2'
5959
versions.ihsanbalLoggingInterceptor = '3.0.0'
6060
versions.cardview = '1.0.0'
6161
versions.buildGradle = '4.1.3'

docs/Camouflage.gif

7.13 MB
Loading

docs/Encrypting.gif

39.8 MB
Loading

mobile/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ android {
1414
minSdkVersion versions.minSdk
1515
compileSdkVersion versions.compileSdk
1616
targetSdkVersion versions.targetSdk
17-
versionCode 198
17+
versionCode 200
1818
versionName "2.15.0"
1919
multiDexEnabled true
2020

@@ -29,7 +29,7 @@ android {
2929
String dropboxKey = localProperties['DROPBOX_APP_KEY']
3030
if (dropboxKey == null) {
3131
logger.warn("No value provided for DROPBOX_APP_KEY. Specify a value in a examples/android/local.properties file. You can register for one at https://developers.dropbox.com/")
32-
dropboxKey = ""
32+
dropboxKey = "PUT_YOUR_KEY_HERE"
3333
}
3434
buildConfigField "String", "DROPBOX_APP_KEY", "\"${dropboxKey}\""
3535
manifestPlaceholders = [dropboxKey: dropboxKey]

mobile/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
android:largeHeap="true"
5252
android:networkSecurityConfig="@xml/configure_localhost_media_file_http_server"
5353
android:roundIcon="@mipmap/tella_icon_round"
54+
android:localeConfig="@xml/locales_config"
5455
android:supportsRtl="true"
5556
android:theme="@style/AppTheme"
5657
android:usesCleartextTraffic="true"

mobile/src/main/java/org/horizontal/tella/mobile/data/nextcloud/NextCloudRepositoryImp.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,11 @@ class NextCloudRepositoryImp(private val context: Context) : NextCloudRepository
115115

116116
val descriptionFilePath = "$finalFolderPath/description.txt"
117117

118-
val timeStamp: Long = System.currentTimeMillis()
118+
val timeStamp: Long = System.currentTimeMillis() / 1000 // Convert to seconds if required
119119
val uploadOperation = UploadFileRemoteOperation(
120120
descriptionFile.absolutePath, descriptionFilePath, "text/plain", timeStamp
121121
)
122+
122123
val result = uploadOperation.execute(client)
123124

124125
if (result.isSuccess) {
@@ -203,8 +204,8 @@ class NextCloudRepositoryImp(private val context: Context) : NextCloudRepository
203204
remoteFilePath,
204205
mimeType,
205206
tempUploadId,
206-
System.currentTimeMillis(),
207-
System.currentTimeMillis(),
207+
System.currentTimeMillis() / 1000,
208+
System.currentTimeMillis() / 1000,
208209
true,
209210
true
210211
)
@@ -267,5 +268,5 @@ class NextCloudRepositoryImp(private val context: Context) : NextCloudRepository
267268
)
268269
}
269270
}
270-
271+
271272
}

mobile/src/main/java/org/horizontal/tella/mobile/util/LocaleManager.java

Lines changed: 49 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,32 @@
55
import android.content.res.Configuration;
66
import android.content.res.Resources;
77
import android.os.Build;
8+
89
import androidx.annotation.Nullable;
910

1011
import java.util.Locale;
1112
import java.util.concurrent.Callable;
1213

1314
import io.reactivex.Completable;
1415
import io.reactivex.Single;
16+
import io.reactivex.disposables.CompositeDisposable;
1517
import io.reactivex.schedulers.Schedulers;
1618
import org.horizontal.tella.mobile.data.sharedpref.SharedPrefs;
1719

18-
1920
/**
2021
* Managing "forced" (non-system) locale in the app.
2122
*/
2223
public class LocaleManager {
2324
private static LocaleManager instance;
2425
private Locale appLocale;
26+
private final CompositeDisposable disposables = new CompositeDisposable();
2527

2628
private static final String NONE_LANGUAGE = "";
2729

28-
2930
public synchronized static LocaleManager getInstance() {
3031
if (instance == null) {
3132
instance = new LocaleManager();
3233
}
33-
3434
return instance;
3535
}
3636

@@ -39,62 +39,85 @@ private LocaleManager() {
3939
}
4040

4141
public Context getLocalizedContext(Context context) {
42-
if (appLocale == null) { // nothing to do..
42+
if (appLocale == null) { // If no custom locale is set, return default context
4343
return context;
4444
}
45-
46-
// todo: ContextWrapper here?
4745
return getLocalizedContext(context, appLocale);
4846
}
4947

48+
/**
49+
* Sets the app locale and saves it in SharedPreferences.
50+
*/
5051
public void setLocale(@Nullable final Locale newLocale) {
5152
if (newLocale != null) {
5253
appLocale = newLocale;
5354
} else {
5455
appLocale = getSystemLocale();
5556
}
5657

57-
setLanguageSetting(newLocale != null ? newLocale.getLanguage() : null);
58+
// Store the FULL locale (language + region) instead of just the language.
59+
String localeString = (newLocale != null) ? newLocale.toLanguageTag() : null;
60+
setLanguageSetting(localeString);
5861
}
5962

63+
/**
64+
* Gets the currently saved language setting.
65+
*/
6066
@Nullable
6167
public String getLanguageSetting() {
62-
String language = Single.fromCallable(() -> {
63-
String language1 = SharedPrefs.getInstance().getAppLanguage();
64-
return language1 != null ? language1 : NONE_LANGUAGE;
68+
String localeTag = Single.fromCallable(() -> {
69+
String savedLocale = SharedPrefs.getInstance().getAppLanguage();
70+
return savedLocale != null ? savedLocale : NONE_LANGUAGE;
6571
}).subscribeOn(Schedulers.io()).blockingGet();
6672

67-
return NONE_LANGUAGE.equals(language) ? null : language;
73+
return NONE_LANGUAGE.equals(localeTag) ? null : localeTag;
6874
}
6975

70-
private void setLanguageSetting(@Nullable final String language) {
71-
Completable.fromCallable((Callable<Void>) () -> {
72-
SharedPrefs.getInstance().setAppLanguage(language);
76+
/**
77+
* Saves the full language setting (including region).
78+
*/
79+
private void setLanguageSetting(@Nullable final String localeTag) {
80+
disposables.add(Completable.fromCallable((Callable<Void>) () -> {
81+
SharedPrefs.getInstance().setAppLanguage(localeTag);
7382
return null;
74-
}).subscribeOn(Schedulers.io()).subscribe(); // leaks?
83+
}).subscribeOn(Schedulers.io()).subscribeWith(new io.reactivex.observers.DisposableCompletableObserver() {
84+
@Override
85+
public void onComplete() {
86+
// Successfully saved
87+
}
88+
89+
@Override
90+
public void onError(Throwable e) {
91+
e.printStackTrace();
92+
}
93+
}));
7594
}
7695

96+
/**
97+
* Gets the system default locale.
98+
*/
7799
private Locale getSystemLocale() {
78100
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
79101
return Resources.getSystem().getConfiguration().getLocales().get(0);
80102
} else {
81-
//noinspection deprecation
82103
return Resources.getSystem().getConfiguration().locale;
83104
}
84105
}
85106

107+
/**
108+
* Loads the saved locale from SharedPreferences.
109+
*/
86110
@Nullable
87111
private Locale loadSavedLocale() {
88-
String language = getLanguageSetting();
89-
return language != null ? new Locale(language) : null;
112+
String localeTag = getLanguageSetting();
113+
return (localeTag != null) ? Locale.forLanguageTag(localeTag) : null;
90114
}
91115

92116
private Context getLocalizedContext(Context context, Locale locale) {
93117
try {
94118
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
95119
return updateResources(context, locale);
96120
}
97-
98121
return updateResourcesLegacy(context, locale);
99122
} catch (Throwable ignored) {
100123
return context;
@@ -104,30 +127,27 @@ private Context getLocalizedContext(Context context, Locale locale) {
104127
@TargetApi(Build.VERSION_CODES.N)
105128
private static Context updateResources(Context context, Locale locale) {
106129
Locale.setDefault(locale);
107-
//LocaleList localeList = new LocaleList(locale);
108-
//LocaleList.setDefault(localeList);
109-
110130
Configuration configuration = context.getResources().getConfiguration();
111131
configuration.setLocale(locale);
112132
configuration.setLayoutDirection(locale);
113-
//configuration.setLocales(localeList);
114-
115133
return context.createConfigurationContext(configuration);
116134
}
117135

118136
@SuppressWarnings("deprecation")
119137
private static Context updateResourcesLegacy(Context context, Locale locale) {
120138
Locale.setDefault(locale);
121-
122139
Resources resources = context.getResources();
123-
124140
Configuration configuration = resources.getConfiguration();
125141
configuration.locale = locale;
126-
127142
configuration.setLayoutDirection(locale);
128-
129143
resources.updateConfiguration(configuration, resources.getDisplayMetrics());
130-
131144
return context;
132145
}
146+
147+
/**
148+
* Clean up resources.
149+
*/
150+
public void dispose() {
151+
disposables.clear();
152+
}
133153
}

mobile/src/main/java/org/horizontal/tella/mobile/views/activity/viewer/VaultActionsHelper.kt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ object VaultActionsHelper {
4747
vaultFile: VaultFile,
4848
viewModel: SharedMediaFileViewModel,
4949
unitFunction: () -> Unit,
50-
toolbar: Toolbar
51-
) {
50+
toolbar: Toolbar) {
51+
5252
chosenVaultFile = vaultFile
5353
sharedViewModel = viewModel
5454
toolBar = toolbar
@@ -184,10 +184,7 @@ object VaultActionsHelper {
184184
}
185185

186186
fun BaseActivity.shareMediaFile() {
187-
if (chosenVaultFile == null) {
188-
return
189-
}
190-
if (chosenVaultFile?.metadata != null) {
187+
if (chosenVaultFile.metadata != null) {
191188
showShareWithMetadataDialog()
192189
} else {
193190
startShareActivity(false)

mobile/src/main/java/org/horizontal/tella/mobile/views/activity/viewer/VideoViewerActivity.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,4 +383,15 @@ class VideoViewerActivity : BaseLockActivity(), StyledPlayerView.ControllerVisib
383383
}
384384
}
385385

386+
override fun onBackPressed() {
387+
super.onBackPressed()
388+
if (isInfoShown) {
389+
toolbar.menu.findItem(R.id.menu_item_more).isVisible = true
390+
if (withMetadata){
391+
toolbar.menu.findItem(R.id.menu_item_metadata).isVisible = true
392+
}
393+
toolbar.title = vaultFile?.name
394+
}
395+
}
396+
386397
}

0 commit comments

Comments
 (0)