Replaced e.printStackTrace by Log.e(e)
This commit is contained in:
parent
d2c2bfa757
commit
82fe152b5c
22 changed files with 60 additions and 52 deletions
|
@ -23,6 +23,7 @@ import java.util.List;
|
|||
|
||||
import org.linphone.LinphonePreferences.AccountBuilder;
|
||||
import org.linphone.core.LinphoneCoreException;
|
||||
import org.linphone.mediastream.Log;
|
||||
import org.linphone.ui.PreferencesListFragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
@ -455,7 +456,7 @@ public class AccountPreferencesFragment extends PreferencesListFragment {
|
|||
builder.saveNewAccount();
|
||||
}
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
LinphoneActivity.instance().isNewProxyConfig();
|
||||
LinphoneManager.getLc().refreshRegisters();
|
||||
|
|
|
@ -269,7 +269,7 @@ public class BluetoothManager extends BroadcastReceiver {
|
|||
Log.d("Bluetooth receiver stopped");
|
||||
} catch (Exception e) {}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1326,7 +1326,7 @@ public class CallActivity extends Activity implements OnClickListener, SensorEve
|
|||
try {
|
||||
LinphoneManager.getLc().acceptCallUpdate(call, params);
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -905,7 +905,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
|||
bm = Bitmap.createBitmap(bm, 0, 0, bm.getWidth(), bm.getHeight(), matrix, true);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
|
||||
ByteArrayOutputStream stream = new ByteArrayOutputStream();
|
||||
|
|
|
@ -71,7 +71,7 @@ public class ChatStorage {
|
|||
try {
|
||||
return context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionCode >= 2200;
|
||||
} catch (NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ public class ChatStorage {
|
|||
try {
|
||||
id = c.getString(c.getColumnIndex("id"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
c.close();
|
||||
|
@ -250,7 +250,7 @@ public class ChatStorage {
|
|||
try {
|
||||
message = c.getString(c.getColumnIndex("message"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
c.close();
|
||||
|
@ -271,7 +271,7 @@ public class ChatStorage {
|
|||
String to = c.getString(c.getColumnIndex("remoteContact"));
|
||||
drafts.add(to);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
c.close();
|
||||
|
@ -296,7 +296,7 @@ public class ChatStorage {
|
|||
try {
|
||||
message = c.getString(c.getColumnIndex("message"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
c.close();
|
||||
|
|
|
@ -25,6 +25,7 @@ import java.io.Serializable;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.linphone.mediastream.Log;
|
||||
import org.linphone.mediastream.Version;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
|
@ -354,7 +355,7 @@ public class ContactEditorFragment extends Fragment {
|
|||
Bitmap selectedImage = MediaStore.Images.Media.getBitmap(LinphoneManager.getInstance().getContext().getContentResolver(), selectedImageUri);
|
||||
selectedImage = Bitmap.createScaledBitmap(selectedImage, PHOTO_SIZE, PHOTO_SIZE, false);
|
||||
editContactPicture(null, selectedImage);
|
||||
} catch (IOException e) { e.printStackTrace(); }
|
||||
} catch (IOException e) { Log.e(e); }
|
||||
}
|
||||
else if (pickedPhotoForContactUri != null) {
|
||||
String filePath = pickedPhotoForContactUri.getPath();
|
||||
|
|
|
@ -104,7 +104,7 @@ public class HistoryDetailFragment extends Fragment implements OnClickListener {
|
|||
try {
|
||||
lAddress = LinphoneCoreFactory.instance().createLinphoneAddress(sipUri);
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
|
||||
if(lAddress != null) {
|
||||
|
|
|
@ -1466,7 +1466,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
return R.drawable.led_disconnected;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
|
||||
return R.drawable.led_disconnected;
|
||||
|
|
|
@ -301,7 +301,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
file.delete();
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
removePendingMessage(msg);
|
||||
}
|
||||
|
@ -570,7 +570,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
mLc.destroy();
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
finally {
|
||||
mServiceContext.unregisterReceiver(instance.mKeepAliveReceiver);
|
||||
|
@ -609,7 +609,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
mTimer.schedule(lTask, 0, 20);
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
Log.e(e, "Cannot start linphone");
|
||||
}
|
||||
}
|
||||
|
@ -786,7 +786,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
mLc.destroy();
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
finally {
|
||||
mServiceContext.unregisterReceiver(instance.mKeepAliveReceiver);
|
||||
|
@ -943,7 +943,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
else if (LinphoneService.isReady())
|
||||
return LinphoneService.instance().getApplicationContext();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -963,7 +963,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
try {
|
||||
mLc.acceptCall(call);
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
else if (state == State.IncomingReceived || (state == State.CallIncomingEarlyMedia && mR.getBoolean(R.bool.allow_ringing_while_early_media))) {
|
||||
|
@ -1037,7 +1037,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
try {
|
||||
LinphoneManager.getLc().deferCallUpdate(call);
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -156,7 +156,7 @@ public class LinphonePreferences {
|
|||
LinphoneAuthInfo authInfo = getLc().findAuthInfo(addr.getUserName(), null, addr.getDomain());
|
||||
return authInfo;
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -399,7 +399,7 @@ public class LinphonePreferences {
|
|||
setAccountOutboundProxyEnabled(n, true);
|
||||
}
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -414,7 +414,7 @@ public class LinphonePreferences {
|
|||
proxyAddr = LinphoneCoreFactory.instance().createLinphoneAddress(proxyConfig.getProxy());
|
||||
transport = proxyAddr.getTransport();
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -458,7 +458,7 @@ public class LinphonePreferences {
|
|||
saveAuthInfo(info);
|
||||
}
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -476,7 +476,7 @@ public class LinphonePreferences {
|
|||
prxCfg.setIdentity(addr.asString());
|
||||
prxCfg.done();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -527,7 +527,7 @@ public class LinphonePreferences {
|
|||
prxCfg.setIdentity(identity);
|
||||
prxCfg.done();
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -559,7 +559,7 @@ public class LinphonePreferences {
|
|||
setAccountOutboundProxyEnabled(n, true);
|
||||
}
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -581,7 +581,7 @@ public class LinphonePreferences {
|
|||
}
|
||||
prxCfg.done();
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -392,7 +392,7 @@ public final class LinphoneUtils {
|
|||
try {
|
||||
Runtime.getRuntime().exec(new String[] { "logcat", "-c" });
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -452,7 +452,7 @@ public final class LinphoneUtils {
|
|||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,12 +22,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
import org.linphone.LinphonePreferences.AccountBuilder;
|
||||
import org.linphone.core.LinphoneCore;
|
||||
import org.linphone.core.LinphoneCoreException;
|
||||
import org.linphone.mediastream.Log;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.SharedPreferences.Editor;
|
||||
import android.content.res.Resources;
|
||||
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
/**
|
||||
|
@ -155,7 +155,7 @@ public class PreferencesMigrator {
|
|||
try {
|
||||
builder.saveNewAccount();
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
|
||||
if (isDefaultAccount) {
|
||||
|
|
|
@ -442,7 +442,7 @@ public class SettingsFragment extends PreferencesListFragment {
|
|||
try {
|
||||
lc.enablePayloadType(pt, false);
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
continue;
|
||||
} else {
|
||||
|
@ -460,7 +460,7 @@ public class SettingsFragment extends PreferencesListFragment {
|
|||
try {
|
||||
LinphoneManager.getLcIfManagerNotDestroyedOrNull().enablePayloadType(pt, enable);
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -579,7 +579,7 @@ public class SettingsFragment extends PreferencesListFragment {
|
|||
try {
|
||||
LinphoneManager.getLcIfManagerNotDestroyedOrNull().enablePayloadType(pt, enable);
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -222,7 +222,7 @@ public class StatusFragment extends Fragment {
|
|||
return R.drawable.led_disconnected;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
|
||||
return R.drawable.led_disconnected;
|
||||
|
@ -246,7 +246,7 @@ public class StatusFragment extends Fragment {
|
|||
return context.getString(R.string.status_not_connected);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
|
||||
return context.getString(R.string.status_not_connected);
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.linphone.core.LinphoneCoreException;
|
|||
import org.linphone.core.LinphoneCoreFactory;
|
||||
import org.linphone.core.LinphoneCoreListenerBase;
|
||||
import org.linphone.core.LinphoneProxyConfig;
|
||||
import org.linphone.mediastream.Log;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
|
@ -48,7 +49,6 @@ import android.graphics.drawable.Drawable;
|
|||
import android.os.Bundle;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.WindowManager;
|
||||
|
@ -367,7 +367,7 @@ private static AssistantActivity instance;
|
|||
try {
|
||||
address = LinphoneCoreFactory.instance().createLinphoneAddress(identity);
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
|
||||
if(address != null && displayName != null && !displayName.equals("")){
|
||||
|
@ -432,7 +432,7 @@ private static AssistantActivity instance;
|
|||
}
|
||||
accountCreated = true;
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick
|
|||
prxCfg.setIdentity(identity);
|
||||
lc.addProxyConfig(prxCfg);
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import org.linphone.LinphoneContact;
|
|||
import org.linphone.LinphoneUtils;
|
||||
import org.linphone.R;
|
||||
import org.linphone.core.LinphoneAddress;
|
||||
import org.linphone.mediastream.Log;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.ContentProviderOperation;
|
||||
|
@ -275,7 +276,7 @@ public class ApiNinePlus {
|
|||
try {
|
||||
contentResolver.applyBatch(ContactsContract.AUTHORITY, ops);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ import org.linphone.R;
|
|||
import org.linphone.core.LinphoneCoreException;
|
||||
import org.linphone.core.tutorials.TutorialBuddyStatus;
|
||||
import org.linphone.core.tutorials.TutorialNotifier;
|
||||
import org.linphone.mediastream.Log;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
|
@ -104,7 +105,7 @@ public class TutorialBuddyStatusActivity extends Activity {
|
|||
}
|
||||
});
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ import org.linphone.R;
|
|||
import org.linphone.core.LinphoneCoreException;
|
||||
import org.linphone.core.tutorials.TutorialChatRoom;
|
||||
import org.linphone.core.tutorials.TutorialNotifier;
|
||||
import org.linphone.mediastream.Log;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
|
@ -93,7 +94,7 @@ public class TutorialChatRoomActivity extends Activity {
|
|||
}
|
||||
});
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ import org.linphone.R;
|
|||
import org.linphone.core.LinphoneCoreException;
|
||||
import org.linphone.core.tutorials.TutorialHelloWorld;
|
||||
import org.linphone.core.tutorials.TutorialNotifier;
|
||||
import org.linphone.mediastream.Log;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
|
@ -93,7 +94,7 @@ public class TutorialHelloWorldActivity extends Activity {
|
|||
}
|
||||
});
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ import org.linphone.R;
|
|||
import org.linphone.core.LinphoneCoreException;
|
||||
import org.linphone.core.tutorials.TutorialNotifier;
|
||||
import org.linphone.core.tutorials.TutorialRegistration;
|
||||
import org.linphone.mediastream.Log;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
@ -97,7 +98,7 @@ public class TutorialRegistrationActivity extends TutorialHelloWorldActivity {
|
|||
sipAddressWidget.getText().toString(),
|
||||
sipPasswordWidget.getText().toString());
|
||||
} catch (LinphoneCoreException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
outputText.setText(e.getMessage() +"\n"+outputText.getText());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ import java.lang.reflect.Constructor;
|
|||
import java.lang.reflect.Method;
|
||||
|
||||
import org.linphone.R;
|
||||
import org.linphone.mediastream.Log;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
|
@ -122,7 +123,7 @@ public class PreferencesListFragment extends ListFragment {
|
|||
m.setAccessible(true);
|
||||
m.invoke(mPreferenceManager);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -135,7 +136,7 @@ public class PreferencesListFragment extends ListFragment {
|
|||
m.setAccessible(true);
|
||||
m.invoke(mPreferenceManager);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -153,7 +154,7 @@ public class PreferencesListFragment extends ListFragment {
|
|||
m.setAccessible(true);
|
||||
m.invoke(mPreferenceManager, requestCode, resultCode, data);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -187,7 +188,7 @@ public class PreferencesListFragment extends ListFragment {
|
|||
PreferenceManager preferenceManager = c.newInstance(this.getActivity(), FIRST_REQUEST_CODE);
|
||||
return preferenceManager;
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -214,7 +215,7 @@ public class PreferencesListFragment extends ListFragment {
|
|||
postBindPreferences();
|
||||
}
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -230,7 +231,7 @@ public class PreferencesListFragment extends ListFragment {
|
|||
m.setAccessible(true);
|
||||
return (PreferenceScreen) m.invoke(mPreferenceManager);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -249,7 +250,7 @@ public class PreferencesListFragment extends ListFragment {
|
|||
PreferenceScreen prefScreen = (PreferenceScreen) m.invoke(mPreferenceManager, getActivity(), preferencesResId, getPreferenceScreen());
|
||||
setPreferenceScreen(prefScreen);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue