mirror of
https://github.com/areteruhiro/LIME-beta-hiro.git
synced 2025-02-05 21:11:39 +09:00
This commit is contained in:
parent
29fd0c18e6
commit
6cd23b62f8
@ -33,7 +33,7 @@ import io.github.chipppppppppp.lime.hooks.RemoveReplyMute;
|
||||
import io.github.chipppppppppp.lime.hooks.SendMuteMessage;
|
||||
import io.github.chipppppppppp.lime.hooks.SpoofAndroidId;
|
||||
import io.github.chipppppppppp.lime.hooks.SpoofUserAgent;
|
||||
import io.github.chipppppppppp.lime.hooks.UnsentRec;
|
||||
import io.github.chipppppppppp.lime.hooks.UnsentCap;
|
||||
|
||||
public class Main implements IXposedHookLoadPackage, IXposedHookInitPackageResources, IXposedHookZygoteInit {
|
||||
public static String modulePath;
|
||||
@ -64,7 +64,7 @@ public class Main implements IXposedHookLoadPackage, IXposedHookInitPackageResou
|
||||
new BlockTracking(),
|
||||
new ModifyResponse(),
|
||||
new OutputRequest(),
|
||||
new UnsentRec(),
|
||||
new UnsentCap(),
|
||||
new Archived()
|
||||
};
|
||||
|
||||
|
@ -20,6 +20,14 @@ import android.widget.ScrollView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import de.robv.android.xposed.XC_MethodHook;
|
||||
import de.robv.android.xposed.XposedBridge;
|
||||
import de.robv.android.xposed.XposedHelpers;
|
||||
import de.robv.android.xposed.callbacks.XC_LoadPackage;
|
||||
|
||||
import io.github.chipppppppppp.lime.LimeOptions;
|
||||
import io.github.chipppppppppp.lime.R;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
@ -32,16 +40,11 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import de.robv.android.xposed.XC_MethodHook;
|
||||
import de.robv.android.xposed.XposedBridge;
|
||||
import de.robv.android.xposed.XposedHelpers;
|
||||
import de.robv.android.xposed.callbacks.XC_LoadPackage;
|
||||
import io.github.chipppppppppp.lime.LimeOptions;
|
||||
import io.github.chipppppppppp.lime.R;
|
||||
public class UnsentRec implements IHook {
|
||||
public class UnsentCap implements IHook {
|
||||
|
||||
public static final String Main_file = "UNSENT_REC.txt";
|
||||
public static final String Main_backup = "BackUpFile.txt";
|
||||
public static final String Main_file = "unsent_capture.txt";
|
||||
public static final String Main_backup = "capture_backup.txt";
|
||||
public static final String Unresolved_Ids = "Unresolved_Ids.txt";
|
||||
SQLiteDatabase db1 = null;
|
||||
SQLiteDatabase db2 = null;
|
||||
|
||||
@ -119,11 +122,11 @@ public class UnsentRec implements IHook {
|
||||
new AlertDialog.Builder(appContext)
|
||||
.setTitle(moduleContext.getResources().getString(R.string.backup))
|
||||
.setView(verticalScrollView)
|
||||
.setPositiveButton("OK", null)
|
||||
.setPositiveButton(moduleContext.getResources().getString(R.string.positive_button), null)
|
||||
.create()
|
||||
.show();
|
||||
} catch (IOException ignored) {
|
||||
Toast.makeText(appContext, moduleContext.getResources().getString(R.string.read_BackUpFile_failed), Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(appContext, moduleContext.getResources().getString(R.string.failed_read_backup_file, Main_backup), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(appContext, moduleContext.getResources().getString(R.string.no_backup_found), Toast.LENGTH_SHORT).show();
|
||||
@ -131,8 +134,8 @@ public class UnsentRec implements IHook {
|
||||
});
|
||||
|
||||
clearFileButton.setOnClickListener(v -> new AlertDialog.Builder(appContext)
|
||||
.setTitle(moduleContext.getResources().getString(R.string.check))
|
||||
.setMessage(moduleContext.getResources().getString(R.string.really_delete))
|
||||
.setTitle(moduleContext.getResources().getString(R.string.confirm))
|
||||
.setMessage(moduleContext.getResources().getString(R.string.confirm_delete))
|
||||
.setPositiveButton(moduleContext.getResources().getString(R.string.yes), (dialog, which) -> {
|
||||
File backupFile = new File(appContext.getFilesDir(), Main_backup);
|
||||
if (backupFile.exists()) {
|
||||
@ -223,7 +226,7 @@ public class UnsentRec implements IHook {
|
||||
new AlertDialog.Builder(context)
|
||||
.setTitle(moduleContext.getResources().getString(R.string.deleted_messages))
|
||||
.setView(verticalScrollView)
|
||||
.setPositiveButton("ok", (dialog, which) -> {
|
||||
.setPositiveButton(moduleContext.getResources().getString(R.string.positive_button), (dialog, which) -> {
|
||||
try (BufferedWriter writer = new BufferedWriter(new FileWriter(new File(context.getFilesDir(), Main_backup), true))) {
|
||||
writer.write(output.toString());
|
||||
new BufferedWriter(new FileWriter(originalFile)).close();
|
||||
@ -241,7 +244,7 @@ public class UnsentRec implements IHook {
|
||||
.show();
|
||||
|
||||
} catch (IOException ignored) {
|
||||
Toast.makeText(context, moduleContext.getResources().getString(R.string.read_BackUpFile_failed), Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(context, moduleContext.getResources().getString(R.string.failed_read_backup_file, Main_backup), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
|
||||
@ -350,7 +353,7 @@ public class UnsentRec implements IHook {
|
||||
}
|
||||
|
||||
private void processMessage(String paramValue, Context moduleContext, SQLiteDatabase db1, SQLiteDatabase db2, Context context) {
|
||||
String unresolvedFilePath = context.getFilesDir() + "/UnresolvedIds.txt";
|
||||
String unresolvedFilePath = context.getFilesDir() + "/" + Unresolved_Ids;
|
||||
String[] operations = paramValue.split("Operation\\(");
|
||||
for (String operation : operations) {
|
||||
if (operation.trim().isEmpty()) continue;
|
||||
@ -430,7 +433,7 @@ public class UnsentRec implements IHook {
|
||||
}
|
||||
|
||||
private void resolveUnresolvedIds(XC_LoadPackage.LoadPackageParam loadPackageParam, Context context, SQLiteDatabase db1, SQLiteDatabase db2, Context moduleContext) {
|
||||
String unresolvedFilePath = context.getFilesDir() + "/UnresolvedIds.txt";
|
||||
String unresolvedFilePath = context.getFilesDir() + "/" + Unresolved_Ids;
|
||||
File unresolvedFile = new File(unresolvedFilePath);
|
||||
File testFile = new File(context.getFilesDir(), Main_file);
|
||||
if (!unresolvedFile.exists()) return;
|
@ -3,6 +3,14 @@
|
||||
<!-- General -->
|
||||
<string name="positive_button">OK</string>
|
||||
<string name="negative_button">キャンセル</string>
|
||||
<string name="ok">OK</string>
|
||||
<string name="yes">はい</string>
|
||||
<string name="no">いいえ</string>
|
||||
<string name="cancel">キャンセル</string>
|
||||
<string name="sticker">スタンプ</string>
|
||||
<string name="video">動画</string>
|
||||
<string name="picture">写真</string>
|
||||
<string name="reacquisition">再取得</string>
|
||||
|
||||
<!-- Xposed API -->
|
||||
<string name="xposed_desc">LINE をクリーンに。</string>
|
||||
@ -45,42 +53,26 @@
|
||||
<string name="button_paste">ペースト</string>
|
||||
|
||||
<!-- Menu -->
|
||||
<string name="switch_keep_unread">未読のまま閲覧</string>]
|
||||
|
||||
|
||||
<!-- UNSENT REC -->
|
||||
|
||||
<string name="switch_keep_unread">未読のまま閲覧</string>
|
||||
|
||||
<!-- UNSENT CAP -->
|
||||
<string name="backup">バックアップ</string>
|
||||
<string name="backup_creation_failed">バックアップの作成に失敗しました</string>
|
||||
<string name="check">確認</string>
|
||||
<string name="confirm">確認</string>
|
||||
<string name="class_not_found">クラスが見つかりません</string>
|
||||
|
||||
<string name="confirm_messages">確認済みのメッセージ</string>
|
||||
<string name="delete_messages">メッセージを削除</string>
|
||||
<string name="deleted_messages">削除されたメッセージ</string>
|
||||
<string name="content_moved_to_backup">内容がバックアップファイルに移動されました</string>
|
||||
|
||||
<string name="file_content_deleted">ファイルの内容が削除されました</string>
|
||||
<string name="file_creation_failed">ファイルを作成できませんでした</string>
|
||||
<string name="file_delete_failed">ファイルの削除に失敗しました</string>
|
||||
<string name="file_move_failed">ファイルの移動に失敗しました</string>
|
||||
<string name="file_save_failed">ファイルの保存に失敗しました</string>
|
||||
<string name="file_not_found">ファイルが見つかりません</string>
|
||||
<string name="read_BackUpFile_failed">BackUpFile.txtの読み取りに失敗しました</string>
|
||||
<string name="really_delete">本当に削除しますか</string>
|
||||
|
||||
|
||||
<string name="failed_read_backup_file">%s の読み取りに失敗しました</string>
|
||||
<string name="confirm_delete">本当に削除しますか?</string>
|
||||
<string name="no_backup_found">何もバックアップされていません</string>
|
||||
<string name="no_get_restart_app">正しく取得できませんでした。アプリを再起動してください</string>
|
||||
<string name="ok">ok</string>
|
||||
|
||||
<string name="yes">はい</string>
|
||||
<string name="no">いいえ</string>
|
||||
<string name="cancel">キャンセル</string>
|
||||
<string name="sticker">スタンプ</string>
|
||||
<string name="video">動画</string>
|
||||
<string name="picture">写真</string>
|
||||
<string name="reacquisition">再取得</string>
|
||||
<string name="no_get_restart_app">正しく取得できませんでした。\nアプリを再起動してください</string>
|
||||
|
||||
</resources>
|
||||
|
@ -1,8 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string translatable="false" name="app_name">LIME</string>
|
||||
<!-- General -->
|
||||
<string name="positive_button">OK</string>
|
||||
<string name="negative_button">Cancel</string>
|
||||
<string name="ok">OK</string>
|
||||
<string name="yes">Yes</string>
|
||||
<string name="no">No</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="sticker">Stickers</string>
|
||||
<string name="video">Videos</string>
|
||||
<string name="picture">Photos</string>
|
||||
<string name="reacquisition">Reacquisition</string>
|
||||
|
||||
<!-- Xposed API -->
|
||||
<string name="xposed_desc">Clean LINE.</string>
|
||||
@ -47,35 +56,24 @@
|
||||
<!-- Menu -->
|
||||
<string name="switch_keep_unread">Keep unread</string>
|
||||
|
||||
<!-- UNSENT REC -->
|
||||
|
||||
<!-- UNSENT CAP -->
|
||||
<string name="backup">Backup</string>
|
||||
<string name="backup_creation_failed">Failed to create backup</string>
|
||||
<string name="check">Confirm</string>
|
||||
<string name="confirm">Confirm</string>
|
||||
<string name="class_not_found">Class not found</string>
|
||||
|
||||
<string name="confirm_messages">Confirmed messages</string>
|
||||
<string name="delete_messages">Deleted messages</string>
|
||||
<string name="deleted_messages">Deleted messages</string>
|
||||
<string name="content_moved_to_backup">Content moved to backup file</string>
|
||||
|
||||
<string name="file_content_deleted">File contents deleted</string>
|
||||
<string name="file_creation_failed">Could not create file</string>
|
||||
<string name="file_delete_failed">Failed to delete file</string>
|
||||
<string name="file_move_failed">Failed to move file</string>
|
||||
<string name="file_save_failed">Failed to save file</string>
|
||||
<string name="file_not_found">File not found</string>
|
||||
<string name="read_BackUpFile_failed">Failed to read BackUpFile.txt</string>
|
||||
<string name="really_delete">Really delete?</string>
|
||||
<string name="failed_read_backup_file">Failed to read %s</string>
|
||||
<string name="confirm_delete">Really want to delete it?</string>
|
||||
<string name="no_backup_found">Nothing backed up</string>
|
||||
<string name="no_get_restart_app">Could not get properly. Please restart the app</string>
|
||||
<string name="ok">ok</string>
|
||||
<string name="yes">Yes</string>
|
||||
<string name="no">No</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="sticker">Stickers</string>
|
||||
<string name="video">Videos</string>
|
||||
<string name="picture">Photos</string>
|
||||
<string name="reacquisition">Reacquisition</string>
|
||||
|
||||
<string name="no_get_restart_app">Could not get properly.\nPlease restart the app</string>
|
||||
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user