milaq/android_frameworks_base — comment on commit c7a7abf037f67a68490f825590d85d7e07145a64
File: packages/SystemUI/src/com/android/systemui/statusbar/CmStatusBarView.java line 730
By zeusk:

Instead you can declare hapticsEnabled in main scope and call "vibrate" only if it is true, should save some overhead on function calls.