Posted on Leave a comment

POJO, equals, hashcode

How to simplify developing of pojo classes?

Problems:

  • pojo class is simple class with members, getters, setters. To keep test coverage more  80% we should develop tests for pojo classes. But it is a ridiculous.
  • do not forget to add new members to equals and hashcode methods.

Decisions:

  • Lombok. We have to type just members of class and use annotations. But there are problems:
    • final members without initialization
    • there are conflicts in annotationProcessor
  • AutoValue. by Google.
    • complicated to use
    • generate child class
  • Kotlin data classes.
    • by Google
    • no problems in annotationProcessor
    • we use Kotlin!!!
Posted on Leave a comment

Clean status bar and Demo mode

Demo Mode for the Android System UI

//enable demo
adb shell settings put global sysui_demo_allowed 1 
// display time 12:00
adb shell am broadcast -a com.android.systemui.demo -e command clock -e hhmm 1200
// Display full mobile data without type
adb shell am broadcast -a com.android.systemui.demo -e command network -e mobile show -e level 4 -e datatype false
// Hide notifications
adb shell am broadcast -a com.android.systemui.demo -e command notifications -e visible false
// Show full battery but not in charging state
adb shell am broadcast -a com.android.systemui.demo -e command battery -e plugged false -e level 100
//exit
adb shell am broadcast -a com.android.systemui.demo -e command exit