Skip to content

Commit

Permalink
Fix for Brightness on setup
Browse files Browse the repository at this point in the history
  • Loading branch information
KaMpErTuGa committed Sep 25, 2017
1 parent 411a930 commit 94dca20
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ public void start ()
super.start();
setStatus(STATUS_AWAITING_CLICK);
//
OBBrightnessManager.sharedManager.setScreenSleepTimeToMax();
//
OBUtils.runOnOtherThread(new OBUtils.RunLambda()
{
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public boolean updateBrightness (boolean loop)
long elapsed = currentTimeStamp - lastTouchTimeStamp;
float percentage = (elapsed < checkIntervalMS) ? maxBrightness() : (elapsed < checkIntervalMS * 2) ? maxBrightness() / 2.0f : (elapsed < checkIntervalMS * 3) ? maxBrightness() / 4.0f : 0.0f;
//
// MainActivity.log("updateBrightness : " + elapsed + " " + percentage);
MainActivity.log("updateBrightness : " + elapsed + " " + percentage);
//
if (lastBrightness != percentage)
{
Expand Down

0 comments on commit 94dca20

Please sign in to comment.