update to 9.6.2

This commit is contained in:
xaxtix 2023-04-26 14:01:31 +04:00
parent c1e3121db2
commit 3c9a4c1f1f
96 changed files with 475 additions and 383 deletions

View file

@ -6,7 +6,7 @@ import java.util.concurrent.CountDownLatch;
public class AnimatedFileDrawableStream implements FileLoadOperationStream {
private final FileLoadOperation loadOperation;
private FileLoadOperation loadOperation;
private CountDownLatch countDownLatch;
private TLRPC.Document document;
private ImageLocation location;
@ -76,22 +76,30 @@ public class AnimatedFileDrawableStream implements FileLoadOperationStream {
return 0;
}
}
countDownLatch = new CountDownLatch(1);
if (loadOperation.isPaused() || lastOffset != offset || preview) {
FileLoader.getInstance(currentAccount).loadStreamFile(this, document, location, parentObject, offset, preview, loadingPriority);
FileLoadOperation loadOperation = FileLoader.getInstance(currentAccount).loadStreamFile(this, document, location, parentObject, offset, preview, loadingPriority);
if (this.loadOperation != loadOperation) {
this.loadOperation.removeStreamListener(this);
this.loadOperation = loadOperation;
}
lastOffset = offset + availableLength;
}
synchronized (sync) {
if (canceled) {
countDownLatch = null;
cancelLoadingInternal();
return 0;
}
countDownLatch = new CountDownLatch(1);
}
if (!preview) {
FileLoader.getInstance(currentAccount).setLoadingVideo(document, false, true);
}
waitingForLoad = true;
countDownLatch.await();
waitingForLoad = false;
if (countDownLatch != null) {
waitingForLoad = true;
countDownLatch.await();
waitingForLoad = false;
}
}
}
lastOffset = offset + availableLength;
@ -113,10 +121,17 @@ public class AnimatedFileDrawableStream implements FileLoadOperationStream {
synchronized (sync) {
if (countDownLatch != null) {
countDownLatch.countDown();
countDownLatch = null;
if (removeLoading && !canceled && !preview) {
FileLoader.getInstance(currentAccount).removeLoadingVideo(document, false, true);
}
}
if (parentObject instanceof MessageObject) {
MessageObject messageObject = (MessageObject) parentObject;
if (DownloadController.getInstance(messageObject.currentAccount).isDownloading(messageObject.getId())) {
removeLoading = false;
}
}
if (removeLoading) {
cancelLoadingInternal();
}
@ -165,6 +180,7 @@ public class AnimatedFileDrawableStream implements FileLoadOperationStream {
public void newDataAvailable() {
if (countDownLatch != null) {
countDownLatch.countDown();
countDownLatch = null;
}
}

View file

@ -24,8 +24,8 @@ public class BuildVars {
public static boolean USE_CLOUD_STRINGS = true;
public static boolean CHECK_UPDATES = true;
public static boolean NO_SCOPED_STORAGE = Build.VERSION.SDK_INT <= 29;
public static int BUILD_VERSION = 3333;
public static String BUILD_VERSION_STRING = "9.6.1";
public static int BUILD_VERSION = 3341;
public static String BUILD_VERSION_STRING = "9.6.2";
public static int APP_ID = 4;
public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103";

View file

@ -619,6 +619,14 @@ public class FileLoadOperation {
return result[0];
}
protected File getCurrentFileFast() {
if (state == stateFinished) {
return cacheFileFinal;
} else {
return cacheFileTemp;
}
}
private long getDownloadedLengthFromOffsetInternal(ArrayList<Range> ranges, final long offset, final long length) {
if (ranges == null || state == stateFinished || ranges.isEmpty()) {
if (state == stateFinished) {

View file

@ -203,8 +203,8 @@ public class FileLoader extends BaseController {
super(instance);
filePathDatabase = new FilePathDatabase(instance);
for (int i = 0; i < smallFilesQueue.length; i++) {
smallFilesQueue[i] = new FileLoaderPriorityQueue("smallFilesQueue dc" + (i + 1), 5);
largeFilesQueue[i] = new FileLoaderPriorityQueue("largeFilesQueue dc" + (i + 1), 2);
smallFilesQueue[i] = new FileLoaderPriorityQueue(instance, "smallFilesQueue dc" + (i + 1), FileLoaderPriorityQueue.TYPE_SMALL);
largeFilesQueue[i] = new FileLoaderPriorityQueue(instance, "largeFilesQueue dc" + (i + 1), FileLoaderPriorityQueue.TYPE_LARGE);
}
dumpFilesQueue();
}

View file

@ -4,8 +4,11 @@ import java.util.ArrayList;
public class FileLoaderPriorityQueue {
private final int maxActiveOperationsCount;
public static final int TYPE_SMALL = 0;
public static final int TYPE_LARGE = 1;
String name;
int type;
int currentAccount;
private ArrayList<FileLoadOperation> allOperations = new ArrayList<>();
@ -13,9 +16,10 @@ public class FileLoaderPriorityQueue {
private int PRIORITY_VALUE_NORMAL = (1 << 16);
private int PRIORITY_VALUE_LOW = 0;
FileLoaderPriorityQueue(String name, int maxActiveOperationsCount) {
FileLoaderPriorityQueue(int currentAccount, String name, int type) {
this.currentAccount = currentAccount;
this.name = name;
this.maxActiveOperationsCount = maxActiveOperationsCount;
this.type = type;
}
public void add(FileLoadOperation operation) {
@ -55,7 +59,7 @@ public class FileLoaderPriorityQueue {
int activeCount = 0;
int lastPriority = 0;
boolean pauseAllNextOperations = false;
int max = maxActiveOperationsCount;
int max = type == TYPE_LARGE ? MessagesController.getInstance(currentAccount).largeQueueMaxActiveOperations : MessagesController.getInstance(currentAccount).smallQueueMaxActiveOperations;
for (int i = 0; i < allOperations.size(); i++) {
FileLoadOperation operation = allOperations.get(i);
if (i > 0 && !pauseAllNextOperations) {

View file

@ -20,6 +20,7 @@ import com.google.android.exoplayer2.upstream.TransferListener;
import org.telegram.tgnet.TLRPC;
import java.io.EOFException;
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.util.concurrent.CountDownLatch;
@ -37,6 +38,7 @@ public class FileStreamLoadOperation extends BaseDataSource implements FileLoadO
private TLRPC.Document document;
private Object parentObject;
private int currentAccount;
File currentFile;
public FileStreamLoadOperation() {
super(/* isNetwork= */ false);
@ -78,7 +80,7 @@ public class FileStreamLoadOperation extends BaseDataSource implements FileLoadO
opened = true;
transferStarted(dataSpec);
if (loadOperation != null) {
file = new RandomAccessFile(loadOperation.getCurrentFile(), "r");
file = new RandomAccessFile(currentFile = loadOperation.getCurrentFile(), "r");
file.seek(currentOffset);
}
return bytesRemaining;
@ -99,13 +101,16 @@ public class FileStreamLoadOperation extends BaseDataSource implements FileLoadO
while (availableLength == 0 && opened) {
availableLength = (int) loadOperation.getDownloadedLengthFromOffset(currentOffset, readLength)[0];
if (availableLength == 0) {
countDownLatch = new CountDownLatch(1);
FileLoadOperation loadOperation = FileLoader.getInstance(currentAccount).loadStreamFile(this, document, null, parentObject, currentOffset, false, FileLoader.PRIORITY_HIGH);
if (this.loadOperation != loadOperation) {
this.loadOperation.removeStreamListener(this);
this.loadOperation = loadOperation;
}
countDownLatch = new CountDownLatch(1);
countDownLatch.await();
if (countDownLatch != null) {
countDownLatch.await();
countDownLatch = null;
}
}
}
if (!opened) {
@ -146,14 +151,18 @@ public class FileStreamLoadOperation extends BaseDataSource implements FileLoadO
transferEnded();
}
if (countDownLatch != null) {
// FileLog.d("FileStreamLoadOperation count down");
countDownLatch.countDown();
countDownLatch = null;
}
}
@Override
public void newDataAvailable() {
if (countDownLatch != null) {
// FileLog.d("FileStreamLoadOperation count down");
countDownLatch.countDown();
countDownLatch = null;
}
}
}

View file

@ -1802,7 +1802,7 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
if (chatActivity == null || accelerometerSensor == null && (gravitySensor == null || linearAcceleration == null) || proximitySensor == null) {
return;
}
if (!SharedConfig.enabledRaiseTo(true) && (playingMessageObject == null || !playingMessageObject.isVoice() && !playingMessageObject.isRoundVideo())) {
if (!SharedConfig.enabledRaiseTo(false) && (playingMessageObject == null || !playingMessageObject.isVoice() && !playingMessageObject.isRoundVideo())) {
return;
}
raiseChat = chatActivity;

View file

@ -2450,6 +2450,32 @@ public class MessageObject {
checkMediaExistance();
}
private boolean spoiledLoginCode = false;
private static Pattern loginCodePattern;
public void spoilLoginCode() { // spoil login code from +42777
if (!spoiledLoginCode && messageText != null && messageOwner != null && messageOwner.entities != null && messageOwner.from_id instanceof TLRPC.TL_peerUser && messageOwner.from_id.user_id == 777000) {
if (loginCodePattern == null) {
loginCodePattern = Pattern.compile("[\\d\\-]{5,7}");
}
try {
Matcher matcher = loginCodePattern.matcher(messageText);
if (matcher.find()) {
TLRPC.TL_messageEntitySpoiler spoiler = new TLRPC.TL_messageEntitySpoiler();
spoiler.offset = matcher.start();
spoiler.length = matcher.end() - spoiler.offset;
messageOwner.entities.add(spoiler);
}
} catch (Exception e) {
FileLog.e(e, false);
}
spoiledLoginCode = true;
}
}
public boolean didSpoilLoginCode() {
return spoiledLoginCode;
}
private CharSequence getStringFrom(TLRPC.ChatReactions reactions) {
if (reactions instanceof TLRPC.TL_chatReactionsAll) {
return LocaleController.getString("AllReactions", R.string.AllReactions);
@ -4764,6 +4790,9 @@ public class MessageObject {
}
matcher = urlPattern.matcher(charSequence);
}
if (!(charSequence instanceof Spannable)) {
return;
}
Spannable spannable = (Spannable) charSequence;
while (matcher.find()) {
int start = matcher.start();
@ -5389,6 +5418,7 @@ public class MessageObject {
textWidth = 0;
ArrayList<TLRPC.MessageEntity> entities = translated && messageOwner.translatedText != null ? messageOwner.translatedText.entities : messageOwner.entities;
spoilLoginCode();
boolean hasEntities;
if (messageOwner.send_state != MESSAGE_SEND_STATE_SENT) {
@ -5670,7 +5700,7 @@ public class MessageObject {
linesOffset += currentBlockLinesCount;
block.spoilers.clear();
if (!isSpoilersRevealed) {
if (!isSpoilersRevealed && !spoiledLoginCode) {
SpoilerEffect.addSpoilers(null, block.textLayout, -1, linesMaxWidthWithLeft, null, block.spoilers);
}
}
@ -7578,6 +7608,9 @@ public class MessageObject {
}
public boolean equals(MessageObject obj) {
if (obj == null) {
return false;
}
return getId() == obj.getId() && getDialogId() == obj.getDialogId();
}

View file

@ -27,6 +27,7 @@ import android.os.SystemClock;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Base64;
import android.util.Log;
import android.util.Pair;
import android.util.SparseArray;
import android.util.SparseBooleanArray;
@ -133,6 +134,8 @@ public class MessagesController extends BaseController implements NotificationCe
private LongSparseIntArray pendingUnreadCounter = new LongSparseIntArray();
private int lastPrintingStringCount;
private SparseArray<ChatlistUpdatesStat> chatlistFoldersUpdates = new SparseArray<>();
public int largeQueueMaxActiveOperations = 2;
public int smallQueueMaxActiveOperations = 5;
class ChatlistUpdatesStat {
public ChatlistUpdatesStat() {
@ -1321,6 +1324,8 @@ public class MessagesController extends BaseController implements NotificationCe
giftAttachMenuIcon = mainPreferences.getBoolean("giftAttachMenuIcon", false);
giftTextFieldIcon = mainPreferences.getBoolean("giftTextFieldIcon", false);
checkResetLangpack = mainPreferences.getInt("checkResetLangpack", 0);
smallQueueMaxActiveOperations = mainPreferences.getInt("smallQueueMaxActiveOperations", 5);
largeQueueMaxActiveOperations = mainPreferences.getInt("largeQueueMaxActiveOperations", 2);
boolean isTest = ConnectionsManager.native_isTestBackend(currentAccount) != 0;
chatlistInvitesLimitDefault = mainPreferences.getInt("chatlistInvitesLimitDefault", 3);
chatlistInvitesLimitPremium = mainPreferences.getInt("chatlistInvitesLimitPremium", isTest ? 5 : 20);
@ -2096,6 +2101,20 @@ public class MessagesController extends BaseController implements NotificationCe
for (int a = 0, N = object.value.size(); a < N; a++) {
TLRPC.TL_jsonObjectValue value = object.value.get(a);
switch (value.key) {
case "large_queue_max_active_operations_count": {
if (value.value instanceof TLRPC.TL_jsonNumber) {
largeQueueMaxActiveOperations = (int) ((TLRPC.TL_jsonNumber) value.value).value;
editor.putInt("largeQueueMaxActiveOperations", largeQueueMaxActiveOperations);
}
break;
}
case "small_queue_max_active_operations_count": {
if (value.value instanceof TLRPC.TL_jsonNumber) {
smallQueueMaxActiveOperations = (int) ((TLRPC.TL_jsonNumber) value.value).value;
editor.putInt("smallQueueMaxActiveOperations", smallQueueMaxActiveOperations);
}
break;
}
case "premium_gift_text_field_icon": {
if (value.value instanceof TLRPC.TL_jsonBool) {
if (giftTextFieldIcon != ((TLRPC.TL_jsonBool) value.value).value) {
@ -2356,17 +2375,6 @@ public class MessagesController extends BaseController implements NotificationCe
}
break;
}
case "autologin_token": {
if (value.value instanceof TLRPC.TL_jsonString) {
TLRPC.TL_jsonString string = (TLRPC.TL_jsonString) value.value;
if (!string.value.equals(autologinToken)) {
autologinToken = string.value;
editor.putString("autologinToken", autologinToken);
changed = true;
}
}
break;
}
case "emojies_send_dice": {
HashSet<String> newEmojies = new HashSet<>();
if (value.value instanceof TLRPC.TL_jsonArray) {
@ -3364,6 +3372,7 @@ public class MessagesController extends BaseController implements NotificationCe
editor.putInt("webFileDatacenterId", webFileDatacenterId);
editor.putString("suggestedLangCode", suggestedLangCode);
editor.putBoolean("forceTryIpV6", forceTryIpV6);
editor.putString("autologinToken", autologinToken = config.autologin_token);
editor.commit();
getConnectionsManager().setForceTryIpV6(forceTryIpV6);
@ -11199,9 +11208,9 @@ public class MessagesController extends BaseController implements NotificationCe
final ArrayList<TLRPC.User> userRestrictedPrivacy = new ArrayList<>();
processed[0] = 0;
final Runnable showUserRestrictedPrivacyAlert = () -> {
AndroidUtilities.runOnUIThread(() ->{
AndroidUtilities.runOnUIThread(() -> {
BaseFragment lastFragment = LaunchActivity.getLastFragment();
if (lastFragment != null && lastFragment.getParentActivity() != null) {
if (lastFragment != null && lastFragment.getParentActivity() != null && !lastFragment.getParentActivity().isFinishing()) {
// if (ChatObject.canUserDoAdminAction(currentChat, ChatObject.ACTION_INVITE)) {
LimitReachedBottomSheet restricterdUsersBottomSheet = new LimitReachedBottomSheet(lastFragment, lastFragment.getParentActivity(), LimitReachedBottomSheet.TYPE_ADD_MEMBERS_RESTRICTED, currentAccount);
restricterdUsersBottomSheet.setRestrictedUsers(currentChat, userRestrictedPrivacy);

View file

@ -13871,7 +13871,7 @@ public class MessagesStorage extends BaseController {
}
if (message.media instanceof TLRPC.TL_messageMediaPoll) {
TLRPC.TL_messageMediaPoll messageMediaPoll = (TLRPC.TL_messageMediaPoll) message.media;
if (!messageMediaPoll.results.recent_voters.isEmpty()) {
if (messageMediaPoll.results != null && messageMediaPoll.results.recent_voters != null && !messageMediaPoll.results.recent_voters.isEmpty()) {
usersToLoad.addAll(messageMediaPoll.results.recent_voters);
}
}

View file

@ -1990,8 +1990,11 @@ public class NotificationsController extends BaseController {
};
private String replaceSpoilers(MessageObject messageObject) {
if (messageObject == null || messageObject.messageOwner == null) {
return null;
}
String text = messageObject.messageOwner.message;
if (text == null || messageObject == null || messageObject.messageOwner == null || messageObject.messageOwner.entities == null) {
if (text == null || messageObject.messageOwner.entities == null) {
return null;
}
StringBuilder stringBuilder = new StringBuilder(text);
@ -3204,7 +3207,8 @@ public class NotificationsController extends BaseController {
boolean secretChat = !isDefault && DialogObject.isEncryptedDialog(dialogId);
boolean shouldOverwrite = !isInApp && overwriteKey != null && preferences.getBoolean(overwriteKey, false);
String soundHash = Utilities.MD5(sound == null ? "NoSound" : sound.toString());
int nosoundPatch = 2; // when changing code here about no-sound issues, make sure to increment this value
String soundHash = Utilities.MD5(sound == null ? "NoSound" + nosoundPatch : sound.toString());
if (soundHash != null && soundHash.length() > 5) {
soundHash = soundHash.substring(0, 5);
}
@ -3422,7 +3426,8 @@ public class NotificationsController extends BaseController {
if (sound != null) {
notificationChannel.setSound(sound, builder.build());
} else {
// notificationChannel.setSound(null, null);
// todo: deal with vendor messed up crash here later
notificationChannel.setSound(null, builder.build());
}
if (BuildVars.LOGS_ENABLED) {
FileLog.d("create new channel " + channelId);

View file

@ -1236,7 +1236,7 @@ public class SharedConfig {
return info;
}
}
proxyList.add(proxyInfo);
proxyList.add(0, proxyInfo);
saveProxyList();
return proxyInfo;
}

View file

@ -4097,8 +4097,13 @@ public class VoIPService extends Service implements SensorEventListener, AudioMa
Notification incomingNotification;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
Bitmap avatar = getRoundAvatarBitmap(userOrChat);
String presonName = ContactsController.formatName(userOrChat);
if (TextUtils.isEmpty(presonName)) {
//java.lang.IllegalArgumentException: person must have a non-empty a name
presonName = "___";
}
Person person = new Person.Builder()
.setName(ContactsController.formatName(userOrChat))
.setName(presonName)
.setIcon(Icon.createWithAdaptiveBitmap(avatar)).build();
Notification.CallStyle notificationStyle = Notification.CallStyle.forIncomingCall(person, endPendingIntent, answerPendingIntent);

View file

@ -9,6 +9,7 @@ import android.os.Build;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Base64;
import android.util.Log;
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;

View file

@ -39,18 +39,15 @@ import androidx.annotation.Nullable;
import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.AnimationNotificationsLocker;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.NotificationCenter;
import org.telegram.messenger.R;
import org.telegram.messenger.UserConfig;
import org.telegram.ui.Components.LayoutHelper;
import org.telegram.ui.Components.Paint.Views.LPhotoPaintView;
import org.telegram.ui.Components.PopupSwipeBackLayout;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Locale;
public class ActionBarPopupWindow extends PopupWindow {

View file

@ -141,7 +141,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.CountDownLatch;
public class Theme {
@ -3526,6 +3525,8 @@ public class Theme {
public static final int key_chat_outBubbleSelected = colorsCount++;
public static final int key_chat_outBubbleShadow = colorsCount++;
public static final int key_chat_outBubbleGradient1 = colorsCount++;
public static final int key_chat_outBubbleGradient2 = colorsCount++;
public static final int key_chat_outBubbleGradient3 = colorsCount++;
public static final int myMessagesBubblesEndIndex = colorsCount;
//my messages
@ -3598,8 +3599,6 @@ public class Theme {
public static final int key_chat_outBubbleLocationPlaceholder = colorsCount++;
public static final int key_chat_outBubbleSelectedOverlay = colorsCount++;
public static final int key_chat_outPsaNameText = colorsCount++;
public static final int key_chat_outBubbleGradient2 = colorsCount++;
public static final int key_chat_outBubbleGradient3 = colorsCount++;
public static final int key_chat_outBubbleGradientAnimated = colorsCount++;
public static final int key_chat_outBubbleGradientSelectedOverlay = colorsCount++;
public static final int key_chat_inBubbleSelected = colorsCount++;
@ -9077,7 +9076,7 @@ public class Theme {
setDrawableColorByKey(profile_verifiedCheckDrawable, key_profile_verifiedCheck);
}
public static Drawable getThemedDrawable(Context context, int resId, int key, Theme.ResourcesProvider resourcesProvider) {
public static Drawable getThemedDrawableByKey(Context context, int resId, int key, Theme.ResourcesProvider resourcesProvider) {
return getThemedDrawable(context, resId, getColor(key, resourcesProvider));
}

View file

@ -402,7 +402,7 @@ public class ContactsAdapter extends RecyclerListView.SectionsAdapter {
case 5:
default:
view = new ShadowSectionCell(mContext);
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
Drawable drawable = Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
combinedDrawable.setFullsize(true);
view.setBackgroundDrawable(combinedDrawable);

View file

@ -583,7 +583,7 @@ public class DialogsAdapter extends RecyclerListView.SelectionAdapter implements
};
frameLayout.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundGray));
View v = new View(mContext);
v.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
v.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
frameLayout.addView(v, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
view = frameLayout;
break;
@ -616,7 +616,7 @@ public class DialogsAdapter extends RecyclerListView.SelectionAdapter implements
break;
case VIEW_TYPE_SHADOW: {
view = new ShadowSectionCell(mContext);
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
Drawable drawable = Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
combinedDrawable.setFullsize(true);
view.setBackgroundDrawable(combinedDrawable);
@ -679,7 +679,7 @@ public class DialogsAdapter extends RecyclerListView.SelectionAdapter implements
}
}
};
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
Drawable drawable = Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
combinedDrawable.setFullsize(true);
view.setBackgroundDrawable(combinedDrawable);

View file

@ -12,14 +12,11 @@ import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.location.Location;
import android.os.Build;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewPropertyAnimator;
import android.widget.FrameLayout;
import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.LocationController;
import org.telegram.messenger.MessageObject;
@ -27,7 +24,6 @@ import org.telegram.messenger.R;
import org.telegram.messenger.UserConfig;
import org.telegram.tgnet.TLRPC;
import org.telegram.ui.ActionBar.Theme;
import org.telegram.ui.Cells.EmptyCell;
import org.telegram.ui.Cells.HeaderCell;
import org.telegram.ui.Cells.LocationCell;
import org.telegram.ui.Cells.LocationDirectionCell;
@ -46,8 +42,6 @@ import java.util.Locale;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.gms.vision.Frame;
public class LocationActivityAdapter extends BaseLocationAdapter implements LocationController.LocationFetchCallback {
private int currentAccount = UserConfig.selectedAccount;
@ -326,7 +320,7 @@ public class LocationActivityAdapter extends BaseLocationAdapter implements Loca
}
case 9: {
view = new ShadowSectionCell(mContext);
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
Drawable drawable = Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(getThemedColor(Theme.key_windowBackgroundGray)), drawable);
combinedDrawable.setFullsize(true);
view.setBackgroundDrawable(combinedDrawable);

View file

@ -93,6 +93,8 @@ public class ArchivedStickersActivity extends BaseFragment implements Notificati
actionBar.setAllowOverlayTitle(true);
if (currentType == MediaDataController.TYPE_IMAGE) {
actionBar.setTitle(LocaleController.getString("ArchivedStickers", R.string.ArchivedStickers));
} else if (currentType == MediaDataController.TYPE_EMOJIPACKS) {
actionBar.setTitle(LocaleController.getString("ArchivedEmojiPacks", R.string.ArchivedEmojiPacks));
} else {
actionBar.setTitle(LocaleController.getString("ArchivedMasks", R.string.ArchivedMasks));
}
@ -173,7 +175,7 @@ public class ArchivedStickersActivity extends BaseFragment implements Notificati
private void updateRows() {
rowCount = 0;
if (!sets.isEmpty()) {
archiveInfoRow = currentType == MediaDataController.TYPE_IMAGE ? rowCount++ : -1;
archiveInfoRow = currentType == MediaDataController.TYPE_IMAGE || currentType == MediaDataController.TYPE_EMOJIPACKS ? rowCount++ : -1;
stickersStartRow = rowCount;
stickersEndRow = rowCount + sets.size();
rowCount += sets.size();
@ -342,7 +344,7 @@ public class ArchivedStickersActivity extends BaseFragment implements Notificati
if (position == archiveInfoRow) {
cell.setTopPadding(17);
cell.setBottomPadding(10);
cell.setText(LocaleController.getString("ArchivedStickersInfo", R.string.ArchivedStickersInfo));
cell.setText(currentType == MediaDataController.TYPE_EMOJIPACKS ? LocaleController.getString("ArchivedEmojiInfo", R.string.ArchivedEmojiInfo) : LocaleController.getString("ArchivedStickersInfo", R.string.ArchivedStickersInfo));
} else {
cell.setTopPadding(10);
cell.setBottomPadding(17);
@ -366,11 +368,11 @@ public class ArchivedStickersActivity extends BaseFragment implements Notificati
break;
case 1:
view = new LoadingCell(mContext);
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
case 2:
view = new TextInfoPrivacyCell(mContext);
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
}
view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, RecyclerView.LayoutParams.WRAP_CONTENT));

View file

@ -20,7 +20,6 @@ import android.graphics.Path;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.RectF;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
@ -108,9 +107,6 @@ import org.telegram.ui.Components.UndoView;
import org.telegram.ui.Storage.CacheModel;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.attribute.BasicFileAttributes;
import java.nio.file.attribute.FileTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@ -2562,7 +2558,7 @@ public class CacheControlActivity extends BaseFragment implements NotificationCe
// privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
// } else {
privacyCell.setText(AndroidUtilities.replaceTags(item.text));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
// }
break;
case VIEW_TYPE_STORAGE:

View file

@ -17,7 +17,6 @@ import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.text.SpannableString;
import android.text.TextUtils;
import android.text.style.ImageSpan;
import android.util.TypedValue;
import android.view.Gravity;
@ -991,7 +990,7 @@ public class CallLogActivity extends BaseFragment implements NotificationCenter.
break;
case 2:
view = new TextInfoPrivacyCell(mContext);
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
case 3:
view = new HeaderCell(mContext, Theme.key_windowBackgroundWhiteBlueHeader, 21, 15, 2, false, getResourceProvider());

View file

@ -42,6 +42,8 @@ import org.telegram.ui.Components.LayoutHelper;
import org.telegram.ui.Components.ProgressButton;
import org.telegram.ui.Components.ViewHelper;
import java.util.ArrayList;
@SuppressLint("ViewConstructor")
public class ArchivedStickerSetCell extends FrameLayout implements Checkable {
@ -154,15 +156,33 @@ public class ArchivedStickerSetCell extends FrameLayout implements Checkable {
setWillNotDraw(!needDivider);
textView.setText(stickersSet.set.title);
valueTextView.setText(LocaleController.formatPluralString("Stickers", set.set.count));
if (set.set.emojis) {
valueTextView.setText(LocaleController.formatPluralString("EmojiCount", set.set.count));
} else {
valueTextView.setText(LocaleController.formatPluralString("Stickers", set.set.count));
}
TLRPC.Document sticker;
if (set.cover != null) {
TLRPC.Document sticker = null;
if (set instanceof TLRPC.TL_stickerSetFullCovered) {
ArrayList<TLRPC.Document> documents = ((TLRPC.TL_stickerSetFullCovered) set).documents;
if (documents == null) {
return;
}
long thumb_document_id = set.set.thumb_document_id;
for (int i = 0; i < documents.size(); ++i) {
TLRPC.Document d = documents.get(i);
if (d != null && d.id == thumb_document_id) {
sticker = d;
break;
}
}
if (sticker == null && !documents.isEmpty()) {
sticker = documents.get(0);
}
} else if (set.cover != null) {
sticker = set.cover;
} else if (!set.covers.isEmpty()) {
sticker = set.covers.get(0);
} else {
sticker = null;
}
if (sticker != null) {
TLObject object = FileLoader.getClosestPhotoSizeWithSize(set.set.thumbs, 90);

View file

@ -816,6 +816,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
private StaticLayout infoLayout;
private StaticLayout loadingProgressLayout;
private long loadingProgressLayoutHash;
private int infoX;
private int infoWidth;
@ -12072,6 +12073,11 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
loadingProgressLayout = null;
return;
}
long hash = loadedSize << 16 + totalSize;
if (loadingProgressLayout != null && loadingProgressLayoutHash == hash) {
return;
}
loadingProgressLayoutHash = hash;
if (lastLoadingSizeTotal == 0) {
lastLoadingSizeTotal = totalSize;
@ -12122,18 +12128,6 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
w = (int) Math.ceil(Theme.chat_infoPaint.measureText(str));
}
loadingProgressLayout = new StaticLayout(str, Theme.chat_infoPaint, w, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
// if (loadingProgressLayout != null) {
// loadingProgressLayout.copyStylesFrom(Theme.chat_infoPaint);
// loadingProgressLayout.setBounds(0, 0, w, (int) Theme.chat_infoPaint.getTextSize());
// loadingProgressLayout.setText(str, true);
// } else {
// loadingProgressLayout = new AnimatedTextView.AnimatedTextDrawable(false, true, true);
// loadingProgressLayout.setAnimationProperties(0.3f, 0, 140, CubicBezierInterpolator.EASE_OUT);
// loadingProgressLayout.setCallback(this);
// loadingProgressLayout.copyStylesFrom(Theme.chat_infoPaint);
// loadingProgressLayout.setBounds(0, 0, w, (int) Theme.chat_infoPaint.getTextSize());
// loadingProgressLayout.setText(str, false);
// }
}

View file

@ -1437,6 +1437,9 @@ public class DialogCell extends BaseCell {
} else {
SpannableStringBuilder msgBuilder = new SpannableStringBuilder(message.caption);
if (message != null && message.messageOwner != null) {
if (message != null) {
message.spoilLoginCode();
}
MediaDataController.addTextStyleRuns(message.messageOwner.entities, message.caption, msgBuilder, TextStyleSpan.FLAG_STYLE_SPOILER | TextStyleSpan.FLAG_STYLE_STRIKE);
MediaDataController.addAnimatedEmojiSpans(message.messageOwner.entities, msgBuilder, currentMessagePaint == null ? null : currentMessagePaint.getFontMetricsInt());
}
@ -1469,6 +1472,9 @@ public class DialogCell extends BaseCell {
messageString = AndroidUtilities.ellipsizeCenterEnd(messageString, message.highlightedWords.get(0), w, currentMessagePaint, 130).toString();
} else {
SpannableStringBuilder stringBuilder = new SpannableStringBuilder(msgText);
if (message != null) {
message.spoilLoginCode();
}
MediaDataController.addTextStyleRuns(message, stringBuilder, TextStyleSpan.FLAG_STYLE_SPOILER | TextStyleSpan.FLAG_STYLE_STRIKE);
if (message != null && message.messageOwner != null) {
MediaDataController.addAnimatedEmojiSpans(message.messageOwner.entities, stringBuilder, currentMessagePaint == null ? null : currentMessagePaint.getFontMetricsInt());
@ -4679,6 +4685,9 @@ public class DialogCell extends BaseCell {
mess = mess.subSequence(0, 150);
}
SpannableStringBuilder msgBuilder = new SpannableStringBuilder(mess);
if (message != null) {
message.spoilLoginCode();
}
MediaDataController.addTextStyleRuns(message.messageOwner.entities, mess, msgBuilder, TextStyleSpan.FLAG_STYLE_SPOILER | TextStyleSpan.FLAG_STYLE_STRIKE);
if (message != null && message.messageOwner != null) {
MediaDataController.addAnimatedEmojiSpans(message.messageOwner.entities, msgBuilder, currentMessagePaint == null ? null : currentMessagePaint.getFontMetricsInt());
@ -4761,6 +4770,9 @@ public class DialogCell extends BaseCell {
mess = AndroidUtilities.replaceNewLines(mess);
}
mess = new SpannableStringBuilder(mess);
if (message != null) {
message.spoilLoginCode();
}
MediaDataController.addTextStyleRuns(message, (Spannable) mess, TextStyleSpan.FLAG_STYLE_SPOILER | TextStyleSpan.FLAG_STYLE_STRIKE);
if (message != null && message.messageOwner != null) {
MediaDataController.addAnimatedEmojiSpans(message.messageOwner.entities, mess, currentMessagePaint == null ? null : currentMessagePaint.getFontMetricsInt());

View file

@ -89,7 +89,7 @@ public class RequestPeerRequirementsCell extends LinearLayout {
}
addView(emptyView(12, Theme.getColor(Theme.key_windowBackgroundWhite)), LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
addView(emptyView(12, Theme.getThemedDrawable(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow)), LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
addView(emptyView(12, Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow)), LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
}
}
}

View file

@ -63,7 +63,7 @@ public class ThemePreviewMessagesCell extends LinearLayout {
setOrientation(LinearLayout.VERTICAL);
setPadding(0, AndroidUtilities.dp(11), 0, AndroidUtilities.dp(11));
shadowDrawable = Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
shadowDrawable = Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
int date = (int) (System.currentTimeMillis() / 1000) - 60 * 60;

View file

@ -517,7 +517,7 @@ public class ChangeUsernameActivity extends BaseFragment {
break;
case VIEW_TYPE_HELP2:
((TextInfoPrivacyCell) holder.itemView).setText(LocaleController.getString(botId != 0 ? R.string.BotUsernamesHelp : R.string.UsernamesProfileHelp));
((TextInfoPrivacyCell) holder.itemView).setBackgroundDrawable(Theme.getThemedDrawable(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
((TextInfoPrivacyCell) holder.itemView).setBackgroundDrawable(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
}
}
@ -650,7 +650,7 @@ public class ChangeUsernameActivity extends BaseFragment {
helpCell = this;
setPadding(AndroidUtilities.dp(18), AndroidUtilities.dp(10), AndroidUtilities.dp(18), AndroidUtilities.dp(17));
setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
setClipChildren(false);
text1View = new LinkSpanDrawable.LinksTextView(context);

View file

@ -899,7 +899,7 @@ public class ChannelCreateActivity extends BaseFragment implements NotificationC
linkContainer.addView(checkTextView, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT, 18, 3, 18, 7));
typeInfoCell = new TextInfoPrivacyCell(context);
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
linearLayout.addView(typeInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
loadingAdminedCell = new LoadingCell(context);
@ -911,7 +911,7 @@ public class ChannelCreateActivity extends BaseFragment implements NotificationC
linearLayout.addView(adminnedChannelsLayout, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
adminedInfoCell = new TextInfoPrivacyCell(context);
adminedInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
adminedInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
linearLayout.addView(adminedInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
updatePrivatePublic();
@ -960,10 +960,10 @@ public class ChannelCreateActivity extends BaseFragment implements NotificationC
if (loadingAdminedChannels) {
loadingAdminedCell.setVisibility(View.VISIBLE);
adminnedChannelsLayout.setVisibility(View.GONE);
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
adminedInfoCell.setVisibility(View.GONE);
} else {
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
loadingAdminedCell.setVisibility(View.GONE);
adminnedChannelsLayout.setVisibility(View.VISIBLE);
adminedInfoCell.setVisibility(View.VISIBLE);
@ -974,7 +974,7 @@ public class ChannelCreateActivity extends BaseFragment implements NotificationC
sectionCell.setVisibility(View.VISIBLE);
adminedInfoCell.setVisibility(View.GONE);
adminnedChannelsLayout.setVisibility(View.GONE);
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
linkContainer.setVisibility(View.VISIBLE);
loadingAdminedCell.setVisibility(View.GONE);
if (isGroup) {

View file

@ -15931,7 +15931,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
if (!postponedScroll) {
chatAdapter.notifyDataSetChanged(true);
}
if (isTopic && startLoadFromMessageId == getTopicId() && messArr.size() > 0 && messages.size() > 0) {
if (isTopic && startLoadFromMessageId == getTopicId() && messArr.size() > 0 && messages.size() > 0 && messArr.size() - 1 < messages.size()) {
scrollToMessage = messages.get(messArr.size() - 1);
}
if (scrollToMessage != null) {
@ -17252,18 +17252,18 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
isVotedChanged = true;
}
}
createUndoView();
if (isVotedChanged && isQuiz && undoView != null && pollView instanceof ChatMessageCell) {
ChatMessageCell cell = (ChatMessageCell) pollView;
if (cell.isAnimatingPollAnswer()) {
for (int a = 0, N = results.results.size(); a < N; a++) {
TLRPC.TL_pollAnswerVoters voters = results.results.get(a);
if (voters.chosen) {
pollView.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING);
if (voters.correct) {
fireworksOverlay.start();
pollView.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING);
} else {
((ChatMessageCell) pollView).shakeView();
pollView.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING);
showPollSolution(cell.getMessageObject(), results);
cell.showHintButton(false, true, 0);
}
@ -31084,7 +31084,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
return animatingColors.valueAt(index);
}
}
if (chatTheme == null && backgroundDrawable == null) {
if (chatTheme == null) {
return Theme.getColor(key);
}
int index = currentColors.indexOfKey(key);
@ -31092,18 +31092,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
return currentColors.valueAt(index);
}
if (Theme.key_chat_outBubbleGradient1 == key || Theme.key_chat_outBubbleGradient2 == key || Theme.key_chat_outBubbleGradient3 == key) {
index = currentColors.indexOfKey(Theme.key_chat_outBubble);
if (index < 0) {
int color = Theme.getColor(key);
if (color != 0) {
return color;
}
} else {
return currentColors.valueAt(index);
}
}
int fallbackKey = Theme.getFallbackKey(key);
if (fallbackKey >= 0) {
index = currentColors.indexOfKey(fallbackKey);

View file

@ -1162,7 +1162,7 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image
}
}, index, index + 10, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}
botInfoCell.setBackground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
botInfoCell.setBackground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
botInfoCell.setText(span);
linearLayout1.addView(botInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
}
@ -1194,15 +1194,15 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image
}, null));
deleteInfoCell = new ShadowSectionCell(context);
deleteInfoCell.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
deleteInfoCell.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
linearLayout1.addView(deleteInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
}
if (stickersInfoCell != null) {
if (deleteInfoCell == null) {
stickersInfoCell.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
stickersInfoCell.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else {
stickersInfoCell.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
stickersInfoCell.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
}
}

View file

@ -547,7 +547,7 @@ public class ChatEditTypeActivity extends BaseFragment implements NotificationCe
prevHeight = getHeight();
}
};
checkTextView.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
checkTextView.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
checkTextView.setBottomPadding(6);
linearLayout.addView(checkTextView, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT));
@ -1061,7 +1061,7 @@ public class ChatEditTypeActivity extends BaseFragment implements NotificationCe
break;
case VIEW_TYPE_HELP:
((TextInfoPrivacyCell) holder.itemView).setText(LocaleController.getString("UsernamesChannelHelp", R.string.UsernamesChannelHelp));
((TextInfoPrivacyCell) holder.itemView).setBackgroundDrawable(Theme.getThemedDrawable(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
((TextInfoPrivacyCell) holder.itemView).setBackgroundDrawable(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
}
}
@ -1305,11 +1305,11 @@ public class ChatEditTypeActivity extends BaseFragment implements NotificationCe
if (loadingAdminedChannels) {
loadingAdminedCell.setVisibility(View.VISIBLE);
adminnedChannelsLayout.setVisibility(View.GONE);
typeInfoCell.setBackgroundDrawable(checkTextView.getVisibility() == View.VISIBLE ? null : Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
typeInfoCell.setBackgroundDrawable(checkTextView.getVisibility() == View.VISIBLE ? null : Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
adminedInfoCell.setBackgroundDrawable(null);
} else {
adminedInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(adminedInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
adminedInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(adminedInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
loadingAdminedCell.setVisibility(View.GONE);
adminnedChannelsLayout.setVisibility(View.VISIBLE);
}
@ -1322,7 +1322,7 @@ public class ChatEditTypeActivity extends BaseFragment implements NotificationCe
sectionCell2.setVisibility(View.VISIBLE);
}
adminedInfoCell.setVisibility(View.GONE);
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
adminnedChannelsLayout.setVisibility(View.GONE);
linkContainer.setVisibility(View.VISIBLE);
loadingAdminedCell.setVisibility(View.GONE);
@ -1344,10 +1344,10 @@ public class ChatEditTypeActivity extends BaseFragment implements NotificationCe
checkTextView.setVisibility(!isPrivate && checkTextView.length() != 0 ? View.VISIBLE : View.GONE);
manageLinksInfoCell.setText(LocaleController.getString("ManageLinksInfoHelp", R.string.ManageLinksInfoHelp));
if (isPrivate) {
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
manageLinksInfoCell.setBackground(Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
manageLinksInfoCell.setBackground(Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else {
typeInfoCell.setBackgroundDrawable(checkTextView.getVisibility() == View.VISIBLE ? null : Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
typeInfoCell.setBackgroundDrawable(checkTextView.getVisibility() == View.VISIBLE ? null : Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
}
}
radioButtonCell1.setChecked(!isPrivate, true);
@ -1392,7 +1392,7 @@ public class ChatEditTypeActivity extends BaseFragment implements NotificationCe
} else {
checkTextView.setVisibility(View.GONE);
}
typeInfoCell.setBackgroundDrawable(checkTextView.getVisibility() == View.VISIBLE ? null : Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
typeInfoCell.setBackgroundDrawable(checkTextView.getVisibility() == View.VISIBLE ? null : Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
if (checkRunnable != null) {
AndroidUtilities.cancelRunOnUIThread(checkRunnable);
checkRunnable = null;

View file

@ -871,7 +871,7 @@ public class ChatLinkActivity extends BaseFragment implements NotificationCenter
break;
case 1:
view = new TextInfoPrivacyCell(mContext);
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
case 2:
view = new ManageChatTextCell(mContext);

View file

@ -1519,7 +1519,7 @@ public class ChatRightsEditActivity extends BaseFragment {
break;
case VIEW_TYPE_INFO_CELL:
view = new TextInfoPrivacyCell(mContext);
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
case VIEW_TYPE_TRANSFER_CELL:
default:
@ -1833,13 +1833,13 @@ public class ChatRightsEditActivity extends BaseFragment {
shadowCell.setAlpha(1);
}
if (position == rightsShadowRow) {
shadowCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, removeAdminRow == -1 && rankRow == -1 ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
shadowCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, removeAdminRow == -1 && rankRow == -1 ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
} else if (position == removeAdminShadowRow) {
shadowCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
shadowCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else if (position == rankInfoRow) {
shadowCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, canEdit ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
shadowCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, canEdit ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else {
shadowCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
shadowCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
}
break;
case VIEW_TYPE_UNTIL_DATE_CELL:

View file

@ -3002,7 +3002,7 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
} else {
privacyCell.setText(LocaleController.getString(R.string.NoBlockedGroup2));
}
privacyCell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
case 5:
HeaderCell headerCell = new HeaderCell(mContext, Theme.key_windowBackgroundWhiteBlueHeader, 21, 11, false);
@ -3176,7 +3176,7 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
TextInfoPrivacyCell privacyCell = (TextInfoPrivacyCell) holder.itemView;
if (position == antiSpamInfoRow) {
privacyCell.setText(LocaleController.getString("ChannelAntiSpamInfo", R.string.ChannelAntiSpamInfo));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
} else if (position == participantsInfoRow) {
if (type == TYPE_BANNED || type == TYPE_KICKED) {
if (isChannel) {
@ -3184,7 +3184,7 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
} else {
privacyCell.setText(LocaleController.getString("NoBlockedGroup2", R.string.NoBlockedGroup2));
}
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else if (type == TYPE_ADMIN) {
if (addNewRow != -1) {
if (isChannel) {
@ -3195,17 +3195,17 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
} else {
privacyCell.setText("");
}
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else if (type == TYPE_USERS) {
if (!isChannel || selectType != SELECT_TYPE_MEMBERS) {
privacyCell.setText("");
} else {
privacyCell.setText(LocaleController.getString("ChannelMembersInfo", R.string.ChannelMembersInfo));
}
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
}
} else if (position == slowmodeInfoRow) {
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
int seconds = getSecondsForIndex(selectedSlowmode);
if (info == null || seconds == 0) {
privacyCell.setText(LocaleController.getString("SlowmodeInfoOff", R.string.SlowmodeInfoOff));
@ -3213,7 +3213,7 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
privacyCell.setText(LocaleController.formatString("SlowmodeInfoSelected", R.string.SlowmodeInfoSelected, formatSeconds(seconds)));
}
} else if (position == hideMembersInfoRow) {
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
privacyCell.setText(LocaleController.getString("ChannelHideMembersInfo", R.string.ChannelHideMembersInfo));
} else if (position == gigaInfoRow) {
privacyCell.setText(LocaleController.getString("BroadcastGroupConvertInfo", R.string.BroadcastGroupConvertInfo));
@ -3254,9 +3254,9 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
break;
case 3:
if (position == addNewSectionRow || type == TYPE_KICKED && position == participantsDividerRow && addNewRow == -1 && participantsStartRow == -1) {
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else {
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
}
break;
case 5:

View file

@ -79,7 +79,7 @@ public class AutoDeletePopupWrapper {
FrameLayout gap = new FrameLayout(context);
gap.setBackgroundColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuSeparator, resourcesProvider));
View gapShadow = new View(context);
gapShadow.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow, resourcesProvider));
gapShadow.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow, resourcesProvider));
gap.addView(gapShadow, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
gap.setTag(R.id.fit_width_tag, 1);
windowLayout.addView(gap, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 8));

View file

@ -1436,7 +1436,7 @@ public class ChatAttachAlertDocumentLayout extends ChatAttachAlert.AttachAlertLa
break;
case 2:
view = new ShadowSectionCell(mContext);
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
Drawable drawable = Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(getThemedColor(Theme.key_windowBackgroundGray)), drawable);
combinedDrawable.setFullsize(true);
view.setBackgroundDrawable(combinedDrawable);

View file

@ -771,7 +771,7 @@ public class ChatAttachAlertPollLayout extends ChatAttachAlert.AttachAlertLayout
}
case 2: {
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
Drawable drawable = Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(getThemedColor(Theme.key_windowBackgroundGray)), drawable);
combinedDrawable.setFullsize(true);
cell.setBackgroundDrawable(combinedDrawable);
@ -880,7 +880,7 @@ public class ChatAttachAlertPollLayout extends ChatAttachAlert.AttachAlertLayout
break;
case 1:
view = new ShadowSectionCell(mContext);
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
Drawable drawable = Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(getThemedColor(Theme.key_windowBackgroundGray)), drawable);
combinedDrawable.setFullsize(true);
view.setBackgroundDrawable(combinedDrawable);

View file

@ -296,7 +296,7 @@ public class ClearHistoryAlert extends BottomSheet {
linearLayout.addView(clearButton, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50, Gravity.LEFT | Gravity.TOP, 0, 0, 0, 0));
ShadowSectionCell shadowSectionCell = new ShadowSectionCell(context);
Drawable drawable = Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
Drawable drawable = Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(getThemedColor(Theme.key_windowBackgroundGray)), drawable);
combinedDrawable.setFullsize(true);
shadowSectionCell.setBackgroundDrawable(combinedDrawable);
@ -359,7 +359,7 @@ public class ClearHistoryAlert extends BottomSheet {
linearLayout.addView(slideChooseView, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, 0, 8, 0, 0));
FrameLayout buttonContainer = new FrameLayout(context);
Drawable drawable = Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
Drawable drawable = Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(getThemedColor(Theme.key_windowBackgroundGray)), drawable);
combinedDrawable.setFullsize(true);
buttonContainer.setBackgroundDrawable(combinedDrawable);

View file

@ -15,7 +15,6 @@ import android.graphics.Path;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Shader;
import android.graphics.Xfermode;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.ShapeDrawable;
import android.text.Layout;
@ -32,12 +31,9 @@ import android.widget.FrameLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.core.graphics.ColorUtils;
import androidx.core.view.ViewCompat;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.gms.vision.Frame;
import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.BotWebViewVibrationEffect;
import org.telegram.messenger.ChatObject;
@ -46,7 +42,6 @@ import org.telegram.messenger.LocaleController;
import org.telegram.messenger.MessagesController;
import org.telegram.messenger.NotificationCenter;
import org.telegram.messenger.R;
import org.telegram.messenger.UserConfig;
import org.telegram.messenger.UserObject;
import org.telegram.messenger.Utilities;
import org.telegram.tgnet.TLObject;
@ -58,15 +53,12 @@ import org.telegram.ui.ActionBar.Theme;
import org.telegram.ui.Cells.GroupCreateUserCell;
import org.telegram.ui.Cells.TextInfoPrivacyCell;
import org.telegram.ui.ChatActivity;
import org.telegram.ui.Components.Premium.LimitReachedBottomSheet;
import org.telegram.ui.DialogsActivity;
import org.telegram.ui.FilterChatlistActivity;
import org.telegram.ui.FilterCreateActivity;
import org.telegram.ui.FiltersSetupActivity;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
public class FolderBottomSheet extends BottomSheetWithRecyclerListView {
@ -1020,7 +1012,7 @@ public class FolderBottomSheet extends BottomSheetWithRecyclerListView {
}
} else if (viewType == VIEW_TYPE_HINT) {
TextInfoPrivacyCell hintCell = (TextInfoPrivacyCell) holder.itemView;
hintCell.setForeground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
hintCell.setForeground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
if (position == alreadySectionRow || position == sectionRow || peers == null || peers.isEmpty()) {
hintCell.setFixedSize(12);
hintCell.setText("");

View file

@ -2037,9 +2037,15 @@ public class InstantCameraView extends FrameLayout implements NotificationCenter
long startWriteTime = input.offset[input.lastWroteBuffer];
for (int a = input.lastWroteBuffer; a <= input.results; a++) {
if (a < input.results) {
if (!running && input.offset[a] >= videoLast - desyncTime) {
long totalTime = input.offset[a] - audioStartTime;
if (!running && (input.offset[a] >= videoLast - desyncTime || totalTime >= 60_000000)) {
if (BuildVars.LOGS_ENABLED) {
FileLog.d("stop audio encoding because of stoped video recording at " + input.offset[a] + " last video " + videoLast);
if (totalTime >= 60_000000) {
FileLog.d("stop audio encoding because recorded time more than 60s");
} else {
FileLog.d("stop audio encoding because of stoped video recording at " + input.offset[a] + " last video " + videoLast);
}
}
audioStopedByTime = true;
isLast = true;
@ -2084,7 +2090,9 @@ public class InstantCameraView extends FrameLayout implements NotificationCenter
}
long dt, alphaDt;
if (!lastCameraId.equals(cameraId)) {
// lastTimestamp = -1;
if (timestampNanos - lastTimestamp > 10_000) {
lastTimestamp = -1;
}
lastCameraId = cameraId;
}
if (lastTimestamp == -1) {
@ -2741,7 +2749,7 @@ public class InstantCameraView extends FrameLayout implements NotificationCenter
}
private String createFragmentShader(Size previewSize) {
if (!allowBigSizeCamera() || Math.max(previewSize.getHeight(), previewSize.getWidth()) * 0.7f < MessagesController.getInstance(currentAccount).roundVideoSize) {
if (!SharedConfig.deviceIsHigh() || !allowBigSizeCamera() || Math.max(previewSize.getHeight(), previewSize.getWidth()) * 0.7f < MessagesController.getInstance(currentAccount).roundVideoSize) {
return "#extension GL_OES_EGL_image_external : require\n" +
"precision highp float;\n" +
"varying vec2 vTextureCoord;\n" +

View file

@ -6,7 +6,6 @@ import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.RectF;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
@ -48,7 +47,6 @@ import org.telegram.ui.ManageLinksActivity;
import org.telegram.ui.ProfileActivity;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
@ -399,7 +397,7 @@ public class InviteLinkBottomSheet extends BottomSheet {
} else if (view instanceof LinkActionView) {
((LinkActionView) view).updateColors();
} else if (view instanceof TextInfoPrivacyCell) {
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), Theme.getThemedDrawable(view.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), Theme.getThemedDrawableByKey(view.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
combinedDrawable.setFullsize(true);
view.setBackground(combinedDrawable);
((TextInfoPrivacyCell) view).setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText4));
@ -409,13 +407,13 @@ public class InviteLinkBottomSheet extends BottomSheet {
RecyclerView.ViewHolder holder = listView.getChildViewHolder(view);
if (holder != null) {
if (holder.getItemViewType() == 7) {
Drawable shadowDrawable = Theme.getThemedDrawable(view.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
Drawable shadowDrawable = Theme.getThemedDrawableByKey(view.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
Drawable background = new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray));
CombinedDrawable combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
combinedDrawable.setFullsize(true);
view.setBackgroundDrawable(combinedDrawable);
} else if (holder.getItemViewType() == 2) {
Drawable shadowDrawable = Theme.getThemedDrawable(view.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
Drawable shadowDrawable = Theme.getThemedDrawableByKey(view.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
Drawable background = new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray));
CombinedDrawable combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
combinedDrawable.setFullsize(true);
@ -653,7 +651,7 @@ public class InviteLinkBottomSheet extends BottomSheet {
break;
case 4:
view = new TimerPrivacyCell(context);
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
combinedDrawable.setFullsize(true);
view.setBackground(combinedDrawable);
break;
@ -675,7 +673,7 @@ public class InviteLinkBottomSheet extends BottomSheet {
break;
case 7:
view = new ShadowSectionCell(context, 12);
Drawable shadowDrawable = Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
Drawable shadowDrawable = Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
Drawable background = new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray));
combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
combinedDrawable.setFullsize(true);

View file

@ -1733,7 +1733,7 @@ public class LPhotoPaintView extends SizeNotifierFrameLayoutPhoto implements IPh
currentCanvas.scale(v.getScaleX(), v.getScaleY());
currentCanvas.rotate(v.getRotation());
currentCanvas.translate(-entity.getWidth() / 2f, -entity.getHeight() / 2f);
if (v instanceof TextPaintView) {
if (v instanceof TextPaintView && v.getHeight() > 0 && v.getWidth() > 0) {
Bitmap b = Bitmaps.createBitmap(v.getWidth(), v.getHeight(), Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(b);
v.draw(c);

View file

@ -620,6 +620,8 @@ public class PhotoViewerCaptionEnterView extends FrameLayout implements Notifica
return -16777216;
} else if (key == Theme.key_dialogFloatingButton) {
return -10177041;
} else if (key == Theme.key_dialogFloatingIcon) {
return 0xffffffff;
}
return 0;
}

View file

@ -171,6 +171,9 @@ public class StickerSetBulletinLayout extends Bulletin.TwoLineLayout {
if (stickerSet.masks) {
titleTextView.setText(LocaleController.getString("MasksArchived", R.string.MasksArchived));
subtitleTextView.setText(LocaleController.formatString("MasksArchivedInfo", R.string.MasksArchivedInfo, stickerSet.title));
} else if (stickerSet.emojis) {
titleTextView.setText(LocaleController.getString("EmojiArchived", R.string.EmojiArchived));
subtitleTextView.setText(LocaleController.formatString("EmojiArchivedInfo", R.string.EmojiArchivedInfo, stickerSet.title));
} else {
titleTextView.setText(LocaleController.getString("StickersArchived", R.string.StickersArchived));
subtitleTextView.setText(LocaleController.formatString("StickersArchivedInfo", R.string.StickersArchivedInfo, stickerSet.title));

View file

@ -407,7 +407,7 @@ public class DataAutoDownloadActivity extends BaseFragment {
linearLayout.addView(checkCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 48));
checkCell[0].setOnClickListener(v -> checkCell[0].setChecked(!checkCell[0].isChecked()));
Drawable drawable = Theme.getThemedDrawable(getParentActivity(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
Drawable drawable = Theme.getThemedDrawableByKey(getParentActivity(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
combinedDrawable.setFullsize(true);
infoCell.setBackgroundDrawable(combinedDrawable);
@ -749,12 +749,12 @@ public class DataAutoDownloadActivity extends BaseFragment {
TextInfoPrivacyCell view = (TextInfoPrivacyCell) holder.itemView;
if (position == typeSectionRow) {
view.setText(LocaleController.getString("AutoDownloadAudioInfo", R.string.AutoDownloadAudioInfo));
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
view.setFixedSize(0);
view.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
} else if (position == autoDownloadSectionRow) {
if (usageHeaderRow == -1) {
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
if (currentType == 0) {
view.setText(LocaleController.getString("AutoDownloadOnMobileDataInfo", R.string.AutoDownloadOnMobileDataInfo));
} else if (currentType == 1) {
@ -764,7 +764,7 @@ public class DataAutoDownloadActivity extends BaseFragment {
}
view.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
} else {
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
view.setText(null);
view.setFixedSize(12);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
@ -850,7 +850,7 @@ public class DataAutoDownloadActivity extends BaseFragment {
case 5:
default: {
view = new TextInfoPrivacyCell(mContext);
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
}
}
view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, RecyclerView.LayoutParams.WRAP_CONTENT));

View file

@ -644,9 +644,9 @@ public class DataSettingsActivity extends BaseFragment {
switch (holder.getItemViewType()) {
case 0: {
if (position == clearDraftsSectionRow) {
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else {
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
}
break;
}
@ -914,7 +914,7 @@ public class DataSettingsActivity extends BaseFragment {
break;
case 4:
view = new TextInfoPrivacyCell(mContext);
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
break;
case 5:
view = new NotificationsCheckCell(mContext);

View file

@ -624,7 +624,7 @@ public class DataUsage2Activity extends BaseFragment {
int bottomViewType;
boolean bottom = position + 1 < itemInners.size() && (bottomViewType = itemInners.get(position + 1).viewType) != item.viewType && bottomViewType != VIEW_TYPE_SEPARATOR && bottomViewType != VIEW_TYPE_ROUNDING;
if (bottom) {
subtitleCell.setBackground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
subtitleCell.setBackground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
} else {
subtitleCell.setBackground(null);
}
@ -637,11 +637,11 @@ public class DataUsage2Activity extends BaseFragment {
boolean top = position > 0 && item.viewType != itemInners.get(position - 1).viewType;
boolean bottom = position + 1 < itemInners.size() && itemInners.get(position + 1).viewType != item.viewType;
if (top && bottom) {
view.setBackground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
view.setBackground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
} else if (top) {
view.setBackground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
view.setBackground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else if (bottom) {
view.setBackground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
view.setBackground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
} else {
view.setBackground(null);
}

View file

@ -735,9 +735,9 @@ public class DataUsageActivity extends BaseFragment {
switch (holder.getItemViewType()) {
case 0: {
if (position == resetSection2Row) {
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else {
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
}
break;
}
@ -806,7 +806,7 @@ public class DataUsageActivity extends BaseFragment {
}
case 3: {
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
cell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
cell.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
cell.setText(LocaleController.formatString("NetworkUsageSince", R.string.NetworkUsageSince, LocaleController.getInstance().formatterStats.format(StatsController.getInstance(currentAccount).getResetStatsDate(currentType))));
break;
}

View file

@ -554,7 +554,7 @@ public class MemberRequestsDelegate implements MemberRequestCell.OnClickListener
break;
case 1:
view = new View(parent.getContext());
view.setBackground(Theme.getThemedDrawable(parent.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
view.setBackground(Theme.getThemedDrawableByKey(parent.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
case 2:
view = new View(parent.getContext()) {

View file

@ -45,7 +45,6 @@ import android.os.Build;
import android.os.Bundle;
import android.text.TextPaint;
import android.text.TextUtils;
import android.util.Log;
import android.util.LongSparseArray;
import android.util.Property;
import android.util.StateSet;
@ -4507,6 +4506,13 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
return fragmentView;
}
public boolean isPremiumRestoreHintVisible() {
if (!MessagesController.getInstance(currentAccount).premiumLocked && folderId == 0) {
return MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_RESTORE") && !getUserConfig().isPremium();
}
return false;
}
public boolean isPremiumHintVisible() {
if (!MessagesController.getInstance(currentAccount).premiumLocked && folderId == 0) {
if (MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_UPGRADE") && getUserConfig().isPremium() || MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_ANNUAL") && !getUserConfig().isPremium()) {
@ -4646,7 +4652,25 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
if (dialogsHintCell == null) {
return;
}
if (isPremiumHintVisible()) {
if (isPremiumRestoreHintVisible()) {
dialogsHintCell.setVisibility(View.VISIBLE);
dialogsHintCell.setOnClickListener(v -> {
presentFragment(new PremiumPreviewFragment("dialogs_hint").setSelectAnnualByDefault());
AndroidUtilities.runOnUIThread(() -> {
MessagesController.getInstance(currentAccount).removeSuggestion(0, "PREMIUM_RESTORE");
updateDialogsHint();
}, 250);
});
dialogsHintCell.setText(
AndroidUtilities.replaceSingleTag(
LocaleController.formatString(R.string.RestorePremiumHintTitle, MediaDataController.getInstance(currentAccount).getPremiumHintAnnualDiscount(false)),
Theme.key_windowBackgroundWhiteValueText,
0,
null
),
LocaleController.getString(R.string.RestorePremiumHintMessage)
);
} else if (isPremiumHintVisible()) {
dialogsHintCell.setVisibility(View.VISIBLE);
dialogsHintCell.setOnClickListener(v -> {
presentFragment(new PremiumPreviewFragment("dialogs_hint").setSelectAnnualByDefault());
@ -7726,12 +7750,12 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
getMessagesController().deleteDialog(selectedDialog, 0, revoke);
} else {
TLRPC.User currentUser = getMessagesController().getUser(getUserConfig().getClientUserId());
getMessagesController().deleteParticipantFromChat((int) -selectedDialog, currentUser, null, revoke, false);
getMessagesController().deleteParticipantFromChat(-selectedDialog, currentUser, null, revoke, false);
}
} else {
getMessagesController().deleteDialog(selectedDialog, 0, revoke);
if (isBot && revoke) {
getMessagesController().blockPeer((int) selectedDialog);
getMessagesController().blockPeer(selectedDialog);
}
}
if (AndroidUtilities.isTablet()) {

View file

@ -72,7 +72,7 @@ public class DilogCacheBottomSheet extends BottomSheetWithRecyclerListView {
textInfoPrivacyCell.setFixedSize(12);
CombinedDrawable combinedDrawable = new CombinedDrawable(
new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)),
Theme.getThemedDrawable(parent.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow)
Theme.getThemedDrawableByKey(parent.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow)
);
combinedDrawable.setFullsize(true);
textInfoPrivacyCell.setBackgroundDrawable(combinedDrawable);

View file

@ -230,7 +230,7 @@ public class EditWidgetActivity extends BaseFragment {
}
updateDialogs();
shadowDrawable = Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
shadowDrawable = Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
}
public void updateDialogs() {
@ -935,7 +935,7 @@ public class EditWidgetActivity extends BaseFragment {
switch (viewType) {
case 0:
view = new TextInfoPrivacyCell(mContext);
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
case 1:
view = new TextCell(mContext);

View file

@ -247,7 +247,7 @@ public class FeaturedStickersActivity extends BaseFragment implements Notificati
case 1:
default:
view = new TextInfoPrivacyCell(mContext);
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
}
view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, RecyclerView.LayoutParams.WRAP_CONTENT));

View file

@ -35,7 +35,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.inputmethod.EditorInfo;
import android.widget.FrameLayout;
import android.widget.ImageView;
@ -46,7 +45,6 @@ import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.core.view.ViewCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
@ -73,9 +71,7 @@ import org.telegram.ui.ActionBar.SimpleTextView;
import org.telegram.ui.ActionBar.Theme;
import org.telegram.ui.Cells.DialogCell;
import org.telegram.ui.Cells.GroupCreateUserCell;
import org.telegram.ui.Cells.PollEditTextCell;
import org.telegram.ui.Cells.TextInfoPrivacyCell;
import org.telegram.ui.Components.AnimatedTextView;
import org.telegram.ui.Components.Bulletin;
import org.telegram.ui.Components.BulletinFactory;
import org.telegram.ui.Components.CircularProgressDrawable;
@ -642,7 +638,7 @@ public class FilterChatlistActivity extends BaseFragment {
updateHintCell(false);
} else if (viewType == 2) {
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
cell.setBackground(Theme.getThemedDrawable(getContext(), position == chatsSectionRow ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
cell.setBackground(Theme.getThemedDrawableByKey(getContext(), position == chatsSectionRow ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
if (position == chatsSectionRow) {
cell.setFixedSize(0);
if (invite == null || allowedPeers.isEmpty()) {

View file

@ -7,16 +7,13 @@ import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.RippleDrawable;
import android.os.Build;
import android.text.Editable;
import android.text.Layout;
@ -27,29 +24,21 @@ import android.text.StaticLayout;
import android.text.TextPaint;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.text.style.CharacterStyle;
import android.text.style.DynamicDrawableSpan;
import android.text.style.ImageSpan;
import android.text.style.ReplacementSpan;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.inputmethod.EditorInfo;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.PopupWindow;
import android.widget.ScrollView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.graphics.ColorUtils;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
@ -71,14 +60,11 @@ import org.telegram.tgnet.TLRPC;
import org.telegram.ui.ActionBar.ActionBar;
import org.telegram.ui.ActionBar.ActionBarMenu;
import org.telegram.ui.ActionBar.ActionBarMenuItem;
import org.telegram.ui.ActionBar.ActionBarMenuSubItem;
import org.telegram.ui.ActionBar.ActionBarPopupWindow;
import org.telegram.ui.ActionBar.AlertDialog;
import org.telegram.ui.ActionBar.BaseFragment;
import org.telegram.ui.ActionBar.SimpleTextView;
import org.telegram.ui.ActionBar.Theme;
import org.telegram.ui.ActionBar.ThemeDescription;
import org.telegram.ui.Cells.CreationTextCell;
import org.telegram.ui.Cells.HeaderCell;
import org.telegram.ui.Cells.PollEditTextCell;
import org.telegram.ui.Cells.ShadowSectionCell;
@ -105,8 +91,6 @@ import org.telegram.ui.Components.UndoView;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Locale;
import java.util.Objects;
public class FilterCreateActivity extends BaseFragment {
@ -1457,7 +1441,7 @@ public class FilterCreateActivity extends BaseFragment {
break;
}
case VIEW_TYPE_SHADOW: {
holder.itemView.setBackground(Theme.getThemedDrawable(mContext, divider ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackground(Theme.getThemedDrawableByKey(mContext, divider ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
}
case VIEW_TYPE_BUTTON: {
@ -1469,7 +1453,7 @@ public class FilterCreateActivity extends BaseFragment {
case VIEW_TYPE_SHADOW_TEXT: {
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
cell.setText(item.text);
holder.itemView.setBackground(Theme.getThemedDrawable(mContext, divider ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackground(Theme.getThemedDrawableByKey(mContext, divider ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
}
case VIEW_TYPE_LINK: {
@ -2328,7 +2312,7 @@ public class FilterCreateActivity extends BaseFragment {
cell.setFixedSize(12);
cell.setText("");
}
cell.setForeground(Theme.getThemedDrawable(getContext(), divider ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
cell.setForeground(Theme.getThemedDrawableByKey(getContext(), divider ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else if (viewType == VIEW_TYPE_HEADER) {
// HeaderView headerV = (HeaderView) holder.itemView;
// textView.setText(item.text);

View file

@ -1,16 +1,12 @@
package org.telegram.ui;
import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.drawable.Drawable;
import android.text.TextPaint;
import android.text.TextUtils;
import android.util.TypedValue;
import android.view.Gravity;
@ -33,7 +29,6 @@ import androidx.recyclerview.widget.RecyclerView;
import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.Emoji;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.GenericProvider;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.MessagesController;
import org.telegram.messenger.NotificationCenter;
@ -51,9 +46,7 @@ import org.telegram.ui.Cells.HeaderCell;
import org.telegram.ui.Cells.ShadowSectionCell;
import org.telegram.ui.Components.Bulletin;
import org.telegram.ui.Components.BulletinFactory;
import org.telegram.ui.Components.CircularProgressDrawable;
import org.telegram.ui.Components.CombinedDrawable;
import org.telegram.ui.Components.CrossfadeDrawable;
import org.telegram.ui.Components.CubicBezierInterpolator;
import org.telegram.ui.Components.FolderBottomSheet;
import org.telegram.ui.Components.ItemOptions;
@ -68,7 +61,6 @@ import org.telegram.ui.Components.RecyclerListView;
import org.telegram.ui.Components.UndoView;
import java.util.ArrayList;
import java.util.Objects;
public class FiltersSetupActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate {
@ -777,7 +769,7 @@ public class FiltersSetupActivity extends BaseFragment implements NotificationCe
break;
case VIEW_TYPE_HINT:
view = new HintInnerCell(mContext, R.raw.filters, AndroidUtilities.replaceTags(LocaleController.formatString("CreateNewFilterInfo", R.string.CreateNewFilterInfo)));
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
break;
case VIEW_TYPE_FILTER:
FilterCell filterCell = new FilterCell(mContext);
@ -938,7 +930,7 @@ public class FiltersSetupActivity extends BaseFragment implements NotificationCe
break;
}
case VIEW_TYPE_SHADOW: {
holder.itemView.setBackground(Theme.getThemedDrawable(mContext, divider ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackground(Theme.getThemedDrawableByKey(mContext, divider ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
}
case VIEW_TYPE_BUTTON: {

View file

@ -7145,7 +7145,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter
}
private boolean showMenuForCell(View rendererCell) {
if (itemAnimator.isRunning()) {
if (itemAnimator.isRunning() || getContext() == null) {
return false;
}
if (avatarPriviewTransitionInProgress || avatarsPreviewShowed) {
@ -7211,6 +7211,9 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter
boolean showWithAvatarPreview = !isLandscapeMode && !isTabletMode && !AndroidUtilities.isInMultiwindow;
TLRPC.TL_groupCallParticipant participant = view.getParticipant();
if (participant == null) {
return false;
}
Rect rect = new Rect();

View file

@ -980,7 +980,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
switch (viewType) {
case VIEW_TYPE_SHADOW_SECTION_CELL: {
view = new ShadowSectionCell(context);
Drawable drawable = Theme.getThemedDrawable(context, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow);
Drawable drawable = Theme.getThemedDrawableByKey(context, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow);
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
combinedDrawable.setFullsize(true);
view.setBackgroundDrawable(combinedDrawable);
@ -999,7 +999,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
break;
case VIEW_TYPE_TEXT_INFO_CELL:
view = new TextInfoPrivacyCell(context);
Drawable drawable = Theme.getThemedDrawable(context, selectedContacts.size() == 0 ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
Drawable drawable = Theme.getThemedDrawableByKey(context, selectedContacts.size() == 0 ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
combinedDrawable.setFullsize(true);
view.setBackgroundDrawable(combinedDrawable);

View file

@ -271,7 +271,7 @@ public class GroupInviteActivity extends BaseFragment implements NotificationCen
TextInfoPrivacyCell privacyCell = (TextInfoPrivacyCell) holder.itemView;
if (position == shadowRow) {
privacyCell.setText("");
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else if (position == linkInfoRow) {
TLRPC.Chat chat = getMessagesController().getChat(chatId);
if (ChatObject.isChannel(chat) && !chat.megagroup) {
@ -279,7 +279,7 @@ public class GroupInviteActivity extends BaseFragment implements NotificationCen
} else {
privacyCell.setText(LocaleController.getString("LinkInfo", R.string.LinkInfo));
}
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
}
break;
case 2:

View file

@ -549,7 +549,7 @@ public class GroupStickersActivity extends BaseFragment implements NotificationC
default:
case TYPE_MY_STICKERS_HEADER:
view = new HeaderCell(mContext, Theme.key_windowBackgroundWhiteGrayText4, 21, 0, 0, false, getResourceProvider());
view.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
view.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
((HeaderCell) view).setText(LocaleController.getString(R.string.ChooseStickerMyStickerSets));
break;
}
@ -685,7 +685,7 @@ public class GroupStickersActivity extends BaseFragment implements NotificationC
break;
case TYPE_INFO:
view = new TextInfoPrivacyCell(mContext);
view.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
view.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
case TYPE_CHOOSE_HEADER:
default:

View file

@ -72,7 +72,7 @@ public class KeepMediaPopupView extends ActionBarPopupWindow.ActionBarPopupWindo
gap = new FrameLayout(context);
gap.setBackgroundColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuSeparator));
View gapShadow = new View(context);
gapShadow.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow, null));
gapShadow.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow, null));
gap.addView(gapShadow, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
gap.setTag(R.id.fit_width_tag, 1);
addView(gap, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 8));

View file

@ -10,7 +10,6 @@ package org.telegram.ui;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.graphics.Canvas;
import android.text.TextUtils;
import android.view.View;
@ -633,9 +632,9 @@ public class LanguageSelectActivity extends BaseFragment implements Notification
position--;
ShadowSectionCell sectionCell = (ShadowSectionCell) holder.itemView;
if (!unofficialLanguages.isEmpty() && position == unofficialLanguages.size()) {
sectionCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
sectionCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
} else {
sectionCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
sectionCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
}
break;
}
@ -695,14 +694,14 @@ public class LanguageSelectActivity extends BaseFragment implements Notification
infoCell.updateRTL();
if (position == (!getMessagesController().premiumLocked && (getContextValue() || getChatValue()) ? 4 : 3)) {
infoCell.setText(LocaleController.getString("TranslateMessagesInfo1", R.string.TranslateMessagesInfo1));
infoCell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
infoCell.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
infoCell.setTopPadding(11);
infoCell.setBottomPadding(16);
} else {
infoCell.setTopPadding(0);
infoCell.setBottomPadding(16);
infoCell.setText(LocaleController.getString("TranslateMessagesInfo2", R.string.TranslateMessagesInfo2));
infoCell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
infoCell.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
}
break;
}

View file

@ -314,7 +314,7 @@ public class LinkEditActivity extends BaseFragment {
}
TextInfoPrivacyCell hintCell = new TextInfoPrivacyCell(context);
hintCell.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
hintCell.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
if (hasApproveCell) {
hintCell.setText(LocaleController.getString("ApproveNewMembersDescription", R.string.ApproveNewMembersDescription));
}
@ -450,7 +450,7 @@ public class LinkEditActivity extends BaseFragment {
linearLayout.addView(nameEditText, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50));
dividerName = new TextInfoPrivacyCell(context);
dividerName.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
dividerName.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
dividerName.setText(LocaleController.getString("LinkNameHelp", R.string.LinkNameHelp));
linearLayout.addView(dividerName);
@ -489,8 +489,8 @@ public class LinkEditActivity extends BaseFragment {
buttonTextView.setOnClickListener(this::onCreateClicked);
buttonTextView.setTextColor(Theme.getColor(Theme.key_featuredStickers_buttonText));
dividerUses.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
divider.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
dividerUses.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
divider.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
buttonTextView.setBackgroundDrawable(Theme.createSimpleSelectorRoundRectDrawable(AndroidUtilities.dp(6), Theme.getColor(Theme.key_featuredStickers_addButton), Theme.getColor(Theme.key_featuredStickers_addButtonPressed)));
usesEditText.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
@ -792,7 +792,7 @@ public class LinkEditActivity extends BaseFragment {
usesChooseView.setVisibility(isVisible ? View.VISIBLE : View.GONE);
usesEditText.setVisibility(isVisible ? View.VISIBLE : View.GONE);
dividerUses.setVisibility(isVisible ? View.VISIBLE : View.GONE);
divider.setBackground(Theme.getThemedDrawable(getParentActivity(), isVisible ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
divider.setBackground(Theme.getThemedDrawableByKey(getParentActivity(), isVisible ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
}
public interface Callback {
@ -818,8 +818,8 @@ public class LinkEditActivity extends BaseFragment {
ThemeDescription.ThemeDescriptionDelegate descriptionDelegate = () -> {
if (dividerUses != null) {
Context context = dividerUses.getContext();
dividerUses.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
divider.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
dividerUses.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
divider.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
buttonTextView.setBackgroundDrawable(Theme.createSimpleSelectorRoundRectDrawable(AndroidUtilities.dp(6), Theme.getColor(Theme.key_featuredStickers_addButton), Theme.getColor(Theme.key_featuredStickers_addButtonPressed)));
usesEditText.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
@ -833,7 +833,7 @@ public class LinkEditActivity extends BaseFragment {
}
createTextView.setTextColor(Theme.getColor(Theme.key_actionBarDefaultTitle));
dividerName.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
dividerName.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
nameEditText.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
nameEditText.setHintTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText));
}

View file

@ -391,11 +391,11 @@ public class LiteModeSettingsActivity extends BaseFragment {
boolean top = position > 0 && items.get(position - 1).viewType != VIEW_TYPE_INFO;
boolean bottom = position + 1 < items.size() && items.get(position + 1).viewType != VIEW_TYPE_INFO;
if (top && bottom) {
textInfoPrivacyCell.setBackground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
textInfoPrivacyCell.setBackground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
} else if (top) {
textInfoPrivacyCell.setBackground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
textInfoPrivacyCell.setBackground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else if (bottom) {
textInfoPrivacyCell.setBackground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
textInfoPrivacyCell.setBackground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
} else {
textInfoPrivacyCell.setBackground(null);
}

View file

@ -275,7 +275,7 @@ public class LogoutActivity extends BaseFragment {
case 4:
default: {
view = new TextInfoPrivacyCell(mContext);
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
break;
}
}

View file

@ -740,7 +740,7 @@ public class ManageLinksActivity extends BaseFragment {
case 0:
default:
view = new HintInnerCell(mContext);
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundWhite));
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundWhite));
break;
case 1:
view = new HeaderCell(mContext, 23);
@ -784,7 +784,7 @@ public class ManageLinksActivity extends BaseFragment {
break;
case 7:
view = new ShadowSectionCell(mContext);
view.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
view.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
case 8:
TextSettingsCell revokeAll = new TextSettingsCell(mContext);
@ -796,7 +796,7 @@ public class ManageLinksActivity extends BaseFragment {
case 9:
TextInfoPrivacyCell cell = new TextInfoPrivacyCell(mContext);
cell.setText(LocaleController.getString("CreateNewLinkHelp", R.string.CreateNewLinkHelp));
cell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
cell.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
view = cell;
break;
case 10:

View file

@ -777,7 +777,7 @@ public class MessageStatisticActivity extends BaseFragment implements Notificati
}
break;
case 1:
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
case 2:
HeaderCell headerCell = (HeaderCell) holder.itemView;
@ -970,7 +970,7 @@ public class MessageStatisticActivity extends BaseFragment implements Notificati
((StatisticActivity.BaseChartCell) child).recolor();
child.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
} else if (child instanceof ShadowSectionCell) {
Drawable shadowDrawable = Theme.getThemedDrawable(ApplicationLoader.applicationContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
Drawable shadowDrawable = Theme.getThemedDrawableByKey(ApplicationLoader.applicationContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
Drawable background = new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray));
CombinedDrawable combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
combinedDrawable.setFullsize(true);

View file

@ -1301,9 +1301,9 @@ public class NotificationsCustomSettingsActivity extends BaseFragment implements
}
case 4: {
if (position == deleteAllSectionRow || position == groupSection2Row && exceptionsSection2Row == -1 || position == exceptionsSection2Row && deleteAllRow == -1) {
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else {
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
}
break;
}

View file

@ -787,7 +787,7 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
case 6:
default:
view = new TextInfoPrivacyCell(mContext);
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
}
return new RecyclerListView.Holder(view);
@ -912,9 +912,9 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
}
case 4: {
if (position == resetNotificationsSectionRow) {
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else {
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
}
break;
}

View file

@ -521,17 +521,23 @@ public class NotificationsSoundActivity extends BaseFragment implements ChatAtta
return null;
}
RingtoneManager manager = new RingtoneManager(ApplicationLoader.applicationContext);
manager.setType(RingtoneManager.TYPE_NOTIFICATION);
Cursor cursor = manager.getCursor();
try {
RingtoneManager manager = new RingtoneManager(ApplicationLoader.applicationContext);
manager.setType(RingtoneManager.TYPE_NOTIFICATION);
Cursor cursor = manager.getCursor();
while (cursor.moveToNext()) {
String notificationTitle = cursor.getString(RingtoneManager.TITLE_COLUMN_INDEX);
String notificationUri = cursor.getString(RingtoneManager.URI_COLUMN_INDEX) + "/" + cursor.getString(RingtoneManager.ID_COLUMN_INDEX);
while (cursor.moveToNext()) {
String notificationTitle = cursor.getString(RingtoneManager.TITLE_COLUMN_INDEX);
String notificationUri = cursor.getString(RingtoneManager.URI_COLUMN_INDEX) + "/" + cursor.getString(RingtoneManager.ID_COLUMN_INDEX);
if (title.equalsIgnoreCase(notificationTitle)) {
return notificationUri;
if (title.equalsIgnoreCase(notificationTitle)) {
return notificationUri;
}
}
} catch (Throwable e) {
// Exception java.lang.NullPointerException: Attempt to invoke interface method 'void android.database.Cursor.registerDataSetObserver(android.database.DataSetObserver)' on a null object reference
// ignore
FileLog.e(e);
}
return null;
}

View file

@ -1232,11 +1232,11 @@ public class PasscodeActivity extends BaseFragment implements NotificationCenter
cell.getTextView().setGravity(Gravity.CENTER_HORIZONTAL);
} else if (position == autoLockDetailRow) {
cell.setText(LocaleController.getString(R.string.AutoLockInfo));
cell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
cell.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
cell.getTextView().setGravity(LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT);
} else if (position == captureDetailRow) {
cell.setText(LocaleController.getString(R.string.ScreenCaptureInfo));
cell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
cell.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
cell.getTextView().setGravity(LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT);
}
break;

View file

@ -1494,7 +1494,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
}
bottomCell = new TextInfoPrivacyCell(context);
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell.setText(LocaleController.formatString("PassportEmailVerifyInfo", R.string.PassportEmailVerifyInfo, currentValues.get("email")));
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
}
@ -1620,7 +1620,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
}
passwordInfoRequestTextView = new TextInfoPrivacyCell(context);
passwordInfoRequestTextView.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
passwordInfoRequestTextView.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
passwordInfoRequestTextView.setText(LocaleController.formatString("PassportRequestPasswordInfo", R.string.PassportRequestPasswordInfo));
linearLayout2.addView(passwordInfoRequestTextView, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
@ -2007,7 +2007,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
avatarImageView.setForUserOrChat(botUser, avatarDrawable);
bottomCell = new TextInfoPrivacyCell(context);
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
bottomCell.setText(AndroidUtilities.replaceTags(LocaleController.formatString("PassportRequest", R.string.PassportRequest, UserObject.getFirstName(botUser))));
bottomCell.getTextView().setGravity(Gravity.CENTER_HORIZONTAL);
((FrameLayout.LayoutParams) bottomCell.getTextView().getLayoutParams()).gravity = Gravity.CENTER_HORIZONTAL;
@ -2156,7 +2156,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
if (botUser != null) {
bottomCell = new TextInfoPrivacyCell(context);
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell.setLinkTextColorKey(Theme.key_windowBackgroundWhiteGrayText4);
if (!TextUtils.isEmpty(currentForm.privacy_policy_url)) {
String str2 = LocaleController.formatString("PassportPolicy", R.string.PassportPolicy, UserObject.getFirstName(botUser), botUser.username);
@ -2431,7 +2431,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
linearLayout2.addView(headerCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
sectionCell = new ShadowSectionCell(context);
sectionCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
sectionCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
linearLayout2.addView(sectionCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
addDocumentCell = new TextSettingsCell(context);
@ -2480,13 +2480,13 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
});
addDocumentSectionCell = new ShadowSectionCell(context);
addDocumentSectionCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
addDocumentSectionCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
linearLayout2.addView(addDocumentSectionCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
emptyLayout = new LinearLayout(context);
emptyLayout.setOrientation(LinearLayout.VERTICAL);
emptyLayout.setGravity(Gravity.CENTER);
emptyLayout.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
emptyLayout.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
if (AndroidUtilities.isTablet()) {
linearLayout2.addView(emptyLayout, new LinearLayout.LayoutParams(LayoutHelper.MATCH_PARENT, AndroidUtilities.dp(528) - ActionBar.getCurrentActionBarHeight()));
} else {
@ -2733,7 +2733,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
});
bottomCell = new TextInfoPrivacyCell(context);
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell.setText(LocaleController.getString("PassportPhoneUseSameEmailInfo", R.string.PassportPhoneUseSameEmailInfo));
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
}
@ -2777,7 +2777,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
}
bottomCell = new TextInfoPrivacyCell(context);
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell.setText(LocaleController.getString("PassportEmailUploadInfo", R.string.PassportEmailUploadInfo));
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
}
@ -2819,7 +2819,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
});
bottomCell = new TextInfoPrivacyCell(context);
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell.setText(LocaleController.getString("PassportPhoneUseSameInfo", R.string.PassportPhoneUseSameInfo));
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
@ -3123,7 +3123,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
}
bottomCell = new TextInfoPrivacyCell(context);
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell.setText(LocaleController.getString("PassportPhoneUploadInfo", R.string.PassportPhoneUploadInfo));
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
}
@ -3143,7 +3143,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
}
topErrorCell = new TextInfoPrivacyCell(context);
topErrorCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
topErrorCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
topErrorCell.setPadding(0, AndroidUtilities.dp(7), 0, 0);
linearLayout2.addView(topErrorCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
checkTopErrorCell(true);
@ -3179,7 +3179,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
});
bottomCell = new TextInfoPrivacyCell(context);
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
if (currentBotId != 0) {
noAllDocumentsErrorText = LocaleController.getString("PassportAddAddressUploadInfo", R.string.PassportAddAddressUploadInfo);
@ -3233,7 +3233,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
});
bottomCellTranslation = new TextInfoPrivacyCell(context);
bottomCellTranslation.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
bottomCellTranslation.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
if (currentBotId != 0) {
noAllTranslationErrorText = LocaleController.getString("PassportAddTranslationUploadInfo", R.string.PassportAddTranslationUploadInfo);
@ -3502,7 +3502,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
addDocumentViews(currentDocumentsTypeValue.files);
addTranslationDocumentViews(currentDocumentsTypeValue.translation);
}
sectionCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
sectionCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
TextSettingsCell settingsCell1 = new TextSettingsCell(context);
settingsCell1.setTextColor(Theme.getColor(Theme.key_text_RedRegular));
@ -3516,12 +3516,12 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
settingsCell1.setOnClickListener(v -> createDocumentDeleteAlert());
sectionCell = new ShadowSectionCell(context);
sectionCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
sectionCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
linearLayout2.addView(sectionCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
} else {
sectionCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
sectionCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
if (documentOnly && currentDocumentsType != null) {
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
}
}
updateUploadText(UPLOADING_TYPE_DOCUMENTS);
@ -3884,7 +3884,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
}
topErrorCell = new TextInfoPrivacyCell(context);
topErrorCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
topErrorCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
topErrorCell.setPadding(0, AndroidUtilities.dp(7), 0, 0);
linearLayout2.addView(topErrorCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
checkTopErrorCell(true);
@ -3942,7 +3942,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
}
bottomCell = new TextInfoPrivacyCell(context);
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
bottomCell.setText(LocaleController.getString("PassportPersonalUploadInfo", R.string.PassportPersonalUploadInfo));
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
@ -3965,7 +3965,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
});
bottomCellTranslation = new TextInfoPrivacyCell(context);
bottomCellTranslation.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
bottomCellTranslation.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
if (currentBotId != 0) {
noAllTranslationErrorText = LocaleController.getString("PassportAddTranslationUploadInfo", R.string.PassportAddTranslationUploadInfo);
@ -4056,7 +4056,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
});
bottomCell = new TextInfoPrivacyCell(context);
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
bottomCell.setText(LocaleController.getString("PassportScanPassportInfo", R.string.PassportScanPassportInfo));
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
}
@ -4590,13 +4590,13 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
linearLayout2.addView(settingsCell1, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
settingsCell1.setOnClickListener(v -> createDocumentDeleteAlert());
nativeInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
nativeInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
sectionCell = new ShadowSectionCell(context);
sectionCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
sectionCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
linearLayout2.addView(sectionCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
} else {
nativeInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
nativeInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
}
updateInterfaceStringsForDocumentType();
@ -5301,9 +5301,9 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
}
if ((currentBotId != 0 || currentDocumentsType == null) && currentTypeValue != null && !documentOnly || currentDocumentsTypeValue != null) {
sectionCell2.setBackgroundDrawable(Theme.getThemedDrawable(getParentActivity(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
sectionCell2.setBackgroundDrawable(Theme.getThemedDrawableByKey(getParentActivity(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
} else {
sectionCell2.setBackgroundDrawable(Theme.getThemedDrawable(getParentActivity(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
sectionCell2.setBackgroundDrawable(Theme.getThemedDrawableByKey(getParentActivity(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
}
}
} else {
@ -5324,7 +5324,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
}
}
}
sectionCell2.setBackgroundDrawable(Theme.getThemedDrawable(getParentActivity(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
sectionCell2.setBackgroundDrawable(Theme.getThemedDrawableByKey(getParentActivity(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
}
nativeInfoCell.setText(LocaleController.formatString("PassportNativeInfo", R.string.PassportNativeInfo, country));

View file

@ -1007,7 +1007,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
}
bottomCell[1] = new TextInfoPrivacyCell(context, resourcesProvider);
bottomCell[1].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell[1].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
linearLayout2.addView(bottomCell[1], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
if (paymentForm.invoice.email_to_provider && paymentForm.invoice.phone_to_provider) {
bottomCell[1].setText(LocaleController.formatString("PaymentPhoneEmailToProvider", R.string.PaymentPhoneEmailToProvider, providerName));
@ -1031,7 +1031,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
});
bottomCell[0] = new TextInfoPrivacyCell(context, resourcesProvider);
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell[0].setText(LocaleController.getString("PaymentShippingSaveInfo", R.string.PaymentShippingSaveInfo));
linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
}
@ -1187,7 +1187,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
});
bottomCell[0] = new TextInfoPrivacyCell(context, resourcesProvider);
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
updateSavePaymentField();
linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
} else {
@ -1627,7 +1627,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
});
bottomCell[0] = new TextInfoPrivacyCell(context, resourcesProvider);
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
updateSavePaymentField();
linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
} else if (a == FIELD_CARD) {
@ -1679,7 +1679,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
linearLayout2.addView(radioCells[a]);
}
bottomCell[0] = new TextInfoPrivacyCell(context, resourcesProvider);
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
} else if (currentStep == STEP_CONFIRM_PASSWORD) {
inputFields = new EditTextBoldCursor[FIELDS_COUNT_SAVEDCARD];
@ -1757,7 +1757,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
if (a == FIELD_SAVEDPASSWORD) {
bottomCell[0] = new TextInfoPrivacyCell(context, resourcesProvider);
bottomCell[0].setText(LocaleController.formatString("PaymentConfirmationMessage", R.string.PaymentConfirmationMessage, savedCredentialsCard.title));
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
settingsCell[0] = new TextSettingsCell(context, resourcesProvider);
@ -1770,7 +1770,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
});
bottomCell[1] = new TextInfoPrivacyCell(context, resourcesProvider);
bottomCell[1].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell[1].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
linearLayout2.addView(bottomCell[1], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
}
}
@ -2092,7 +2092,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
linearLayout2.addView(totalCell);
sectionCell[2] = new ShadowSectionCell(context, resourcesProvider);
sectionCell[2].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
sectionCell[2].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
linearLayout2.addView(sectionCell[2], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
detailSettingsCell[0] = new TextDetailSettingsCell(context);
@ -2436,7 +2436,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
}
sectionCell[1] = new ShadowSectionCell(context, resourcesProvider);
sectionCell[1].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
sectionCell[1].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
if (cardInfoVisibility != View.VISIBLE && currentStep == STEP_CHECKOUT && validateRequest == null && (paymentForm == null || paymentForm.saved_info == null)) {
sectionCell[1].setVisibility(cardInfoVisibility);
}
@ -2476,7 +2476,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
linearLayout2.addView(codeFieldCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
bottomCell[2] = new TextInfoPrivacyCell(context, resourcesProvider);
bottomCell[2].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
bottomCell[2].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
linearLayout2.addView(bottomCell[2], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
settingsCell[1] = new TextSettingsCell(context, resourcesProvider);
@ -2605,12 +2605,12 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
if (a == FIELD_REENTERPASSWORD) {
bottomCell[0] = new TextInfoPrivacyCell(context, resourcesProvider);
bottomCell[0].setText(LocaleController.getString("PaymentPasswordInfo", R.string.PaymentPasswordInfo));
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
} else if (a == FIELD_ENTERPASSWORDEMAIL) {
bottomCell[1] = new TextInfoPrivacyCell(context, resourcesProvider);
bottomCell[1].setText(LocaleController.getString("PaymentPasswordEmailInfo", R.string.PaymentPasswordEmailInfo));
bottomCell[1].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCell[1].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
linearLayout2.addView(bottomCell[1], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
}
}
@ -3432,11 +3432,11 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
bottomCell[0].setText(text);
checkCell1.setVisibility(View.VISIBLE);
bottomCell[0].setVisibility(View.VISIBLE);
sectionCell[2].setBackgroundDrawable(Theme.getThemedDrawable(sectionCell[2].getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
sectionCell[2].setBackgroundDrawable(Theme.getThemedDrawableByKey(sectionCell[2].getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
} else {
checkCell1.setVisibility(View.GONE);
bottomCell[0].setVisibility(View.GONE);
sectionCell[2].setBackgroundDrawable(Theme.getThemedDrawable(sectionCell[2].getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
sectionCell[2].setBackgroundDrawable(Theme.getThemedDrawableByKey(sectionCell[2].getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
}
}

View file

@ -995,11 +995,11 @@ public class PeopleNearbyActivity extends BaseFragment implements NotificationCe
case 1:
ShadowSectionCell privacyCell = (ShadowSectionCell) holder.itemView;
if (position == usersSectionRow) {
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
} else if (position == chatsSectionRow) {
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else if (position == helpSectionRow) {
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
}
break;
case 2:

View file

@ -587,7 +587,7 @@ public class PollCreateActivity extends BaseFragment {
case 2: {
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
cell.setFixedSize(0);
cell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
cell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
if (position == solutionInfoRow) {
cell.setText(LocaleController.getString("AddAnExplanationInfo", R.string.AddAnExplanationInfo));
} else if (position == settingsSectionRow) {

View file

@ -257,7 +257,7 @@ public class PrivacyControlActivity extends BaseFragment implements Notification
setWillNotDraw(false);
setClipToPadding(false);
shadowDrawable = Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
shadowDrawable = Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
setPadding(0, AndroidUtilities.dp(11), 0, AndroidUtilities.dp(11));
int date = (int) (System.currentTimeMillis() / 1000) - 60 * 60;
@ -1141,7 +1141,7 @@ public class PrivacyControlActivity extends BaseFragment implements Notification
case 5:
default:
view = new ShadowSectionCell(mContext);
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
Drawable drawable = Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
combinedDrawable.setFullsize(true);
view.setBackgroundDrawable(combinedDrawable);
@ -1335,7 +1335,7 @@ public class PrivacyControlActivity extends BaseFragment implements Notification
privacyCell.setText(LocaleController.getString("PhotoForRestDescription", R.string.PhotoForRestDescription));
}
if (backgroundResId != 0) {
Drawable drawable = Theme.getThemedDrawable(mContext, backgroundResId, Theme.key_windowBackgroundGrayShadow);
Drawable drawable = Theme.getThemedDrawableByKey(mContext, backgroundResId, Theme.key_windowBackgroundGrayShadow);
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
combinedDrawable.setFullsize(true);
privacyCell.setBackgroundDrawable(combinedDrawable);

View file

@ -1022,7 +1022,7 @@ public class PrivacySettingsActivity extends BaseFragment implements Notificatio
case 1:
TextInfoPrivacyCell privacyCell = (TextInfoPrivacyCell) holder.itemView;
boolean last = position == getItemCount() - 1;
privacyCell.setBackground(Theme.getThemedDrawable(mContext, last ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackground(Theme.getThemedDrawableByKey(mContext, last ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
if (position == deleteAccountDetailRow) {
privacyCell.setText(LocaleController.getString("DeleteAccountHelp", R.string.DeleteAccountHelp));
} else if (position == groupsDetailRow) {

View file

@ -494,14 +494,14 @@ public class PrivacyUsersActivity extends BaseFragment implements NotificationCe
privacyCell.setText(null);
}
if (usersStartRow == -1) {
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else {
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
}
} else if (position == usersDetailRow) {
privacyCell.setFixedSize(12);
privacyCell.setText("");
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
}
break;
case 2:

View file

@ -815,20 +815,20 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
TextInfoPrivacyCell textCell = (TextInfoPrivacyCell) holder.itemView;
if (position == popupInfoRow) {
textCell.setText(LocaleController.getString("ProfilePopupNotificationInfo", R.string.ProfilePopupNotificationInfo));
textCell.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
textCell.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
} else if (position == ledInfoRow) {
textCell.setText(LocaleController.getString("NotificationsLedInfo", R.string.NotificationsLedInfo));
textCell.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
textCell.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else if (position == priorityInfoRow) {
if (priorityRow == -1) {
textCell.setText("");
} else {
textCell.setText(LocaleController.getString("PriorityInfo", R.string.PriorityInfo));
}
textCell.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
textCell.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
} else if (position == ringtoneInfoRow) {
textCell.setText(LocaleController.getString("VoipRingtoneInfo", R.string.VoipRingtoneInfo));
textCell.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
textCell.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
}
break;
}

View file

@ -881,9 +881,9 @@ public class ProxyListActivity extends BaseFragment implements NotificationCente
switch (holder.getItemViewType()) {
case VIEW_TYPE_SHADOW: {
if (position == proxyShadowRow && callsRow == -1) {
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else {
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
}
break;
}
@ -920,10 +920,10 @@ public class ProxyListActivity extends BaseFragment implements NotificationCente
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
if (position == callsDetailRow) {
cell.setText(LocaleController.getString("UseProxyForCallsInfo", R.string.UseProxyForCallsInfo));
cell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
cell.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else if (position == rotationTimeoutInfoRow) {
cell.setText(LocaleController.getString(R.string.ProxyRotationTimeoutInfo));
cell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
cell.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
}
break;
}
@ -1023,7 +1023,7 @@ public class ProxyListActivity extends BaseFragment implements NotificationCente
break;
case VIEW_TYPE_INFO:
view = new TextInfoPrivacyCell(mContext);
view.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
view.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
break;
case VIEW_TYPE_SLIDE_CHOOSER:
view = new SlideChooseView(mContext);

View file

@ -436,7 +436,7 @@ public class ProxySettingsActivity extends BaseFragment {
for (int i = 0; i < 2; i++) {
bottomCells[i] = new TextInfoPrivacyCell(context);
bottomCells[i].setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
bottomCells[i].setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
if (i == 0) {
bottomCells[i].setText(LocaleController.getString("UseProxyInfo", R.string.UseProxyInfo));
} else {
@ -487,7 +487,7 @@ public class ProxySettingsActivity extends BaseFragment {
linearLayout2.addView(pasteCell, 0, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
pasteCell.setVisibility(View.GONE);
sectionCell[2] = new ShadowSectionCell(fragmentView.getContext());
sectionCell[2].setBackground(Theme.getThemedDrawable(fragmentView.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
sectionCell[2].setBackground(Theme.getThemedDrawableByKey(fragmentView.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
linearLayout2.addView(sectionCell[2], 1, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
sectionCell[2].setVisibility(View.GONE);
@ -549,7 +549,7 @@ public class ProxySettingsActivity extends BaseFragment {
});
sectionCell[1] = new ShadowSectionCell(context);
sectionCell[1].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
sectionCell[1].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
linearLayout2.addView(sectionCell[1], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
clipboardManager = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);

View file

@ -138,7 +138,7 @@ public class QuickRepliesSettingsActivity extends BaseFragment {
switch (holder.getItemViewType()) {
case 0: {
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
cell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
cell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
cell.setText(LocaleController.getString("VoipQuickRepliesExplain", R.string.VoipQuickRepliesExplain));
break;
}

View file

@ -107,7 +107,7 @@ public class ReactionsDoubleTapManageActivity extends BaseFragment implements No
case 2:
TextInfoPrivacyCell cell = new TextInfoPrivacyCell(context);
cell.setText(LocaleController.getString("DoubleTapPreviewRational", R.string.DoubleTapPreviewRational));
cell.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
cell.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
view = cell;
break;
case 3:
@ -125,7 +125,7 @@ public class ReactionsDoubleTapManageActivity extends BaseFragment implements No
);
}
};
view.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
view.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
default:
case 1: {

View file

@ -27,7 +27,6 @@ import com.google.common.collect.Sets;
import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.ApplicationLoader;
import org.telegram.messenger.BotWebViewVibrationEffect;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.MessagesController;
@ -51,15 +50,10 @@ import org.telegram.ui.Components.LayoutHelper;
import org.telegram.ui.Components.RecyclerListView;
import org.telegram.ui.Components.TranslateAlert2;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.Timer;
public class RestrictedLanguagesSelectActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate {
@ -481,7 +475,7 @@ public class RestrictedLanguagesSelectActivity extends BaseFragment implements N
}
case 1: {
ShadowSectionCell sectionCell = (ShadowSectionCell) holder.itemView;
sectionCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
sectionCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
break;
}
case 2: {

View file

@ -797,7 +797,7 @@ public class SessionsActivity extends BaseFragment implements NotificationCenter
} else {
privacyCell.setText(LocaleController.getString("ClearOtherWebSessionsHelp", R.string.ClearOtherWebSessionsHelp));
}
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
} else if (position == otherSessionsTerminateDetail) {
if (currentType == 0) {
if (sessions.isEmpty()) {
@ -808,16 +808,16 @@ public class SessionsActivity extends BaseFragment implements NotificationCenter
} else {
privacyCell.setText(LocaleController.getString("TerminateWebSessionInfo", R.string.TerminateWebSessionInfo));
}
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
} else if (position == passwordSessionsDetailRow) {
privacyCell.setText(LocaleController.getString("LoginAttemptsInfo", R.string.LoginAttemptsInfo));
if (otherSessionsTerminateDetail == -1) {
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else {
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
}
} else if (position == qrCodeDividerRow || position == ttlDivideRow || position == noOtherSessionsRow) {
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
privacyCell.setText("");
privacyCell.setFixedSize(12);
}

View file

@ -1916,7 +1916,7 @@ public class StatisticActivity extends BaseFragment implements NotificationCente
if (child instanceof ChartCell) {
((ChartCell) child).recolor();
} else if (child instanceof ShadowSectionCell) {
Drawable shadowDrawable = Theme.getThemedDrawable(ApplicationLoader.applicationContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
Drawable shadowDrawable = Theme.getThemedDrawableByKey(ApplicationLoader.applicationContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
Drawable background = new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray));
CombinedDrawable combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
combinedDrawable.setFullsize(true);

View file

@ -71,7 +71,6 @@ import org.telegram.ui.Components.Bulletin;
import org.telegram.ui.Components.BulletinFactory;
import org.telegram.ui.Components.CubicBezierInterpolator;
import org.telegram.ui.Components.EmojiPacksAlert;
import org.telegram.ui.Components.EmojiView;
import org.telegram.ui.Components.ItemOptions;
import org.telegram.ui.Components.LayoutHelper;
import org.telegram.ui.Components.NumberTextView;
@ -295,9 +294,7 @@ public class StickersActivity extends BaseFragment implements NotificationCenter
selectedCountTextView.setOnTouchListener((v, event) -> true);
shareMenuItem = actionMode.addItemWithWidth(MENU_SHARE, R.drawable.msg_share, AndroidUtilities.dp(54));
if (currentType != MediaDataController.TYPE_EMOJIPACKS) {
archiveMenuItem = actionMode.addItemWithWidth(MENU_ARCHIVE, R.drawable.msg_archive, AndroidUtilities.dp(54));
}
archiveMenuItem = actionMode.addItemWithWidth(MENU_ARCHIVE, R.drawable.msg_archive, AndroidUtilities.dp(54));
deleteMenuItem = actionMode.addItemWithWidth(MENU_DELETE, R.drawable.msg_delete, AndroidUtilities.dp(54));
ArrayList<TLRPC.TL_messages_stickerSet> sets;
@ -656,14 +653,7 @@ public class StickersActivity extends BaseFragment implements NotificationCenter
loopRow = -1;
loopInfoRow = -1;
if (currentType == MediaDataController.TYPE_EMOJIPACKS) {
suggestAnimatedEmojiRow = rowCount++;
suggestAnimatedEmojiInfoRow = rowCount++;
} else {
suggestAnimatedEmojiRow = -1;
suggestAnimatedEmojiInfoRow = -1;
}
archivedRow = -1;
if (currentType == MediaDataController.TYPE_IMAGE) {
featuredRow = rowCount++;
@ -682,7 +672,7 @@ public class StickersActivity extends BaseFragment implements NotificationCenter
masksRow = -1;
emojiPacksRow = -1;
if (mediaDataController.getArchivedStickersCount(currentType) != 0 && currentType != MediaDataController.TYPE_EMOJIPACKS) {
if (mediaDataController.getArchivedStickersCount(currentType) != 0) {
boolean inserted = archivedRow == -1;
archivedRow = rowCount++;
@ -704,6 +694,14 @@ public class StickersActivity extends BaseFragment implements NotificationCenter
}
}
if (currentType == MediaDataController.TYPE_EMOJIPACKS) {
suggestAnimatedEmojiRow = rowCount++;
suggestAnimatedEmojiInfoRow = rowCount++;
} else {
suggestAnimatedEmojiRow = -1;
suggestAnimatedEmojiInfoRow = -1;
}
if (currentType == MediaDataController.TYPE_IMAGE) {
reactionsDoubleTapRow = rowCount++;
} else {
@ -1206,7 +1204,7 @@ public class StickersActivity extends BaseFragment implements NotificationCenter
}
case TYPE_SHADOW:
if (position == stickersShadowRow) {
holder.itemView.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
}
break;
case TYPE_SWITCH:
@ -1367,7 +1365,7 @@ public class StickersActivity extends BaseFragment implements NotificationCenter
break;
case TYPE_INFO:
view = new TextInfoPrivacyCell(mContext);
view.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
view.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
break;
case TYPE_TEXT_AND_VALUE:
view = new TextCell(mContext);

View file

@ -101,7 +101,6 @@ import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.atomic.AtomicReference;
@ -1940,7 +1939,7 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
break;
case TYPE_TEXT_INFO_PRIVACY:
view = new TextInfoPrivacyCell(mContext);
view.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
view.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
break;
case TYPE_SHADOW:
view = new ShadowSectionCell(mContext);
@ -2244,9 +2243,9 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
}
case TYPE_SHADOW: {
if (position == nightTypeInfoRow && themeInfoRow == -1 || position == lastShadowRow || position == themeInfoRow && nightTypeInfoRow != -1 || position == saveToGallerySectionRow || position == settings2Row) {
holder.itemView.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else {
holder.itemView.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
holder.itemView.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
}
break;
}

View file

@ -322,7 +322,7 @@ public class ThemeSetUrlActivity extends BaseFragment implements NotificationCen
}
checkInfoCell = new TextInfoPrivacyCell(context);
checkInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
checkInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
checkInfoCell.setVisibility(View.GONE);
checkInfoCell.setBottomPadding(0);
linearLayout.addView(checkInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
@ -338,7 +338,7 @@ public class ThemeSetUrlActivity extends BaseFragment implements NotificationCen
linearLayout.addView(helpInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
if (creatingNewTheme) {
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
messagesCell = new ThemePreviewMessagesCell(context, parentLayout, 1);
linearLayout.addView(messagesCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
@ -386,10 +386,10 @@ public class ThemeSetUrlActivity extends BaseFragment implements NotificationCen
createInfoCell = new TextInfoPrivacyCell(context);
createInfoCell.setText(AndroidUtilities.replaceTags(LocaleController.getString("UseDifferentThemeInfo", R.string.UseDifferentThemeInfo)));
createInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
createInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
linearLayout.addView(createInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
} else {
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
}
if (info != null) {
@ -534,9 +534,9 @@ public class ThemeSetUrlActivity extends BaseFragment implements NotificationCen
if (TextUtils.isEmpty(text)) {
checkInfoCell.setVisibility(View.GONE);
if (creatingNewTheme) {
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(getParentActivity(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(getParentActivity(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
} else {
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(getParentActivity(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(getParentActivity(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
}
} else {
checkInfoCell.setVisibility(View.VISIBLE);
@ -544,7 +544,7 @@ public class ThemeSetUrlActivity extends BaseFragment implements NotificationCen
checkInfoCell.setTag(colorKey);
checkInfoCell.setTextColorByKey(colorKey);
if (creatingNewTheme) {
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(getParentActivity(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(getParentActivity(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
} else {
helpInfoCell.setBackgroundDrawable(null);
}

View file

@ -464,7 +464,7 @@ public class TooManyCommunitiesActivity extends BaseFragment {
break;
case 2:
view = new ShadowSectionCell(parent.getContext());
Drawable drawable = Theme.getThemedDrawable(parent.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
Drawable drawable = Theme.getThemedDrawableByKey(parent.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
combinedDrawable.setFullsize(true);
view.setBackground(combinedDrawable);

View file

@ -486,7 +486,7 @@ public class TopicCreateFragment extends BaseFragment {
TextInfoPrivacyCell infoCell = new TextInfoPrivacyCell(context);
infoCell.setText(LocaleController.getString("EditTopicHideInfo", R.string.EditTopicHideInfo));
infoCell.setBackground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow, getResourceProvider()));
infoCell.setBackground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow, getResourceProvider()));
emojiContainer.addView(infoCell, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP, 0, 8 + 50, 0, 0));
}
linearLayout.addView(emojiContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));

View file

@ -1205,10 +1205,10 @@ public class TwoStepVerificationActivity extends BaseFragment implements Notific
TextInfoPrivacyCell privacyCell = (TextInfoPrivacyCell) holder.itemView;
if (position == setPasswordDetailRow) {
privacyCell.setText(LocaleController.getString("SetAdditionalPasswordInfo", R.string.SetAdditionalPasswordInfo));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
} else if (position == passwordEnabledDetailRow) {
privacyCell.setText(LocaleController.getString("EnabledPasswordText", R.string.EnabledPasswordText));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
}
break;
}

View file

@ -1814,7 +1814,7 @@ public class WallpapersListActivity extends BaseFragment implements Notification
}
case 1: {
view = new ShadowSectionCell(mContext);
Drawable drawable = Theme.getThemedDrawable(mContext, wallPaperStartRow == -1 ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
Drawable drawable = Theme.getThemedDrawableByKey(mContext, wallPaperStartRow == -1 ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
combinedDrawable.setFullsize(true);
view.setBackgroundDrawable(combinedDrawable);
@ -1822,7 +1822,7 @@ public class WallpapersListActivity extends BaseFragment implements Notification
}
case 3: {
view = new TextInfoPrivacyCell(mContext);
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
Drawable drawable = Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
combinedDrawable.setFullsize(true);
view.setBackgroundDrawable(combinedDrawable);

View file

@ -1907,6 +1907,7 @@
<string name="ArchivedMasksEmpty">No archived masks</string>
<string name="ArchivedEmojiPacksEmpty">No archived emoji packs</string>
<string name="ArchivedStickersInfo">You can add up to 200 sticker sets.\nUnused sets are archived when you add more.</string>
<string name="ArchivedEmojiInfo">You can add up to 200 emoji packs.\nUnused packs are archived when you add more.</string>
<string name="ArchivedMasksInfo">You can have up to 200 sets of masks.\nUnused sets are archived when you add more.</string>
<string name="SendSticker">SEND STICKER</string>
<string name="ArchivedStickersAlertTitle">Archived stickers</string>
@ -6598,4 +6599,6 @@
<string name="ChatThemeDaySwitchTooltip">Tap to view this theme in the day mode.</string>
<string name="ChatThemeNightSwitchTooltip">Tap to view this theme in the night mode.</string>
<string name="BotWebAppInstantViewOpen">Open App</string>
<string name="RestorePremiumHintTitle">Get Premium back with up to **%1$d%%** off</string>
<string name="RestorePremiumHintMessage">Your Telegram Premium has recently expired. Tap here to extend it.</string>
</resources>

View file

@ -13,8 +13,8 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Sat Mar 12 05:53:50 MSK 2016
APP_VERSION_CODE=3333
APP_VERSION_NAME=9.6.1
APP_VERSION_CODE=3341
APP_VERSION_NAME=9.6.2
APP_PACKAGE=org.telegram.messenger
RELEASE_KEY_PASSWORD=android
RELEASE_KEY_ALIAS=androidkey