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

Commit 5b048292 authored by Ken Wakasa's avatar Ken Wakasa Committed by Android (Google) Code Review
Browse files

Merge "Rename ProductionFlag.IS_EXPERIMENTAL to USES_DEVELOPMENT_ONLY_DIAGNOSTICS" into jb-mr2-dev

parents 20591e43 9c3860ce
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -287,10 +287,10 @@ public class KeyboardView extends View {
            }
        }

        // ResearchLogging indicator.
        // Research Logging (Development Only Diagnostics) indicator.
        // TODO: Reimplement using a keyboard background image specific to the ResearchLogger,
        // and remove this call.
        if (ProductionFlag.IS_EXPERIMENTAL) {
        if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
            ResearchLogger.getInstance().paintIndicator(this, paint, canvas, width, height);
        }

+12 −11
Original line number Diff line number Diff line
@@ -662,7 +662,7 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
                ? mSpaceKey.getIcon(keyboard.mIconsSet, Constants.Color.ALPHA_OPAQUE) : null;
        final int keyHeight = keyboard.mMostCommonKeyHeight - keyboard.mVerticalGap;
        mSpacebarTextSize = keyHeight * mSpacebarTextRatio;
        if (ProductionFlag.IS_EXPERIMENTAL) {
        if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
            ResearchLogger.mainKeyboardView_setKeyboard(keyboard);
        }

@@ -925,10 +925,10 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
    @Override
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        // Notify the research logger that the keyboard view has been attached.  This is needed
        // to properly show the splash screen, which requires that the window token of the
        // KeyboardView be non-null.
        if (ProductionFlag.IS_EXPERIMENTAL) {
        // Notify the ResearchLogger (development only diagnostics) that the keyboard view has
        // been attached.  This is needed to properly show the splash screen, which requires that
        // the window token of the KeyboardView be non-null.
        if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
            ResearchLogger.getInstance().mainKeyboardView_onAttachedToWindow(this);
        }
    }
@@ -937,9 +937,10 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
    protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        mPreviewPlacerView.removeAllViews();
        // Notify the research logger that the keyboard view has been detached.  This is needed
        // to invalidate the reference of {@link MainKeyboardView} to null.
        if (ProductionFlag.IS_EXPERIMENTAL) {
        // Notify the ResearchLogger (development only diagnostics) that the keyboard view has
        // been detached.  This is needed to invalidate the reference of {@link MainKeyboardView}
        // to null.
        if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
            ResearchLogger.getInstance().mainKeyboardView_onDetachedFromWindow();
        }
    }
@@ -977,7 +978,7 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
        if (key == null) {
            return false;
        }
        if (ProductionFlag.IS_EXPERIMENTAL) {
        if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
            ResearchLogger.mainKeyboardView_onLongPress();
        }
        final int code = key.mCode;
@@ -1125,7 +1126,7 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
        }
        // TODO: This should be moved to the tracker.processMotionEvent() call below.
        // Currently the same "move" event is being logged twice.
        if (ProductionFlag.IS_EXPERIMENTAL) {
        if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
            ResearchLogger.mainKeyboardView_processMotionEvent(
                    me, action, eventTime, index, id, x, y);
        }
@@ -1185,7 +1186,7 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
                if (ENABLE_USABILITY_STUDY_LOG) {
                    writeUsabilityStudyLog(me, action, eventTime, i, pointerId, px, py);
                }
                if (ProductionFlag.IS_EXPERIMENTAL) {
                if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
                    ResearchLogger.mainKeyboardView_processMotionEvent(
                            me, action, eventTime, i, pointerId, px, py);
                }
+5 −5
Original line number Diff line number Diff line
@@ -478,7 +478,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
                    output, ignoreModifierKey ? " ignoreModifier" : "",
                    altersCode ? " altersCode" : "", key.isEnabled() ? "" : " disabled"));
        }
        if (ProductionFlag.IS_EXPERIMENTAL) {
        if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
            ResearchLogger.pointerTracker_callListenerOnCodeInput(key, x, y, ignoreModifierKey,
                    altersCode, code);
        }
@@ -510,7 +510,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
                    withSliding ? " sliding" : "", ignoreModifierKey ? " ignoreModifier" : "",
                    key.isEnabled() ?  "": " disabled"));
        }
        if (ProductionFlag.IS_EXPERIMENTAL) {
        if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
            ResearchLogger.pointerTracker_callListenerOnRelease(key, primaryCode, withSliding,
                    ignoreModifierKey);
        }
@@ -526,7 +526,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
        if (DEBUG_LISTENER) {
            Log.d(TAG, String.format("[%d] onCancelInput", mPointerId));
        }
        if (ProductionFlag.IS_EXPERIMENTAL) {
        if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
            ResearchLogger.pointerTracker_callListenerOnCancelInput();
        }
        mListener.onCancelInput();
@@ -843,7 +843,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
                    Log.w(TAG, String.format("[%d] onDownEvent:"
                            + " ignore potential noise: time=%d distance=%d",
                            mPointerId, deltaT, distance));
                if (ProductionFlag.IS_EXPERIMENTAL) {
                if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
                    ResearchLogger.pointerTracker_onDownEvent(deltaT, distance * distance);
                }
                cancelTracking();
@@ -1000,7 +1000,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
                    x, y, Constants.printableCode(key.mCode)));
        }
        // TODO: This should be moved to outside of this nested if-clause?
        if (ProductionFlag.IS_EXPERIMENTAL) {
        if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
            ResearchLogger.pointerTracker_onMoveEvent(x, y, lastX, lastY);
        }
        onUpEventInternal(x, y, eventTime);
+1 −1
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ public final class TouchScreenRegulator {
        if (handleSuddenJumping(me)) {
            if (DEBUG_MODE)
                Log.w(TAG, "onTouchEvent: ignore sudden jump " + me);
            if (ProductionFlag.IS_EXPERIMENTAL) {
            if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
                ResearchLogger.suddenJumpingTouchEventHandler_onTouchEvent(me);
            }
            return true;
+3 −2
Original line number Diff line number Diff line
@@ -289,8 +289,9 @@ final class BinaryDictionaryGetter {
        // cacheWordListsFromContentProvider returns the list of files it copied to local
        // storage, but we don't really care about what was copied NOW: what we want is the
        // list of everything we ever cached, so we ignore the return value.
        // TODO: The experimental version is not supported by the Dictionary Pack Service yet
        if (!ProductionFlag.IS_EXPERIMENTAL) {
        // TODO: The development-only-diagnostic version is not supported by the Dictionary Pack
        // Service yet
        if (!ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
            // We need internet access to do the following. Only do this if the package actually
            // has the permission.
            if (context.checkCallingOrSelfPermission(android.Manifest.permission.INTERNET)
Loading