Skip to content

Commit 8424011

Browse files
authored
Merge pull request #903 from meganz/release/v3.6.3_246
Release/v3.6.3 246
2 parents 60730ad + 5f62c11 commit 8424011

18 files changed

+53
-27
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ android {
88
applicationId "mega.privacy.android.app"
99
minSdkVersion 21
1010
targetSdkVersion 27
11-
versionCode 245
12-
versionName "3.6.3 (245)"
11+
versionCode 246
12+
versionName "3.6.3 (246)"
1313
multiDexEnabled true
1414
}
1515

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="mega.privacy.android.app"
44
android:installLocation="internalOnly"
5-
android:versionCode="245"
6-
android:versionName="3.6.3 (245)" >
5+
android:versionCode="246"
6+
android:versionName="3.6.3 (246)" >
77

88
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
99
<uses-feature android:name="android.hardware.camera" android:required="false"/>

app/src/main/java/mega/privacy/android/app/DownloadService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,7 @@ else if (MimeTypeList.typeForName(currentFile.getName()).isVideoReproducible() |
744744
mediaIntent.putExtra("isPlayList", false);
745745
mediaIntent.putExtra("HANDLE", handle);
746746
mediaIntent.putExtra("fromDownloadService", true);
747+
mediaIntent.putExtra(AudioVideoPlayerLollipop.PLAY_WHEN_READY,app.isActivityVisible());
747748
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && !externalFile) {
748749
mediaIntent.setDataAndType(FileProvider.getUriForFile(this, "mega.privacy.android.app.providers.fileprovider", currentFile), MimeTypeList.typeForName(currentFile.getName()).getType());
749750
} else {

app/src/main/java/mega/privacy/android/app/fcm/ChatAdvancedNotificationBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ else if(msg.getType()==MegaChatMessage.TYPE_TRUNCATE){
475475

476476
MegaChatMessage lastMsg = unreadMessageList.get(0);
477477
if(lastMsg!=null){
478-
log("Last message: "+lastMsg.getContent()+" "+lastMsg.getTimestamp());
478+
log("Last message ts: " + lastMsg.getTimestamp());
479479
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
480480
notificationBuilderO.setWhen(lastMsg.getTimestamp()*1000);
481481
}

app/src/main/java/mega/privacy/android/app/lollipop/AudioVideoPlayerLollipop.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ public class AudioVideoPlayerLollipop extends PinActivityLollipop implements Vie
171171

172172
private final String offLineDIR = mega.privacy.android.app.utils.Util.offlineDIR;
173173
private final String oldMKFile = mega.privacy.android.app.utils.Util.oldMKFile;
174+
public static final String PLAY_WHEN_READY = "PLAY_WHEN_READY";
174175

175176
static AudioVideoPlayerLollipop audioVideoPlayerLollipop;
176177

@@ -384,7 +385,7 @@ protected void onCreate(Bundle savedInstanceState) {
384385
fileName = getIntent().getStringExtra("FILENAME");
385386
currentPosition = intent.getIntExtra("position", 0);
386387
placeholderCount = intent.getIntExtra("placeholder", 0);
387-
playWhenReady = true;
388+
playWhenReady = intent.getBooleanExtra(PLAY_WHEN_READY,true);
388389
}
389390
if (!renamed) {
390391
uri = intent.getData();
@@ -3533,6 +3534,10 @@ protected void onResume() {
35333534
@Override
35343535
protected void onPause() {
35353536
super.onPause();
3537+
//pause either video or audio as per UX advise
3538+
if (player != null && player.getPlayWhenReady()) {
3539+
player.setPlayWhenReady(false);
3540+
}
35363541
log("onPause");
35373542
}
35383543

app/src/main/java/mega/privacy/android/app/lollipop/ManagerActivityLollipop.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17966,7 +17966,7 @@ public void disableChat(){
1796617966
@Override
1796717967
public void onChatListItemUpdate(MegaChatApiJava api, MegaChatListItem item) {
1796817968
if (item != null){
17969-
log("onChatListItemUpdate:" + item.getTitle());
17969+
log("onChatListItemUpdate:" + item.getChatId());
1797017970
if (item.isPreview()) {
1797117971
return;
1797217972
}
@@ -17983,7 +17983,7 @@ public void onChatListItemUpdate(MegaChatApiJava api, MegaChatListItem item) {
1798317983

1798417984
if(Util.isChatEnabled()){
1798517985
if(item.hasChanged(MegaChatListItem.CHANGE_TYPE_UNREAD_COUNT)) {
17986-
log("Change unread count: " + item.getTitle());
17986+
log("Change unread count: " + item.getUnreadCount());
1798717987
setChatBadge();
1798817988
updateNavigationToolbarIcon();
1798917989
}

app/src/main/java/mega/privacy/android/app/lollipop/TourFragmentLollipop.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import android.view.ViewGroup;
1414
import android.widget.Button;
1515
import android.widget.ImageView;
16+
import android.widget.ScrollView;
1617

1718
import mega.privacy.android.app.R;
1819
import mega.privacy.android.app.TourImageAdapter;
@@ -31,6 +32,7 @@ public class TourFragmentLollipop extends Fragment implements View.OnClickListen
3132
private ImageView fourthItem;
3233
private Button bRegister;
3334
private Button bLogin;
35+
private ScrollView baseContainer;
3436

3537
@Override
3638
public void onCreate (Bundle savedInstanceState){
@@ -68,6 +70,17 @@ void setStatusBarColor (int position) {
6870
public void onResume() {
6971
super.onResume();
7072
setStatusBarColor(viewPager.getCurrentItem());
73+
74+
// For small screen like nexus one or bigger screen, this is to force the scroll view to bottom to show buttons
75+
// Meanwhile, tour image glide could also be shown
76+
baseContainer.post(new Runnable() {
77+
@Override
78+
public void run() {
79+
if (baseContainer != null) {
80+
baseContainer.fullScroll(View.FOCUS_DOWN);
81+
}
82+
}
83+
});
7184
}
7285

7386
@Override
@@ -85,6 +98,8 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
8598
thirdItem = (ImageView) v.findViewById(R.id.third_item);
8699
fourthItem = (ImageView) v.findViewById(R.id.fourth_item);
87100

101+
baseContainer = (ScrollView) v.findViewById(R.id.tour_fragment_base_container);
102+
88103
bLogin = (Button) v.findViewById(R.id.button_login_tour);
89104
bRegister = (Button) v.findViewById(R.id.button_register_tour);
90105

app/src/main/java/mega/privacy/android/app/lollipop/controllers/ChatController.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ public String createManagementString(MegaChatMessage message, MegaChatRoom chatR
588588
return builder.toString();
589589
} else {
590590
log("Participant privilege change!");
591-
log("Message type PRIVILEGE CHANGE: " + message.getContent());
591+
log("Message type PRIVILEGE CHANGE - Message ID: " + message.getMsgId());
592592

593593
String fullNameTitle = getFullName(message.getHandleOfAction(), chatRoom);
594594

@@ -707,7 +707,7 @@ public String createManagementString(MegaChatMessage message, MegaChatRoom chatR
707707
builder.append(result);
708708
return builder.toString();
709709
}else if (message.getType() == MegaChatMessage.TYPE_CHAT_TITLE) {
710-
log("Message type TITLE CHANGE: " + message.getContent());
710+
log("Message type TITLE CHANGE - Message ID: " + message.getMsgId());
711711

712712
String messageContent = message.getContent();
713713
String textToShow = String.format(context.getString(R.string.non_format_change_title_messages), megaChatApi.getMyFullname(), messageContent);
@@ -896,7 +896,7 @@ else if(message.getType() == MegaChatMessage.TYPE_CALL_ENDED){
896896
return builder.toString();
897897

898898
} else if (message.getType() == MegaChatMessage.TYPE_CHAT_TITLE) {
899-
log("Message type CHANGE TITLE " + message.getContent());
899+
log("Message type CHANGE TITLE - Message ID: " + message.getMsgId());
900900

901901
String messageContent = message.getContent();
902902

@@ -1021,7 +1021,7 @@ else if(message.getType() == MegaChatMessage.TYPE_CALL_ENDED){
10211021
}
10221022
else{
10231023
log("Type message: " + message.getType());
1024-
log("Content: " + message.getContent());
1024+
log("Message ID: " + message.getMsgId());
10251025
return "";
10261026
}
10271027
}
@@ -1756,6 +1756,7 @@ else if (context instanceof NodeAttachmentHistoryActivity) {
17561756
log("ISFILE");
17571757
String localPath = Util.getLocalFile(context, tempNode.getName(), tempNode.getSize(), parentPath);
17581758
//Check if the file is already downloaded
1759+
MegaApplication app = ((MegaApplication) ((Activity)context).getApplication());
17591760
if(localPath != null){
17601761
log("localPath != null");
17611762

@@ -1825,6 +1826,7 @@ else if (MimeTypeList.typeForName(tempNode.getName()).isVideoReproducible() || M
18251826
mediaIntent.putExtra("isPlayList", false);
18261827
mediaIntent.putExtra("HANDLE", tempNode.getHandle());
18271828
mediaIntent.putExtra("adapterType", Constants.FROM_CHAT);
1829+
mediaIntent.putExtra(AudioVideoPlayerLollipop.PLAY_WHEN_READY,app.isActivityVisible());
18281830
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && localPath.contains(Environment.getExternalStorageDirectory().getPath())) {
18291831
mediaIntent.setDataAndType(FileProvider.getUriForFile(context, "mega.privacy.android.app.providers.fileprovider", mediaFile), MimeTypeList.typeForName(tempNode.getName()).getType());
18301832
}

app/src/main/java/mega/privacy/android/app/lollipop/controllers/NodeController.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,7 @@ public void download(String parentPath, String url, long size, long [] hashes, b
794794
log("ISFILE");
795795
String localPath = Util.getLocalFile(context, tempNode.getName(), tempNode.getSize(), parentPath);
796796
//Check if the file is already downloaded
797+
MegaApplication app = ((MegaApplication) ((Activity)context).getApplication());
797798
if(localPath != null){
798799
log("localPath != null");
799800
try {
@@ -881,6 +882,7 @@ else if (MimeTypeList.typeForName(tempNode.getName()).isVideoReproducible() || M
881882
}
882883
mediaIntent.putExtra("isPlayList", false);
883884
mediaIntent.putExtra("HANDLE", tempNode.getHandle());
885+
mediaIntent.putExtra(AudioVideoPlayerLollipop.PLAY_WHEN_READY,app.isActivityVisible());
884886
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && localPath.contains(Environment.getExternalStorageDirectory().getPath())) {
885887
mediaIntent.setDataAndType(FileProvider.getUriForFile(context, "mega.privacy.android.app.providers.fileprovider", mediaFile), MimeTypeList.typeForName(tempNode.getName()).getType());
886888

app/src/main/java/mega/privacy/android/app/lollipop/megachat/ArchivedChatsActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public void changeActionBarElevation(boolean whitElevation){
172172
@Override
173173
public void onChatListItemUpdate(MegaChatApiJava api, MegaChatListItem item) {
174174
if (item != null){
175-
log("onChatListItemUpdate:" + item.getTitle());
175+
log("onChatListItemUpdate - Chat ID: " + item.getChatId());
176176
}
177177
else{
178178
log("onChatListItemUpdate");

app/src/main/java/mega/privacy/android/app/lollipop/megachat/ChatExplorerFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ public MegaContactAdapter getContact(MegaChatListItem chat) {
281281

282282
// Maybe the contact is not my contact already
283283
if (user == null) {
284-
log("Chat "+chat.getTitle()+" with PeerHandle: "+handle+" is NULL");
284+
log("Chat ID " + chat.getChatId() + " with PeerHandle: " + handle + " is NULL");
285285
return null;
286286
}
287287

app/src/main/java/mega/privacy/android/app/lollipop/megachat/GroupChatInfoActivityLollipop.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,9 +1712,9 @@ else if(item.hasChanged(MegaChatListItem.CHANGE_TYPE_UNREAD_COUNT)) {
17121712
else if(item.hasChanged(MegaChatListItem.CHANGE_TYPE_UPDATE_PREVIEWERS)){
17131713
updatePreviewers();
17141714
}
1715-
else{
1716-
log("Changes other: "+item.getChanges());
1717-
log("Chat title: "+item.getTitle());
1715+
else {
1716+
log("Changes other: " + item.getChanges());
1717+
log("Chat ID: " + item.getChatId());
17181718
}
17191719
}
17201720
else{

app/src/main/java/mega/privacy/android/app/modalbottomsheet/chatmodalbottomsheet/ChatBottomSheetDialogFragment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ public void onClick(View v) {
475475
if(chat==null){
476476
log("Selected chat NULL");
477477
}
478-
log("Leave chat with: "+chat.getTitle());
478+
log("Leave chat - Chat ID: " + chat.getChatId());
479479
((ManagerActivityLollipop)context).showConfirmationLeaveChat(chat);
480480
break;
481481
}
@@ -484,7 +484,7 @@ public void onClick(View v) {
484484
if(chat==null){
485485
log("Selected chat NULL");
486486
}
487-
log("Clear chat with: "+chat.getTitle());
487+
log("Clear chat - Chat ID: " + chat.getChatId());
488488
((ManagerActivityLollipop)context).showConfirmationClearChat(chat);
489489

490490
break;

app/src/main/java/mega/privacy/android/app/modalbottomsheet/chatmodalbottomsheet/MessageNotSentBottomSheetDialogFragment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ public void onCreate(Bundle savedInstanceState) {
8787
}
8888

8989
if(selectedMessage!=null){
90-
log("selectedMessage content: "+selectedMessage.getMessage().getContent());
91-
log("Temporal id of MS message: "+selectedMessage.getMessage().getTempId());
90+
log("Selected message ID: " + selectedMessage.getMessage().getMsgId());
91+
log("Temporal ID of MS message: " + selectedMessage.getMessage().getTempId());
9292
}
9393
else{
9494
log("Error the selectedMessage is NULL");

app/src/main/jni/mega/sdk

Submodule sdk updated 85 files

app/src/main/res/layout/fragment_tour.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
xmlns:android="http://schemas.android.com/apk/res/android"
33
android:layout_width="match_parent"
44
android:layout_height="match_parent"
5-
android:background="@color/white">
5+
android:background="@color/white"
6+
android:id="@+id/tour_fragment_base_container">
67

78
<RelativeLayout
89
android:id="@+id/tour_fragment_container"

app/src/main/res/values/strings_donottranslate.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<resources>
33
<string name="app_name" context="Name of the app" translatable="false">MEGA</string>
44
<string name="pdf_app_name" context="PDF viewer app name" translatable="false">MEGA PDF Viewer</string>
5-
<string name="app_version" context="Version number of the app" translatable="false">3.6.3 (245)</string>
6-
<string name="sdk_version" context="SDK version" translatable="false">b668402</string>
7-
<string name="karere_version" context="MEGAchat SDK version" translatable="false">ea276c4</string>
5+
<string name="app_version" context="Version number of the app" translatable="false">3.6.3 (246)</string>
6+
<string name="sdk_version" context="SDK version" translatable="false">f293e3a</string>
7+
<string name="karere_version" context="MEGAchat SDK version" translatable="false">3390a8b</string>
88
<string name="prolite_account" context="PRO Lite account" translatable="false">Lite</string>
99
<string name="pro1_account" context="PRO I account" translatable="false">PRO I</string>
1010
<string name="pro2_account" context="PRO II account" translatable="false">PRO II</string>

0 commit comments

Comments
 (0)