Java Code Examples for org.telegram.tgnet.TLRPC#TL_messageActionPhoneCall
The following examples show how to use
org.telegram.tgnet.TLRPC#TL_messageActionPhoneCall .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VoIPHelper.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
public static void showRateAlert(Context context, TLRPC.TL_messageActionPhoneCall call){ SharedPreferences prefs=MessagesController.getNotificationsSettings(UserConfig.selectedAccount); // always called from chat UI Set<String> hashes=prefs.getStringSet("calls_access_hashes", (Set<String>)Collections.EMPTY_SET); for(String hash:hashes){ String[] d=hash.split(" "); if(d.length<2) continue; if(d[0].equals(call.call_id+"")){ try{ long accessHash=Long.parseLong(d[1]); showRateAlert(context, null, call.call_id, accessHash, UserConfig.selectedAccount); }catch(Exception x){} return; } } }
Example 2
Source File: VoIPHelper.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
public static void showRateAlert(Context context, TLRPC.TL_messageActionPhoneCall call){ SharedPreferences prefs=MessagesController.getNotificationsSettings(UserConfig.selectedAccount); // always called from chat UI Set<String> hashes=prefs.getStringSet("calls_access_hashes", (Set<String>)Collections.EMPTY_SET); for(String hash:hashes){ String[] d=hash.split(" "); if(d.length<2) continue; if(d[0].equals(call.call_id+"")){ try{ long accessHash=Long.parseLong(d[1]); showRateAlert(context, null, call.call_id, accessHash, UserConfig.selectedAccount); }catch(Exception x){} return; } } }
Example 3
Source File: VoIPHelper.java From Telegram-FOSS with GNU General Public License v2.0 | 6 votes |
public static void showRateAlert(Context context, TLRPC.TL_messageActionPhoneCall call) { SharedPreferences prefs = MessagesController.getNotificationsSettings(UserConfig.selectedAccount); // always called from chat UI Set<String> hashes = prefs.getStringSet("calls_access_hashes", (Set<String>) Collections.EMPTY_SET); for (String hash : hashes) { String[] d = hash.split(" "); if (d.length < 2) continue; if (d[0].equals(call.call_id + "")) { try { long accessHash = Long.parseLong(d[1]); showRateAlert(context, null, call.call_id, accessHash, UserConfig.selectedAccount, true); } catch (Exception ignore) { } return; } } }
Example 4
Source File: VoIPHelper.java From Telegram with GNU General Public License v2.0 | 6 votes |
public static void showRateAlert(Context context, TLRPC.TL_messageActionPhoneCall call) { SharedPreferences prefs = MessagesController.getNotificationsSettings(UserConfig.selectedAccount); // always called from chat UI Set<String> hashes = prefs.getStringSet("calls_access_hashes", (Set<String>) Collections.EMPTY_SET); for (String hash : hashes) { String[] d = hash.split(" "); if (d.length < 2) continue; if (d[0].equals(call.call_id + "")) { try { long accessHash = Long.parseLong(d[1]); showRateAlert(context, null, call.call_id, accessHash, UserConfig.selectedAccount, true); } catch (Exception ignore) { } return; } } }
Example 5
Source File: VoIPHelper.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
public static boolean canRateCall(TLRPC.TL_messageActionPhoneCall call){ if(!(call.reason instanceof TLRPC.TL_phoneCallDiscardReasonBusy) && !(call.reason instanceof TLRPC.TL_phoneCallDiscardReasonMissed)){ SharedPreferences prefs=MessagesController.getNotificationsSettings(UserConfig.selectedAccount); // always called from chat UI Set<String> hashes=prefs.getStringSet("calls_access_hashes", (Set<String>)Collections.EMPTY_SET); for(String hash:hashes){ String[] d=hash.split(" "); if(d.length<2) continue; if(d[0].equals(call.call_id+"")){ return true; } } } return false; }
Example 6
Source File: VoIPHelper.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
public static boolean canRateCall(TLRPC.TL_messageActionPhoneCall call){ if(!(call.reason instanceof TLRPC.TL_phoneCallDiscardReasonBusy) && !(call.reason instanceof TLRPC.TL_phoneCallDiscardReasonMissed)){ SharedPreferences prefs=MessagesController.getNotificationsSettings(UserConfig.selectedAccount); // always called from chat UI Set<String> hashes=prefs.getStringSet("calls_access_hashes", (Set<String>)Collections.EMPTY_SET); for(String hash:hashes){ String[] d=hash.split(" "); if(d.length<2) continue; if(d[0].equals(call.call_id+"")){ return true; } } } return false; }
Example 7
Source File: VoIPHelper.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
public static boolean canRateCall(TLRPC.TL_messageActionPhoneCall call) { if (!(call.reason instanceof TLRPC.TL_phoneCallDiscardReasonBusy) && !(call.reason instanceof TLRPC.TL_phoneCallDiscardReasonMissed)) { SharedPreferences prefs = MessagesController.getNotificationsSettings(UserConfig.selectedAccount); // always called from chat UI Set<String> hashes = prefs.getStringSet("calls_access_hashes", (Set<String>) Collections.EMPTY_SET); for (String hash : hashes) { String[] d = hash.split(" "); if (d.length < 2) continue; if (d[0].equals(call.call_id + "")) { return true; } } } return false; }
Example 8
Source File: VoIPHelper.java From Telegram with GNU General Public License v2.0 | 5 votes |
public static boolean canRateCall(TLRPC.TL_messageActionPhoneCall call) { if (!(call.reason instanceof TLRPC.TL_phoneCallDiscardReasonBusy) && !(call.reason instanceof TLRPC.TL_phoneCallDiscardReasonMissed)) { SharedPreferences prefs = MessagesController.getNotificationsSettings(UserConfig.selectedAccount); // always called from chat UI Set<String> hashes = prefs.getStringSet("calls_access_hashes", (Set<String>) Collections.EMPTY_SET); for (String hash : hashes) { String[] d = hash.split(" "); if (d.length < 2) continue; if (d[0].equals(call.call_id + "")) { return true; } } } return false; }