Reduced logging

This commit is contained in:
M66B 2019-12-07 17:02:42 +01:00
parent 2591dc9011
commit 22df24d91b
34 changed files with 143 additions and 144 deletions

View File

@ -116,7 +116,7 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
int before = Helper.getSize(outState);
super.onSaveInstanceState(outState);
int after = Helper.getSize(outState);
Log.i("Saved instance " + this + " size=" + before + "/" + after);
Log.d("Saved instance " + this + " size=" + before + "/" + after);
Map<String, String> crumb = new HashMap<>();
crumb.put("name", this.getClass().getName());
@ -125,12 +125,12 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
Log.breadcrumb("onSaveInstanceState", crumb);
for (String key : outState.keySet())
Log.i("Saved " + this + " " + key + "=" + outState.get(key));
Log.d("Saved " + this + " " + key + "=" + outState.get(key));
}
@Override
protected void onResume() {
Log.i("Resume " + this.getClass().getName());
Log.d("Resume " + this.getClass().getName());
boolean contacts = hasPermission(Manifest.permission.READ_CONTACTS);
if (!this.getClass().equals(ActivitySetup.class) && this.contacts != contacts) {
@ -145,7 +145,7 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
@Override
protected void onPause() {
Log.i("Pause " + this.getClass().getName());
Log.d("Pause " + this.getClass().getName());
super.onPause();
if (!this.getClass().equals(ActivityMain.class) && Helper.shouldAuthenticate(this))
@ -154,13 +154,13 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
@Override
public void onConfigurationChanged(Configuration newConfig) {
Log.i("Config " + this.getClass().getName());
Log.d("Config " + this.getClass().getName());
super.onConfigurationChanged(newConfig);
}
@Override
public void onUserInteraction() {
Log.i("User interaction");
Log.d("User interaction");
if (!this.getClass().equals(ActivityMain.class) && Helper.shouldAuthenticate(this)) {
finishAndRemoveTask();
@ -172,7 +172,7 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
@Override
protected void onUserLeaveHint() {
Log.i("User leaving");
Log.d("User leaving");
}
@Override
@ -255,13 +255,13 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
}
void addBackPressedListener(final IBackPressedListener listener, LifecycleOwner owner) {
Log.i("Adding back listener=" + listener);
Log.d("Adding back listener=" + listener);
backPressedListeners.add(listener);
owner.getLifecycle().addObserver(new LifecycleObserver() {
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroyed() {
Log.i("Removing back listener=" + listener);
Log.d("Removing back listener=" + listener);
backPressedListeners.remove(listener);
}
});

View File

@ -188,7 +188,7 @@ public class ActivityBilling extends ActivityBase implements PurchasesUpdatedLis
}
static boolean isPro(Context context) {
if (false && BuildConfig.DEBUG)
if (BuildConfig.DEBUG && false)
return true;
return PreferenceManager.getDefaultSharedPreferences(context).getBoolean("pro", false);
}

View File

@ -326,7 +326,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
owner.getLifecycle().addObserver(new LifecycleObserver() {
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroyed() {
Log.i(AdapterAccount.this + " parent destroyed");
Log.d(AdapterAccount.this + " parent destroyed");
AdapterAccount.this.parentFragment = null;
}
});
@ -342,22 +342,22 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
diff.dispatchUpdatesTo(new ListUpdateCallback() {
@Override
public void onInserted(int position, int count) {
Log.i("Inserted @" + position + " #" + count);
Log.d("Inserted @" + position + " #" + count);
}
@Override
public void onRemoved(int position, int count) {
Log.i("Removed @" + position + " #" + count);
Log.d("Removed @" + position + " #" + count);
}
@Override
public void onMoved(int fromPosition, int toPosition) {
Log.i("Moved " + fromPosition + ">" + toPosition);
Log.d("Moved " + fromPosition + ">" + toPosition);
}
@Override
public void onChanged(int position, int count, Object payload) {
Log.i("Changed @" + position + " #" + count);
Log.d("Changed @" + position + " #" + count);
}
});
diff.dispatchUpdatesTo(this);

View File

@ -193,7 +193,7 @@ public class AdapterAnswer extends RecyclerView.Adapter<AdapterAnswer.ViewHolder
owner.getLifecycle().addObserver(new LifecycleObserver() {
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroyed() {
Log.i(AdapterAnswer.this + " parent destroyed");
Log.d(AdapterAnswer.this + " parent destroyed");
AdapterAnswer.this.parentFragment = null;
}
});
@ -227,22 +227,22 @@ public class AdapterAnswer extends RecyclerView.Adapter<AdapterAnswer.ViewHolder
diff.dispatchUpdatesTo(new ListUpdateCallback() {
@Override
public void onInserted(int position, int count) {
Log.i("Inserted @" + position + " #" + count);
Log.d("Inserted @" + position + " #" + count);
}
@Override
public void onRemoved(int position, int count) {
Log.i("Removed @" + position + " #" + count);
Log.d("Removed @" + position + " #" + count);
}
@Override
public void onMoved(int fromPosition, int toPosition) {
Log.i("Moved " + fromPosition + ">" + toPosition);
Log.d("Moved " + fromPosition + ">" + toPosition);
}
@Override
public void onChanged(int position, int count, Object payload) {
Log.i("Changed @" + position + " #" + count);
Log.d("Changed @" + position + " #" + count);
}
});
diff.dispatchUpdatesTo(this);

View File

@ -309,7 +309,7 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
owner.getLifecycle().addObserver(new LifecycleObserver() {
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroyed() {
Log.i(AdapterAttachment.this + " parent destroyed");
Log.d(AdapterAttachment.this + " parent destroyed");
AdapterAttachment.this.parentFragment = null;
}
});
@ -332,22 +332,22 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
diff.dispatchUpdatesTo(new ListUpdateCallback() {
@Override
public void onInserted(int position, int count) {
Log.i("Inserted @" + position + " #" + count);
Log.d("Inserted @" + position + " #" + count);
}
@Override
public void onRemoved(int position, int count) {
Log.i("Removed @" + position + " #" + count);
Log.d("Removed @" + position + " #" + count);
}
@Override
public void onMoved(int fromPosition, int toPosition) {
Log.i("Moved " + fromPosition + ">" + toPosition);
Log.d("Moved " + fromPosition + ">" + toPosition);
}
@Override
public void onChanged(int position, int count, Object payload) {
Log.i("Changed @" + position + " #" + count);
Log.d("Changed @" + position + " #" + count);
}
});
diff.dispatchUpdatesTo(this);

View File

@ -163,22 +163,22 @@ public class AdapterCertificate extends RecyclerView.Adapter<AdapterCertificate.
diff.dispatchUpdatesTo(new ListUpdateCallback() {
@Override
public void onInserted(int position, int count) {
Log.i("Inserted @" + position + " #" + count);
Log.d("Inserted @" + position + " #" + count);
}
@Override
public void onRemoved(int position, int count) {
Log.i("Removed @" + position + " #" + count);
Log.d("Removed @" + position + " #" + count);
}
@Override
public void onMoved(int fromPosition, int toPosition) {
Log.i("Moved " + fromPosition + ">" + toPosition);
Log.d("Moved " + fromPosition + ">" + toPosition);
}
@Override
public void onChanged(int position, int count, Object payload) {
Log.i("Changed @" + position + " #" + count);
Log.d("Changed @" + position + " #" + count);
}
});
diff.dispatchUpdatesTo(this);

View File

@ -307,7 +307,7 @@ public class AdapterContact extends RecyclerView.Adapter<AdapterContact.ViewHold
owner.getLifecycle().addObserver(new LifecycleObserver() {
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroyed() {
Log.i(AdapterContact.this + " parent destroyed");
Log.d(AdapterContact.this + " parent destroyed");
AdapterContact.this.parentFragment = null;
}
});
@ -337,22 +337,22 @@ public class AdapterContact extends RecyclerView.Adapter<AdapterContact.ViewHold
diff.dispatchUpdatesTo(new ListUpdateCallback() {
@Override
public void onInserted(int position, int count) {
Log.i("Inserted @" + position + " #" + count);
Log.d("Inserted @" + position + " #" + count);
}
@Override
public void onRemoved(int position, int count) {
Log.i("Removed @" + position + " #" + count);
Log.d("Removed @" + position + " #" + count);
}
@Override
public void onMoved(int fromPosition, int toPosition) {
Log.i("Moved " + fromPosition + ">" + toPosition);
Log.d("Moved " + fromPosition + ">" + toPosition);
}
@Override
public void onChanged(int position, int count, Object payload) {
Log.i("Changed @" + position + " #" + count);
Log.d("Changed @" + position + " #" + count);
}
});
diff.dispatchUpdatesTo(this);

View File

@ -726,7 +726,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
owner.getLifecycle().addObserver(new LifecycleObserver() {
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroyed() {
Log.i(AdapterFolder.this + " parent destroyed");
Log.d(AdapterFolder.this + " parent destroyed");
AdapterFolder.this.parentFragment = null;
}
});
@ -817,22 +817,22 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
diff.dispatchUpdatesTo(new ListUpdateCallback() {
@Override
public void onInserted(int position, int count) {
Log.i("Inserted @" + position + " #" + count);
Log.d("Inserted @" + position + " #" + count);
}
@Override
public void onRemoved(int position, int count) {
Log.i("Removed @" + position + " #" + count);
Log.d("Removed @" + position + " #" + count);
}
@Override
public void onMoved(int fromPosition, int toPosition) {
Log.i("Moved " + fromPosition + ">" + toPosition);
Log.d("Moved " + fromPosition + ">" + toPosition);
}
@Override
public void onChanged(int position, int count, Object payload) {
Log.i("Changed @" + position + " #" + count);
Log.d("Changed @" + position + " #" + count);
}
});
diff.dispatchUpdatesTo(this);

View File

@ -284,7 +284,7 @@ public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHo
owner.getLifecycle().addObserver(new LifecycleObserver() {
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroyed() {
Log.i(AdapterIdentity.this + " parent destroyed");
Log.d(AdapterIdentity.this + " parent destroyed");
AdapterIdentity.this.parentFragment = null;
}
});
@ -316,22 +316,22 @@ public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHo
diff.dispatchUpdatesTo(new ListUpdateCallback() {
@Override
public void onInserted(int position, int count) {
Log.i("Inserted @" + position + " #" + count);
Log.d("Inserted @" + position + " #" + count);
}
@Override
public void onRemoved(int position, int count) {
Log.i("Removed @" + position + " #" + count);
Log.d("Removed @" + position + " #" + count);
}
@Override
public void onMoved(int fromPosition, int toPosition) {
Log.i("Moved " + fromPosition + ">" + toPosition);
Log.d("Moved " + fromPosition + ">" + toPosition);
}
@Override
public void onChanged(int position, int count, Object payload) {
Log.i("Changed @" + position + " #" + count);
Log.d("Changed @" + position + " #" + count);
}
});
diff.dispatchUpdatesTo(this);

View File

@ -195,7 +195,7 @@ public class AdapterImage extends RecyclerView.Adapter<AdapterImage.ViewHolder>
owner.getLifecycle().addObserver(new LifecycleObserver() {
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroyed() {
Log.i(AdapterImage.this + " parent destroyed");
Log.d(AdapterImage.this + " parent destroyed");
AdapterImage.this.parentFragment = null;
}
});
@ -218,22 +218,22 @@ public class AdapterImage extends RecyclerView.Adapter<AdapterImage.ViewHolder>
diff.dispatchUpdatesTo(new ListUpdateCallback() {
@Override
public void onInserted(int position, int count) {
Log.i("Inserted @" + position + " #" + count);
Log.d("Inserted @" + position + " #" + count);
}
@Override
public void onRemoved(int position, int count) {
Log.i("Removed @" + position + " #" + count);
Log.d("Removed @" + position + " #" + count);
}
@Override
public void onMoved(int fromPosition, int toPosition) {
Log.i("Moved " + fromPosition + ">" + toPosition);
Log.d("Moved " + fromPosition + ">" + toPosition);
}
@Override
public void onChanged(int position, int count, Object payload) {
Log.i("Changed @" + position + " #" + count);
Log.d("Changed @" + position + " #" + count);
}
});
diff.dispatchUpdatesTo(this);

View File

@ -80,7 +80,7 @@ public class AdapterLog extends RecyclerView.Adapter<AdapterLog.ViewHolder> {
owner.getLifecycle().addObserver(new LifecycleObserver() {
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroyed() {
Log.i(AdapterLog.this + " parent destroyed");
Log.d(AdapterLog.this + " parent destroyed");
AdapterLog.this.parentFragment = null;
}
});
@ -96,22 +96,22 @@ public class AdapterLog extends RecyclerView.Adapter<AdapterLog.ViewHolder> {
diff.dispatchUpdatesTo(new ListUpdateCallback() {
@Override
public void onInserted(int position, int count) {
Log.i("Inserted @" + position + " #" + count);
Log.d("Inserted @" + position + " #" + count);
}
@Override
public void onRemoved(int position, int count) {
Log.i("Removed @" + position + " #" + count);
Log.d("Removed @" + position + " #" + count);
}
@Override
public void onMoved(int fromPosition, int toPosition) {
Log.i("Moved " + fromPosition + ">" + toPosition);
Log.d("Moved " + fromPosition + ">" + toPosition);
}
@Override
public void onChanged(int position, int count, Object payload) {
Log.i("Changed @" + position + " #" + count);
Log.d("Changed @" + position + " #" + count);
}
});
diff.dispatchUpdatesTo(this);

View File

@ -3728,7 +3728,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
owner.getLifecycle().addObserver(new LifecycleObserver() {
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroyed() {
Log.i(AdapterMessage.this + " parent destroyed");
Log.d(AdapterMessage.this + " parent destroyed");
AdapterMessage.this.parentFragment = null;
}
});

View File

@ -155,22 +155,22 @@ public class AdapterNavAccount extends RecyclerView.Adapter<AdapterNavAccount.Vi
diff.dispatchUpdatesTo(new ListUpdateCallback() {
@Override
public void onInserted(int position, int count) {
Log.i("Inserted @" + position + " #" + count);
Log.d("Inserted @" + position + " #" + count);
}
@Override
public void onRemoved(int position, int count) {
Log.i("Removed @" + position + " #" + count);
Log.d("Removed @" + position + " #" + count);
}
@Override
public void onMoved(int fromPosition, int toPosition) {
Log.i("Moved " + fromPosition + ">" + toPosition);
Log.d("Moved " + fromPosition + ">" + toPosition);
}
@Override
public void onChanged(int position, int count, Object payload) {
Log.i("Changed @" + position + " #" + count);
Log.d("Changed @" + position + " #" + count);
}
});
diff.dispatchUpdatesTo(this);

View File

@ -184,22 +184,22 @@ public class AdapterNavFolder extends RecyclerView.Adapter<AdapterNavFolder.View
diff.dispatchUpdatesTo(new ListUpdateCallback() {
@Override
public void onInserted(int position, int count) {
Log.i("Inserted @" + position + " #" + count);
Log.d("Inserted @" + position + " #" + count);
}
@Override
public void onRemoved(int position, int count) {
Log.i("Removed @" + position + " #" + count);
Log.d("Removed @" + position + " #" + count);
}
@Override
public void onMoved(int fromPosition, int toPosition) {
Log.i("Moved " + fromPosition + ">" + toPosition);
Log.d("Moved " + fromPosition + ">" + toPosition);
}
@Override
public void onChanged(int position, int count, Object payload) {
Log.i("Changed @" + position + " #" + count);
Log.d("Changed @" + position + " #" + count);
}
});
diff.dispatchUpdatesTo(this);

View File

@ -143,22 +143,22 @@ public class AdapterNavMenu extends RecyclerView.Adapter<AdapterNavMenu.ViewHold
diff.dispatchUpdatesTo(new ListUpdateCallback() {
@Override
public void onInserted(int position, int count) {
Log.i("Inserted @" + position + " #" + count);
Log.d("Inserted @" + position + " #" + count);
}
@Override
public void onRemoved(int position, int count) {
Log.i("Removed @" + position + " #" + count);
Log.d("Removed @" + position + " #" + count);
}
@Override
public void onMoved(int fromPosition, int toPosition) {
Log.i("Moved " + fromPosition + ">" + toPosition);
Log.d("Moved " + fromPosition + ">" + toPosition);
}
@Override
public void onChanged(int position, int count, Object payload) {
Log.i("Changed @" + position + " #" + count);
Log.d("Changed @" + position + " #" + count);
}
});
diff.dispatchUpdatesTo(this);

View File

@ -152,22 +152,22 @@ public class AdapterNavUnified extends RecyclerView.Adapter<AdapterNavUnified.Vi
diff.dispatchUpdatesTo(new ListUpdateCallback() {
@Override
public void onInserted(int position, int count) {
Log.i("Inserted @" + position + " #" + count);
Log.d("Inserted @" + position + " #" + count);
}
@Override
public void onRemoved(int position, int count) {
Log.i("Removed @" + position + " #" + count);
Log.d("Removed @" + position + " #" + count);
}
@Override
public void onMoved(int fromPosition, int toPosition) {
Log.i("Moved " + fromPosition + ">" + toPosition);
Log.d("Moved " + fromPosition + ">" + toPosition);
}
@Override
public void onChanged(int position, int count, Object payload) {
Log.i("Changed @" + position + " #" + count);
Log.d("Changed @" + position + " #" + count);
}
});
diff.dispatchUpdatesTo(this);

View File

@ -247,7 +247,7 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
owner.getLifecycle().addObserver(new LifecycleObserver() {
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroyed() {
Log.i(AdapterOperation.this + " parent destroyed");
Log.d(AdapterOperation.this + " parent destroyed");
AdapterOperation.this.parentFragment = null;
}
});
@ -263,22 +263,22 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
diff.dispatchUpdatesTo(new ListUpdateCallback() {
@Override
public void onInserted(int position, int count) {
Log.i("Inserted @" + position + " #" + count);
Log.d("Inserted @" + position + " #" + count);
}
@Override
public void onRemoved(int position, int count) {
Log.i("Removed @" + position + " #" + count);
Log.d("Removed @" + position + " #" + count);
}
@Override
public void onMoved(int fromPosition, int toPosition) {
Log.i("Moved " + fromPosition + ">" + toPosition);
Log.d("Moved " + fromPosition + ">" + toPosition);
}
@Override
public void onChanged(int position, int count, Object payload) {
Log.i("Changed @" + position + " #" + count);
Log.d("Changed @" + position + " #" + count);
}
});
diff.dispatchUpdatesTo(this);

View File

@ -79,7 +79,7 @@ public class AdapterOrder extends RecyclerView.Adapter<AdapterOrder.ViewHolder>
owner.getLifecycle().addObserver(new LifecycleObserver() {
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroyed() {
Log.i(AdapterOrder.this + " parent destroyed");
Log.d(AdapterOrder.this + " parent destroyed");
AdapterOrder.this.parentFragment = null;
}
});
@ -98,22 +98,22 @@ public class AdapterOrder extends RecyclerView.Adapter<AdapterOrder.ViewHolder>
diff.dispatchUpdatesTo(new ListUpdateCallback() {
@Override
public void onInserted(int position, int count) {
Log.i("Inserted @" + position + " #" + count);
Log.d("Inserted @" + position + " #" + count);
}
@Override
public void onRemoved(int position, int count) {
Log.i("Removed @" + position + " #" + count);
Log.d("Removed @" + position + " #" + count);
}
@Override
public void onMoved(int fromPosition, int toPosition) {
Log.i("Moved " + fromPosition + ">" + toPosition);
Log.d("Moved " + fromPosition + ">" + toPosition);
}
@Override
public void onChanged(int position, int count, Object payload) {
Log.i("Changed @" + position + " #" + count);
Log.d("Changed @" + position + " #" + count);
}
});
diff.dispatchUpdatesTo(this);

View File

@ -380,7 +380,7 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
owner.getLifecycle().addObserver(new LifecycleObserver() {
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroyed() {
Log.i(AdapterRule.this + " parent destroyed");
Log.d(AdapterRule.this + " parent destroyed");
AdapterRule.this.parentFragment = null;
}
});
@ -396,22 +396,22 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
diff.dispatchUpdatesTo(new ListUpdateCallback() {
@Override
public void onInserted(int position, int count) {
Log.i("Inserted @" + position + " #" + count);
Log.d("Inserted @" + position + " #" + count);
}
@Override
public void onRemoved(int position, int count) {
Log.i("Removed @" + position + " #" + count);
Log.d("Removed @" + position + " #" + count);
}
@Override
public void onMoved(int fromPosition, int toPosition) {
Log.i("Moved " + fromPosition + ">" + toPosition);
Log.d("Moved " + fromPosition + ">" + toPosition);
}
@Override
public void onChanged(int position, int count, Object payload) {
Log.i("Changed @" + position + " #" + count);
Log.d("Changed @" + position + " #" + count);
}
});
diff.dispatchUpdatesTo(this);

View File

@ -87,7 +87,7 @@ public class AdapterRuleMatch extends RecyclerView.Adapter<AdapterRuleMatch.View
owner.getLifecycle().addObserver(new LifecycleObserver() {
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroyed() {
Log.i(AdapterRuleMatch.this + " parent destroyed");
Log.d(AdapterRuleMatch.this + " parent destroyed");
}
});
}
@ -102,22 +102,22 @@ public class AdapterRuleMatch extends RecyclerView.Adapter<AdapterRuleMatch.View
diff.dispatchUpdatesTo(new ListUpdateCallback() {
@Override
public void onInserted(int position, int count) {
Log.i("Inserted @" + position + " #" + count);
Log.d("Inserted @" + position + " #" + count);
}
@Override
public void onRemoved(int position, int count) {
Log.i("Removed @" + position + " #" + count);
Log.d("Removed @" + position + " #" + count);
}
@Override
public void onMoved(int fromPosition, int toPosition) {
Log.i("Moved " + fromPosition + ">" + toPosition);
Log.d("Moved " + fromPosition + ">" + toPosition);
}
@Override
public void onChanged(int position, int count, Object payload) {
Log.i("Changed @" + position + " #" + count);
Log.d("Changed @" + position + " #" + count);
}
});
diff.dispatchUpdatesTo(this);

View File

@ -42,7 +42,7 @@ public class ContentLoadingProgressBar extends ProgressBar {
@Override
public void setVisibility(int visibility) {
this.visibility = visibility;
if (false && BuildConfig.DEBUG) {
if (BuildConfig.DEBUG && false) {
super.setVisibility(visibility);
return;
}

View File

@ -2302,8 +2302,8 @@ class Core {
if (process)
updateContactInfo(context, folder, message);
else if (BuildConfig.DEBUG)
Log.i(folder.name + " unchanged uid=" + uid);
else
Log.d(folder.name + " unchanged uid=" + uid);
}
List<String> fkeywords = new ArrayList<>(Arrays.asList(folder.keywords));

View File

@ -135,8 +135,7 @@ public abstract class DB extends RoomDatabase {
EntityLog.TABLE_NAME) {
@Override
public void onInvalidated(@NonNull Set<String> tables) {
if (BuildConfig.DEBUG)
Log.i("ROOM invalidated=" + TextUtils.join(",", tables));
Log.d("ROOM invalidated=" + TextUtils.join(",", tables));
}
});
}

View File

@ -40,7 +40,6 @@ import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.documentfile.provider.DocumentFile;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.Lifecycle;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
@ -124,12 +123,12 @@ public class FragmentBase extends Fragment {
@Override
public void onSaveInstanceState(Bundle outState) {
Log.i("Save instance " + this);
Log.d("Save instance " + this);
int before = Helper.getSize(outState);
outState.putString("fair:subtitle", subtitle);
super.onSaveInstanceState(outState);
int after = Helper.getSize(outState);
Log.i("Saved instance " + this + " size=" + before + "/" + after);
Log.d("Saved instance " + this + " size=" + before + "/" + after);
Map<String, String> crumb = new HashMap<>();
crumb.put("name", this.getClass().getName());
@ -142,7 +141,7 @@ public class FragmentBase extends Fragment {
Log.breadcrumb("onSaveInstanceState", crumb);
for (String key : outState.keySet())
Log.i("Saved " + this + " " + key + "=" + outState.get(key));
Log.d("Saved " + this + " " + key + "=" + outState.get(key));
}
@Override
@ -155,19 +154,19 @@ public class FragmentBase extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
Log.i("Create view " + this);
Log.d("Create view " + this);
return super.onCreateView(inflater, container, savedInstanceState);
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
Log.i("Activity " + this + " saved=" + (savedInstanceState != null));
Log.d("Activity " + this + " saved=" + (savedInstanceState != null));
super.onActivityCreated(savedInstanceState);
}
@Override
public void onResume() {
Log.i("Resume " + this);
Log.d("Resume " + this);
super.onResume();
updateSubtitle();
if (finish) {
@ -184,7 +183,7 @@ public class FragmentBase extends Fragment {
@Override
public void onPause() {
Log.i("Pause " + this);
Log.d("Pause " + this);
super.onPause();
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(getContext());
@ -217,6 +216,7 @@ public class FragmentBase extends Fragment {
@Override
public void onDetach() {
Log.d("Detach " + this);
super.onDetach();
InputMethodManager im = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
@ -227,7 +227,7 @@ public class FragmentBase extends Fragment {
@Override
public void onConfigurationChanged(Configuration newConfig) {
Log.i("Config " + this);
Log.d("Config " + this);
super.onConfigurationChanged(newConfig);
}

View File

@ -3833,10 +3833,13 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
private BroadcastReceiver creceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
Log.i("Received " + intent);
Log.logExtras(intent);
String action = intent.getAction();
if (!SimpleTask.ACTION_TASK_COUNT.equals(action)) {
Log.i("Received " + intent);
Log.logExtras(intent);
}
if (SimpleTask.ACTION_TASK_COUNT.equals(action))
onTaskCount(intent);
else if (ACTION_NEW_MESSAGE.equals(action))

View File

@ -167,8 +167,7 @@ public class Helper {
@Override
protected void beforeExecute(Thread t, Runnable r) {
if (BuildConfig.DEBUG)
Log.i("Executing " + t.getName());
Log.d("Executing " + t.getName());
}
}

View File

@ -436,10 +436,9 @@ public class HtmlHelper {
}
boolean email = matcher.group().contains("@") && !matcher.group().contains(":");
if (BuildConfig.DEBUG)
Log.i("Web url=" + matcher.group() +
" " + matcher.start() + "..." + matcher.end() + "/" + text.length() +
" linked=" + linked + " email=" + email + " count=" + links);
Log.d("Web url=" + matcher.group() +
" " + matcher.start() + "..." + matcher.end() + "/" + text.length() +
" linked=" + linked + " email=" + email + " count=" + links);
if (linked)
span.appendText(text.substring(pos, matcher.end()));

View File

@ -218,9 +218,8 @@ class ImageHelper {
boolean embedded = a.source.startsWith("cid:");
boolean data = a.source.startsWith("data:");
if (BuildConfig.DEBUG)
Log.i("Image show=" + show + " inline=" + inline +
" embedded=" + embedded + " data=" + data + " source=" + a.source);
Log.d("Image show=" + show + " inline=" + inline +
" embedded=" + embedded + " data=" + data + " source=" + a.source);
// Embedded images
if (embedded && (show || inline)) {

View File

@ -32,7 +32,7 @@ public class ItemDetailsMessage extends ItemDetailsLookup.ItemDetails<Long> {
@Override
public int getPosition() {
int pos = viewHolder.getAdapterPosition();
Log.i("ItemDetails pos=" + pos);
Log.d("ItemDetails pos=" + pos);
return pos;
}
@ -41,7 +41,7 @@ public class ItemDetailsMessage extends ItemDetailsLookup.ItemDetails<Long> {
public Long getSelectionKey() {
int pos = viewHolder.getAdapterPosition();
Long key = viewHolder.getKey();
Log.i("ItemDetails pos=" + pos + " key=" + key);
Log.d("ItemDetails pos=" + pos + " key=" + key);
return key;
}
}

View File

@ -104,7 +104,7 @@ public class Log {
private static final String TAG = "fairemail";
public static int d(String msg) {
if (BuildConfig.DEBUG)
if (BuildConfig.DEBUG && false)
return android.util.Log.d(TAG, msg);
else
return 0;

View File

@ -207,7 +207,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
@Override
public void onChanged(List<TupleAccountNetworkState> accountNetworkStates) {
if (!running) {
Log.i("XXX not running");
Log.i("### not running");
return;
}
@ -225,7 +225,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
int index = accountStates.indexOf(current);
if (index < 0) {
if (current.canRun()) {
Log.i("XXX new " + current);
Log.i("### new " + current);
start(current, current.accountState.isEnabled(current.enabled));
}
} else {
@ -242,7 +242,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
if (current.reload ||
prev.canRun() != current.canRun() ||
!prev.accountState.equals(current.accountState)) {
Log.i("XXX changed " + current +
Log.i("### changed " + current +
" reload=" + current.reload +
" run prev=" + prev.canRun() +
" run cur=" + current.canRun() +
@ -309,9 +309,9 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
crumb.put("lastLost", new Date(lastLost).toString());
Log.breadcrumb("start", crumb);
Log.i("XXX start=" + accountNetworkState);
Log.i("### start=" + accountNetworkState);
astate.start();
Log.i("XXX started=" + accountNetworkState);
Log.i("### started=" + accountNetworkState);
}
});
}
@ -334,10 +334,10 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
crumb.put("lastLost", new Date(lastLost).toString());
Log.breadcrumb("stop", crumb);
Log.i("XXX stop=" + accountNetworkState);
Log.i("### stop=" + accountNetworkState);
state.stop();
state.join();
Log.i("XXX stopped=" + accountNetworkState);
Log.i("### stopped=" + accountNetworkState);
}
});
}
@ -366,7 +366,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
queue.submit(new Runnable() {
@Override
public void run() {
Log.i("XXX exit");
Log.i("### exit");
DB db = DB.getInstance(ServiceSynchronize.this);
List<EntityOperation> ops = db.operation().getOperations(EntityOperation.SYNC);
@ -374,7 +374,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
db.folder().setFolderSyncState(op.folder, null);
stopSelf();
Log.i("XXX exited");
Log.i("### exited");
}
});
}
@ -563,7 +563,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
String action = (intent == null ? null : intent.getAction());
Log.i("Service command intent=" + intent + " action=" + action);
String reason = (intent == null ? null : intent.getStringExtra("reason"));
Log.i("### Service command intent=" + intent + " action=" + action + " reason=" + reason);
Log.logExtras(intent);
super.onStartCommand(intent, flags, startId);

View File

@ -134,7 +134,7 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
cleanup(context);
} else if (state.isAtLeast(Lifecycle.State.RESUMED)) {
// Inline delivery
Log.i("Deliver task " + name);
Log.i("Deliver task " + name + " state=" + state);
deliver();
cleanup(context);
} else

View File

@ -46,8 +46,7 @@ public class TwoStateOwner implements LifecycleOwner {
owner.getLifecycle().addObserver(new LifecycleObserver() {
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroyed() {
if (BuildConfig.DEBUG)
Log.i("LifeCycle " + name + " parent destroyed");
Log.d("LifeCycle " + name + " parent destroyed");
destroy();
}
});

View File

@ -64,12 +64,12 @@ public class ViewModelMessages extends ViewModel {
String query, boolean server) {
Args args = new Args(context, viewType, type, account, folder, thread, id, query, server);
Log.i("Get model=" + viewType + " " + args);
Log.d("Get model=" + viewType + " " + args);
dump();
Model model = models.get(viewType);
if (model == null || !model.args.equals(args)) {
Log.i("Creating model=" + viewType + " replace=" + (model != null));
Log.d("Creating model=" + viewType + " replace=" + (model != null));
if (model != null)
model.list.removeObservers(owner);
@ -165,17 +165,17 @@ public class ViewModelMessages extends ViewModel {
int free_mb = Log.getFreeMemMb();
boolean lowmem = (free_mb < LOW_MEM_MB);
Log.i("Destroy model=" + viewType +
Log.d("Destroy model=" + viewType +
" lowmem=" + lowmem + " free=" + free_mb + " MB");
Model model = models.get(viewType);
if (model != null) {
Log.i("Remove observer model=" + viewType);
Log.d("Remove observer model=" + viewType);
model.list.removeObservers(owner);
}
if (viewType == AdapterMessage.ViewType.THREAD || lowmem) {
Log.i("Remove model=" + viewType);
Log.d("Remove model=" + viewType);
models.remove(viewType);
}
@ -191,10 +191,10 @@ public class ViewModelMessages extends ViewModel {
if (viewType != AdapterMessage.ViewType.THREAD) {
last = viewType;
Log.i("Last model=" + last);
Log.d("Last model=" + last);
}
Log.i("Returning model=" + viewType);
Log.d("Returning model=" + viewType);
dump();
return model;
@ -207,7 +207,7 @@ public class ViewModelMessages extends ViewModel {
}
void observePrevNext(LifecycleOwner owner, final long id, final IPrevNext intf) {
Log.i("Observe prev/next model=" + last);
Log.d("Observe prev/next model=" + last);
Model model = models.get(last);
if (model == null) {
@ -215,11 +215,11 @@ public class ViewModelMessages extends ViewModel {
return;
}
Log.i("Observe previous/next id=" + id);
Log.d("Observe previous/next id=" + id);
model.list.observe(owner, new Observer<PagedList<TupleMessageEx>>() {
@Override
public void onChanged(PagedList<TupleMessageEx> messages) {
Log.i("Observe previous/next id=" + id + " messages=" + messages.size());
Log.d("Observe previous/next id=" + id + " messages=" + messages.size());
for (int pos = 0; pos < messages.size(); pos++) {
TupleMessageEx item = messages.get(pos);
@ -376,7 +376,7 @@ public class ViewModelMessages extends ViewModel {
}
private void dump() {
Log.i("Current models=" + TextUtils.join(", ", models.keySet()));
Log.d("Current models=" + TextUtils.join(", ", models.keySet()));
}
class Model {