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

Commit 7739c8d6 authored by Yining Liu's avatar Yining Liu
Browse files

Add logs to track ViewFlipper updateRunning

Add logs to track ViewFlipper updateRunning to help
investigating battery life. This log should not run
on production.

Test: logcat
Bug: 409112153
Flag: EXEMPT log only update
Change-Id: Ibe38bfd647ba22a664e3ee3d63840d4869ca548e
parent ad3c5519
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -38,7 +38,9 @@ import android.widget.RemoteViews.RemoteView;
@RemoteView
public class ViewFlipper extends ViewAnimator {
    private static final String TAG = "ViewFlipper";
    private static final boolean LOGD = false;

    //TODO(b/423971232): set LOGD back to false once the log is unneeded
    private static final boolean LOGD = Build.isDebuggable();

    private static final int DEFAULT_INTERVAL = 3000;

@@ -181,7 +183,11 @@ public class ViewFlipper extends ViewAnimator {
        }
        if (LOGD) {
            Log.d(TAG, "updateRunning() mVisible=" + mVisible + ", mStarted=" + mStarted
                    + ", mInhibited=" + mInhibited + ", mRunning=" + mRunning);
                    + ", mInhibited=" + mInhibited + ", mRunning=" + mRunning
                    + ", mInhibited=" + mInhibited + ", flipNow=" + flipNow
                    + ", mFlipInterval=" + mFlipInterval + ", view=" + this
                    + ", parent=" + this.getParent()
            );
        }
    }