f09d033156
Once sensor listeners are registered, onSensorChanged() (and subsequently getRotatedValues()) gets called multiple times per socond. Obtaining WindowManager on each of those calls is superfluous and can be avoided by extracting it to a lazy class val. getRotatedValue() can also be called before checking sensor type, and used for each one of them, resulting in less code repetition. |
||
---|---|---|
.. | ||
app | ||
editor | ||
gradle/wrapper | ||
lib | ||
nativeSrcsConfigs | ||
scripts | ||
build.gradle | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
settings.gradle |