Fixed possible crashes

This commit is contained in:
DrKLO 2014-03-26 16:24:54 +04:00
parent fc8f91a3b7
commit 0e9d92e8f9
3 changed files with 8 additions and 8 deletions

View file

@ -27,11 +27,11 @@ package org.telegram.PhoneFormat;
import java.util.ArrayList;
public class CallingCodeInfo {
public ArrayList<String> countries;
public String callingCode;
public ArrayList<String> trunkPrefixes;
public ArrayList<String> intlPrefixes;
public ArrayList<RuleSet> ruleSets;
public ArrayList<String> countries = new ArrayList<String>();
public String callingCode = "";
public ArrayList<String> trunkPrefixes = new ArrayList<String>();
public ArrayList<String> intlPrefixes = new ArrayList<String>();
public ArrayList<RuleSet> ruleSets = new ArrayList<RuleSet>();
//public ArrayList formatStrings;
String matchingAccessCode(String str) {

View file

@ -30,7 +30,7 @@ import java.util.regex.Pattern;
public class RuleSet {
public int matchLen;
public ArrayList<PhoneRule> rules;
public ArrayList<PhoneRule> rules = new ArrayList<PhoneRule>();
public boolean hasRuleWithIntlPrefix;
public boolean hasRuleWithTrunkPrefix;
public static Pattern pattern = Pattern.compile("[0-9]+");

View file

@ -831,7 +831,7 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
recordDialogId = dialog_id;
fileBuffer.rewind();
if (android.os.Build.VERSION.SDK_INT >= 16) {
/*if (android.os.Build.VERSION.SDK_INT >= 16) { some devices crash with it
AutomaticGainControl agc = null;
try {
if (AutomaticGainControl.isAvailable()) {
@ -850,7 +850,7 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
}
FileLog.e("tmessages", e);
}
}
}*/
audioRecorder.startRecording();
} catch (Exception e) {