Update to 4.2.1

This commit is contained in:
DrKLO 2017-07-24 00:06:13 +03:00
parent 7fcd94d5c9
commit c92ecf973c
4 changed files with 35 additions and 29 deletions

View file

@ -90,7 +90,7 @@ android {
}
}
defaultConfig.versionCode = 1040
defaultConfig.versionCode = 1043
sourceSets.debug {
manifest.srcFile 'config/debug/AndroidManifest.xml'
@ -162,7 +162,7 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 25
versionName "4.2.0"
versionName 4.2.1
externalNativeBuild {
ndkBuild {

View file

@ -11,7 +11,7 @@ package org.telegram.messenger;
public class BuildVars {
public static boolean DEBUG_VERSION = false;
public static boolean DEBUG_PRIVATE_VERSION = false;
public static int BUILD_VERSION = 1042;
public static int BUILD_VERSION = 1043;
public static String BUILD_VERSION_STRING = "4.2";
public static int APP_ID = 0; //obtain your own APP_ID at https://core.telegram.org/api/obtaining_api_id
public static String APP_HASH = ""; //obtain your own APP_HASH at https://core.telegram.org/api/obtaining_api_id

View file

@ -581,7 +581,7 @@ public class FileLoadOperation {
RequestInfo delayedRequestInfo = delayedRequestInfos.get(a);
if (downloadedBytes == delayedRequestInfo.offset) {
delayedRequestInfos.remove(a);
processRequestResult(delayedRequestInfo, null);
if (!processRequestResult(delayedRequestInfo, null)) {
if (delayedRequestInfo.response != null) {
delayedRequestInfo.response.disableFree = false;
delayedRequestInfo.response.freeResources();
@ -592,6 +592,7 @@ public class FileLoadOperation {
delayedRequestInfo.responseCdn.disableFree = false;
delayedRequestInfo.responseCdn.freeResources();
}
}
break;
}
}
@ -600,16 +601,16 @@ public class FileLoadOperation {
}, null, null, 0, datacenter_id, ConnectionsManager.ConnectionTypeGeneric, true);
}
private void processRequestResult(RequestInfo requestInfo, TLRPC.TL_error error) {
private boolean processRequestResult(RequestInfo requestInfo, TLRPC.TL_error error) {
if (state != stateDownloading) {
return;
return false;
}
requestInfos.remove(requestInfo);
if (error == null) {
try {
if (downloadedBytes != requestInfo.offset) {
delayRequestInfo(requestInfo);
return;
return false;
}
NativeByteBuffer bytes;
if (requestInfo.response != null) {
@ -623,7 +624,7 @@ public class FileLoadOperation {
}
if (bytes == null || bytes.limit() == 0) {
onFinishLoadingFile(true);
return;
return false;
}
int currentBytesSize = bytes.limit();
if (isCdn) {
@ -633,7 +634,7 @@ public class FileLoadOperation {
if (hash == null) {
delayRequestInfo(requestInfo);
requestFileOffsets(fileOffset);
return;
return true;
}
}
@ -694,7 +695,7 @@ public class FileLoadOperation {
}
onFail(false, 0);
cacheFileTemp.delete();
return;
return false;
}
lastCheckedCdnPart = cdnCheckPart;
}
@ -711,7 +712,7 @@ public class FileLoadOperation {
RequestInfo delayedRequestInfo = delayedRequestInfos.get(a);
if (downloadedBytes == delayedRequestInfo.offset) {
delayedRequestInfos.remove(a);
processRequestResult(delayedRequestInfo, null);
if (!processRequestResult(delayedRequestInfo, null)) {
if (delayedRequestInfo.response != null) {
delayedRequestInfo.response.disableFree = false;
delayedRequestInfo.response.freeResources();
@ -722,6 +723,7 @@ public class FileLoadOperation {
delayedRequestInfo.responseCdn.disableFree = false;
delayedRequestInfo.responseCdn.freeResources();
}
}
break;
}
}
@ -775,6 +777,7 @@ public class FileLoadOperation {
onFail(false, 0);
}
}
return false;
}
private void onFail(boolean thread, final int reason) {

View file

@ -740,6 +740,9 @@ public class PhotoPaintView extends FrameLayout implements EntityView.EntityView
private void removeEntity(EntityView entityView) {
if (entityView == currentEntityView) {
currentEntityView.deselect();
if (editingText) {
closeTextEnter(false);
}
currentEntityView = null;
updateSettingsButton();
}