Skip to content

Commit

Permalink
Merge pull request #903 from meganz/release/v3.6.3_246
Browse files Browse the repository at this point in the history
Release/v3.6.3 246
  • Loading branch information
javiergm1983 authored Jul 15, 2019
2 parents 60730ad + 5f62c11 commit 8424011
Show file tree
Hide file tree
Showing 18 changed files with 53 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 27
versionCode 245
versionName "3.6.3 (245)"
versionCode 246
versionName "3.6.3 (246)"
multiDexEnabled true
}

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="mega.privacy.android.app"
android:installLocation="internalOnly"
android:versionCode="245"
android:versionName="3.6.3 (245)" >
android:versionCode="246"
android:versionName="3.6.3 (246)" >

<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-feature android:name="android.hardware.camera" android:required="false"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,7 @@ else if (MimeTypeList.typeForName(currentFile.getName()).isVideoReproducible() |
mediaIntent.putExtra("isPlayList", false);
mediaIntent.putExtra("HANDLE", handle);
mediaIntent.putExtra("fromDownloadService", true);
mediaIntent.putExtra(AudioVideoPlayerLollipop.PLAY_WHEN_READY,app.isActivityVisible());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && !externalFile) {
mediaIntent.setDataAndType(FileProvider.getUriForFile(this, "mega.privacy.android.app.providers.fileprovider", currentFile), MimeTypeList.typeForName(currentFile.getName()).getType());
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ else if(msg.getType()==MegaChatMessage.TYPE_TRUNCATE){

MegaChatMessage lastMsg = unreadMessageList.get(0);
if(lastMsg!=null){
log("Last message: "+lastMsg.getContent()+" "+lastMsg.getTimestamp());
log("Last message ts: " + lastMsg.getTimestamp());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
notificationBuilderO.setWhen(lastMsg.getTimestamp()*1000);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ public class AudioVideoPlayerLollipop extends PinActivityLollipop implements Vie

private final String offLineDIR = mega.privacy.android.app.utils.Util.offlineDIR;
private final String oldMKFile = mega.privacy.android.app.utils.Util.oldMKFile;
public static final String PLAY_WHEN_READY = "PLAY_WHEN_READY";

static AudioVideoPlayerLollipop audioVideoPlayerLollipop;

Expand Down Expand Up @@ -384,7 +385,7 @@ protected void onCreate(Bundle savedInstanceState) {
fileName = getIntent().getStringExtra("FILENAME");
currentPosition = intent.getIntExtra("position", 0);
placeholderCount = intent.getIntExtra("placeholder", 0);
playWhenReady = true;
playWhenReady = intent.getBooleanExtra(PLAY_WHEN_READY,true);
}
if (!renamed) {
uri = intent.getData();
Expand Down Expand Up @@ -3533,6 +3534,10 @@ protected void onResume() {
@Override
protected void onPause() {
super.onPause();
//pause either video or audio as per UX advise
if (player != null && player.getPlayWhenReady()) {
player.setPlayWhenReady(false);
}
log("onPause");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17966,7 +17966,7 @@ public void disableChat(){
@Override
public void onChatListItemUpdate(MegaChatApiJava api, MegaChatListItem item) {
if (item != null){
log("onChatListItemUpdate:" + item.getTitle());
log("onChatListItemUpdate:" + item.getChatId());
if (item.isPreview()) {
return;
}
Expand All @@ -17983,7 +17983,7 @@ public void onChatListItemUpdate(MegaChatApiJava api, MegaChatListItem item) {

if(Util.isChatEnabled()){
if(item.hasChanged(MegaChatListItem.CHANGE_TYPE_UNREAD_COUNT)) {
log("Change unread count: " + item.getTitle());
log("Change unread count: " + item.getUnreadCount());
setChatBadge();
updateNavigationToolbarIcon();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ScrollView;

import mega.privacy.android.app.R;
import mega.privacy.android.app.TourImageAdapter;
Expand All @@ -31,6 +32,7 @@ public class TourFragmentLollipop extends Fragment implements View.OnClickListen
private ImageView fourthItem;
private Button bRegister;
private Button bLogin;
private ScrollView baseContainer;

@Override
public void onCreate (Bundle savedInstanceState){
Expand Down Expand Up @@ -68,6 +70,17 @@ void setStatusBarColor (int position) {
public void onResume() {
super.onResume();
setStatusBarColor(viewPager.getCurrentItem());

// For small screen like nexus one or bigger screen, this is to force the scroll view to bottom to show buttons
// Meanwhile, tour image glide could also be shown
baseContainer.post(new Runnable() {
@Override
public void run() {
if (baseContainer != null) {
baseContainer.fullScroll(View.FOCUS_DOWN);
}
}
});
}

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

baseContainer = (ScrollView) v.findViewById(R.id.tour_fragment_base_container);

bLogin = (Button) v.findViewById(R.id.button_login_tour);
bRegister = (Button) v.findViewById(R.id.button_register_tour);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ public String createManagementString(MegaChatMessage message, MegaChatRoom chatR
return builder.toString();
} else {
log("Participant privilege change!");
log("Message type PRIVILEGE CHANGE: " + message.getContent());
log("Message type PRIVILEGE CHANGE - Message ID: " + message.getMsgId());

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

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

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

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

String messageContent = message.getContent();

Expand Down Expand Up @@ -1021,7 +1021,7 @@ else if(message.getType() == MegaChatMessage.TYPE_CALL_ENDED){
}
else{
log("Type message: " + message.getType());
log("Content: " + message.getContent());
log("Message ID: " + message.getMsgId());
return "";
}
}
Expand Down Expand Up @@ -1756,6 +1756,7 @@ else if (context instanceof NodeAttachmentHistoryActivity) {
log("ISFILE");
String localPath = Util.getLocalFile(context, tempNode.getName(), tempNode.getSize(), parentPath);
//Check if the file is already downloaded
MegaApplication app = ((MegaApplication) ((Activity)context).getApplication());
if(localPath != null){
log("localPath != null");

Expand Down Expand Up @@ -1825,6 +1826,7 @@ else if (MimeTypeList.typeForName(tempNode.getName()).isVideoReproducible() || M
mediaIntent.putExtra("isPlayList", false);
mediaIntent.putExtra("HANDLE", tempNode.getHandle());
mediaIntent.putExtra("adapterType", Constants.FROM_CHAT);
mediaIntent.putExtra(AudioVideoPlayerLollipop.PLAY_WHEN_READY,app.isActivityVisible());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && localPath.contains(Environment.getExternalStorageDirectory().getPath())) {
mediaIntent.setDataAndType(FileProvider.getUriForFile(context, "mega.privacy.android.app.providers.fileprovider", mediaFile), MimeTypeList.typeForName(tempNode.getName()).getType());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,7 @@ public void download(String parentPath, String url, long size, long [] hashes, b
log("ISFILE");
String localPath = Util.getLocalFile(context, tempNode.getName(), tempNode.getSize(), parentPath);
//Check if the file is already downloaded
MegaApplication app = ((MegaApplication) ((Activity)context).getApplication());
if(localPath != null){
log("localPath != null");
try {
Expand Down Expand Up @@ -881,6 +882,7 @@ else if (MimeTypeList.typeForName(tempNode.getName()).isVideoReproducible() || M
}
mediaIntent.putExtra("isPlayList", false);
mediaIntent.putExtra("HANDLE", tempNode.getHandle());
mediaIntent.putExtra(AudioVideoPlayerLollipop.PLAY_WHEN_READY,app.isActivityVisible());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && localPath.contains(Environment.getExternalStorageDirectory().getPath())) {
mediaIntent.setDataAndType(FileProvider.getUriForFile(context, "mega.privacy.android.app.providers.fileprovider", mediaFile), MimeTypeList.typeForName(tempNode.getName()).getType());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public void changeActionBarElevation(boolean whitElevation){
@Override
public void onChatListItemUpdate(MegaChatApiJava api, MegaChatListItem item) {
if (item != null){
log("onChatListItemUpdate:" + item.getTitle());
log("onChatListItemUpdate - Chat ID: " + item.getChatId());
}
else{
log("onChatListItemUpdate");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public MegaContactAdapter getContact(MegaChatListItem chat) {

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1712,9 +1712,9 @@ else if(item.hasChanged(MegaChatListItem.CHANGE_TYPE_UNREAD_COUNT)) {
else if(item.hasChanged(MegaChatListItem.CHANGE_TYPE_UPDATE_PREVIEWERS)){
updatePreviewers();
}
else{
log("Changes other: "+item.getChanges());
log("Chat title: "+item.getTitle());
else {
log("Changes other: " + item.getChanges());
log("Chat ID: " + item.getChatId());
}
}
else{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ public void onClick(View v) {
if(chat==null){
log("Selected chat NULL");
}
log("Leave chat with: "+chat.getTitle());
log("Leave chat - Chat ID: " + chat.getChatId());
((ManagerActivityLollipop)context).showConfirmationLeaveChat(chat);
break;
}
Expand All @@ -484,7 +484,7 @@ public void onClick(View v) {
if(chat==null){
log("Selected chat NULL");
}
log("Clear chat with: "+chat.getTitle());
log("Clear chat - Chat ID: " + chat.getChatId());
((ManagerActivityLollipop)context).showConfirmationClearChat(chat);

break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ public void onCreate(Bundle savedInstanceState) {
}

if(selectedMessage!=null){
log("selectedMessage content: "+selectedMessage.getMessage().getContent());
log("Temporal id of MS message: "+selectedMessage.getMessage().getTempId());
log("Selected message ID: " + selectedMessage.getMessage().getMsgId());
log("Temporal ID of MS message: " + selectedMessage.getMessage().getTempId());
}
else{
log("Error the selectedMessage is NULL");
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/jni/mega/sdk
Submodule sdk updated 85 files
+1 −0 .gitignore
+138 −0 bindings/ios/MEGABackgroundMediaUpload.h
+84 −0 bindings/ios/MEGABackgroundMediaUpload.mm
+2 −1 bindings/ios/MEGAEvent.h
+2 −0 bindings/ios/MEGAGlobalDelegate.h
+10 −1 bindings/ios/MEGARequest.h
+21 −6 bindings/ios/MEGASDK.xcodeproj/project.pbxproj
+208 −47 bindings/ios/MEGASdk.h
+82 −49 bindings/ios/MEGASdk.mm
+21 −0 bindings/ios/Private/MEGABackgroundMediaUpload+init.h
+4 −13 bindings/ios/Private/MEGADataInputStream.h
+47 −0 bindings/ios/Private/MEGADataInputStream.mm
+37 −0 bindings/ios/Private/MEGAFileInputStream.h
+51 −0 bindings/ios/Private/MEGAFileInputStream.mm
+0 −77 bindings/ios/Private/MEGAInputStream.mm
+82 −24 bindings/java/nz/mega/sdk/MegaApiJava.java
+4 −1 bindings/qt/sdk.pri
+3 −0 contrib/QtCreator/MEGATestSuite/MEGAcryptotests/MEGAcryptotests.pro
+3 −0 contrib/QtCreator/MEGATestSuite/MEGAtests/MEGAtests.pro
+10 −0 contrib/build_pdfium/args_darwin.gn
+31 −6 contrib/build_pdfium/build.sh
+5 −5 contrib/build_sdk.sh
+50 −39 contrib/cmake/CMakeLists.txt
+2,952 −3,321 examples/megacli.cpp
+2 −0 examples/megacli.h
+3 −3 examples/megasimplesync.cpp
+1 −23 examples/win32/testmega/main.cpp
+6 −5 include/mega/autocomplete.h
+2 −1 include/mega/base64.h
+32 −1 include/mega/command.h
+1 −1 include/mega/filesystem.h
+4 −2 include/mega/gfx.h
+1 −1 include/mega/gfx/freeimage.h
+1 −1 include/mega/gfx/qt.h
+39 −4 include/mega/http.h
+2 −0 include/mega/logging.h
+5 −0 include/mega/mediafileattribute.h
+10 −1 include/mega/megaapp.h
+14 −0 include/mega/megaclient.h
+6 −9 include/mega/node.h
+1 −1 include/mega/posix/megafs.h
+2 −2 include/mega/posix/meganet.h
+0 −17 include/mega/thread.h
+0 −16 include/mega/thread/cppthread.h
+0 −16 include/mega/thread/libuvthread.h
+0 −16 include/mega/thread/posixthread.h
+0 −17 include/mega/thread/qtthread.h
+0 −15 include/mega/thread/win32thread.h
+5 −1 include/mega/types.h
+2 −0 include/mega/utils.h
+2 −2 include/mega/version.h
+35 −35 include/mega/win32/megafs.h
+530 −86 include/megaapi.h
+419 −361 include/megaapi_impl.h
+53 −34 src/autocomplete.cpp
+281 −32 src/commands.cpp
+21 −0 src/filesystem.cpp
+2 −2 src/gfx.cpp
+23 −37 src/gfx/GfxProcCG.mm
+2 −1 src/gfx/freeimage.cpp
+5 −2 src/gfx/qt.cpp
+79 −39 src/http.cpp
+17 −4 src/mediafileattribute.cpp
+136 −14 src/megaapi.cpp
+952 −337 src/megaapi_impl.cpp
+137 −73 src/megaclient.cpp
+63 −0 src/node.cpp
+3 −3 src/posix/fs.cpp
+10 −8 src/posix/net.cpp
+3 −8 src/raid.cpp
+1 −1 src/request.cpp
+0 −49 src/thread/cppthread.cpp
+0 −77 src/thread/libuvthread.cpp
+0 −57 src/thread/posixthread.cpp
+0 −38 src/thread/qtthread.cpp
+0 −33 src/thread/win32thread.cpp
+2 −20 src/transfer.cpp
+37 −3 src/transferslot.cpp
+26 −3 src/user.cpp
+17 −0 src/utils.cpp
+2 −2 src/win32/fs.cpp
+213 −52 tests/sdk_test.cpp
+28 −22 tests/sdk_test.h
+5 −8 tests/synctests.cpp
+1 −0 tests/tests.cpp
3 changes: 2 additions & 1 deletion app/src/main/res/layout/fragment_tour.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
android:background="@color/white"
android:id="@+id/tour_fragment_base_container">

<RelativeLayout
android:id="@+id/tour_fragment_container"
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/values/strings_donottranslate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<resources>
<string name="app_name" context="Name of the app" translatable="false">MEGA</string>
<string name="pdf_app_name" context="PDF viewer app name" translatable="false">MEGA PDF Viewer</string>
<string name="app_version" context="Version number of the app" translatable="false">3.6.3 (245)</string>
<string name="sdk_version" context="SDK version" translatable="false">b668402</string>
<string name="karere_version" context="MEGAchat SDK version" translatable="false">ea276c4</string>
<string name="app_version" context="Version number of the app" translatable="false">3.6.3 (246)</string>
<string name="sdk_version" context="SDK version" translatable="false">f293e3a</string>
<string name="karere_version" context="MEGAchat SDK version" translatable="false">3390a8b</string>
<string name="prolite_account" context="PRO Lite account" translatable="false">Lite</string>
<string name="pro1_account" context="PRO I account" translatable="false">PRO I</string>
<string name="pro2_account" context="PRO II account" translatable="false">PRO II</string>
Expand Down

0 comments on commit 8424011

Please sign in to comment.