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

Commit 53caac09 authored by Xiaowen Lei's avatar Xiaowen Lei
Browse files

Hide Log.d behind DEBUG.

Flag: android.app.api_rich_ongoing
Bug: 372908709
Test: Post ProgressStyle notifs via test app, confirm logs are gone.
Change-Id: I9f1faf5c2bf6cf035882e495d62b8bfc38c0160e
parent ef7cce26
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ import java.util.TreeSet;
public final class NotificationProgressBar extends ProgressBar implements
        NotificationProgressDrawable.BoundsChangeListener {
    private static final String TAG = "NotificationProgressBar";
    private static final boolean DEBUG = false;

    private NotificationProgressDrawable mNotificationProgressDrawable;
    private final Rect mProgressDrawableBounds = new Rect();
@@ -417,8 +418,10 @@ public final class NotificationProgressBar extends ProgressBar implements
    }

    private void updateDrawableParts() {
        if (DEBUG) {
            Log.d(TAG, "updateDrawableParts() called. mNotificationProgressDrawable = "
                    + mNotificationProgressDrawable + ", mParts = " + mParts);
        }

        if (mNotificationProgressDrawable == null) return;
        if (mParts == null) return;
@@ -426,7 +429,9 @@ public final class NotificationProgressBar extends ProgressBar implements
        final float width = mNotificationProgressDrawable.getBounds().width();
        if (width == 0) {
            if (mProgressDrawableParts != null) {
                if (DEBUG) {
                    Log.d(TAG, "Clearing mProgressDrawableParts");
                }
                mProgressDrawableParts.clear();
                mNotificationProgressDrawable.setParts(mProgressDrawableParts);
            }
@@ -451,7 +456,9 @@ public final class NotificationProgressBar extends ProgressBar implements
                mProgressModel.isStyledByProgress(),
                mHasTrackerIcon ? 0F : mNotificationProgressDrawable.getSegSegGap());

        if (DEBUG) {
            Log.d(TAG, "Updating NotificationProgressDrawable parts");
        }
        mNotificationProgressDrawable.setParts(p.first);
        mAdjustedProgressFraction = p.second / width;
    }