Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb618290 authored by cketti's avatar cketti Committed by Vincent Breitmoser
Browse files

Use format strings with Timber

parent b49e699d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -953,8 +953,7 @@ public class Account implements BaseAccount, StoreConfig {
                switchLocalStorage(id);
                successful = true;
            } catch (MessagingException e) {
                Timber.e(e, "Switching local storage provider from " +
                        mLocalStorageProviderId + " to " + id + " failed.");
                Timber.e(e, "Switching local storage provider from %s to %s failed.", mLocalStorageProviderId, id);
            }

            // if migration to/from SD-card failed once, it will fail again.
+5 −7
Original line number Diff line number Diff line
@@ -418,7 +418,7 @@ public class K9 extends Application {
                try {
                    queue.put(new Handler());
                } catch (InterruptedException e) {
                    Timber.e(e, "");
                    Timber.e(e);
                }
                Looper.loop();
            }
@@ -572,10 +572,8 @@ public class K9 extends Application {
                intent.putExtra(K9.Intents.EmailReceived.EXTRA_FROM_SELF, account.isAnIdentity(message.getFrom()));
                K9.this.sendBroadcast(intent);
                if (K9.DEBUG)
                    Timber.d("Broadcasted: action=" + action
                            + " account=" + account.getDescription()
                            + " folder=" + folder
                            + " message uid=" + message.getUid());
                    Timber.d("Broadcasted: action=%s account=%s folder=%s message uid=%s",
                            action, account.getDescription(), folder, message.getUid());
            }

            private void updateUnreadWidget() {
@@ -805,12 +803,12 @@ public class K9 extends Application {
        synchronized (observers) {
            for (final ApplicationAware aware : observers) {
                if (K9.DEBUG) {
                    Timber.v("Initializing observer: " + aware);
                    Timber.v("Initializing observer: %s", aware);
                }
                try {
                    aware.initializeComponent(this);
                } catch (Exception e) {
                    Timber.w(e, "Failure when notifying " + aware);
                    Timber.w(e, "Failure when notifying %s", aware);
                }
            }

+3 −4
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@ import com.fsck.k9.mail.store.RemoteStore;
import com.fsck.k9.mailstore.LocalStore;
import com.fsck.k9.preferences.StorageEditor;
import com.fsck.k9.preferences.Storage;
import timber.log.Timber;


public class Preferences {
@@ -130,7 +129,7 @@ public class Preferences {
        try {
            RemoteStore.removeInstance(account);
        } catch (Exception e) {
            Timber.e(e, "Failed to reset remote store for account " + account.getUuid());
            Timber.e(e, "Failed to reset remote store for account %s", account.getUuid());
        }
        LocalStore.removeAccount(account);

@@ -178,8 +177,8 @@ public class Preferences {
            try {
                return Enum.valueOf(defaultEnum.getDeclaringClass(), stringPref);
            } catch (IllegalArgumentException ex) {
                Timber.w(ex, "Unable to convert preference key [" + key +
                        "] value [" + stringPref + "] to enum of type " + defaultEnum.getDeclaringClass());
                Timber.w(ex, "Unable to convert preference key [%s] value [%s] to enum of type %s",
                        key, stringPref, defaultEnum.getDeclaringClass());

                return defaultEnum;
            }
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ public class Throttle {
    }

    private void debugLog(String message) {
        Timber.d("Throttle: [" + mName + "] " + message);
        Timber.d("Throttle: [%s] %s", mName, message);
    }

    private boolean isCallbackScheduled() {
+2 −2
Original line number Diff line number Diff line
@@ -1411,7 +1411,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        Timber.i("onActivityResult requestCode = " + requestCode + ", resultCode = " + resultCode + ", data = " + data);
        Timber.i("onActivityResult requestCode = %d, resultCode = %s, data = %s", requestCode, resultCode, data);
        if (resultCode != RESULT_OK)
            return;
        if (data == null) {
@@ -2069,7 +2069,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
                Timber.w(e, "Exception during export");
                return false;
            } catch (FileNotFoundException e) {
                Timber.w("Couldn't read content from URI " + mUri);
                Timber.w("Couldn't read content from URI %s", mUri);
                return false;
            }
            return true;
Loading