diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle index 10025372b..f88e4bd4c 100644 --- a/TMessagesProj/build.gradle +++ b/TMessagesProj/build.gradle @@ -210,14 +210,6 @@ android { keyPassword pwd } - debug { - - storeFile project.file('debug.keystore') - storePassword "android" - keyAlias "androiddebugkey" - keyPassword "android" - - } } buildTypes { @@ -225,7 +217,7 @@ android { debuggable true jniDebuggable true multiDexEnabled true - signingConfig signingConfigs.debug + signingConfig signingConfigs.release proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } @@ -235,7 +227,6 @@ android { jniDebuggable false minifyEnabled true shrinkResources true - signingConfig signingConfigs.release } release { diff --git a/TMessagesProj/debug.keystore b/TMessagesProj/debug.keystore deleted file mode 100644 index 87a727d3f..000000000 Binary files a/TMessagesProj/debug.keystore and /dev/null differ diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/SendMessagesHelper.java b/TMessagesProj/src/main/java/org/telegram/messenger/SendMessagesHelper.java index 6604c3af6..044e10a50 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/SendMessagesHelper.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/SendMessagesHelper.java @@ -6036,7 +6036,7 @@ public class SendMessagesHelper extends BaseController implements NotificationCe if (forceDocument) { videoEditedInfo = null; } else { - videoEditedInfo = info.videoEditedInfo; + videoEditedInfo = info.videoEditedInfo != null ? info.videoEditedInfo : createCompressionSettings(info.path); } if (!forceDocument && (videoEditedInfo != null || info.path.endsWith("mp4"))) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/CallLogActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/CallLogActivity.java index d86d07dd4..78de519ba 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/CallLogActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/CallLogActivity.java @@ -451,7 +451,7 @@ public class CallLogActivity extends BaseFragment implements NotificationCenter. BottomBuilder builder = new BottomBuilder(getParentActivity()); builder.addTitle(LocaleController.getString("ConfirmDeleteCallLog", R.string.ConfirmDeleteCallLog)); - builder.addItem(LocaleController.getString("Delete", R.string.Delete), R.drawable.baseline_delete_24, (dialog, which) -> { + builder.addItem(LocaleController.getString("Delete", R.string.Delete), R.drawable.baseline_delete_24, (cell) -> { ArrayList ids = new ArrayList<>(); for (TLRPC.Message msg : row.calls) { ids.add(msg.id); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChannelCreateActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChannelCreateActivity.java index b99c737c8..db05a7c2b 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChannelCreateActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChannelCreateActivity.java @@ -16,6 +16,7 @@ import android.content.Context; import android.content.Intent; import android.graphics.Canvas; import android.graphics.Paint; +import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.os.Bundle; import android.os.Vibrator; diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatRightsEditActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatRightsEditActivity.java index 2319140fd..06ed4bfc8 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatRightsEditActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatRightsEditActivity.java @@ -974,7 +974,7 @@ public class ChatRightsEditActivity extends BaseFragment { int left = MAX_RANK_LENGTH - (currentRank != null ? currentRank.codePointCount(0, currentRank.length()) : 0); if (left <= MAX_RANK_LENGTH - MAX_RANK_LENGTH * 0.7f) { headerCell.setText2(String.format("%d", left)); - SimpleTextView textView = headerCell.getTextView2(); + TextView textView = headerCell.getTextView2(); String key = left < 0 ? Theme.key_windowBackgroundWhiteRedText5 : Theme.key_windowBackgroundWhiteGrayText3; textView.setTextColor(Theme.getColor(key)); textView.setTag(key); diff --git a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/utils/FileUtil.kt b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/utils/FileUtil.kt index a12998d3e..2809ceab7 100644 --- a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/utils/FileUtil.kt +++ b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/utils/FileUtil.kt @@ -192,17 +192,37 @@ object FileUtil { if (!newFile.isFile) { + if (Build.VERSION.SDK_INT > Build.VERSION_CODES.M) { + + Build.SUPPORTED_ABIS.forEachIndexed { index, abi -> + + runCatching { + + saveNonAsset("lib/$abi/${execFile.name}", execFile) + + FileLog.d("lib extracted with default abi$index ($abi): $execFile") + + } + + } + + error("library not found ${execFile.name}") + + } + + } else { + runCatching { saveNonAsset("lib/${Build.CPU_ABI}/${execFile.name}", execFile) - FileLog.d("lib extracted with default abi: $execFile, ${Build.CPU_ABI}") + FileLog.d("lib extracted with default abi (${Build.CPU_ABI}): $execFile") }.recover { saveNonAsset("lib/${Build.CPU_ABI2}/${execFile.name}", execFile) - FileLog.d("lib extracted with abi2: $execFile, ${Build.CPU_ABI2}") + FileLog.d("lib extracted with abi2 (${Build.CPU_ABI2}): $execFile") } diff --git a/update_jni.sh b/update_jni.sh index dcf42c10e..26ac6f018 100755 --- a/update_jni.sh +++ b/update_jni.sh @@ -1,6 +1,6 @@ #!/bin/bash -rm TMessagesProj/libs/*.aar +rm -f TMessagesProj/libs/*.aar ./gradlew ss-rust:assembleRelease @@ -31,14 +31,16 @@ cd ../.. OUT=TMessagesProj/build/intermediates/ndkBuild/fullFoss/obj/local DIR=TMessagesProj/src/main/libs -rm $DIR/armeabi-v7a/* +rm -rf $DIR + +mkdir -p $DIR/armeabi-v7a cp $OUT/armeabi-v7a/*.so $DIR/armeabi-v7a -rm $DIR/arm64-v8a/* +mkdir -p $DIR/arm64-v8a cp $OUT/arm64-v8a/*.so $DIR/arm64-v8a -rm $DIR/x86/* +mkdir -p $DIR/x86 cp $OUT/x86/*.so $DIR/x86 -rm $DIR/x86_64/* +mkdir -p $DIR/x86_64 cp $OUT/x86_64/*.so $DIR/x86_64 \ No newline at end of file