Update to 7.2.1 (2135)

This commit is contained in:
DrKLO 2020-10-30 20:44:29 +03:00
parent 002c01ecd3
commit 8726c6d11f
11 changed files with 75 additions and 34 deletions

View file

@ -285,7 +285,7 @@ android {
} }
} }
defaultConfig.versionCode = 2134 defaultConfig.versionCode = 2135
applicationVariants.all { variant -> applicationVariants.all { variant ->
variant.outputs.all { output -> variant.outputs.all { output ->
@ -304,7 +304,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 28 targetSdkVersion 28
versionName "7.2.0" versionName "7.2.1"
vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi'] vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi']

View file

@ -18,7 +18,7 @@ public class BuildVars {
public static boolean LOGS_ENABLED = false; public static boolean LOGS_ENABLED = false;
public static boolean USE_CLOUD_STRINGS = true; public static boolean USE_CLOUD_STRINGS = true;
public static boolean CHECK_UPDATES = true; public static boolean CHECK_UPDATES = true;
public static int BUILD_VERSION = 2134; public static int BUILD_VERSION = 2135;
public static String BUILD_VERSION_STRING = "7.2.0"; public static String BUILD_VERSION_STRING = "7.2.0";
public static int APP_ID = 4; public static int APP_ID = 4;
public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103"; public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103";

View file

@ -3644,6 +3644,9 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
} }
public static void saveFilesFromMessages(Context context, AccountInstance accountInstance, ArrayList<MessageObject> messageObjects, final MessagesStorage.IntCallback onSaved) { public static void saveFilesFromMessages(Context context, AccountInstance accountInstance, ArrayList<MessageObject> messageObjects, final MessagesStorage.IntCallback onSaved) {
if (messageObjects == null || messageObjects.isEmpty()) {
return;
}
new MediaLoader(context, accountInstance, messageObjects, onSaved).start(); new MediaLoader(context, accountInstance, messageObjects, onSaved).start();
} }

View file

@ -3064,7 +3064,6 @@ public class MessagesStorage extends BaseController {
if (messagesOnly == 0 || messagesOnly == 3) { if (messagesOnly == 0 || messagesOnly == 3) {
database.executeFast("DELETE FROM dialogs WHERE did = " + did).stepThis().dispose(); database.executeFast("DELETE FROM dialogs WHERE did = " + did).stepThis().dispose();
database.executeFast("DELETE FROM chat_settings_v2 WHERE uid = " + did).stepThis().dispose();
database.executeFast("DELETE FROM chat_pinned_v2 WHERE uid = " + did).stepThis().dispose(); database.executeFast("DELETE FROM chat_pinned_v2 WHERE uid = " + did).stepThis().dispose();
database.executeFast("DELETE FROM chat_pinned_count WHERE uid = " + did).stepThis().dispose(); database.executeFast("DELETE FROM chat_pinned_count WHERE uid = " + did).stepThis().dispose();
database.executeFast("DELETE FROM channel_users_v2 WHERE did = " + did).stepThis().dispose(); database.executeFast("DELETE FROM channel_users_v2 WHERE did = " + did).stepThis().dispose();
@ -3073,11 +3072,10 @@ public class MessagesStorage extends BaseController {
int high_id = (int) (did >> 32); int high_id = (int) (did >> 32);
if (lower_id != 0) { if (lower_id != 0) {
if (lower_id < 0) { if (lower_id < 0) {
//database.executeFast("DELETE FROM chats WHERE uid = " + (-lower_id)).stepThis().dispose(); database.executeFast("DELETE FROM chat_settings_v2 WHERE uid = " + (-lower_id)).stepThis().dispose();
} }
} else { } else {
database.executeFast("DELETE FROM enc_chats WHERE uid = " + high_id).stepThis().dispose(); database.executeFast("DELETE FROM enc_chats WHERE uid = " + high_id).stepThis().dispose();
//database.executeFast("DELETE FROM secret_holes WHERE uid = " + high_id).stepThis().dispose();
} }
} else if (messagesOnly == 2) { } else if (messagesOnly == 2) {
SQLiteCursor cursor = database.queryFinalized("SELECT last_mid_i, last_mid FROM dialogs WHERE did = " + did); SQLiteCursor cursor = database.queryFinalized("SELECT last_mid_i, last_mid FROM dialogs WHERE did = " + did);
@ -3091,7 +3089,9 @@ public class MessagesStorage extends BaseController {
NativeByteBuffer data = cursor2.byteBufferValue(0); NativeByteBuffer data = cursor2.byteBufferValue(0);
if (data != null) { if (data != null) {
TLRPC.Message message = TLRPC.Message.TLdeserialize(data, data.readInt32(false), false); TLRPC.Message message = TLRPC.Message.TLdeserialize(data, data.readInt32(false), false);
message.readAttachPath(data, getUserConfig().clientUserId); if (message != null) {
message.readAttachPath(data, getUserConfig().clientUserId);
}
data.reuse(); data.reuse();
if (message != null) { if (message != null) {
messageId = message.id; messageId = message.id;
@ -5009,14 +5009,21 @@ public class MessagesStorage extends BaseController {
if (ids == null) { if (ids == null) {
database.executeFast("DELETE FROM chat_pinned_v2 WHERE uid = " + dialogId).stepThis().dispose(); database.executeFast("DELETE FROM chat_pinned_v2 WHERE uid = " + dialogId).stepThis().dispose();
if (dialogId < 0) { if (dialogId < 0) {
database.executeFast("UPDATE chat_settings_v2 SET pinned = " + 0 + " WHERE uid = " + dialogId).stepThis().dispose(); database.executeFast(String.format(Locale.US, "UPDATE chat_settings_v2 SET pinned = 0 WHERE uid = %d", -dialogId)).stepThis().dispose();
} else { } else {
database.executeFast("UPDATE user_settings SET pinned = " + 0 + " WHERE uid = " + dialogId).stepThis().dispose(); database.executeFast(String.format(Locale.US, "UPDATE user_settings SET pinned = 0 WHERE uid = %d", dialogId)).stepThis().dispose();
} }
newCount = 0; newCount = 0;
endReached = true; endReached = true;
} else { } else {
database.executeFast(String.format("DELETE FROM chat_pinned_v2 WHERE uid = " + dialogId + " AND mid IN(%s)", TextUtils.join(",", ids))).stepThis().dispose(); String idsStr = TextUtils.join(",", ids);
if (dialogId < 0) {
database.executeFast(String.format(Locale.US, "UPDATE chat_settings_v2 SET pinned = 0 WHERE uid = %d AND pinned IN (%s)", -dialogId, idsStr)).stepThis().dispose();
} else {
database.executeFast(String.format(Locale.US, "UPDATE user_settings SET pinned = 0 WHERE uid = %d AND pinned IN (%s)", dialogId, idsStr)).stepThis().dispose();
}
database.executeFast(String.format(Locale.US, "DELETE FROM chat_pinned_v2 WHERE uid = %d AND mid IN(%s)", dialogId, idsStr)).stepThis().dispose();
SQLiteCursor cursor = database.queryFinalized("SELECT changes()"); SQLiteCursor cursor = database.queryFinalized("SELECT changes()");
int updatedCount = cursor.next() ? cursor.intValue(0) : 0; int updatedCount = cursor.next() ? cursor.intValue(0) : 0;
@ -8990,6 +8997,14 @@ public class MessagesStorage extends BaseController {
for (int a = 0, N = messagesByDialogs.size(); a < N; a++) { for (int a = 0, N = messagesByDialogs.size(); a < N; a++) {
long did = messagesByDialogs.keyAt(a); long did = messagesByDialogs.keyAt(a);
ArrayList<Integer> mids = messagesByDialogs.valueAt(a); ArrayList<Integer> mids = messagesByDialogs.valueAt(a);
int lowerId = (int) did;
if (lowerId != 0) {
if (lowerId < 0) {
database.executeFast(String.format(Locale.US, "UPDATE chat_settings_v2 SET pinned = 0 WHERE uid = %d AND pinned IN (%s)", -lowerId, mids)).stepThis().dispose();
} else {
database.executeFast(String.format(Locale.US, "UPDATE user_settings SET pinned = 0 WHERE uid = %d AND pinned IN (%s)", lowerId, mids)).stepThis().dispose();
}
}
database.executeFast(String.format(Locale.US, "DELETE FROM chat_pinned_v2 WHERE uid = %d AND mid IN(%s)", did, TextUtils.join(",", mids))).stepThis().dispose(); database.executeFast(String.format(Locale.US, "DELETE FROM chat_pinned_v2 WHERE uid = %d AND mid IN(%s)", did, TextUtils.join(",", mids))).stepThis().dispose();
int updatedCount = 0; int updatedCount = 0;
cursor = database.queryFinalized("SELECT changes()"); cursor = database.queryFinalized("SELECT changes()");
@ -9332,7 +9347,9 @@ public class MessagesStorage extends BaseController {
state.dispose(); state.dispose();
} }
database.executeFast(String.format(Locale.US, "DELETE FROM chat_pinned_v2 WHERE uid = %d AND mid <= %d", -channelId, maxMessageId)).stepThis().dispose();
database.executeFast(String.format(Locale.US, "UPDATE chat_settings_v2 SET pinned = 0 WHERE uid = %d AND pinned <= %d", channelId, maxMessageId)).stepThis().dispose();
database.executeFast(String.format(Locale.US, "DELETE FROM chat_pinned_v2 WHERE uid = %d AND mid <= %d", channelId, maxMessageId)).stepThis().dispose();
int updatedCount = 0; int updatedCount = 0;
cursor = database.queryFinalized("SELECT changes()"); cursor = database.queryFinalized("SELECT changes()");
if (cursor.next()) { if (cursor.next()) {

View file

@ -5220,7 +5220,7 @@ public class SendMessagesHelper extends BaseController implements NotificationCe
} }
} }
private static boolean prepareSendingDocumentInternal(AccountInstance accountInstance, String path, String originalPath, Uri uri, String mime, long dialogId, MessageObject replyToMsg, MessageObject replyToTopMsg, CharSequence caption, final ArrayList<TLRPC.MessageEntity> entities, final MessageObject editingMessageObject, long[] groupId, boolean isGroupFinal, boolean forceDocument, boolean notify, int scheduleDate, Boolean[] withThumb) { private static boolean prepareSendingDocumentInternal(AccountInstance accountInstance, String path, String originalPath, Uri uri, String mime, long dialogId, MessageObject replyToMsg, MessageObject replyToTopMsg, CharSequence caption, final ArrayList<TLRPC.MessageEntity> entities, final MessageObject editingMessageObject, long[] groupId, boolean isGroupFinal, boolean forceDocument, boolean notify, int scheduleDate, Integer[] docType) {
if ((path == null || path.length() == 0) && uri == null) { if ((path == null || path.length() == 0) && uri == null) {
return false; return false;
} }
@ -5448,19 +5448,25 @@ public class SendMessagesHelper extends BaseController implements NotificationCe
if (originalPath != null) { if (originalPath != null) {
params.put("originalPath", originalPath); params.put("originalPath", originalPath);
} }
if (forceDocument) { if (forceDocument && attributeAudio == null) {
params.put("forceDocument", "1"); params.put("forceDocument", "1");
} }
if (parentFinal != null) { if (parentFinal != null) {
params.put("parentObject", parentFinal); params.put("parentObject", parentFinal);
} }
Boolean prevWithThumb = false; Integer prevType = 0;
if (withThumb != null) { if (docType != null) {
prevWithThumb = withThumb[0]; prevType = docType[0];
withThumb[0] = document.mime_type != null && (document.mime_type.toLowerCase().startsWith("image/") || document.mime_type.toLowerCase().startsWith("video/mp4")) || MessageObject.canPreviewDocument(document); if (document.mime_type != null && (document.mime_type.toLowerCase().startsWith("image/") || document.mime_type.toLowerCase().startsWith("video/mp4")) || MessageObject.canPreviewDocument(document)) {
docType[0] = 1;
} else if (attributeAudio != null) {
docType[0] = 2;
} else {
docType[0] = 0;
}
} }
if (groupId != null) { if (groupId != null) {
if (withThumb != null && prevWithThumb != null && prevWithThumb != withThumb[0]) { if (docType != null && prevType != null && prevType != docType[0]) {
finishGroup(accountInstance, groupId[0], scheduleDate); finishGroup(accountInstance, groupId[0], scheduleDate);
groupId[0] = Utilities.random.nextLong(); groupId[0] = Utilities.random.nextLong();
} }
@ -5605,7 +5611,7 @@ public class SendMessagesHelper extends BaseController implements NotificationCe
boolean error = false; boolean error = false;
long[] groupId = new long[1]; long[] groupId = new long[1];
int mediaCount = 0; int mediaCount = 0;
Boolean[] withThumb = new Boolean[1]; Integer[] docType = new Integer[1];
boolean isEncrypted = (int) dialogId == 0; boolean isEncrypted = (int) dialogId == 0;
int enryptedLayer = 0; int enryptedLayer = 0;
@ -5630,7 +5636,7 @@ public class SendMessagesHelper extends BaseController implements NotificationCe
} }
mediaCount++; mediaCount++;
long prevGroupId = groupId[0]; long prevGroupId = groupId[0];
if (!prepareSendingDocumentInternal(accountInstance, paths.get(a), originalPaths.get(a), null, mime, dialogId, replyToMsg, replyToTopMsg, captionFinal, null, editingMessageObject, groupId, mediaCount == 10 || a == count - 1, true, notify, scheduleDate, withThumb)) { if (!prepareSendingDocumentInternal(accountInstance, paths.get(a), originalPaths.get(a), null, mime, dialogId, replyToMsg, replyToTopMsg, captionFinal, null, editingMessageObject, groupId, mediaCount == 10 || a == count - 1, true, notify, scheduleDate, docType)) {
error = true; error = true;
} }
if (prevGroupId != groupId[0]) { if (prevGroupId != groupId[0]) {
@ -5653,7 +5659,7 @@ public class SendMessagesHelper extends BaseController implements NotificationCe
} }
mediaCount++; mediaCount++;
long prevGroupId = groupId[0]; long prevGroupId = groupId[0];
if (!prepareSendingDocumentInternal(accountInstance, null, null, uris.get(a), mime, dialogId, replyToMsg, replyToTopMsg, captionFinal, null, editingMessageObject, groupId, mediaCount == 10 || a == count - 1, true, notify, scheduleDate, withThumb)) { if (!prepareSendingDocumentInternal(accountInstance, null, null, uris.get(a), mime, dialogId, replyToMsg, replyToTopMsg, captionFinal, null, editingMessageObject, groupId, mediaCount == 10 || a == count - 1, true, notify, scheduleDate, docType)) {
error = true; error = true;
} }
if (prevGroupId != groupId[0]) { if (prevGroupId != groupId[0]) {

View file

@ -199,7 +199,7 @@ public class SharedConfig {
public static void loadConfig() { public static void loadConfig() {
synchronized (sync) { synchronized (sync) {
if (configLoaded) { if (configLoaded || ApplicationLoader.applicationContext == null) {
return; return;
} }

View file

@ -645,6 +645,9 @@ public class DialogsSearchAdapter extends RecyclerListView.SelectionAdapter {
searchWas = false; searchWas = false;
lastSearchId = 0; lastSearchId = 0;
waitingResponseCount = 0; waitingResponseCount = 0;
if (delegate != null) {
delegate.searchStateChanged(false, true);
}
searchMessagesInternal(null, 0); searchMessagesInternal(null, 0);
notifyDataSetChanged(); notifyDataSetChanged();
localTipDates.clear(); localTipDates.clear();

View file

@ -2312,7 +2312,7 @@ public class DialogCell extends BaseCell {
StatusDrawable statusDrawable = Theme.getChatStatusDrawable(printingStringType); StatusDrawable statusDrawable = Theme.getChatStatusDrawable(printingStringType);
if (statusDrawable != null) { if (statusDrawable != null) {
canvas.save(); canvas.save();
int left = LocaleController.isRTL ? messageLeft + messageLayout.getWidth() - statusDrawable.getIntrinsicWidth() : messageLeft; int left = (LocaleController.isRTL || messageLayout.isRtlCharAt(0)) ? messageLeft + messageLayout.getWidth() - statusDrawable.getIntrinsicWidth() : messageLeft;
if (printingStringType == 1 || printingStringType == 4) { if (printingStringType == 1 || printingStringType == 4) {
canvas.translate(left, messageTop + (printingStringType == 1 ? AndroidUtilities.dp(1) : 0)); canvas.translate(left, messageTop + (printingStringType == 1 ? AndroidUtilities.dp(1) : 0));
} else { } else {

View file

@ -6632,7 +6632,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
private void searchUserMessages(TLRPC.User user, TLRPC.Chat chat) { private void searchUserMessages(TLRPC.User user, TLRPC.Chat chat) {
searchingUserMessages = user; searchingUserMessages = user;
searchingChatMessages = chat; searchingChatMessages = chat;
if (searchingUserMessages == null && searchingChatMessages == null) { if (searchItem == null || searchingUserMessages == null && searchingChatMessages == null) {
return; return;
} }
String name; String name;
@ -6923,7 +6923,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
if (!inPreviewMode && chatActivityEnterView != null) { if (!inPreviewMode && chatActivityEnterView != null) {
if (chatActivityEnterView.getAnimatedTop() != 0) { if (chatActivityEnterView.getAnimatedTop() != 0) {
chatListViewPaddingTop += chatActivityEnterView.getHeightWithTopView() - AndroidUtilities.dp(51) - chatActivityEnterView.getAnimatedTop(); chatListViewPaddingTop += chatActivityEnterView.getHeightWithTopView() - AndroidUtilities.dp(51) - chatActivityEnterView.getAnimatedTop();
} else { } else if (!chatActivityEnterView.pannelAniamationInProgress()) {
chatListViewPaddingTop -= chatListView.getTranslationY(); chatListViewPaddingTop -= chatListView.getTranslationY();
} }
} }
@ -18081,6 +18081,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
messageObjects.add(selectedObject); messageObjects.add(selectedObject);
} }
MediaController.saveFilesFromMessages(getParentActivity(), getAccountInstance(), messageObjects, (count) -> { MediaController.saveFilesFromMessages(getParentActivity(), getAccountInstance(), messageObjects, (count) -> {
if (getParentActivity() == null) {
return;
}
if (count > 0) { if (count > 0) {
BulletinFactory.of(this).createDownloadBulletin(isMusic ? BulletinFactory.FileType.AUDIOS : BulletinFactory.FileType.UNKNOWNS, count).show(); BulletinFactory.of(this).createDownloadBulletin(isMusic ? BulletinFactory.FileType.AUDIOS : BulletinFactory.FileType.UNKNOWNS, count).show();
} }
@ -18104,6 +18107,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
path = FileLoader.getPathToMessage(selectedObject.messageOwner).toString(); path = FileLoader.getPathToMessage(selectedObject.messageOwner).toString();
} }
MediaController.saveFile(path, getParentActivity(), 2, fileName, selectedObject.getDocument() != null ? selectedObject.getDocument().mime_type : "", () -> { MediaController.saveFile(path, getParentActivity(), 2, fileName, selectedObject.getDocument() != null ? selectedObject.getDocument().mime_type : "", () -> {
if (getParentActivity() == null) {
return;
}
final BulletinFactory.FileType fileType; final BulletinFactory.FileType fileType;
if (photo) { if (photo) {
fileType = BulletinFactory.FileType.PHOTO_TO_DOWNLOADS; fileType = BulletinFactory.FileType.PHOTO_TO_DOWNLOADS;

View file

@ -35,6 +35,8 @@ public class SlotsDrawable extends RLottieDrawable {
private int[] secondFrameCounts = new int[3]; private int[] secondFrameCounts = new int[3];
private int[] secondFrameNums = new int[3]; private int[] secondFrameNums = new int[3];
private boolean playWinAnimation;
public SlotsDrawable(String diceEmoji, int w, int h) { public SlotsDrawable(String diceEmoji, int w, int h) {
super(diceEmoji, w, h); super(diceEmoji, w, h);
@ -82,7 +84,7 @@ public class SlotsDrawable extends RLottieDrawable {
secondFrameNums[a] = secondFrameCounts[a] - 1; secondFrameNums[a] = secondFrameCounts[a] - 1;
} }
} }
if (autoRepeatPlayCount == 1) { if (playWinAnimation) {
if (frameNums[0] + 1 < frameCounts[0]) { if (frameNums[0] + 1 < frameCounts[0]) {
frameNums[0]++; frameNums[0]++;
} else { } else {
@ -92,10 +94,12 @@ public class SlotsDrawable extends RLottieDrawable {
getFrame(nativePtrs[0], Math.max(frameNums[0], 0), backgroundBitmap, width, height, backgroundBitmap.getRowBytes(), true); getFrame(nativePtrs[0], Math.max(frameNums[0], 0), backgroundBitmap, width, height, backgroundBitmap.getRowBytes(), true);
for (int a = 0; a < secondNativePtrs.length; a++) { for (int a = 0; a < secondNativePtrs.length; a++) {
getFrame(secondNativePtrs[a], secondFrameNums[a] >= 0 ? secondFrameNums[a] : (secondFrameCounts[a] - 1), backgroundBitmap, width, height, backgroundBitmap.getRowBytes(), false); getFrame(secondNativePtrs[a], secondFrameNums[a] >= 0 ? secondFrameNums[a] : (secondFrameCounts[a] - 1), backgroundBitmap, width, height, backgroundBitmap.getRowBytes(), false);
if (secondFrameNums[a] + 1 < secondFrameCounts[a]) { if (!nextFrameIsLast) {
secondFrameNums[a]++; if (secondFrameNums[a] + 1 < secondFrameCounts[a]) {
} else { secondFrameNums[a]++;
secondFrameNums[a] = -1; } else {
secondFrameNums[a] = -1;
}
} }
} }
result = getFrame(nativePtrs[4], frameNums[4], backgroundBitmap, width, height, backgroundBitmap.getRowBytes(), false); result = getFrame(nativePtrs[4], frameNums[4], backgroundBitmap, width, height, backgroundBitmap.getRowBytes(), false);
@ -104,12 +108,11 @@ public class SlotsDrawable extends RLottieDrawable {
} }
if (secondFrameNums[0] == -1 && secondFrameNums[1] == -1 && secondFrameNums[2] == -1) { if (secondFrameNums[0] == -1 && secondFrameNums[1] == -1 && secondFrameNums[2] == -1) {
nextFrameIsLast = true; nextFrameIsLast = true;
autoRepeatPlayCount++;
} }
if (left == right && right == center) { if (left == right && right == center) {
if (secondFrameNums[0] == secondFrameCounts[0] - 100) { if (secondFrameNums[0] == secondFrameCounts[0] - 100) {
if (autoRepeatPlayCount == 0) { playWinAnimation = true;
autoRepeatPlayCount++;
}
if (left == ReelValue.sevenWin) { if (left == ReelValue.sevenWin) {
Runnable runnable = onFinishCallback.get(); Runnable runnable = onFinishCallback.get();
if (runnable != null) { if (runnable != null) {

View file

@ -867,7 +867,7 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
proximityButton.setContentDescription(LocaleController.getString("AccDescrLocationNotify", R.string.AccDescrLocationNotify)); proximityButton.setContentDescription(LocaleController.getString("AccDescrLocationNotify", R.string.AccDescrLocationNotify));
mapViewClip.addView(proximityButton, LayoutHelper.createFrame(Build.VERSION.SDK_INT >= 21 ? 40 : 44, Build.VERSION.SDK_INT >= 21 ? 40 : 44, Gravity.RIGHT | Gravity.TOP, 0, 12 + 50, 12, 0)); mapViewClip.addView(proximityButton, LayoutHelper.createFrame(Build.VERSION.SDK_INT >= 21 ? 40 : 44, Build.VERSION.SDK_INT >= 21 ? 40 : 44, Gravity.RIGHT | Gravity.TOP, 0, 12 + 50, 12, 0));
proximityButton.setOnClickListener(v -> { proximityButton.setOnClickListener(v -> {
if (getParentActivity() == null || myLocation == null || !checkGpsEnabled()) { if (getParentActivity() == null || myLocation == null || !checkGpsEnabled() || googleMap == null) {
return; return;
} }
if (hintView != null) { if (hintView != null) {
@ -1836,6 +1836,9 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
} }
private void createCircle(int meters) { private void createCircle(int meters) {
if (googleMap == null) {
return;
}
List<PatternItem> PATTERN_POLYGON_ALPHA = Arrays.asList(new Gap(20), new Dash(20)); List<PatternItem> PATTERN_POLYGON_ALPHA = Arrays.asList(new Gap(20), new Dash(20));
CircleOptions circleOptions = new CircleOptions(); CircleOptions circleOptions = new CircleOptions();