Possibly improved screenshots

This commit is contained in:
Austen Adler 2016-07-25 02:29:02 -04:00
parent 52a9c80de5
commit 5f4f71d43d
No known key found for this signature in database
GPG Key ID: 7ECEE590CCDFE3F1

View File

@ -725,13 +725,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
} }
if (currentEncryptedChat != null) { if (currentEncryptedChat != null) {
MediaController.getInstance().stopMediaObserver(); MediaController.getInstance().stopMediaObserver();
try {
if (Build.VERSION.SDK_INT >= 14) {
getParentActivity().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
}
} catch (Throwable e) {
FileLog.e("tmessages", e);
}
} }
if (currentUser != null) { if (currentUser != null) {
MessagesController.getInstance().cancelLoadFullUser(currentUser.id); MessagesController.getInstance().cancelLoadFullUser(currentUser.id);
@ -7025,25 +7018,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
} }
private void updateInformationForScreenshotDetector() { private void updateInformationForScreenshotDetector() {
if (currentEncryptedChat == null) { return;
return;
}
ArrayList<Long> visibleMessages = new ArrayList<>();
if (chatListView != null) {
int count = chatListView.getChildCount();
for (int a = 0; a < count; a++) {
View view = chatListView.getChildAt(a);
MessageObject object = null;
if (view instanceof ChatBaseCell) {
ChatBaseCell cell = (ChatBaseCell) view;
object = cell.getMessageObject();
}
if (object != null && object.getId() < 0 && object.messageOwner.random_id != 0) {
visibleMessages.add(object.messageOwner.random_id);
}
}
}
MediaController.getInstance().setLastEncryptedChatParams(chatEnterTime, chatLeaveTime, currentEncryptedChat, visibleMessages);
} }
private boolean fixLayoutInternal() { private boolean fixLayoutInternal() {