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

Commit 3747f3f4 authored by Jim Miller's avatar Jim Miller
Browse files

Fix 2926276: Remove spurrious warning about unspecified measurespec.

Only issue the warning in debug mode.

Change-Id: I5fecb2e6b0013ce775187a878f5a81317e758f2c
parent 931831dc
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -474,11 +474,14 @@ public class SlidingTab extends ViewGroup {
        int heightSpecMode = MeasureSpec.getMode(heightMeasureSpec);
        int heightSpecSize =  MeasureSpec.getSize(heightMeasureSpec);

        if (widthSpecMode == MeasureSpec.UNSPECIFIED || heightSpecMode == MeasureSpec.UNSPECIFIED) {
        if (DBG) {
            if (widthSpecMode == MeasureSpec.UNSPECIFIED 
                    || heightSpecMode == MeasureSpec.UNSPECIFIED) {
                Log.e("SlidingTab", "SlidingTab cannot have UNSPECIFIED MeasureSpec"
                        +"(wspec=" + widthSpecMode + ", hspec=" + heightSpecMode + ")",
                        new RuntimeException(LOG_TAG + "stack:"));
            }
        }

        mLeftSlider.measure();
        mRightSlider.measure();