Skip to content

Commit

Permalink
Merge pull request #1192 from meganz/release/v3.7.4a
Browse files Browse the repository at this point in the history
Release/v3.7.4a
  • Loading branch information
Yenel authored Mar 13, 2020
2 parents 1d52e24 + 15c66ca commit a4e282b
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 27 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "mega.privacy.android.app"
minSdkVersion 21
targetSdkVersion 28
versionCode 294
versionName "3.7.4 (294)"
versionCode 297
versionName "3.7.4 (297)"
multiDexEnabled true
ndk.abiFilters 'armeabi-v7a','x86', 'x86_64', 'arm64-v8a'
}
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/mega/privacy/android/app/BaseActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ public BaseActivity() {
if(isChatEnabled()) {
megaChatApi = app.getMegaChatApi();
}
}

dbH = app.getDbH();
dbH = app.getDbH();
}
}

@Override
Expand Down Expand Up @@ -145,10 +145,10 @@ private void checkMegaObjects() {
megaChatApi = app.getMegaChatApi();
}
}
}

if (dbH == null) {
dbH = app.getDbH();
if (dbH == null) {
dbH = app.getDbH();
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public class MegaApplication extends MultiDexApplication implements MegaChatRequ

final String TAG = "MegaApplication";

static final public String USER_AGENT = "MEGAAndroid/3.7.4_294";
static final public String USER_AGENT = "MEGAAndroid/3.7.4_297";

DatabaseHandler dbH;
MegaApiAndroid megaApi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import nz.mega.sdk.MegaNode;
import nz.mega.sdk.MegaShare;

import static mega.privacy.android.app.utils.LogUtil.*;
import static mega.privacy.android.app.utils.SortUtil.*;

public class SearchNodesTask extends AsyncTask<Void, Void, Void> {
Expand Down Expand Up @@ -258,6 +259,12 @@ private boolean isCDExplorerF() {
}

public static void setSearchProgressView(RelativeLayout contentLayout, ProgressBar searchProgressBar, RecyclerView recyclerView, boolean inProgress) {
if (contentLayout == null || searchProgressBar == null || recyclerView == null) {
logWarning("Cannot set search progress view, one or more parameters are NULL.");
logDebug("contentLayout: " + contentLayout + ", searchProgressBar: " + searchProgressBar + ", recyclerView: " + recyclerView);
return;
}

contentLayout.setEnabled(!inProgress);
if (inProgress) {
contentLayout.setAlpha(0.4f);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,12 @@ protected List<ShareInfo> doInBackground(Intent... params) {

@Override
protected void onPostExecute(List<ShareInfo> info) {
if (info == null || info.isEmpty()) {
logWarning("Selected items list is null or empty.");
finishFileExplorer();
return;
}

filePreparedInfos = info;
if(needLogin) {
Intent loginIntent = new Intent(FileExplorerActivityLollipop.this, LoginActivityLollipop.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,11 @@ public void showAB(Toolbar tB){

public void setKeyboardVisibilityListener(final OnKeyboardVisibilityListener onKeyboardVisibilityListener) {
final View parentView = ((ViewGroup) findViewById(android.R.id.content)).getChildAt(0);
if (parentView == null) {
logWarning("Cannot set the keyboard visibility listener. Parent view is NULL.");
return;
}

parentView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {

private boolean alreadyOpen;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5745,8 +5745,13 @@ private void removeFragment(Fragment fragment) {
}

@SuppressLint("NewApi")
public void selectDrawerItemLollipop(DrawerItem item){
logDebug("selectDrawerItemLollipop: "+item);
public void selectDrawerItemLollipop(DrawerItem item) {
if (item == null) {
logWarning("The selected DrawerItem is NULL. Using latest or default value.");
item = drawerItem != null ? drawerItem : DrawerItem.CLOUD_DRIVE;
}

logDebug("Selected DrawerItem: " + item.name());

drawerItem = item;
((MegaApplication)getApplication()).setRecentChatVisible(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,18 @@ protected Integer doInBackground(Long... params){
logDebug("PreviewAsyncTask()-doInBackground");
handle = params[0];
MegaNode node = megaApi.getNodeByHandle(handle);
if (node == null) {
logWarning("Cannot get the preview because the node is NULL.");
return 3;
}

preview = getPreviewFromFolderFullImage(node, activity);

if (preview != null){
return 0;
}
else{
if (pendingPreviews.contains(node.getHandle())){
if (pendingPreviews != null && pendingPreviews.contains(node.getHandle())) {
logDebug("The preview is already downloaded or added to the list");
return 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,11 +537,13 @@ public void onCreate (Bundle savedInstanceState){
}

public void checkScroll () {
if ((recyclerView.canScrollVertically(-1) && recyclerView.getVisibility() == View.VISIBLE) || (adapter != null && adapter.isMultipleSelect())){
((ManagerActivityLollipop) context).changeActionBarElevation(true);
}
else {
((ManagerActivityLollipop) context).changeActionBarElevation(false);
if (recyclerView != null) {
if ((recyclerView.canScrollVertically(-1) && recyclerView.getVisibility() == View.VISIBLE) || (adapter != null && adapter.isMultipleSelect())){
((ManagerActivityLollipop) context).changeActionBarElevation(true);
}
else {
((ManagerActivityLollipop) context).changeActionBarElevation(false);
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_change_password.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:hint="@string/my_account_change_password_newPassword1"
app:errorEnabled="true"
app:errorTextAppearance="@style/InputTextAppearanceError">

Expand All @@ -52,7 +53,6 @@
android:textSize="16sp"
android:imeOptions="actionNext"
android:inputType="textPassword"
android:hint="@string/my_account_change_password_newPassword1"
android:theme="@style/ColorControlStyle"/>

</android.support.design.widget.TextInputLayout>
Expand Down Expand Up @@ -168,6 +168,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:hint="@string/my_account_change_password_newPassword2"
app:errorEnabled="true"
app:errorTextAppearance="@style/InputTextAppearanceError">

Expand All @@ -178,7 +179,6 @@
android:textSize="16sp"
android:imeOptions="actionDone"
android:inputType="textPassword"
android:hint="@string/my_account_change_password_newPassword2"
android:theme="@style/ColorControlStyle"/>

</android.support.design.widget.TextInputLayout>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_confirm_email.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
android:id="@+id/confirm_email_new_email_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/email_text"
app:errorEnabled="true"
app:errorTextAppearance="@style/InputTextAppearanceError">

Expand All @@ -74,7 +75,6 @@
android:textSize="16sp"
android:imeOptions="actionDone"
android:inputType="textEmailAddress"
android:hint="@string/email_text"
android:theme="@style/ColorControlStyle"/>

</android.support.design.widget.TextInputLayout>
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/layout/fragment_create_account.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7dp"
android:hint="@string/first_name_text"
app:errorEnabled="true"
app:errorTextAppearance="@style/InputTextAppearanceError">

Expand All @@ -63,7 +64,6 @@
android:textSize="16sp"
android:imeOptions="actionNext"
android:inputType="text|textCapWords"
android:hint="@string/first_name_text"
android:theme="@style/ColorControlStyle"/>

</android.support.design.widget.TextInputLayout>
Expand All @@ -89,6 +89,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="@string/lastname_text"
app:errorEnabled="true"
app:errorTextAppearance="@style/InputTextAppearanceError">

Expand All @@ -99,7 +100,6 @@
android:textSize="16sp"
android:imeOptions="actionNext"
android:inputType="text|textCapWords"
android:hint="@string/lastname_text"
android:theme="@style/ColorControlStyle"/>

</android.support.design.widget.TextInputLayout>
Expand All @@ -125,6 +125,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="@string/email_text"
app:errorEnabled="true"
app:errorTextAppearance="@style/InputTextAppearanceError">

Expand All @@ -135,7 +136,6 @@
android:textSize="16sp"
android:imeOptions="actionNext"
android:inputType="textEmailAddress"
android:hint="@string/email_text"
android:theme="@style/ColorControlStyle"/>

</android.support.design.widget.TextInputLayout>
Expand All @@ -161,6 +161,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="@string/password_text"
app:errorEnabled="true"
app:errorTextAppearance="@style/InputTextAppearanceError">

Expand All @@ -171,7 +172,6 @@
android:textSize="16sp"
android:imeOptions="actionNext"
android:inputType="textPassword"
android:hint="@string/password_text"
android:theme="@style/ColorControlStyle"/>

</android.support.design.widget.TextInputLayout>
Expand Down Expand Up @@ -287,6 +287,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="@string/confirm_password_text"
app:errorEnabled="true"
app:errorTextAppearance="@style/InputTextAppearanceError">

Expand All @@ -297,7 +298,6 @@
android:textSize="16sp"
android:imeOptions="actionDone"
android:inputType="textPassword"
android:hint="@string/confirm_password_text"
android:theme="@style/ColorControlStyle"/>

</android.support.design.widget.TextInputLayout>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="44dp"
android:hint="@string/email_text"
app:errorEnabled="true"
app:errorTextAppearance="@style/InputTextAppearanceError">

Expand All @@ -61,7 +62,6 @@
android:textSize="16sp"
android:imeOptions="actionNext"
android:inputType="textEmailAddress"
android:hint="@string/email_text"
android:theme="@style/ColorControlStyle"/>

</android.support.design.widget.TextInputLayout>
Expand All @@ -87,6 +87,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:hint="@string/password_text"
app:errorEnabled="true"
app:errorTextAppearance="@style/InputTextAppearanceError">

Expand All @@ -97,7 +98,6 @@
android:textSize="16sp"
android:imeOptions="actionNext"
android:inputType="textPassword"
android:hint="@string/password_text"
android:theme="@style/ColorControlStyle"/>

</android.support.design.widget.TextInputLayout>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings_donottranslate.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name" context="Name of the app" translatable="false">MEGA</string>
<string name="app_version" context="Version number of the app" translatable="false">3.7.4 (294)</string>
<string name="app_version" context="Version number of the app" translatable="false">3.7.4 (297)</string>
<string name="sdk_version" context="SDK version" translatable="false">93cc57d</string>
<string name="karere_version" context="MEGAchat SDK version" translatable="false">4494a82</string>
<string name="prolite_account" context="PRO Lite account" translatable="false">Lite</string>
Expand Down

0 comments on commit a4e282b

Please sign in to comment.