mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Remove dead code.
This commit is contained in:
@@ -513,7 +513,7 @@ JNIEXPORT jstring Java_org_telegram_messenger_MrMailbox_MrMsgGetParam(JNIEnv *en
|
||||
CHAR_REF(def);
|
||||
char* temp = mrparam_get(ths? ths->m_param:NULL, key, defPtr);
|
||||
jstring ret = JSTRING_NEW(temp);
|
||||
mrlog_info(" got %s", temp);
|
||||
mrlog_info(" MrMsgGetParam(): got %s", temp);
|
||||
free(temp);
|
||||
CHAR_UNREF(def);
|
||||
return ret;
|
||||
|
||||
@@ -87,7 +87,6 @@ public class FileLoadOperation {
|
||||
} else*/ if (photoLocation instanceof TLRPC.TL_fileLocation) {
|
||||
location = new TLRPC.TL_inputFileLocation();
|
||||
location.volume_id = photoLocation.volume_id;
|
||||
location.secret = photoLocation.secret;
|
||||
location.local_id = photoLocation.local_id;
|
||||
datacenter_id = photoLocation.dc_id;
|
||||
}
|
||||
|
||||
@@ -763,40 +763,4 @@ public class FileLoader {
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public void deleteFiles(final ArrayList<File> files, final int type) {
|
||||
if (files == null || files.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
fileLoaderQueue.postRunnable(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
for (int a = 0; a < files.size(); a++) {
|
||||
File file = files.get(a);
|
||||
if (file.exists()) {
|
||||
try {
|
||||
if (!file.delete()) {
|
||||
file.deleteOnExit();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
}
|
||||
try {
|
||||
File qFile = new File(file.getParentFile(), "q_" + file.getName());
|
||||
if (qFile.exists()) {
|
||||
if (!qFile.delete()) {
|
||||
qFile.deleteOnExit();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
}
|
||||
if (type == 2) {
|
||||
ImageLoader.getInstance().clearMemory();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2119,23 +2119,6 @@ public class ImageLoader {
|
||||
return b;
|
||||
}
|
||||
|
||||
public static void fillPhotoSizeWithBytes(TLRPC.PhotoSize photoSize) {
|
||||
if (photoSize == null || photoSize.bytes != null) {
|
||||
return;
|
||||
}
|
||||
File file = FileLoader.getPathToAttach(photoSize, true);
|
||||
try {
|
||||
RandomAccessFile f = new RandomAccessFile(file, "r");
|
||||
int len = (int) f.length();
|
||||
if (len < 20000) {
|
||||
photoSize.bytes = new byte[(int) f.length()];
|
||||
f.readFully(photoSize.bytes, 0, photoSize.bytes.length);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
}
|
||||
|
||||
private static TLRPC.PhotoSize scaleAndSaveImageInternal(Bitmap bitmap, int w, int h, float photoW, float photoH, float scaleFactor, int quality, boolean cache, boolean scaleAnyway) throws Exception {
|
||||
Bitmap scaledBitmap;
|
||||
if (scaleFactor > 1 || scaleAnyway) {
|
||||
|
||||
@@ -741,18 +741,10 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
|
||||
return imageX;
|
||||
}
|
||||
|
||||
public int getImageX2() {
|
||||
return imageX + imageW;
|
||||
}
|
||||
|
||||
public int getImageY() {
|
||||
return imageY;
|
||||
}
|
||||
|
||||
public int getImageY2() {
|
||||
return imageY + imageH;
|
||||
}
|
||||
|
||||
public int getImageWidth() {
|
||||
return imageW;
|
||||
}
|
||||
|
||||
@@ -1827,22 +1827,6 @@ public class TLRPC {
|
||||
}
|
||||
}
|
||||
|
||||
public static class TL_inputEncryptedFileLocation extends InputFileLocation {
|
||||
public static int constructor = 0xf5235d55;
|
||||
|
||||
|
||||
public void readParams(AbstractSerializedData stream, boolean exception) {
|
||||
id = stream.readInt64(exception);
|
||||
access_hash = stream.readInt64(exception);
|
||||
}
|
||||
|
||||
public void serializeToStream(AbstractSerializedData stream) {
|
||||
stream.writeInt32(constructor);
|
||||
stream.writeInt64(id);
|
||||
stream.writeInt64(access_hash);
|
||||
}
|
||||
}
|
||||
|
||||
public static class TL_inputDocumentFileLocation extends InputFileLocation {
|
||||
public static int constructor = 0x4e45abe9;
|
||||
|
||||
@@ -4367,8 +4351,6 @@ public class TLRPC {
|
||||
public String first_name;
|
||||
public String last_name;
|
||||
public int user_id;
|
||||
public int thumb_w;
|
||||
public int thumb_h;
|
||||
public ArrayList<DocumentAttribute> attributes = new ArrayList<>();
|
||||
public String caption;
|
||||
public String url;
|
||||
@@ -4841,7 +4823,6 @@ public class TLRPC {
|
||||
dc_id = stream.readInt32(exception);
|
||||
volume_id = stream.readInt64(exception);
|
||||
local_id = stream.readInt32(exception);
|
||||
secret = stream.readInt64(exception);
|
||||
}
|
||||
|
||||
public void serializeToStream(AbstractSerializedData stream) {
|
||||
@@ -4849,7 +4830,6 @@ public class TLRPC {
|
||||
stream.writeInt32(dc_id);
|
||||
stream.writeInt64(volume_id);
|
||||
stream.writeInt32(local_id);
|
||||
stream.writeInt64(secret);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4860,14 +4840,12 @@ public class TLRPC {
|
||||
public void readParams(AbstractSerializedData stream, boolean exception) {
|
||||
volume_id = stream.readInt64(exception);
|
||||
local_id = stream.readInt32(exception);
|
||||
secret = stream.readInt64(exception);
|
||||
}
|
||||
|
||||
public void serializeToStream(AbstractSerializedData stream) {
|
||||
stream.writeInt32(constructor);
|
||||
stream.writeInt64(volume_id);
|
||||
stream.writeInt32(local_id);
|
||||
stream.writeInt64(secret);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5630,16 +5608,6 @@ public class TLRPC {
|
||||
}
|
||||
}
|
||||
|
||||
public static class messages_Stickers extends TLObject {
|
||||
public String hash;
|
||||
public ArrayList<Document> stickers = new ArrayList<>();
|
||||
|
||||
public static messages_Stickers TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
|
||||
messages_Stickers result = null;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public static class InputPeer extends TLObject {
|
||||
public int user_id;
|
||||
public long access_hash;
|
||||
|
||||
Reference in New Issue
Block a user