id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
113,500
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/crypto/Curve25519.java
Curve25519.verifySignature
public static boolean verifySignature(byte[] publicKey, byte[] message, byte[] signature) { return curve_sigs.curve25519_verify(SHA512Provider, signature, publicKey, message, message.length) == 0; }
java
public static boolean verifySignature(byte[] publicKey, byte[] message, byte[] signature) { return curve_sigs.curve25519_verify(SHA512Provider, signature, publicKey, message, message.length) == 0; }
[ "public", "static", "boolean", "verifySignature", "(", "byte", "[", "]", "publicKey", ",", "byte", "[", "]", "message", ",", "byte", "[", "]", "signature", ")", "{", "return", "curve_sigs", ".", "curve25519_verify", "(", "SHA512Provider", ",", "signature", "...
Verification of signature @param publicKey public key of signature @param message message @param signature signature of a message @return true if signature correct
[ "Verification", "of", "signature" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/crypto/Curve25519.java#L107-L109
113,501
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/i18n/I18nEngine.java
I18nEngine.isLargeDialogMessage
@ObjectiveCName("isLargeDialogMessage:") public boolean isLargeDialogMessage(ContentType contentType) { switch (contentType) { case SERVICE: case SERVICE_AVATAR: case SERVICE_AVATAR_REMOVED: case SERVICE_CREATED: case SERVICE_TITLE: cas...
java
@ObjectiveCName("isLargeDialogMessage:") public boolean isLargeDialogMessage(ContentType contentType) { switch (contentType) { case SERVICE: case SERVICE_AVATAR: case SERVICE_AVATAR_REMOVED: case SERVICE_CREATED: case SERVICE_TITLE: cas...
[ "@", "ObjectiveCName", "(", "\"isLargeDialogMessage:\"", ")", "public", "boolean", "isLargeDialogMessage", "(", "ContentType", "contentType", ")", "{", "switch", "(", "contentType", ")", "{", "case", "SERVICE", ":", "case", "SERVICE_AVATAR", ":", "case", "SERVICE_AV...
If Dialog List message need to be wide in group chat as it is already includes performer in it's body. @param contentType Type of Content @return true if content is wide
[ "If", "Dialog", "List", "message", "need", "to", "be", "wide", "in", "group", "chat", "as", "it", "is", "already", "includes", "performer", "in", "it", "s", "body", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/i18n/I18nEngine.java#L249-L270
113,502
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/i18n/I18nEngine.java
I18nEngine.formatNotificationText
@ObjectiveCName("formatNotificationText:") public String formatNotificationText(Notification pendingNotification) { return formatContentText(pendingNotification.getSender(), pendingNotification.getContentDescription().getContentType(), pendingNotification.getContentDescriptio...
java
@ObjectiveCName("formatNotificationText:") public String formatNotificationText(Notification pendingNotification) { return formatContentText(pendingNotification.getSender(), pendingNotification.getContentDescription().getContentType(), pendingNotification.getContentDescriptio...
[ "@", "ObjectiveCName", "(", "\"formatNotificationText:\"", ")", "public", "String", "formatNotificationText", "(", "Notification", "pendingNotification", ")", "{", "return", "formatContentText", "(", "pendingNotification", ".", "getSender", "(", ")", ",", "pendingNotifica...
Formatting Pending notification text @param pendingNotification pending notification @return formatted notification
[ "Formatting", "Pending", "notification", "text" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/i18n/I18nEngine.java#L278-L285
113,503
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/i18n/I18nEngine.java
I18nEngine.formatContentText
@ObjectiveCName("formatContentTextWithSenderId:withContentType:withText:withRelatedUid:withIsChannel:") public String formatContentText(int senderId, ContentType contentType, String text, int relatedUid, boolean isChannel) { String groupKey = isChannel ? "channels" : "gr...
java
@ObjectiveCName("formatContentTextWithSenderId:withContentType:withText:withRelatedUid:withIsChannel:") public String formatContentText(int senderId, ContentType contentType, String text, int relatedUid, boolean isChannel) { String groupKey = isChannel ? "channels" : "gr...
[ "@", "ObjectiveCName", "(", "\"formatContentTextWithSenderId:withContentType:withText:withRelatedUid:withIsChannel:\"", ")", "public", "String", "formatContentText", "(", "int", "senderId", ",", "ContentType", "contentType", ",", "String", "text", ",", "int", "relatedUid", ",...
Formatting content for Dialog List and Notifications @param senderId sender of message (used in service messages) @param contentType type of content @param text text of message @param relatedUid optional related uid @return formatted content
[ "Formatting", "content", "for", "Dialog", "List", "and", "Notifications" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/i18n/I18nEngine.java#L296-L363
113,504
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/i18n/I18nEngine.java
I18nEngine.formatFullServiceMessage
@ObjectiveCName("formatFullServiceMessageWithSenderId:withContent:withIsChannel:") public String formatFullServiceMessage(int senderId, ServiceContent content, boolean isChannel) { String groupKey = isChannel ? "channels" : "groups"; if (content instanceof ServiceUserRegistered) { return...
java
@ObjectiveCName("formatFullServiceMessageWithSenderId:withContent:withIsChannel:") public String formatFullServiceMessage(int senderId, ServiceContent content, boolean isChannel) { String groupKey = isChannel ? "channels" : "groups"; if (content instanceof ServiceUserRegistered) { return...
[ "@", "ObjectiveCName", "(", "\"formatFullServiceMessageWithSenderId:withContent:withIsChannel:\"", ")", "public", "String", "formatFullServiceMessage", "(", "int", "senderId", ",", "ServiceContent", "content", ",", "boolean", "isChannel", ")", "{", "String", "groupKey", "="...
Formatting Service Content @param senderId sender of a message @param content content of a message @return formatted message
[ "Formatting", "Service", "Content" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/i18n/I18nEngine.java#L372-L417
113,505
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/i18n/I18nEngine.java
I18nEngine.formatMessagesExport
@ObjectiveCName("formatMessagesExport:") public String formatMessagesExport(Message[] messages) { String text = ""; Arrays.sort(messages, new Comparator<Message>() { int compare(long lhs, long rhs) { return lhs < rhs ? -1 : (lhs == rhs ? 0 : 1); } ...
java
@ObjectiveCName("formatMessagesExport:") public String formatMessagesExport(Message[] messages) { String text = ""; Arrays.sort(messages, new Comparator<Message>() { int compare(long lhs, long rhs) { return lhs < rhs ? -1 : (lhs == rhs ? 0 : 1); } ...
[ "@", "ObjectiveCName", "(", "\"formatMessagesExport:\"", ")", "public", "String", "formatMessagesExport", "(", "Message", "[", "]", "messages", ")", "{", "String", "text", "=", "\"\"", ";", "Arrays", ".", "sort", "(", "messages", ",", "new", "Comparator", "<",...
Formatting messages for exporting @param messages messages to export @return formatted text
[ "Formatting", "messages", "for", "exporting" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/i18n/I18nEngine.java#L461-L496
113,506
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-clc/src/main/java/im/actor/runtime/clc/Cursor.java
Cursor.moveToFirst
public boolean moveToFirst() { try { return resultSet.first(); } catch (SQLException e) { logger.error(e.getMessage(),e); } return false; }
java
public boolean moveToFirst() { try { return resultSet.first(); } catch (SQLException e) { logger.error(e.getMessage(),e); } return false; }
[ "public", "boolean", "moveToFirst", "(", ")", "{", "try", "{", "return", "resultSet", ".", "first", "(", ")", ";", "}", "catch", "(", "SQLException", "e", ")", "{", "logger", ".", "error", "(", "e", ".", "getMessage", "(", ")", ",", "e", ")", ";", ...
We can't use this method in sqlite jdbc driver @return
[ "We", "can", "t", "use", "this", "method", "in", "sqlite", "jdbc", "driver" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-clc/src/main/java/im/actor/runtime/clc/Cursor.java#L32-L39
113,507
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/calls/peers/PeerNodeInt.java
PeerNodeInt.replaceOwnStream
public Promise<Void> replaceOwnStream(CountedReference<WebRTCMediaStream> stream) { return ask(new PeerNodeActor.ReplaceOwnStream(stream.acquire())); }
java
public Promise<Void> replaceOwnStream(CountedReference<WebRTCMediaStream> stream) { return ask(new PeerNodeActor.ReplaceOwnStream(stream.acquire())); }
[ "public", "Promise", "<", "Void", ">", "replaceOwnStream", "(", "CountedReference", "<", "WebRTCMediaStream", ">", "stream", ")", "{", "return", "ask", "(", "new", "PeerNodeActor", ".", "ReplaceOwnStream", "(", "stream", ".", "acquire", "(", ")", ")", ")", "...
Call this method to set own stream @param stream own stream
[ "Call", "this", "method", "to", "set", "own", "stream" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/calls/peers/PeerNodeInt.java#L55-L57
113,508
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/calls/peers/PeerNodeInt.java
PeerNodeInt.onCandidate
public void onCandidate(long sessionId, int index, String id, String sdp) { send(new RTCCandidate(deviceId, sessionId, index, id, sdp)); }
java
public void onCandidate(long sessionId, int index, String id, String sdp) { send(new RTCCandidate(deviceId, sessionId, index, id, sdp)); }
[ "public", "void", "onCandidate", "(", "long", "sessionId", ",", "int", "index", ",", "String", "id", ",", "String", "sdp", ")", "{", "send", "(", "new", "RTCCandidate", "(", "deviceId", ",", "sessionId", ",", "index", ",", "id", ",", "sdp", ")", ")", ...
Call this method when new candidate is received @param index candidate index @param id candidate id @param sdp candidate sdp
[ "Call", "this", "method", "when", "new", "candidate", "is", "received" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/calls/peers/PeerNodeInt.java#L120-L122
113,509
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/calls/peers/PeerConnectionInt.java
PeerConnectionInt.replaceStream
public Promise<Void> replaceStream(CountedReference<WebRTCMediaStream> mediaStream) { return ask(new PeerConnectionActor.ReplaceStream(mediaStream.acquire())); }
java
public Promise<Void> replaceStream(CountedReference<WebRTCMediaStream> mediaStream) { return ask(new PeerConnectionActor.ReplaceStream(mediaStream.acquire())); }
[ "public", "Promise", "<", "Void", ">", "replaceStream", "(", "CountedReference", "<", "WebRTCMediaStream", ">", "mediaStream", ")", "{", "return", "ask", "(", "new", "PeerConnectionActor", ".", "ReplaceStream", "(", "mediaStream", ".", "acquire", "(", ")", ")", ...
Replace Current outgoing stream @param mediaStream media stream
[ "Replace", "Current", "outgoing", "stream" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/calls/peers/PeerConnectionInt.java#L57-L59
113,510
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/calls/peers/PeerConnectionInt.java
PeerConnectionInt.onCandidate
public void onCandidate(long sessionId, int index, String id, String sdp) { send(new PeerConnectionActor.OnCandidate(sessionId, index, id, sdp)); }
java
public void onCandidate(long sessionId, int index, String id, String sdp) { send(new PeerConnectionActor.OnCandidate(sessionId, index, id, sdp)); }
[ "public", "void", "onCandidate", "(", "long", "sessionId", ",", "int", "index", ",", "String", "id", ",", "String", "sdp", ")", "{", "send", "(", "new", "PeerConnectionActor", ".", "OnCandidate", "(", "sessionId", ",", "index", ",", "id", ",", "sdp", ")"...
Call this method when new candidate arrived from other peer @param index index of media in sdp @param id id of candidate @param sdp sdp of candidate
[ "Call", "this", "method", "when", "new", "candidate", "arrived", "from", "other", "peer" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/calls/peers/PeerConnectionInt.java#L104-L106
113,511
actorapp/actor-platform
actor-server/actor-frontend/src/main/java/im/actor/crypto/primitives/digest/MD5Digest.java
MD5Digest.reset
public void reset() { super.reset(); H1 = 0x67452301; H2 = 0xefcdab89; H3 = 0x98badcfe; H4 = 0x10325476; xOff = 0; for (int i = 0; i != X.length; i++) { X[i] = 0; } }
java
public void reset() { super.reset(); H1 = 0x67452301; H2 = 0xefcdab89; H3 = 0x98badcfe; H4 = 0x10325476; xOff = 0; for (int i = 0; i != X.length; i++) { X[i] = 0; } }
[ "public", "void", "reset", "(", ")", "{", "super", ".", "reset", "(", ")", ";", "H1", "=", "0x67452301", ";", "H2", "=", "0xefcdab89", ";", "H3", "=", "0x98badcfe", ";", "H4", "=", "0x10325476", ";", "xOff", "=", "0", ";", "for", "(", "int", "i",...
reset the chaining variables to the IV values.
[ "reset", "the", "chaining", "variables", "to", "the", "IV", "values", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-server/actor-frontend/src/main/java/im/actor/crypto/primitives/digest/MD5Digest.java#L79-L92
113,512
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/promise/PromisesArray.java
PromisesArray.of
@SuppressWarnings("unchecked") public static <T> PromisesArray<T> of(Collection<T> collection) { final ArrayList<Promise<T>> res = new ArrayList<>(); for (T t : collection) { res.add(Promise.success(t)); } final Promise[] promises = res.toArray(new Promise[res.size()]); ...
java
@SuppressWarnings("unchecked") public static <T> PromisesArray<T> of(Collection<T> collection) { final ArrayList<Promise<T>> res = new ArrayList<>(); for (T t : collection) { res.add(Promise.success(t)); } final Promise[] promises = res.toArray(new Promise[res.size()]); ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "PromisesArray", "<", "T", ">", "of", "(", "Collection", "<", "T", ">", "collection", ")", "{", "final", "ArrayList", "<", "Promise", "<", "T", ">", ">", "res", "=",...
Create PromisesArray from collection @param collection Source collection @param <T> type of array @return array
[ "Create", "PromisesArray", "from", "collection" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/promise/PromisesArray.java#L31-L41
113,513
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/promise/PromisesArray.java
PromisesArray.of
@SafeVarargs public static <T> PromisesArray<T> of(T... items) { ArrayList<Promise<T>> res = new ArrayList<>(); for (T t : items) { res.add(Promise.success(t)); } final Promise[] promises = res.toArray(new Promise[res.size()]); return new PromisesArray<>((PromiseF...
java
@SafeVarargs public static <T> PromisesArray<T> of(T... items) { ArrayList<Promise<T>> res = new ArrayList<>(); for (T t : items) { res.add(Promise.success(t)); } final Promise[] promises = res.toArray(new Promise[res.size()]); return new PromisesArray<>((PromiseF...
[ "@", "SafeVarargs", "public", "static", "<", "T", ">", "PromisesArray", "<", "T", ">", "of", "(", "T", "...", "items", ")", "{", "ArrayList", "<", "Promise", "<", "T", ">>", "res", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "T", "t...
Create PromisesArray from values @param items elements @param <T> type of array @return array
[ "Create", "PromisesArray", "from", "values" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/promise/PromisesArray.java#L50-L60
113,514
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/promise/PromisesArray.java
PromisesArray.ofPromises
@SafeVarargs public static <T> PromisesArray<T> ofPromises(Promise<T>... items) { ArrayList<Promise<T>> res = new ArrayList<>(); Collections.addAll(res, items); final Promise[] promises = res.toArray(new Promise[res.size()]); return new PromisesArray<>((PromiseFunc<Promise<T>[]>) exe...
java
@SafeVarargs public static <T> PromisesArray<T> ofPromises(Promise<T>... items) { ArrayList<Promise<T>> res = new ArrayList<>(); Collections.addAll(res, items); final Promise[] promises = res.toArray(new Promise[res.size()]); return new PromisesArray<>((PromiseFunc<Promise<T>[]>) exe...
[ "@", "SafeVarargs", "public", "static", "<", "T", ">", "PromisesArray", "<", "T", ">", "ofPromises", "(", "Promise", "<", "T", ">", "...", "items", ")", "{", "ArrayList", "<", "Promise", "<", "T", ">>", "res", "=", "new", "ArrayList", "<>", "(", ")",...
Create PromisesArray from multiple Promise @param items promises @param <T> type of array @return array
[ "Create", "PromisesArray", "from", "multiple", "Promise" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/promise/PromisesArray.java#L69-L77
113,515
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/promise/PromisesArray.java
PromisesArray.map
public <R> PromisesArray<R> map(final Function<T, Promise<R>> fun) { return mapSourcePromises(srcPromise -> new Promise<R>(resolver -> { srcPromise.then(t -> { Promise<R> mapped = fun.apply(t); mapped.then(t2 -> resolver.result(t2)); mapped.failure(e -...
java
public <R> PromisesArray<R> map(final Function<T, Promise<R>> fun) { return mapSourcePromises(srcPromise -> new Promise<R>(resolver -> { srcPromise.then(t -> { Promise<R> mapped = fun.apply(t); mapped.then(t2 -> resolver.result(t2)); mapped.failure(e -...
[ "public", "<", "R", ">", "PromisesArray", "<", "R", ">", "map", "(", "final", "Function", "<", "T", ",", "Promise", "<", "R", ">", ">", "fun", ")", "{", "return", "mapSourcePromises", "(", "srcPromise", "->", "new", "Promise", "<", "R", ">", "(", "...
Map promises results to new promises @param fun mapping function @param <R> type of result promises @return PromisesArray
[ "Map", "promises", "results", "to", "new", "promises" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/promise/PromisesArray.java#L109-L118
113,516
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/promise/PromisesArray.java
PromisesArray.zipPromise
public <R> Promise<R> zipPromise(final ListFunction<T, Promise<R>> fuc) { return new Promise<>(resolver -> { promises.then(promises1 -> { final ArrayList<T> res = new ArrayList<T>(); for (int i = 0; i < promises1.length; i++) { res.add(null); ...
java
public <R> Promise<R> zipPromise(final ListFunction<T, Promise<R>> fuc) { return new Promise<>(resolver -> { promises.then(promises1 -> { final ArrayList<T> res = new ArrayList<T>(); for (int i = 0; i < promises1.length; i++) { res.add(null); ...
[ "public", "<", "R", ">", "Promise", "<", "R", ">", "zipPromise", "(", "final", "ListFunction", "<", "T", ",", "Promise", "<", "R", ">", ">", "fuc", ")", "{", "return", "new", "Promise", "<>", "(", "resolver", "->", "{", "promises", ".", "then", "("...
Zip array to single promise @param fuc zipping function @param <R> type of result @return promise
[ "Zip", "array", "to", "single", "promise" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/promise/PromisesArray.java#L323-L357
113,517
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/mvvm/Value.java
Value.subscribe
@ObjectiveCName("subscribeWithListener:notify:") public void subscribe(ValueChangedListener<T> listener, boolean notify) { // im.actor.runtime.Runtime.checkMainThread(); if (listeners.contains(listener)) { return; } listeners.add(listener); if (notify) { ...
java
@ObjectiveCName("subscribeWithListener:notify:") public void subscribe(ValueChangedListener<T> listener, boolean notify) { // im.actor.runtime.Runtime.checkMainThread(); if (listeners.contains(listener)) { return; } listeners.add(listener); if (notify) { ...
[ "@", "ObjectiveCName", "(", "\"subscribeWithListener:notify:\"", ")", "public", "void", "subscribe", "(", "ValueChangedListener", "<", "T", ">", "listener", ",", "boolean", "notify", ")", "{", "// im.actor.runtime.Runtime.checkMainThread();", "if", "(", "listeners", "."...
Subscribe to value updates @param listener update listener @param notify perform notify about current value
[ "Subscribe", "to", "value", "updates" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/mvvm/Value.java#L61-L72
113,518
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/mvvm/Value.java
Value.notifyInMainThread
protected void notifyInMainThread(final T value) { for (ValueChangedListener<T> listener : listeners) { listener.onChanged(value, Value.this); } }
java
protected void notifyInMainThread(final T value) { for (ValueChangedListener<T> listener : listeners) { listener.onChanged(value, Value.this); } }
[ "protected", "void", "notifyInMainThread", "(", "final", "T", "value", ")", "{", "for", "(", "ValueChangedListener", "<", "T", ">", "listener", ":", "listeners", ")", "{", "listener", ".", "onChanged", "(", "value", ",", "Value", ".", "this", ")", ";", "...
Performing notification to subscribers if we know that we are on mainthread Useful for chainging updates from chain of values @param value new value
[ "Performing", "notification", "to", "subscribers", "if", "we", "know", "that", "we", "are", "on", "mainthread", "Useful", "for", "chainging", "updates", "from", "chain", "of", "values" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/mvvm/Value.java#L101-L105
113,519
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/crypto/PRNGFixes.java
PRNGFixes.applyOpenSSLFix
private static void applyOpenSSLFix() throws SecurityException { if ((Build.VERSION.SDK_INT < VERSION_CODE_JELLY_BEAN) || (Build.VERSION.SDK_INT > VERSION_CODE_JELLY_BEAN_MR2)) { // No need to apply the fix return; } try { // Mix in the device...
java
private static void applyOpenSSLFix() throws SecurityException { if ((Build.VERSION.SDK_INT < VERSION_CODE_JELLY_BEAN) || (Build.VERSION.SDK_INT > VERSION_CODE_JELLY_BEAN_MR2)) { // No need to apply the fix return; } try { // Mix in the device...
[ "private", "static", "void", "applyOpenSSLFix", "(", ")", "throws", "SecurityException", "{", "if", "(", "(", "Build", ".", "VERSION", ".", "SDK_INT", "<", "VERSION_CODE_JELLY_BEAN", ")", "||", "(", "Build", ".", "VERSION", ".", "SDK_INT", ">", "VERSION_CODE_J...
Applies the fix for OpenSSL PRNG having low entropy. Does nothing if the fix is not needed. @throws SecurityException if the fix is needed but could not be applied.
[ "Applies", "the", "fix", "for", "OpenSSL", "PRNG", "having", "low", "entropy", ".", "Does", "nothing", "if", "the", "fix", "is", "not", "needed", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/crypto/PRNGFixes.java#L81-L107
113,520
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/crypto/PRNGFixes.java
PRNGFixes.generateSeed
private static byte[] generateSeed() { try { ByteArrayOutputStream seedBuffer = new ByteArrayOutputStream(); DataOutputStream seedBufferOut = new DataOutputStream(seedBuffer); seedBufferOut.writeLong(System.currentTimeMillis()); seedBufferOut.w...
java
private static byte[] generateSeed() { try { ByteArrayOutputStream seedBuffer = new ByteArrayOutputStream(); DataOutputStream seedBufferOut = new DataOutputStream(seedBuffer); seedBufferOut.writeLong(System.currentTimeMillis()); seedBufferOut.w...
[ "private", "static", "byte", "[", "]", "generateSeed", "(", ")", "{", "try", "{", "ByteArrayOutputStream", "seedBuffer", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "DataOutputStream", "seedBufferOut", "=", "new", "DataOutputStream", "(", "seedBuffer", ")"...
Generates a device- and invocation-specific seed to be mixed into the Linux PRNG.
[ "Generates", "a", "device", "-", "and", "invocation", "-", "specific", "seed", "to", "be", "mixed", "into", "the", "Linux", "PRNG", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/crypto/PRNGFixes.java#L304-L319
113,521
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/crypto/PRNGFixes.java
PRNGFixes.getDeviceSerialNumber
private static String getDeviceSerialNumber() { // We're using the Reflection API because Build.SERIAL is only available // since API Level 9 (Gingerbread, Android 2.3). try { return (String) Build.class.getField("SERIAL").get(null); } catch (Exception ignored) { ...
java
private static String getDeviceSerialNumber() { // We're using the Reflection API because Build.SERIAL is only available // since API Level 9 (Gingerbread, Android 2.3). try { return (String) Build.class.getField("SERIAL").get(null); } catch (Exception ignored) { ...
[ "private", "static", "String", "getDeviceSerialNumber", "(", ")", "{", "// We're using the Reflection API because Build.SERIAL is only available", "// since API Level 9 (Gingerbread, Android 2.3).", "try", "{", "return", "(", "String", ")", "Build", ".", "class", ".", "getField...
Gets the hardware serial number of this device. @return serial number or {@code null} if not available.
[ "Gets", "the", "hardware", "serial", "number", "of", "this", "device", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/crypto/PRNGFixes.java#L326-L334
113,522
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/api/ApiModule.java
ApiModule.performPersistCursorRequest
public void performPersistCursorRequest(String name, long key, Request request) { persistentRequests.send(new PersistentRequestsActor.PerformCursorRequest(name, key, request)); }
java
public void performPersistCursorRequest(String name, long key, Request request) { persistentRequests.send(new PersistentRequestsActor.PerformCursorRequest(name, key, request)); }
[ "public", "void", "performPersistCursorRequest", "(", "String", "name", ",", "long", "key", ",", "Request", "request", ")", "{", "persistentRequests", ".", "send", "(", "new", "PersistentRequestsActor", ".", "PerformCursorRequest", "(", "name", ",", "key", ",", ...
Perform cursor persist request. Request is performed only if key is bigger than previous request with same name @param name name of cursor @param key sorting key @param request request for performing
[ "Perform", "cursor", "persist", "request", ".", "Request", "is", "performed", "only", "if", "key", "is", "bigger", "than", "previous", "request", "with", "same", "name" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/api/ApiModule.java#L100-L102
113,523
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/crypto/primitives/curve25519/Arrays.java
Arrays.fill
public static void fill(byte[] a, byte val) { for (int i = 0, len = a.length; i < len; i++) a[i] = val; }
java
public static void fill(byte[] a, byte val) { for (int i = 0, len = a.length; i < len; i++) a[i] = val; }
[ "public", "static", "void", "fill", "(", "byte", "[", "]", "a", ",", "byte", "val", ")", "{", "for", "(", "int", "i", "=", "0", ",", "len", "=", "a", ".", "length", ";", "i", "<", "len", ";", "i", "++", ")", "a", "[", "i", "]", "=", "val"...
Assigns the specified byte value to each element of the specified array of bytes. @param a the array to be filled @param val the value to be stored in all elements of the array
[ "Assigns", "the", "specified", "byte", "value", "to", "each", "element", "of", "the", "specified", "array", "of", "bytes", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/crypto/primitives/curve25519/Arrays.java#L17-L20
113,524
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/actors/dispatch/Mailbox.java
Mailbox.scheduleFirst
public void scheduleFirst(Envelope envelope) { if (envelope.getMailbox() != this) { throw new RuntimeException("envelope.mailbox != this mailbox"); } queueCollection.post(queueId, envelope, true); }
java
public void scheduleFirst(Envelope envelope) { if (envelope.getMailbox() != this) { throw new RuntimeException("envelope.mailbox != this mailbox"); } queueCollection.post(queueId, envelope, true); }
[ "public", "void", "scheduleFirst", "(", "Envelope", "envelope", ")", "{", "if", "(", "envelope", ".", "getMailbox", "(", ")", "!=", "this", ")", "{", "throw", "new", "RuntimeException", "(", "\"envelope.mailbox != this mailbox\"", ")", ";", "}", "queueCollection...
Send envelope first @param envelope envelope
[ "Send", "envelope", "first" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/actors/dispatch/Mailbox.java#L46-L52
113,525
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/crypto/CRC32.java
CRC32.make_crc_table
private static int[] make_crc_table() { int[] crc_table = new int[256]; for (int n = 0; n < 256; n++) { int c = n; for (int k = 8; --k >= 0; ) { if ((c & 1) != 0) c = 0xedb88320 ^ (c >>> 1); else c = c >>> 1;...
java
private static int[] make_crc_table() { int[] crc_table = new int[256]; for (int n = 0; n < 256; n++) { int c = n; for (int k = 8; --k >= 0; ) { if ((c & 1) != 0) c = 0xedb88320 ^ (c >>> 1); else c = c >>> 1;...
[ "private", "static", "int", "[", "]", "make_crc_table", "(", ")", "{", "int", "[", "]", "crc_table", "=", "new", "int", "[", "256", "]", ";", "for", "(", "int", "n", "=", "0", ";", "n", "<", "256", ";", "n", "++", ")", "{", "int", "c", "=", ...
Make the table for a fast CRC.
[ "Make", "the", "table", "for", "a", "fast", "CRC", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/crypto/CRC32.java#L30-L43
113,526
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/crypto/CRC32.java
CRC32.update
public void update(int bval) { int c = ~crc; c = crc_table[(c ^ bval) & 0xff] ^ (c >>> 8); crc = ~c; }
java
public void update(int bval) { int c = ~crc; c = crc_table[(c ^ bval) & 0xff] ^ (c >>> 8); crc = ~c; }
[ "public", "void", "update", "(", "int", "bval", ")", "{", "int", "c", "=", "~", "crc", ";", "c", "=", "crc_table", "[", "(", "c", "^", "bval", ")", "&", "0xff", "]", "^", "(", "c", ">>>", "8", ")", ";", "crc", "=", "~", "c", ";", "}" ]
Updates the checksum with the int bval. @param bval (the byte is taken as the lower 8 bits of bval)
[ "Updates", "the", "checksum", "with", "the", "int", "bval", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/crypto/CRC32.java#L65-L69
113,527
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/crypto/CRC32.java
CRC32.update
public void update(byte[] buf, int off, int len) { int c = ~crc; while (--len >= 0) c = crc_table[(c ^ buf[off++]) & 0xff] ^ (c >>> 8); crc = ~c; }
java
public void update(byte[] buf, int off, int len) { int c = ~crc; while (--len >= 0) c = crc_table[(c ^ buf[off++]) & 0xff] ^ (c >>> 8); crc = ~c; }
[ "public", "void", "update", "(", "byte", "[", "]", "buf", ",", "int", "off", ",", "int", "len", ")", "{", "int", "c", "=", "~", "crc", ";", "while", "(", "--", "len", ">=", "0", ")", "c", "=", "crc_table", "[", "(", "c", "^", "buf", "[", "o...
Adds the byte array to the data checksum. @param buf the buffer which contains the data @param off the offset in the buffer where the data starts @param len the length of the data
[ "Adds", "the", "byte", "array", "to", "the", "data", "checksum", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/crypto/CRC32.java#L78-L83
113,528
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/util/Timing.java
Timing.end
public void end() { if (this.sectionName != null) { Log.d(TAG, "" + this.sectionName + " loaded in " + (ActorTime.currentTime() - sectionStart) + " ms"); this.sectionName = null; } }
java
public void end() { if (this.sectionName != null) { Log.d(TAG, "" + this.sectionName + " loaded in " + (ActorTime.currentTime() - sectionStart) + " ms"); this.sectionName = null; } }
[ "public", "void", "end", "(", ")", "{", "if", "(", "this", ".", "sectionName", "!=", "null", ")", "{", "Log", ".", "d", "(", "TAG", ",", "\"\"", "+", "this", ".", "sectionName", "+", "\" loaded in \"", "+", "(", "ActorTime", ".", "currentTime", "(", ...
Mark section end
[ "Mark", "section", "end" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/util/Timing.java#L42-L47
113,529
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDKLauncher.java
ActorSDKLauncher.startProfileActivity
public static void startProfileActivity(Context context, int uid) { // Ignore call if context is empty, simple work-around when fragment was disconnected from // activity if (context == null) { return; } Bundle b = new Bundle(); b.putInt(Intents.EXTRA...
java
public static void startProfileActivity(Context context, int uid) { // Ignore call if context is empty, simple work-around when fragment was disconnected from // activity if (context == null) { return; } Bundle b = new Bundle(); b.putInt(Intents.EXTRA...
[ "public", "static", "void", "startProfileActivity", "(", "Context", "context", ",", "int", "uid", ")", "{", "// Ignore call if context is empty, simple work-around when fragment was disconnected from", "// activity", "if", "(", "context", "==", "null", ")", "{", "return", ...
Launch User Profile Activity @param context current context @param uid user id
[ "Launch", "User", "Profile", "Activity" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDKLauncher.java#L19-L29
113,530
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/android/support/v7/widget/ChatLinearLayoutManager.java
ChatLinearLayoutManager.findFirstVisibleChildClosestToStart
private View findFirstVisibleChildClosestToStart(boolean completelyVisible, boolean acceptPartiallyVisible) { if (mShouldReverseLayout) { return findOneVisibleChild(getChildCount() - 1, -1, completelyVisible, acceptPartiallyVis...
java
private View findFirstVisibleChildClosestToStart(boolean completelyVisible, boolean acceptPartiallyVisible) { if (mShouldReverseLayout) { return findOneVisibleChild(getChildCount() - 1, -1, completelyVisible, acceptPartiallyVis...
[ "private", "View", "findFirstVisibleChildClosestToStart", "(", "boolean", "completelyVisible", ",", "boolean", "acceptPartiallyVisible", ")", "{", "if", "(", "mShouldReverseLayout", ")", "{", "return", "findOneVisibleChild", "(", "getChildCount", "(", ")", "-", "1", "...
Convenience method to find the visible child closes to start. Caller should check if it has enough children. @param completelyVisible Whether child should be completely visible or not @return The first visible child closest to start of the layout from user's perspective.
[ "Convenience", "method", "to", "find", "the", "visible", "child", "closes", "to", "start", ".", "Caller", "should", "check", "if", "it", "has", "enough", "children", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/android/support/v7/widget/ChatLinearLayoutManager.java#L1489-L1498
113,531
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/android/support/v7/widget/ChatLinearLayoutManager.java
ChatLinearLayoutManager.findFirstVisibleChildClosestToEnd
private View findFirstVisibleChildClosestToEnd(boolean completelyVisible, boolean acceptPartiallyVisible) { if (mShouldReverseLayout) { return findOneVisibleChild(0, getChildCount(), completelyVisible, acceptPartiallyVisible); ...
java
private View findFirstVisibleChildClosestToEnd(boolean completelyVisible, boolean acceptPartiallyVisible) { if (mShouldReverseLayout) { return findOneVisibleChild(0, getChildCount(), completelyVisible, acceptPartiallyVisible); ...
[ "private", "View", "findFirstVisibleChildClosestToEnd", "(", "boolean", "completelyVisible", ",", "boolean", "acceptPartiallyVisible", ")", "{", "if", "(", "mShouldReverseLayout", ")", "{", "return", "findOneVisibleChild", "(", "0", ",", "getChildCount", "(", ")", ","...
Convenience method to find the visible child closes to end. Caller should check if it has enough children. @param completelyVisible Whether child should be completely visible or not @return The first visible child closest to end of the layout from user's perspective.
[ "Convenience", "method", "to", "find", "the", "visible", "child", "closes", "to", "end", ".", "Caller", "should", "check", "if", "it", "has", "enough", "children", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/android/support/v7/widget/ChatLinearLayoutManager.java#L1507-L1516
113,532
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/webrtc/AndroidVideoSource.java
AndroidVideoSource.getVideoCapturer
private VideoCapturer getVideoCapturer() { String[] cameraFacing = {"front", "back"}; int[] cameraIndex = {0, 1}; int[] cameraOrientation = {0, 90, 180, 270}; for (String facing : cameraFacing) { for (int index : cameraIndex) { for (int orientation : cameraOri...
java
private VideoCapturer getVideoCapturer() { String[] cameraFacing = {"front", "back"}; int[] cameraIndex = {0, 1}; int[] cameraOrientation = {0, 90, 180, 270}; for (String facing : cameraFacing) { for (int index : cameraIndex) { for (int orientation : cameraOri...
[ "private", "VideoCapturer", "getVideoCapturer", "(", ")", "{", "String", "[", "]", "cameraFacing", "=", "{", "\"front\"", ",", "\"back\"", "}", ";", "int", "[", "]", "cameraIndex", "=", "{", "0", ",", "1", "}", ";", "int", "[", "]", "cameraOrientation", ...
capturer that works, or crash if none do.
[ "capturer", "that", "works", "or", "crash", "if", "none", "do", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/webrtc/AndroidVideoSource.java#L66-L83
113,533
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/conductor/ConductorActor.java
ConductorActor.onInitialDataDownloaded
public void onInitialDataDownloaded() { Log.d(TAG, "Initial Data Loaded"); context().getContactsModule().startImport(); if (appStateVM.isBookImported()) { onAppLoaded(); } }
java
public void onInitialDataDownloaded() { Log.d(TAG, "Initial Data Loaded"); context().getContactsModule().startImport(); if (appStateVM.isBookImported()) { onAppLoaded(); } }
[ "public", "void", "onInitialDataDownloaded", "(", ")", "{", "Log", ".", "d", "(", "TAG", ",", "\"Initial Data Loaded\"", ")", ";", "context", "(", ")", ".", "getContactsModule", "(", ")", ".", "startImport", "(", ")", ";", "if", "(", "appStateVM", ".", "...
Called after dialogs, contacts and settings are downloaded from server
[ "Called", "after", "dialogs", "contacts", "and", "settings", "are", "downloaded", "from", "server" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/conductor/ConductorActor.java#L96-L102
113,534
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/viewmodel/FileVM.java
FileVM.detach
@Override public void detach() { super.detach(); modules.getFilesModule().unbindFile(location.getFileId(), callback, false); }
java
@Override public void detach() { super.detach(); modules.getFilesModule().unbindFile(location.getFileId(), callback, false); }
[ "@", "Override", "public", "void", "detach", "(", ")", "{", "super", ".", "detach", "(", ")", ";", "modules", ".", "getFilesModule", "(", ")", ".", "unbindFile", "(", "location", ".", "getFileId", "(", ")", ",", "callback", ",", "false", ")", ";", "}...
Detach FileVM from Messenger. Don't use object after detaching.
[ "Detach", "FileVM", "from", "Messenger", ".", "Don", "t", "use", "object", "after", "detaching", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/viewmodel/FileVM.java#L71-L75
113,535
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java
MarkdownParser.processDocument
public MDDocument processDocument(String text) { TextCursor cursor = new TextCursor(text); ArrayList<MDSection> sections = new ArrayList<MDSection>(); while (handleCodeBlock(cursor, sections)) ; return new MDDocument(sections.toArray(new MDSection[sections.size()])); }
java
public MDDocument processDocument(String text) { TextCursor cursor = new TextCursor(text); ArrayList<MDSection> sections = new ArrayList<MDSection>(); while (handleCodeBlock(cursor, sections)) ; return new MDDocument(sections.toArray(new MDSection[sections.size()])); }
[ "public", "MDDocument", "processDocument", "(", "String", "text", ")", "{", "TextCursor", "cursor", "=", "new", "TextCursor", "(", "text", ")", ";", "ArrayList", "<", "MDSection", ">", "sections", "=", "new", "ArrayList", "<", "MDSection", ">", "(", ")", "...
Parsing markdown document @param text markdown text @return parsed document
[ "Parsing", "markdown", "document" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java#L28-L33
113,536
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java
MarkdownParser.handleTextBlock
private void handleTextBlock(TextCursor cursor, int blockEnd, ArrayList<MDSection> paragraphs) { MDText[] spans = handleSpans(cursor, blockEnd); paragraphs.add(new MDSection(spans)); cursor.currentOffset = blockEnd; }
java
private void handleTextBlock(TextCursor cursor, int blockEnd, ArrayList<MDSection> paragraphs) { MDText[] spans = handleSpans(cursor, blockEnd); paragraphs.add(new MDSection(spans)); cursor.currentOffset = blockEnd; }
[ "private", "void", "handleTextBlock", "(", "TextCursor", "cursor", ",", "int", "blockEnd", ",", "ArrayList", "<", "MDSection", ">", "paragraphs", ")", "{", "MDText", "[", "]", "spans", "=", "handleSpans", "(", "cursor", ",", "blockEnd", ")", ";", "paragraphs...
Processing text blocks between code blocks @param cursor text cursor @param blockEnd text block end @param paragraphs current paragraphs
[ "Processing", "text", "blocks", "between", "code", "blocks" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java#L85-L89
113,537
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java
MarkdownParser.handleSpans
private MDText[] handleSpans(TextCursor cursor, int blockEnd) { ArrayList<MDText> elements = new ArrayList<MDText>(); while (handleSpan(cursor, blockEnd, elements)) ; return elements.toArray(new MDText[elements.size()]); }
java
private MDText[] handleSpans(TextCursor cursor, int blockEnd) { ArrayList<MDText> elements = new ArrayList<MDText>(); while (handleSpan(cursor, blockEnd, elements)) ; return elements.toArray(new MDText[elements.size()]); }
[ "private", "MDText", "[", "]", "handleSpans", "(", "TextCursor", "cursor", ",", "int", "blockEnd", ")", "{", "ArrayList", "<", "MDText", ">", "elements", "=", "new", "ArrayList", "<", "MDText", ">", "(", ")", ";", "while", "(", "handleSpan", "(", "cursor...
Processing formatting spans @param cursor text cursor @param blockEnd code span search limit @return built text segments
[ "Processing", "formatting", "spans" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java#L98-L102
113,538
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java
MarkdownParser.handleRawText
private void handleRawText(TextCursor cursor, int limit, ArrayList<MDText> elements) { while (true) { BasicUrl url = findUrl(cursor, limit); if (url != null) { String link = cursor.text.substring(url.getStart(), url.getEnd()); // Handling text before url ...
java
private void handleRawText(TextCursor cursor, int limit, ArrayList<MDText> elements) { while (true) { BasicUrl url = findUrl(cursor, limit); if (url != null) { String link = cursor.text.substring(url.getStart(), url.getEnd()); // Handling text before url ...
[ "private", "void", "handleRawText", "(", "TextCursor", "cursor", ",", "int", "limit", ",", "ArrayList", "<", "MDText", ">", "elements", ")", "{", "while", "(", "true", ")", "{", "BasicUrl", "url", "=", "findUrl", "(", "cursor", ",", "limit", ")", ";", ...
Handling raw text block @param cursor text cursor @param limit text end @param elements current elements
[ "Handling", "raw", "text", "block" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java#L189-L211
113,539
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java
MarkdownParser.addText
private void addText(TextCursor cursor, int limit, ArrayList<MDText> elements) { if (cursor.currentOffset < limit) { elements.add(new MDRawText(cursor.text.substring(cursor.currentOffset, limit))); cursor.currentOffset = limit; } }
java
private void addText(TextCursor cursor, int limit, ArrayList<MDText> elements) { if (cursor.currentOffset < limit) { elements.add(new MDRawText(cursor.text.substring(cursor.currentOffset, limit))); cursor.currentOffset = limit; } }
[ "private", "void", "addText", "(", "TextCursor", "cursor", ",", "int", "limit", ",", "ArrayList", "<", "MDText", ">", "elements", ")", "{", "if", "(", "cursor", ".", "currentOffset", "<", "limit", ")", "{", "elements", ".", "add", "(", "new", "MDRawText"...
Adding raw simple text @param cursor text cursor @param limit text end @param elements current elements
[ "Adding", "raw", "simple", "text" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java#L220-L225
113,540
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java
MarkdownParser.findCodeBlockStart
private int findCodeBlockStart(TextCursor cursor) { int offset = cursor.currentOffset; int index; while ((index = cursor.text.indexOf(CODE_BLOCK, offset)) >= 0) { if (isGoodAnchor(cursor.text, index - 1)) { return index; } offset = index + 3; ...
java
private int findCodeBlockStart(TextCursor cursor) { int offset = cursor.currentOffset; int index; while ((index = cursor.text.indexOf(CODE_BLOCK, offset)) >= 0) { if (isGoodAnchor(cursor.text, index - 1)) { return index; } offset = index + 3; ...
[ "private", "int", "findCodeBlockStart", "(", "TextCursor", "cursor", ")", "{", "int", "offset", "=", "cursor", ".", "currentOffset", ";", "int", "index", ";", "while", "(", "(", "index", "=", "cursor", ".", "text", ".", "indexOf", "(", "CODE_BLOCK", ",", ...
Searching for valid code block begin @param cursor text cursor @return code block start, -1 if not found
[ "Searching", "for", "valid", "code", "block", "begin" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java#L233-L243
113,541
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java
MarkdownParser.findCodeBlockEnd
private int findCodeBlockEnd(TextCursor cursor, int blockStart) { int offset = blockStart + 3; int index; while ((index = cursor.text.indexOf(CODE_BLOCK, offset)) >= 0) { if (isGoodAnchor(cursor.text, index + 3)) { return index + 3; } offset = ...
java
private int findCodeBlockEnd(TextCursor cursor, int blockStart) { int offset = blockStart + 3; int index; while ((index = cursor.text.indexOf(CODE_BLOCK, offset)) >= 0) { if (isGoodAnchor(cursor.text, index + 3)) { return index + 3; } offset = ...
[ "private", "int", "findCodeBlockEnd", "(", "TextCursor", "cursor", ",", "int", "blockStart", ")", "{", "int", "offset", "=", "blockStart", "+", "3", ";", "int", "index", ";", "while", "(", "(", "index", "=", "cursor", ".", "text", ".", "indexOf", "(", ...
Searching for valid code block end @param cursor text cursor @param blockStart start of expected code block @return code block end, -1 if not found
[ "Searching", "for", "valid", "code", "block", "end" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java#L252-L262
113,542
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java
MarkdownParser.findSpanStart
private int findSpanStart(TextCursor cursor, int limit) { for (int i = cursor.currentOffset; i < limit; i++) { char c = cursor.text.charAt(i); if (c == '*' || c == '_') { // Check prev and next symbols if (isGoodAnchor(cursor.text, i - 1) && isNotSymbol(cu...
java
private int findSpanStart(TextCursor cursor, int limit) { for (int i = cursor.currentOffset; i < limit; i++) { char c = cursor.text.charAt(i); if (c == '*' || c == '_') { // Check prev and next symbols if (isGoodAnchor(cursor.text, i - 1) && isNotSymbol(cu...
[ "private", "int", "findSpanStart", "(", "TextCursor", "cursor", ",", "int", "limit", ")", "{", "for", "(", "int", "i", "=", "cursor", ".", "currentOffset", ";", "i", "<", "limit", ";", "i", "++", ")", "{", "char", "c", "=", "cursor", ".", "text", "...
Searching for valid formatting span start @param cursor text cursor @param limit maximum index in cursor @return span start, -1 if not found
[ "Searching", "for", "valid", "formatting", "span", "start" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java#L271-L282
113,543
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java
MarkdownParser.findSpanEnd
private int findSpanEnd(TextCursor cursor, int spanStart, int limit, char span) { for (int i = spanStart + 1; i < limit; i++) { char c = cursor.text.charAt(i); if (c == span) { // Check prev and next symbols if (isGoodAnchor(cursor.text, i + 1) && isNotSym...
java
private int findSpanEnd(TextCursor cursor, int spanStart, int limit, char span) { for (int i = spanStart + 1; i < limit; i++) { char c = cursor.text.charAt(i); if (c == span) { // Check prev and next symbols if (isGoodAnchor(cursor.text, i + 1) && isNotSym...
[ "private", "int", "findSpanEnd", "(", "TextCursor", "cursor", ",", "int", "spanStart", ",", "int", "limit", ",", "char", "span", ")", "{", "for", "(", "int", "i", "=", "spanStart", "+", "1", ";", "i", "<", "limit", ";", "i", "++", ")", "{", "char",...
Searching for valid formatting span end @param cursor text cursor @param spanStart expected span start @param limit maximum index in cursor @param span span control character @return span end, -1 if not found
[ "Searching", "for", "valid", "formatting", "span", "end" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java#L293-L304
113,544
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java
MarkdownParser.findFormattedUrl
private TitledUrl findFormattedUrl(TextCursor cursor, int limit) { start_loop: for (int start = cursor.currentOffset; start < limit; start++) { // Finding beginning of url if (cursor.text.charAt(start) == '[') { if (!isGoodAnchor(cursor.text, start - 1)) { ...
java
private TitledUrl findFormattedUrl(TextCursor cursor, int limit) { start_loop: for (int start = cursor.currentOffset; start < limit; start++) { // Finding beginning of url if (cursor.text.charAt(start) == '[') { if (!isGoodAnchor(cursor.text, start - 1)) { ...
[ "private", "TitledUrl", "findFormattedUrl", "(", "TextCursor", "cursor", ",", "int", "limit", ")", "{", "start_loop", ":", "for", "(", "int", "start", "=", "cursor", ".", "currentOffset", ";", "start", "<", "limit", ";", "start", "++", ")", "{", "// Findin...
Searching for valid formatted url @param cursor current cursor @param limit search limit @return found url, null if not found
[ "Searching", "for", "valid", "formatted", "url" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java#L313-L344
113,545
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java
MarkdownParser.findUrl
private BasicUrl findUrl(TextCursor cursor, int limit) { for (int i = cursor.currentOffset; i < limit; i++) { if (!isGoodAnchor(cursor.text, i - 1)) { continue; } String currentText = cursor.text.substring(i, limit); MatcherCompat matcher = Pattern...
java
private BasicUrl findUrl(TextCursor cursor, int limit) { for (int i = cursor.currentOffset; i < limit; i++) { if (!isGoodAnchor(cursor.text, i - 1)) { continue; } String currentText = cursor.text.substring(i, limit); MatcherCompat matcher = Pattern...
[ "private", "BasicUrl", "findUrl", "(", "TextCursor", "cursor", ",", "int", "limit", ")", "{", "for", "(", "int", "i", "=", "cursor", ".", "currentOffset", ";", "i", "<", "limit", ";", "i", "++", ")", "{", "if", "(", "!", "isGoodAnchor", "(", "cursor"...
Finding non-formatted urls in texts @param cursor current text cursor @param limit end of cursor @return founded url
[ "Finding", "non", "-", "formatted", "urls", "in", "texts" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java#L353-L367
113,546
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java
MarkdownParser.isGoodAnchor
private boolean isGoodAnchor(String text, int index) { // Check if there is space and punctuation mark after block String punct = " .,:!?\t\n"; if (index >= 0 && index < text.length()) { if (punct.indexOf(text.charAt(index)) == -1) { return false; } ...
java
private boolean isGoodAnchor(String text, int index) { // Check if there is space and punctuation mark after block String punct = " .,:!?\t\n"; if (index >= 0 && index < text.length()) { if (punct.indexOf(text.charAt(index)) == -1) { return false; } ...
[ "private", "boolean", "isGoodAnchor", "(", "String", "text", ",", "int", "index", ")", "{", "// Check if there is space and punctuation mark after block", "String", "punct", "=", "\" .,:!?\\t\\n\"", ";", "if", "(", "index", ">=", "0", "&&", "index", "<", "text", "...
Test if symbol at index is space or out of string bounds @param text text @param index char to test @return is good anchor
[ "Test", "if", "symbol", "at", "index", "is", "space", "or", "out", "of", "string", "bounds" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java#L376-L386
113,547
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java
MarkdownParser.isNotSymbol
private boolean isNotSymbol(String text, int index, char c) { if (index >= 0 && index < text.length()) { return text.charAt(index) != c; } return true; }
java
private boolean isNotSymbol(String text, int index, char c) { if (index >= 0 && index < text.length()) { return text.charAt(index) != c; } return true; }
[ "private", "boolean", "isNotSymbol", "(", "String", "text", ",", "int", "index", ",", "char", "c", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "text", ".", "length", "(", ")", ")", "{", "return", "text", ".", "charAt", "(", "index"...
Checking if symbol is not eq to c @param text @param index @param c @return
[ "Checking", "if", "symbol", "is", "not", "eq", "to", "c" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java#L396-L402
113,548
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/collections/GrowingArrayUtils.java
GrowingArrayUtils.append
public static <T> T[] append(T[] array, int currentSize, T element) { assert currentSize <= array.length; if (currentSize + 1 > array.length) { @SuppressWarnings("unchecked") T[] newArray = (T[]) new Object[growSize(currentSize)]; System.arraycopy(array, 0, newArray,...
java
public static <T> T[] append(T[] array, int currentSize, T element) { assert currentSize <= array.length; if (currentSize + 1 > array.length) { @SuppressWarnings("unchecked") T[] newArray = (T[]) new Object[growSize(currentSize)]; System.arraycopy(array, 0, newArray,...
[ "public", "static", "<", "T", ">", "T", "[", "]", "append", "(", "T", "[", "]", "array", ",", "int", "currentSize", ",", "T", "element", ")", "{", "assert", "currentSize", "<=", "array", ".", "length", ";", "if", "(", "currentSize", "+", "1", ">", ...
Appends an element to the end of the array, growing the array if there is no more room. @param array The array to which to append the element. This must NOT be null. @param currentSize The number of elements in the array. Must be less than or equal to array.length. @param element The element to append. @retu...
[ "Appends", "an", "element", "to", "the", "end", "of", "the", "array", "growing", "the", "array", "if", "there", "is", "no", "more", "room", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/collections/GrowingArrayUtils.java#L41-L52
113,549
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/collections/GrowingArrayUtils.java
GrowingArrayUtils.insert
public static <T> T[] insert(T[] array, int currentSize, int index, T element) { assert currentSize <= array.length; if (currentSize + 1 <= array.length) { System.arraycopy(array, index, array, index + 1, currentSize - index); array[index] = element; return array; ...
java
public static <T> T[] insert(T[] array, int currentSize, int index, T element) { assert currentSize <= array.length; if (currentSize + 1 <= array.length) { System.arraycopy(array, index, array, index + 1, currentSize - index); array[index] = element; return array; ...
[ "public", "static", "<", "T", ">", "T", "[", "]", "insert", "(", "T", "[", "]", "array", ",", "int", "currentSize", ",", "int", "index", ",", "T", "element", ")", "{", "assert", "currentSize", "<=", "array", ".", "length", ";", "if", "(", "currentS...
Inserts an element into the array at the specified index, growing the array if there is no more room. @param array The array to which to append the element. Must NOT be null. @param currentSize The number of elements in the array. Must be less than or equal to array.length. @param element The element to inse...
[ "Inserts", "an", "element", "into", "the", "array", "at", "the", "specified", "index", "growing", "the", "array", "if", "there", "is", "no", "more", "room", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/collections/GrowingArrayUtils.java#L110-L125
113,550
actorapp/actor-platform
actor-sdk/sdk-core-android/android-app/src/main/java/im/actor/tour/VerticalViewPager.java
VerticalViewPager.setInternalPageChangeListener
ViewPager.OnPageChangeListener setInternalPageChangeListener(ViewPager.OnPageChangeListener listener) { ViewPager.OnPageChangeListener oldListener = mInternalPageChangeListener; mInternalPageChangeListener = listener; return oldListener; }
java
ViewPager.OnPageChangeListener setInternalPageChangeListener(ViewPager.OnPageChangeListener listener) { ViewPager.OnPageChangeListener oldListener = mInternalPageChangeListener; mInternalPageChangeListener = listener; return oldListener; }
[ "ViewPager", ".", "OnPageChangeListener", "setInternalPageChangeListener", "(", "ViewPager", ".", "OnPageChangeListener", "listener", ")", "{", "ViewPager", ".", "OnPageChangeListener", "oldListener", "=", "mInternalPageChangeListener", ";", "mInternalPageChangeListener", "=", ...
Set a separate OnPageChangeListener for internal use by the support library. @param listener Listener to set @return The old listener that was set, if any.
[ "Set", "a", "separate", "OnPageChangeListener", "for", "internal", "use", "by", "the", "support", "library", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-app/src/main/java/im/actor/tour/VerticalViewPager.java#L518-L522
113,551
actorapp/actor-platform
actor-sdk/sdk-core/core/core-js/src/main/java/im/actor/core/js/modules/JsFilesModule.java
JsFilesModule.getFileUrl
public String getFileUrl(long id, long accessHash) { CachedFileUrl cachedFileUrl = keyValueStorage.getValue(id); if (cachedFileUrl != null) { long urlTime = cachedFileUrl.getTimeout(); long currentTime = im.actor.runtime.Runtime.getCurrentSyncedTime(); if (urlTime <= ...
java
public String getFileUrl(long id, long accessHash) { CachedFileUrl cachedFileUrl = keyValueStorage.getValue(id); if (cachedFileUrl != null) { long urlTime = cachedFileUrl.getTimeout(); long currentTime = im.actor.runtime.Runtime.getCurrentSyncedTime(); if (urlTime <= ...
[ "public", "String", "getFileUrl", "(", "long", "id", ",", "long", "accessHash", ")", "{", "CachedFileUrl", "cachedFileUrl", "=", "keyValueStorage", ".", "getValue", "(", "id", ")", ";", "if", "(", "cachedFileUrl", "!=", "null", ")", "{", "long", "urlTime", ...
Getting URL for file if available @param id file's id @param accessHash file's accessHash @return url for a file or null if not yet available
[ "Getting", "URL", "for", "file", "if", "available" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-js/src/main/java/im/actor/core/js/modules/JsFilesModule.java#L93-L112
113,552
actorapp/actor-platform
actor-server/actor-frontend/src/main/java/im/actor/crypto/primitives/kuznechik/KuznechikMath.java
KuznechikMath.kuz_mul_gf256
public static byte kuz_mul_gf256(byte x, byte y) { // uint8_t z; // z = 0; byte z = 0; // while (y) { while ((y & 0xFF) != 0) { // if (y & 1) if ((y & 1) != 0) { // z ^= x; z ^= x; } // x = (x << 1)...
java
public static byte kuz_mul_gf256(byte x, byte y) { // uint8_t z; // z = 0; byte z = 0; // while (y) { while ((y & 0xFF) != 0) { // if (y & 1) if ((y & 1) != 0) { // z ^= x; z ^= x; } // x = (x << 1)...
[ "public", "static", "byte", "kuz_mul_gf256", "(", "byte", "x", ",", "byte", "y", ")", "{", "// uint8_t z;", "// z = 0;", "byte", "z", "=", "0", ";", "// while (y) {", "while", "(", "(", "y", "&", "0xFF", ")", "!=", "0", ")", "{", "// if (y & 1)", "if",...
totally not constant time
[ "totally", "not", "constant", "time" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-server/actor-frontend/src/main/java/im/actor/crypto/primitives/kuznechik/KuznechikMath.java#L17-L38
113,553
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/time/SntpClient.java
SntpClient.requestTime
public boolean requestTime(String host, int timeout) { DatagramSocket socket = null; try { socket = new DatagramSocket(); socket.setSoTimeout(timeout); InetAddress address = InetAddress.getByName(host); byte[] buffer = new byte[NTP_PACKET_SIZE]; ...
java
public boolean requestTime(String host, int timeout) { DatagramSocket socket = null; try { socket = new DatagramSocket(); socket.setSoTimeout(timeout); InetAddress address = InetAddress.getByName(host); byte[] buffer = new byte[NTP_PACKET_SIZE]; ...
[ "public", "boolean", "requestTime", "(", "String", "host", ",", "int", "timeout", ")", "{", "DatagramSocket", "socket", "=", "null", ";", "try", "{", "socket", "=", "new", "DatagramSocket", "(", ")", ";", "socket", ".", "setSoTimeout", "(", "timeout", ")",...
Sends an SNTP request to the given host and processes the response. @param host host name of the server. @param timeout network timeout in milliseconds. @return true if the transaction was successful.
[ "Sends", "an", "SNTP", "request", "to", "the", "given", "host", "and", "processes", "the", "response", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/time/SntpClient.java#L72-L130
113,554
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/time/SntpClient.java
SntpClient.read32
private long read32(byte[] buffer, int offset) { byte b0 = buffer[offset]; byte b1 = buffer[offset + 1]; byte b2 = buffer[offset + 2]; byte b3 = buffer[offset + 3]; // convert signed bytes to unsigned values int i0 = ((b0 & 0x80) == 0x80 ? (b0 & 0x7F) + 0x80 : b0); ...
java
private long read32(byte[] buffer, int offset) { byte b0 = buffer[offset]; byte b1 = buffer[offset + 1]; byte b2 = buffer[offset + 2]; byte b3 = buffer[offset + 3]; // convert signed bytes to unsigned values int i0 = ((b0 & 0x80) == 0x80 ? (b0 & 0x7F) + 0x80 : b0); ...
[ "private", "long", "read32", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ")", "{", "byte", "b0", "=", "buffer", "[", "offset", "]", ";", "byte", "b1", "=", "buffer", "[", "offset", "+", "1", "]", ";", "byte", "b2", "=", "buffer", "[", ...
Reads an unsigned 32 bit big endian number from the given offset in the buffer.
[ "Reads", "an", "unsigned", "32", "bit", "big", "endian", "number", "from", "the", "given", "offset", "in", "the", "buffer", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/time/SntpClient.java#L167-L180
113,555
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-clc/src/main/java/im/actor/runtime/clc/ClcListStorage.java
ClcListStorage.countAll
public int countAll(){ checkTable(); Cursor mCount = null; try { mCount = database.rawQuery("SELECT COUNT(*) FROM \"" + tableName + "\"", null); if (mCount.moveToNext()) { return mCount.getInt(1); } } finally { if (mCount !...
java
public int countAll(){ checkTable(); Cursor mCount = null; try { mCount = database.rawQuery("SELECT COUNT(*) FROM \"" + tableName + "\"", null); if (mCount.moveToNext()) { return mCount.getInt(1); } } finally { if (mCount !...
[ "public", "int", "countAll", "(", ")", "{", "checkTable", "(", ")", ";", "Cursor", "mCount", "=", "null", ";", "try", "{", "mCount", "=", "database", ".", "rawQuery", "(", "\"SELECT COUNT(*) FROM \\\"\"", "+", "tableName", "+", "\"\\\"\"", ",", "null", ")"...
Just for unit test
[ "Just", "for", "unit", "test" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-clc/src/main/java/im/actor/runtime/clc/ClcListStorage.java#L314-L329
113,556
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/adapters/HeaderViewRecyclerAdapter.java
HeaderViewRecyclerAdapter.setAdapter
public void setAdapter(RecyclerView.Adapter adapter) { if (mWrappedAdapter != null && mWrappedAdapter.getItemCount() > 0) { notifyItemRangeRemoved(getHeaderCount(), mWrappedAdapter.getItemCount()); } setWrappedAdapter(adapter); notifyItemRangeInserted(getHeaderCount(), mWrapp...
java
public void setAdapter(RecyclerView.Adapter adapter) { if (mWrappedAdapter != null && mWrappedAdapter.getItemCount() > 0) { notifyItemRangeRemoved(getHeaderCount(), mWrappedAdapter.getItemCount()); } setWrappedAdapter(adapter); notifyItemRangeInserted(getHeaderCount(), mWrapp...
[ "public", "void", "setAdapter", "(", "RecyclerView", ".", "Adapter", "adapter", ")", "{", "if", "(", "mWrappedAdapter", "!=", "null", "&&", "mWrappedAdapter", ".", "getItemCount", "(", ")", ">", "0", ")", "{", "notifyItemRangeRemoved", "(", "getHeaderCount", "...
Replaces the underlying adapter, notifying RecyclerView of changes @param adapter The new adapter to wrap
[ "Replaces", "the", "underlying", "adapter", "notifying", "RecyclerView", "of", "changes" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/adapters/HeaderViewRecyclerAdapter.java#L79-L85
113,557
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/crypto/Base64Utils.java
Base64Utils.longFromBase64
public static long longFromBase64(String value) { int pos = 0; long longVal = base64Values[value.charAt(pos++)]; int len = value.length(); while (pos < len) { longVal <<= 6; longVal |= base64Values[value.charAt(pos++)]; } return longVal; }
java
public static long longFromBase64(String value) { int pos = 0; long longVal = base64Values[value.charAt(pos++)]; int len = value.length(); while (pos < len) { longVal <<= 6; longVal |= base64Values[value.charAt(pos++)]; } return longVal; }
[ "public", "static", "long", "longFromBase64", "(", "String", "value", ")", "{", "int", "pos", "=", "0", ";", "long", "longVal", "=", "base64Values", "[", "value", ".", "charAt", "(", "pos", "++", ")", "]", ";", "int", "len", "=", "value", ".", "lengt...
Decode a base64 string into a long value.
[ "Decode", "a", "base64", "string", "into", "a", "long", "value", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/crypto/Base64Utils.java#L118-L127
113,558
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/actors/ActorRef.java
ActorRef.send
public void send(Object message, ActorRef sender) { endpoint.getMailbox().schedule(new Envelope(message, endpoint.getScope(), endpoint.getMailbox(), sender)); }
java
public void send(Object message, ActorRef sender) { endpoint.getMailbox().schedule(new Envelope(message, endpoint.getScope(), endpoint.getMailbox(), sender)); }
[ "public", "void", "send", "(", "Object", "message", ",", "ActorRef", "sender", ")", "{", "endpoint", ".", "getMailbox", "(", ")", ".", "schedule", "(", "new", "Envelope", "(", "message", ",", "endpoint", ".", "getScope", "(", ")", ",", "endpoint", ".", ...
Send message with specified sender @param message message @param sender sender
[ "Send", "message", "with", "specified", "sender" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/actors/ActorRef.java#L65-L67
113,559
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/actors/ActorRef.java
ActorRef.sendFirst
public void sendFirst(Object message, ActorRef sender) { endpoint.getMailbox().scheduleFirst(new Envelope(message, endpoint.getScope(), endpoint.getMailbox(), sender)); }
java
public void sendFirst(Object message, ActorRef sender) { endpoint.getMailbox().scheduleFirst(new Envelope(message, endpoint.getScope(), endpoint.getMailbox(), sender)); }
[ "public", "void", "sendFirst", "(", "Object", "message", ",", "ActorRef", "sender", ")", "{", "endpoint", ".", "getMailbox", "(", ")", ".", "scheduleFirst", "(", "new", "Envelope", "(", "message", ",", "endpoint", ".", "getScope", "(", ")", ",", "endpoint"...
Sending message before all other messages @param message message @param sender sender
[ "Sending", "message", "before", "all", "other", "messages" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/actors/ActorRef.java#L75-L77
113,560
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/calls/UnhandledExceptionHandler.java
UnhandledExceptionHandler.getTopLevelCauseMessage
private static String getTopLevelCauseMessage(Throwable t) { Throwable topLevelCause = t; while (topLevelCause.getCause() != null) { topLevelCause = topLevelCause.getCause(); } return topLevelCause.getMessage(); }
java
private static String getTopLevelCauseMessage(Throwable t) { Throwable topLevelCause = t; while (topLevelCause.getCause() != null) { topLevelCause = topLevelCause.getCause(); } return topLevelCause.getMessage(); }
[ "private", "static", "String", "getTopLevelCauseMessage", "(", "Throwable", "t", ")", "{", "Throwable", "topLevelCause", "=", "t", ";", "while", "(", "topLevelCause", ".", "getCause", "(", ")", "!=", "null", ")", "{", "topLevelCause", "=", "topLevelCause", "."...
Returns the Message attached to the original Cause of |t|.
[ "Returns", "the", "Message", "attached", "to", "the", "original", "Cause", "of", "|t|", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/calls/UnhandledExceptionHandler.java#L90-L96
113,561
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/ActorToolbar.java
ActorToolbar.colorizeToolbar
public static void colorizeToolbar(Toolbar toolbarView, int toolbarIconsColor, Activity activity) { final PorterDuffColorFilter colorFilter = new PorterDuffColorFilter(toolbarIconsColor, PorterDuff.Mode.SRC_IN); for (int i = 0; i < toolbarView.getChildCount(); i++) { final V...
java
public static void colorizeToolbar(Toolbar toolbarView, int toolbarIconsColor, Activity activity) { final PorterDuffColorFilter colorFilter = new PorterDuffColorFilter(toolbarIconsColor, PorterDuff.Mode.SRC_IN); for (int i = 0; i < toolbarView.getChildCount(); i++) { final V...
[ "public", "static", "void", "colorizeToolbar", "(", "Toolbar", "toolbarView", ",", "int", "toolbarIconsColor", ",", "Activity", "activity", ")", "{", "final", "PorterDuffColorFilter", "colorFilter", "=", "new", "PorterDuffColorFilter", "(", "toolbarIconsColor", ",", "...
Use this method to colorize toolbar icons to the desired target color @param toolbarView toolbar view being colored @param toolbarIconsColor the target color of toolbar icons @param activity reference to activity needed to register observers
[ "Use", "this", "method", "to", "colorize", "toolbar", "icons", "to", "the", "desired", "target", "color" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/ActorToolbar.java#L64-L77
113,562
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/encryption/SessionManagerActor.java
SessionManagerActor.pickSession
public Promise<PeerSession> pickSession(final int uid, final int keyGroupId, final long ownKeyId, final long theirKeyId) { return pickCachedSession(uid, keyGroupId, ownKeyId, thei...
java
public Promise<PeerSession> pickSession(final int uid, final int keyGroupId, final long ownKeyId, final long theirKeyId) { return pickCachedSession(uid, keyGroupId, ownKeyId, thei...
[ "public", "Promise", "<", "PeerSession", ">", "pickSession", "(", "final", "int", "uid", ",", "final", "int", "keyGroupId", ",", "final", "long", "ownKeyId", ",", "final", "long", "theirKeyId", ")", "{", "return", "pickCachedSession", "(", "uid", ",", "keyGr...
Pick session for specific keys @param uid User's id @param keyGroupId User's key group @param ownKeyId Own Pre Key id @param theirKeyId Their Pre Key id
[ "Pick", "session", "for", "specific", "keys" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/encryption/SessionManagerActor.java#L126-L159
113,563
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/encryption/SessionManagerActor.java
SessionManagerActor.spawnSession
private PeerSession spawnSession(int uid, int ownKeyGroup, int theirKeyGroup, PrivateKey ownIdentity, PublicKey theirIdentity, PrivateK...
java
private PeerSession spawnSession(int uid, int ownKeyGroup, int theirKeyGroup, PrivateKey ownIdentity, PublicKey theirIdentity, PrivateK...
[ "private", "PeerSession", "spawnSession", "(", "int", "uid", ",", "int", "ownKeyGroup", ",", "int", "theirKeyGroup", ",", "PrivateKey", "ownIdentity", ",", "PublicKey", "theirIdentity", ",", "PrivateKey", "ownPreKey", ",", "PublicKey", "theirPreKey", ")", "{", "//...
Spawn new session @param uid user's id @param ownKeyGroup own key group id @param theirKeyGroup their key group Id @param ownIdentity own identity private key @param theirIdentity their identity public key @param ownPreKey own pre key @param theirPreKey their pre key @return spawned session
[ "Spawn", "new", "session" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/encryption/SessionManagerActor.java#L173-L216
113,564
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/encryption/SessionManagerActor.java
SessionManagerActor.pickCachedSession
private Promise<PeerSession> pickCachedSession(int uid, final int keyGroupId) { return ManagedList.of(peerSessions.getValue(uid)) .flatMap(PeerSessionsStorage.SESSIONS) .filter(PeerSession.BY_THEIR_GROUP(keyGroupId)) .sorted(PeerSession.COMPARATOR) ...
java
private Promise<PeerSession> pickCachedSession(int uid, final int keyGroupId) { return ManagedList.of(peerSessions.getValue(uid)) .flatMap(PeerSessionsStorage.SESSIONS) .filter(PeerSession.BY_THEIR_GROUP(keyGroupId)) .sorted(PeerSession.COMPARATOR) ...
[ "private", "Promise", "<", "PeerSession", ">", "pickCachedSession", "(", "int", "uid", ",", "final", "int", "keyGroupId", ")", "{", "return", "ManagedList", ".", "of", "(", "peerSessions", ".", "getValue", "(", "uid", ")", ")", ".", "flatMap", "(", "PeerSe...
Picking cached session @param uid User's id @param keyGroupId Key Group Id @return promise of session
[ "Picking", "cached", "session" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/encryption/SessionManagerActor.java#L225-L231
113,565
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageDrawing.java
ImageDrawing.drawTo
public static void drawTo(Bitmap src, Bitmap dest, int color) { clearBitmap(src, color); Canvas canvas = new Canvas(dest); canvas.drawBitmap(src, 0, 0, null); canvas.setBitmap(null); }
java
public static void drawTo(Bitmap src, Bitmap dest, int color) { clearBitmap(src, color); Canvas canvas = new Canvas(dest); canvas.drawBitmap(src, 0, 0, null); canvas.setBitmap(null); }
[ "public", "static", "void", "drawTo", "(", "Bitmap", "src", ",", "Bitmap", "dest", ",", "int", "color", ")", "{", "clearBitmap", "(", "src", ",", "color", ")", ";", "Canvas", "canvas", "=", "new", "Canvas", "(", "dest", ")", ";", "canvas", ".", "draw...
Drawing bitmap over dest bitmap with clearing last one before drawing @param src source bitmap @param dest destination bitmap @param color clear color
[ "Drawing", "bitmap", "over", "dest", "bitmap", "with", "clearing", "last", "one", "before", "drawing" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageDrawing.java#L54-L59
113,566
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageDrawing.java
ImageDrawing.drawInRound
public static void drawInRound(Bitmap src, Bitmap dest, int clearColor) { if (dest.getWidth() != dest.getHeight()) { throw new RuntimeException("dest Bitmap must have square size"); } clearBitmap(dest, clearColor); Canvas canvas = new Canvas(dest); int r = dest.getWi...
java
public static void drawInRound(Bitmap src, Bitmap dest, int clearColor) { if (dest.getWidth() != dest.getHeight()) { throw new RuntimeException("dest Bitmap must have square size"); } clearBitmap(dest, clearColor); Canvas canvas = new Canvas(dest); int r = dest.getWi...
[ "public", "static", "void", "drawInRound", "(", "Bitmap", "src", ",", "Bitmap", "dest", ",", "int", "clearColor", ")", "{", "if", "(", "dest", ".", "getWidth", "(", ")", "!=", "dest", ".", "getHeight", "(", ")", ")", "{", "throw", "new", "RuntimeExcept...
Drawing src bitmap to dest bitmap with round mask. Dest might be squared, src is recommended to be square @param src source bitmap @param dest destination bitmap @param clearColor clear color
[ "Drawing", "src", "bitmap", "to", "dest", "bitmap", "with", "round", "mask", ".", "Dest", "might", "be", "squared", "src", "is", "recommended", "to", "be", "square" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageDrawing.java#L165-L191
113,567
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageScaling.java
ImageScaling.scaleFill
public static Bitmap scaleFill(Bitmap src, int w, int h) { Bitmap res = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888); scaleFill(src, res); return res; }
java
public static Bitmap scaleFill(Bitmap src, int w, int h) { Bitmap res = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888); scaleFill(src, res); return res; }
[ "public", "static", "Bitmap", "scaleFill", "(", "Bitmap", "src", ",", "int", "w", ",", "int", "h", ")", "{", "Bitmap", "res", "=", "Bitmap", ".", "createBitmap", "(", "w", ",", "h", ",", "Bitmap", ".", "Config", ".", "ARGB_8888", ")", ";", "scaleFill...
Scaling bitmap to fill rect with centering. Method keep aspect ratio. @param src source bitmap @param w width of result @param h height of result @return scaled bitmap
[ "Scaling", "bitmap", "to", "fill", "rect", "with", "centering", ".", "Method", "keep", "aspect", "ratio", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageScaling.java#L23-L27
113,568
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageScaling.java
ImageScaling.scaleFill
public static void scaleFill(Bitmap src, Bitmap dest, int clearColor) { float ratio = Math.max(dest.getWidth() / (float) src.getWidth(), dest.getHeight() / (float) src.getHeight()); int newW = (int) (src.getWidth() * ratio); int newH = (int) (src.getHeight() * ratio); int paddingTop = (d...
java
public static void scaleFill(Bitmap src, Bitmap dest, int clearColor) { float ratio = Math.max(dest.getWidth() / (float) src.getWidth(), dest.getHeight() / (float) src.getHeight()); int newW = (int) (src.getWidth() * ratio); int newH = (int) (src.getHeight() * ratio); int paddingTop = (d...
[ "public", "static", "void", "scaleFill", "(", "Bitmap", "src", ",", "Bitmap", "dest", ",", "int", "clearColor", ")", "{", "float", "ratio", "=", "Math", ".", "max", "(", "dest", ".", "getWidth", "(", ")", "/", "(", "float", ")", "src", ".", "getWidth...
Scaling src bitmap to fill dest bitmap with centering. Method keep aspect ratio. @param src source bitmap @param dest destination bitmap @param clearColor color for clearing dest before drawing
[ "Scaling", "src", "bitmap", "to", "fill", "dest", "bitmap", "with", "centering", ".", "Method", "keep", "aspect", "ratio", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageScaling.java#L46-L56
113,569
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageScaling.java
ImageScaling.scaleFit
public static void scaleFit(Bitmap src, Bitmap dest, int clearColor) { float ratio = Math.min(dest.getWidth() / (float) src.getWidth(), dest.getHeight() / (float) src.getHeight()); int newW = (int) (src.getWidth() * ratio); int newH = (int) (src.getHeight() * ratio); int paddingTop = (de...
java
public static void scaleFit(Bitmap src, Bitmap dest, int clearColor) { float ratio = Math.min(dest.getWidth() / (float) src.getWidth(), dest.getHeight() / (float) src.getHeight()); int newW = (int) (src.getWidth() * ratio); int newH = (int) (src.getHeight() * ratio); int paddingTop = (de...
[ "public", "static", "void", "scaleFit", "(", "Bitmap", "src", ",", "Bitmap", "dest", ",", "int", "clearColor", ")", "{", "float", "ratio", "=", "Math", ".", "min", "(", "dest", ".", "getWidth", "(", ")", "/", "(", "float", ")", "src", ".", "getWidth"...
Scaling src Bitmap to fit and cenetered in dest bitmap. Method keep aspect ratio. @param src source bitmap @param dest destination bitmap @param clearColor color for clearing dest before drawing
[ "Scaling", "src", "Bitmap", "to", "fit", "and", "cenetered", "in", "dest", "bitmap", ".", "Method", "keep", "aspect", "ratio", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageScaling.java#L90-L100
113,570
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageScaling.java
ImageScaling.scale
public static Bitmap scale(Bitmap src, int dw, int dh) { Bitmap res = Bitmap.createBitmap(dw, dh, Bitmap.Config.ARGB_8888); scale(src, res); return res; }
java
public static Bitmap scale(Bitmap src, int dw, int dh) { Bitmap res = Bitmap.createBitmap(dw, dh, Bitmap.Config.ARGB_8888); scale(src, res); return res; }
[ "public", "static", "Bitmap", "scale", "(", "Bitmap", "src", ",", "int", "dw", ",", "int", "dh", ")", "{", "Bitmap", "res", "=", "Bitmap", ".", "createBitmap", "(", "dw", ",", "dh", ",", "Bitmap", ".", "Config", ".", "ARGB_8888", ")", ";", "scale", ...
Scaling bitmap to specific width and height without keeping aspect ratio. @param src source bitmap @param dw new width @param dh new height @return scaled bitmap
[ "Scaling", "bitmap", "to", "specific", "width", "and", "height", "without", "keeping", "aspect", "ratio", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageScaling.java#L110-L114
113,571
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/json/JSONObject.java
JSONObject.wrap
public static Object wrap(Object o) { if (o == null) { return NULL; } if (o instanceof JSONArray || o instanceof JSONObject) { return o; } if (o.equals(NULL)) { return o; } try { if (o instanceof Collection) { ...
java
public static Object wrap(Object o) { if (o == null) { return NULL; } if (o instanceof JSONArray || o instanceof JSONObject) { return o; } if (o.equals(NULL)) { return o; } try { if (o instanceof Collection) { ...
[ "public", "static", "Object", "wrap", "(", "Object", "o", ")", "{", "if", "(", "o", "==", "null", ")", "{", "return", "NULL", ";", "}", "if", "(", "o", "instanceof", "JSONArray", "||", "o", "instanceof", "JSONObject", ")", "{", "return", "o", ";", ...
Wraps the given object if necessary. <p>If the object is null or , returns {@link #NULL}. If the object is a {@code JSONArray} or {@code JSONObject}, no wrapping is necessary. If the object is {@code NULL}, no wrapping is necessary. If the object is an array or {@code Collection}, returns an equivalent {@code JSONArra...
[ "Wraps", "the", "given", "object", "if", "necessary", "." ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/json/JSONObject.java#L786-L819
113,572
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.doStartEmailAuth
@NotNull @ObjectiveCName("doStartAuthWithEmail:") public Promise<AuthStartRes> doStartEmailAuth(String email) { return modules.getAuthModule().doStartEmailAuth(email); }
java
@NotNull @ObjectiveCName("doStartAuthWithEmail:") public Promise<AuthStartRes> doStartEmailAuth(String email) { return modules.getAuthModule().doStartEmailAuth(email); }
[ "@", "NotNull", "@", "ObjectiveCName", "(", "\"doStartAuthWithEmail:\"", ")", "public", "Promise", "<", "AuthStartRes", ">", "doStartEmailAuth", "(", "String", "email", ")", "{", "return", "modules", ".", "getAuthModule", "(", ")", ".", "doStartEmailAuth", "(", ...
Starting email auth @param email email for authentication @return promise of AuthStartRes
[ "Starting", "email", "auth" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L157-L161
113,573
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.doStartPhoneAuth
@NotNull @ObjectiveCName("doStartAuthWithPhone:") public Promise<AuthStartRes> doStartPhoneAuth(long phone) { return modules.getAuthModule().doStartPhoneAuth(phone); }
java
@NotNull @ObjectiveCName("doStartAuthWithPhone:") public Promise<AuthStartRes> doStartPhoneAuth(long phone) { return modules.getAuthModule().doStartPhoneAuth(phone); }
[ "@", "NotNull", "@", "ObjectiveCName", "(", "\"doStartAuthWithPhone:\"", ")", "public", "Promise", "<", "AuthStartRes", ">", "doStartPhoneAuth", "(", "long", "phone", ")", "{", "return", "modules", ".", "getAuthModule", "(", ")", ".", "doStartPhoneAuth", "(", "p...
Starting phone auth @param phone phone for authentication @return promise of AuthStartRes
[ "Starting", "phone", "auth" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L169-L173
113,574
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.doValidateCode
@NotNull @ObjectiveCName("doValidateCode:withTransaction:") public Promise<AuthCodeRes> doValidateCode(String code, String transactionHash) { return modules.getAuthModule().doValidateCode(transactionHash, code); }
java
@NotNull @ObjectiveCName("doValidateCode:withTransaction:") public Promise<AuthCodeRes> doValidateCode(String code, String transactionHash) { return modules.getAuthModule().doValidateCode(transactionHash, code); }
[ "@", "NotNull", "@", "ObjectiveCName", "(", "\"doValidateCode:withTransaction:\"", ")", "public", "Promise", "<", "AuthCodeRes", ">", "doValidateCode", "(", "String", "code", ",", "String", "transactionHash", ")", "{", "return", "modules", ".", "getAuthModule", "(",...
Validating Confirmation Code @param code code @param transactionHash transaction hash @return promise of AuthCodeRes
[ "Validating", "Confirmation", "Code" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L182-L186
113,575
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.doSendCodeViaCall
@NotNull @ObjectiveCName("doSendCodeViaCall:") public Promise<Boolean> doSendCodeViaCall(String transactionHash) { return modules.getAuthModule().doSendCall(transactionHash); }
java
@NotNull @ObjectiveCName("doSendCodeViaCall:") public Promise<Boolean> doSendCodeViaCall(String transactionHash) { return modules.getAuthModule().doSendCall(transactionHash); }
[ "@", "NotNull", "@", "ObjectiveCName", "(", "\"doSendCodeViaCall:\"", ")", "public", "Promise", "<", "Boolean", ">", "doSendCodeViaCall", "(", "String", "transactionHash", ")", "{", "return", "modules", ".", "getAuthModule", "(", ")", ".", "doSendCall", "(", "tr...
Sending activation code via voice @param transactionHash transaction hash @return promice of Boolean
[ "Sending", "activation", "code", "via", "voice" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L195-L199
113,576
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.requestStartEmailAuth
@NotNull @Deprecated @ObjectiveCName("requestStartAuthCommandWithEmail:") public Command<AuthState> requestStartEmailAuth(final String email) { return modules.getAuthModule().requestStartEmailAuth(email); }
java
@NotNull @Deprecated @ObjectiveCName("requestStartAuthCommandWithEmail:") public Command<AuthState> requestStartEmailAuth(final String email) { return modules.getAuthModule().requestStartEmailAuth(email); }
[ "@", "NotNull", "@", "Deprecated", "@", "ObjectiveCName", "(", "\"requestStartAuthCommandWithEmail:\"", ")", "public", "Command", "<", "AuthState", ">", "requestStartEmailAuth", "(", "final", "String", "email", ")", "{", "return", "modules", ".", "getAuthModule", "(...
Request email auth @param email email to authenticate @return Command for execution
[ "Request", "email", "auth" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L247-L252
113,577
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.requestStartPhoneAuth
@NotNull @Deprecated @ObjectiveCName("requestStartAuthCommandWithPhone:") public Command<AuthState> requestStartPhoneAuth(final long phone) { return modules.getAuthModule().requestStartPhoneAuth(phone); }
java
@NotNull @Deprecated @ObjectiveCName("requestStartAuthCommandWithPhone:") public Command<AuthState> requestStartPhoneAuth(final long phone) { return modules.getAuthModule().requestStartPhoneAuth(phone); }
[ "@", "NotNull", "@", "Deprecated", "@", "ObjectiveCName", "(", "\"requestStartAuthCommandWithPhone:\"", ")", "public", "Command", "<", "AuthState", ">", "requestStartPhoneAuth", "(", "final", "long", "phone", ")", "{", "return", "modules", ".", "getAuthModule", "(",...
Request phone auth @param phone phone to authenticate @return Command for execution
[ "Request", "phone", "auth" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L260-L265
113,578
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.requestStartAnonymousAuth
@NotNull @Deprecated @ObjectiveCName("requestStartAnonymousAuthWithUserName:") public Command<AuthState> requestStartAnonymousAuth(String userName) { return modules.getAuthModule().requestStartAnonymousAuth(userName); }
java
@NotNull @Deprecated @ObjectiveCName("requestStartAnonymousAuthWithUserName:") public Command<AuthState> requestStartAnonymousAuth(String userName) { return modules.getAuthModule().requestStartAnonymousAuth(userName); }
[ "@", "NotNull", "@", "Deprecated", "@", "ObjectiveCName", "(", "\"requestStartAnonymousAuthWithUserName:\"", ")", "public", "Command", "<", "AuthState", ">", "requestStartAnonymousAuth", "(", "String", "userName", ")", "{", "return", "modules", ".", "getAuthModule", "...
Request user name anonymous auth @param userName userName to authenticate @return Command for execution
[ "Request", "user", "name", "anonymous", "auth" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L273-L278
113,579
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.requestStartUserNameAuth
@NotNull @ObjectiveCName("requestStartAuthCommandWithUserName:") public Command<AuthState> requestStartUserNameAuth(String userName) { return modules.getAuthModule().requestStartUserNameAuth(userName); }
java
@NotNull @ObjectiveCName("requestStartAuthCommandWithUserName:") public Command<AuthState> requestStartUserNameAuth(String userName) { return modules.getAuthModule().requestStartUserNameAuth(userName); }
[ "@", "NotNull", "@", "ObjectiveCName", "(", "\"requestStartAuthCommandWithUserName:\"", ")", "public", "Command", "<", "AuthState", ">", "requestStartUserNameAuth", "(", "String", "userName", ")", "{", "return", "modules", ".", "getAuthModule", "(", ")", ".", "reque...
Request user name auth @param userName userName to authenticate @return Command for execution
[ "Request", "user", "name", "auth" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L286-L290
113,580
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.requestCompleteOAuth
@NotNull @ObjectiveCName("requestCompleteOAuthCommandWithCode:") public Command<AuthState> requestCompleteOAuth(String code) { return modules.getAuthModule().requestCompleteOauth(code); }
java
@NotNull @ObjectiveCName("requestCompleteOAuthCommandWithCode:") public Command<AuthState> requestCompleteOAuth(String code) { return modules.getAuthModule().requestCompleteOauth(code); }
[ "@", "NotNull", "@", "ObjectiveCName", "(", "\"requestCompleteOAuthCommandWithCode:\"", ")", "public", "Command", "<", "AuthState", ">", "requestCompleteOAuth", "(", "String", "code", ")", "{", "return", "modules", ".", "getAuthModule", "(", ")", ".", "requestComple...
Request complete OAuth @param code code from oauth @return Command for execution
[ "Request", "complete", "OAuth" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L309-L313
113,581
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.validateCode
@NotNull @ObjectiveCName("validateCodeCommand:") public Command<AuthState> validateCode(final String code) { return modules.getAuthModule().requestValidateCode(code); }
java
@NotNull @ObjectiveCName("validateCodeCommand:") public Command<AuthState> validateCode(final String code) { return modules.getAuthModule().requestValidateCode(code); }
[ "@", "NotNull", "@", "ObjectiveCName", "(", "\"validateCodeCommand:\"", ")", "public", "Command", "<", "AuthState", ">", "validateCode", "(", "final", "String", "code", ")", "{", "return", "modules", ".", "getAuthModule", "(", ")", ".", "requestValidateCode", "(...
Sending activation code @param code activation code @return Command for execution
[ "Sending", "activation", "code" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L332-L336
113,582
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.getUsers
@Nullable @ObjectiveCName("getUsers") public MVVMCollection<User, UserVM> getUsers() { if (modules.getUsersModule() == null) { return null; } return modules.getUsersModule().getUsers(); }
java
@Nullable @ObjectiveCName("getUsers") public MVVMCollection<User, UserVM> getUsers() { if (modules.getUsersModule() == null) { return null; } return modules.getUsersModule().getUsers(); }
[ "@", "Nullable", "@", "ObjectiveCName", "(", "\"getUsers\"", ")", "public", "MVVMCollection", "<", "User", ",", "UserVM", ">", "getUsers", "(", ")", "{", "if", "(", "modules", ".", "getUsersModule", "(", ")", "==", "null", ")", "{", "return", "null", ";"...
Get User View Model Collection @return User ViewModel Collection
[ "Get", "User", "View", "Model", "Collection" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L450-L457
113,583
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.getGroups
@Nullable @ObjectiveCName("getGroups") public MVVMCollection<Group, GroupVM> getGroups() { if (modules.getGroupsModule() == null) { return null; } return modules.getGroupsModule().getGroupsCollection(); }
java
@Nullable @ObjectiveCName("getGroups") public MVVMCollection<Group, GroupVM> getGroups() { if (modules.getGroupsModule() == null) { return null; } return modules.getGroupsModule().getGroupsCollection(); }
[ "@", "Nullable", "@", "ObjectiveCName", "(", "\"getGroups\"", ")", "public", "MVVMCollection", "<", "Group", ",", "GroupVM", ">", "getGroups", "(", ")", "{", "if", "(", "modules", ".", "getGroupsModule", "(", ")", "==", "null", ")", "{", "return", "null", ...
Get Group View Model Collection @return Group ViewModel Collection
[ "Get", "Group", "View", "Model", "Collection" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L476-L483
113,584
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.getTyping
@NotNull @ObjectiveCName("getTypingWithUid:") public ValueModel<Boolean> getTyping(int uid) { return modules.getTypingModule().getTyping(uid).getTyping(); }
java
@NotNull @ObjectiveCName("getTypingWithUid:") public ValueModel<Boolean> getTyping(int uid) { return modules.getTypingModule().getTyping(uid).getTyping(); }
[ "@", "NotNull", "@", "ObjectiveCName", "(", "\"getTypingWithUid:\"", ")", "public", "ValueModel", "<", "Boolean", ">", "getTyping", "(", "int", "uid", ")", "{", "return", "modules", ".", "getTypingModule", "(", ")", ".", "getTyping", "(", "uid", ")", ".", ...
Get private chat ViewModel @param uid chat's User Id @return ValueModel of Boolean for typing state
[ "Get", "private", "chat", "ViewModel" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L515-L519
113,585
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.getGroupTyping
@NotNull @ObjectiveCName("getGroupTypingWithGid:") public ValueModel<int[]> getGroupTyping(int gid) { return modules.getTypingModule().getGroupTyping(gid).getActive(); }
java
@NotNull @ObjectiveCName("getGroupTypingWithGid:") public ValueModel<int[]> getGroupTyping(int gid) { return modules.getTypingModule().getGroupTyping(gid).getActive(); }
[ "@", "NotNull", "@", "ObjectiveCName", "(", "\"getGroupTypingWithGid:\"", ")", "public", "ValueModel", "<", "int", "[", "]", ">", "getGroupTyping", "(", "int", "gid", ")", "{", "return", "modules", ".", "getTypingModule", "(", ")", ".", "getGroupTyping", "(", ...
Get group chat ViewModel @param gid chat's Group Id @return ValueModel of int[] for typing state
[ "Get", "group", "chat", "ViewModel" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L527-L531
113,586
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.onProfileOpen
@ObjectiveCName("onProfileOpenWithUid:") public void onProfileOpen(int uid) { modules.getEvents().post(new PeerInfoOpened(Peer.user(uid))); }
java
@ObjectiveCName("onProfileOpenWithUid:") public void onProfileOpen(int uid) { modules.getEvents().post(new PeerInfoOpened(Peer.user(uid))); }
[ "@", "ObjectiveCName", "(", "\"onProfileOpenWithUid:\"", ")", "public", "void", "onProfileOpen", "(", "int", "uid", ")", "{", "modules", ".", "getEvents", "(", ")", ".", "post", "(", "new", "PeerInfoOpened", "(", "Peer", ".", "user", "(", "uid", ")", ")", ...
MUST be called on profile open @param uid user's Id
[ "MUST", "be", "called", "on", "profile", "open" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L629-L632
113,587
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.onProfileClosed
@ObjectiveCName("onProfileClosedWithUid:") public void onProfileClosed(int uid) { modules.getEvents().post(new PeerInfoClosed(Peer.user(uid))); }
java
@ObjectiveCName("onProfileClosedWithUid:") public void onProfileClosed(int uid) { modules.getEvents().post(new PeerInfoClosed(Peer.user(uid))); }
[ "@", "ObjectiveCName", "(", "\"onProfileClosedWithUid:\"", ")", "public", "void", "onProfileClosed", "(", "int", "uid", ")", "{", "modules", ".", "getEvents", "(", ")", ".", "post", "(", "new", "PeerInfoClosed", "(", "Peer", ".", "user", "(", "uid", ")", "...
MUST be called on profile closed @param uid user's Id
[ "MUST", "be", "called", "on", "profile", "closed" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L649-L652
113,588
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.onPushReceived
@ObjectiveCName("onPushReceivedWithSeq:withAuthId:") public void onPushReceived(int seq, long authId) { if (modules.getUpdatesModule() != null) { modules.getUpdatesModule().onPushReceived(seq, authId); } }
java
@ObjectiveCName("onPushReceivedWithSeq:withAuthId:") public void onPushReceived(int seq, long authId) { if (modules.getUpdatesModule() != null) { modules.getUpdatesModule().onPushReceived(seq, authId); } }
[ "@", "ObjectiveCName", "(", "\"onPushReceivedWithSeq:withAuthId:\"", ")", "public", "void", "onPushReceived", "(", "int", "seq", ",", "long", "authId", ")", "{", "if", "(", "modules", ".", "getUpdatesModule", "(", ")", "!=", "null", ")", "{", "modules", ".", ...
MUST be called when external push received @param seq sequence number of update @param authId auth id
[ "MUST", "be", "called", "when", "external", "push", "received" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L696-L701
113,589
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.getConversationVM
@NotNull @ObjectiveCName("getConversationVM") public ConversationVM getConversationVM(Peer peer) { return modules.getMessagesModule().getConversationVM(peer); }
java
@NotNull @ObjectiveCName("getConversationVM") public ConversationVM getConversationVM(Peer peer) { return modules.getMessagesModule().getConversationVM(peer); }
[ "@", "NotNull", "@", "ObjectiveCName", "(", "\"getConversationVM\"", ")", "public", "ConversationVM", "getConversationVM", "(", "Peer", "peer", ")", "{", "return", "modules", ".", "getMessagesModule", "(", ")", ".", "getConversationVM", "(", "peer", ")", ";", "}...
Getting Conversation VM @param peer peer @return Conversation VM
[ "Getting", "Conversation", "VM" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L713-L717
113,590
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.sendVideo
@ObjectiveCName("sendVideoWithPeer:withName:withW:withH:withDuration:withThumb:withDescriptor:") public void sendVideo(Peer peer, String fileName, int w, int h, int duration, FastThumb fastThumb, String descriptor) { modules.getMessagesModule().sendVideo(peer, fileName, w, h, durat...
java
@ObjectiveCName("sendVideoWithPeer:withName:withW:withH:withDuration:withThumb:withDescriptor:") public void sendVideo(Peer peer, String fileName, int w, int h, int duration, FastThumb fastThumb, String descriptor) { modules.getMessagesModule().sendVideo(peer, fileName, w, h, durat...
[ "@", "ObjectiveCName", "(", "\"sendVideoWithPeer:withName:withW:withH:withDuration:withThumb:withDescriptor:\"", ")", "public", "void", "sendVideo", "(", "Peer", "peer", ",", "String", "fileName", ",", "int", "w", ",", "int", "h", ",", "int", "duration", ",", "FastThu...
Send Video message @param peer destination peer @param fileName File name (without path) @param w video width @param h video height @param duration video duration @param fastThumb Fast thumb of video @param descriptor File Descriptor
[ "Send", "Video", "message" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L889-L893
113,591
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.sendDocument
@ObjectiveCName("sendDocumentWithPeer:withName:withMime:withThumb:withDescriptor:") public void sendDocument(Peer peer, String fileName, String mimeType, FastThumb fastThumb, String descriptor) { modules.getMessagesModule().sendDocument(peer, fileName, mimeType, fastThumb, descr...
java
@ObjectiveCName("sendDocumentWithPeer:withName:withMime:withThumb:withDescriptor:") public void sendDocument(Peer peer, String fileName, String mimeType, FastThumb fastThumb, String descriptor) { modules.getMessagesModule().sendDocument(peer, fileName, mimeType, fastThumb, descr...
[ "@", "ObjectiveCName", "(", "\"sendDocumentWithPeer:withName:withMime:withThumb:withDescriptor:\"", ")", "public", "void", "sendDocument", "(", "Peer", "peer", ",", "String", "fileName", ",", "String", "mimeType", ",", "FastThumb", "fastThumb", ",", "String", "descriptor"...
Send document with preview @param peer destination peer @param fileName File name (without path) @param mimeType mimetype of document @param descriptor File Descriptor @param fastThumb FastThumb of preview
[ "Send", "document", "with", "preview" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L957-L961
113,592
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.forwardContent
@ObjectiveCName("forwardContentContentWithPeer:withContent:") public void forwardContent(Peer peer, AbsContent content) { modules.getMessagesModule().forwardContent(peer, content); }
java
@ObjectiveCName("forwardContentContentWithPeer:withContent:") public void forwardContent(Peer peer, AbsContent content) { modules.getMessagesModule().forwardContent(peer, content); }
[ "@", "ObjectiveCName", "(", "\"forwardContentContentWithPeer:withContent:\"", ")", "public", "void", "forwardContent", "(", "Peer", "peer", ",", "AbsContent", "content", ")", "{", "modules", ".", "getMessagesModule", "(", ")", ".", "forwardContent", "(", "peer", ","...
Send DocumentContent - used for forwarding @param peer destination peer @param content content to forward
[ "Send", "DocumentContent", "-", "used", "for", "forwarding" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L969-L972
113,593
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.addReaction
@ObjectiveCName("addReactionWithPeer:withRid:withCode:") public Command<Void> addReaction(Peer peer, long rid, String code) { return callback -> modules.getMessagesModule().addReaction(peer, rid, code) .then(v -> callback.onResult(v)) .failure(e -> callback.onError(e)); }
java
@ObjectiveCName("addReactionWithPeer:withRid:withCode:") public Command<Void> addReaction(Peer peer, long rid, String code) { return callback -> modules.getMessagesModule().addReaction(peer, rid, code) .then(v -> callback.onResult(v)) .failure(e -> callback.onError(e)); }
[ "@", "ObjectiveCName", "(", "\"addReactionWithPeer:withRid:withCode:\"", ")", "public", "Command", "<", "Void", ">", "addReaction", "(", "Peer", "peer", ",", "long", "rid", ",", "String", "code", ")", "{", "return", "callback", "->", "modules", ".", "getMessages...
Adding reaction to a message @param peer destination peer @param rid random id of message @param code reaction code @return Command for execution
[ "Adding", "reaction", "to", "a", "message" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L1069-L1074
113,594
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.saveDraft
@ObjectiveCName("saveDraftWithPeer:withDraft:") public void saveDraft(Peer peer, String draft) { modules.getMessagesModule().saveDraft(peer, draft); }
java
@ObjectiveCName("saveDraftWithPeer:withDraft:") public void saveDraft(Peer peer, String draft) { modules.getMessagesModule().saveDraft(peer, draft); }
[ "@", "ObjectiveCName", "(", "\"saveDraftWithPeer:withDraft:\"", ")", "public", "void", "saveDraft", "(", "Peer", "peer", ",", "String", "draft", ")", "{", "modules", ".", "getMessagesModule", "(", ")", ".", "saveDraft", "(", "peer", ",", "draft", ")", ";", "...
Save message draft @param peer destination peer @param draft message draft
[ "Save", "message", "draft" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L1097-L1100
113,595
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.loadDraft
@Nullable @ObjectiveCName("loadDraftWithPeer:") public String loadDraft(Peer peer) { return modules.getMessagesModule().loadDraft(peer); }
java
@Nullable @ObjectiveCName("loadDraftWithPeer:") public String loadDraft(Peer peer) { return modules.getMessagesModule().loadDraft(peer); }
[ "@", "Nullable", "@", "ObjectiveCName", "(", "\"loadDraftWithPeer:\"", ")", "public", "String", "loadDraft", "(", "Peer", "peer", ")", "{", "return", "modules", ".", "getMessagesModule", "(", ")", ".", "loadDraft", "(", "peer", ")", ";", "}" ]
Load message draft @param peer destination peer @return null if no draft available
[ "Load", "message", "draft" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L1108-L1112
113,596
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.findMentions
@ObjectiveCName("findMentionsWithGid:withQuery:") public List<MentionFilterResult> findMentions(int gid, String query) { return modules.getMentions().findMentions(gid, query); }
java
@ObjectiveCName("findMentionsWithGid:withQuery:") public List<MentionFilterResult> findMentions(int gid, String query) { return modules.getMentions().findMentions(gid, query); }
[ "@", "ObjectiveCName", "(", "\"findMentionsWithGid:withQuery:\"", ")", "public", "List", "<", "MentionFilterResult", ">", "findMentions", "(", "int", "gid", ",", "String", "query", ")", "{", "return", "modules", ".", "getMentions", "(", ")", ".", "findMentions", ...
Finding suitable mentions @param gid gid of group @param query query for search @return matches
[ "Finding", "suitable", "mentions" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L1144-L1147
113,597
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.findPeers
@ObjectiveCName("findPeersWithType:") public Command<List<PeerSearchEntity>> findPeers(PeerSearchType type) { return callback -> modules.getSearchModule().findPeers(type) .then(v -> callback.onResult(v)) .failure(e -> callback.onError(e)); }
java
@ObjectiveCName("findPeersWithType:") public Command<List<PeerSearchEntity>> findPeers(PeerSearchType type) { return callback -> modules.getSearchModule().findPeers(type) .then(v -> callback.onResult(v)) .failure(e -> callback.onError(e)); }
[ "@", "ObjectiveCName", "(", "\"findPeersWithType:\"", ")", "public", "Command", "<", "List", "<", "PeerSearchEntity", ">", ">", "findPeers", "(", "PeerSearchType", "type", ")", "{", "return", "callback", "->", "modules", ".", "getSearchModule", "(", ")", ".", ...
Finding peers by type @param type type of peer @return found peers
[ "Finding", "peers", "by", "type" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L1155-L1160
113,598
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.findPeers
@ObjectiveCName("findPeersWithQuery:") public Command<List<PeerSearchEntity>> findPeers(String query) { return callback -> modules.getSearchModule().findPeers(query) .then(v -> callback.onResult(v)) .failure(e -> callback.onError(e)); }
java
@ObjectiveCName("findPeersWithQuery:") public Command<List<PeerSearchEntity>> findPeers(String query) { return callback -> modules.getSearchModule().findPeers(query) .then(v -> callback.onResult(v)) .failure(e -> callback.onError(e)); }
[ "@", "ObjectiveCName", "(", "\"findPeersWithQuery:\"", ")", "public", "Command", "<", "List", "<", "PeerSearchEntity", ">", ">", "findPeers", "(", "String", "query", ")", "{", "return", "callback", "->", "modules", ".", "getSearchModule", "(", ")", ".", "findP...
Finding peers by text query @param query text query @return found peers
[ "Finding", "peers", "by", "text", "query" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L1168-L1173
113,599
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.findTextMessages
@ObjectiveCName("findTextMessagesWithPeer:withQuery:") public Command<List<MessageSearchEntity>> findTextMessages(Peer peer, String query) { return callback -> modules.getSearchModule().findTextMessages(peer, query) .then(v -> callback.onResult(v)) .failure(e -> callback.onEr...
java
@ObjectiveCName("findTextMessagesWithPeer:withQuery:") public Command<List<MessageSearchEntity>> findTextMessages(Peer peer, String query) { return callback -> modules.getSearchModule().findTextMessages(peer, query) .then(v -> callback.onResult(v)) .failure(e -> callback.onEr...
[ "@", "ObjectiveCName", "(", "\"findTextMessagesWithPeer:withQuery:\"", ")", "public", "Command", "<", "List", "<", "MessageSearchEntity", ">", ">", "findTextMessages", "(", "Peer", "peer", ",", "String", "query", ")", "{", "return", "callback", "->", "modules", "....
Finding text messages by query @param peer peer for search @param query query for search @return found messages
[ "Finding", "text", "messages", "by", "query" ]
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L1182-L1187