Millisecond-Chronometer icon indicating copy to clipboard operation
Millisecond-Chronometer copied to clipboard

Handler should be static

Open OuterObsessionSoftware opened this issue 6 years ago • 0 comments

The following handler should really be static:

private Handler mHandler = new Handler() {
        public void handleMessage(Message m) {
            if (mRunning) {
                updateText(SystemClock.elapsedRealtime());
                dispatchChronometerTick();
                sendMessageDelayed(Message.obtain(this , TICK_WHAT),
                        100);
            }
        }
    };

For accessing the UI you could consider using weakreferences.

Other then that looks pretty good :)

OuterObsessionSoftware avatar Dec 10 '19 01:12 OuterObsessionSoftware