Update to 8.8.2

This commit is contained in:
xaxtix 2022-06-21 06:51:00 +04:00
parent 32aef72421
commit 96dce2c9aa
2710 changed files with 40357 additions and 11958 deletions

View file

@ -34,8 +34,6 @@ import android.graphics.PorterDuffXfermode;
import android.graphics.drawable.BitmapDrawable;
import android.media.AudioAttributes;
import android.media.AudioManager;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.media.SoundPool;
import android.net.Uri;
import android.os.Build;
@ -43,7 +41,6 @@ import android.os.PowerManager;
import android.os.SystemClock;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Log;
import android.util.SparseArray;
import android.util.SparseBooleanArray;
@ -3719,7 +3716,7 @@ public class NotificationsController extends BaseController {
mBuilder.setLargeIcon(img.getBitmap());
} else {
try {
File file = FileLoader.getPathToAttach(photoPath, true);
File file = getFileLoader().getPathToAttach(photoPath, true);
if (file.exists()) {
float scaleFactor = 160.0f / AndroidUtilities.dp(50);
BitmapFactory.Options options = new BitmapFactory.Options();
@ -4104,7 +4101,7 @@ public class NotificationsController extends BaseController {
}
if (photoPath != null) {
avatalFile = FileLoader.getPathToAttach(photoPath, true);
avatalFile = getFileLoader().getPathToAttach(photoPath, true);
if (Build.VERSION.SDK_INT < 28) {
BitmapDrawable img = ImageLoader.getInstance().getImageFromMemory(photoPath, null, "50_50");
if (img != null) {
@ -4176,7 +4173,7 @@ public class NotificationsController extends BaseController {
try {
if (sender != null && sender.photo != null && sender.photo.photo_small != null && sender.photo.photo_small.volume_id != 0 && sender.photo.photo_small.local_id != 0) {
Person.Builder personBuilder = new Person.Builder().setName(LocaleController.getString("FromYou", R.string.FromYou));
File avatar = FileLoader.getPathToAttach(sender.photo.photo_small, true);
File avatar = getFileLoader().getPathToAttach(sender.photo.photo_small, true);
loadRoundAvatar(avatar, personBuilder);
selfPerson = personBuilder.build();
personCache.put(selfUserId, selfPerson);
@ -4276,7 +4273,7 @@ public class NotificationsController extends BaseController {
}
}
if (sender != null && sender.photo != null && sender.photo.photo_small != null && sender.photo.photo_small.volume_id != 0 && sender.photo.photo_small.local_id != 0) {
avatar = FileLoader.getPathToAttach(sender.photo.photo_small, true);
avatar = getFileLoader().getPathToAttach(sender.photo.photo_small, true);
}
}
loadRoundAvatar(avatar, personBuilder);
@ -4289,7 +4286,7 @@ public class NotificationsController extends BaseController {
boolean setPhoto = false;
if (preview[0] && Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && !((ActivityManager) ApplicationLoader.applicationContext.getSystemService(Context.ACTIVITY_SERVICE)).isLowRamDevice()) {
if (!waitingForPasscode && !messageObject.isSecretMedia() && (messageObject.type == 1 || messageObject.isSticker())) {
File attach = FileLoader.getPathToMessage(messageObject.messageOwner);
File attach = getFileLoader().getPathToMessage(messageObject.messageOwner);
NotificationCompat.MessagingStyle.Message msg = new NotificationCompat.MessagingStyle.Message(message, ((long) messageObject.messageOwner.date) * 1000L, person);
String mimeType = messageObject.isSticker() ? "image/webp" : "image/jpeg";
Uri uri;
@ -4332,7 +4329,7 @@ public class NotificationsController extends BaseController {
if (preview[0] && !waitingForPasscode && messageObject.isVoice()) {
List<NotificationCompat.MessagingStyle.Message> messages = messagingStyle.getMessages();
if (!messages.isEmpty()) {
File f = FileLoader.getPathToMessage(messageObject.messageOwner);
File f = getFileLoader().getPathToMessage(messageObject.messageOwner);
Uri uri;
if (Build.VERSION.SDK_INT >= 24) {
try {
@ -4384,7 +4381,7 @@ public class NotificationsController extends BaseController {
msgHeardIntent.putExtra("max_id", maxId);
msgHeardIntent.putExtra("currentAccount", currentAccount);
PendingIntent readPendingIntent = PendingIntent.getBroadcast(ApplicationLoader.applicationContext, internalId, msgHeardIntent, PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Action readAction = new NotificationCompat.Action.Builder(R.drawable.menu_read, LocaleController.getString("MarkAsRead", R.string.MarkAsRead), readPendingIntent)
NotificationCompat.Action readAction = new NotificationCompat.Action.Builder(R.drawable.msg_markread, LocaleController.getString("MarkAsRead", R.string.MarkAsRead), readPendingIntent)
.setSemanticAction(NotificationCompat.Action.SEMANTIC_ACTION_MARK_AS_READ)
.setShowsUserInterface(false)
.build();