Skip to content

Commit

Permalink
better eink
Browse files Browse the repository at this point in the history
  • Loading branch information
foobnix committed Mar 24, 2020
1 parent 8e7892c commit 1cf4a73
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Mon Mar 23 18:08:12 EET 2020
appCodeNumber=3676
#Tue Mar 24 12:06:23 EET 2020
appCodeNumber=3680
appVersionNumberBase=8.3
appVersionNumberIndex=25
appDB=8
appVersionNumberIndex=26
11 changes: 9 additions & 2 deletions app/src/main/java/com/foobnix/ui2/MainTabs2.java
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,10 @@ protected void onPause() {
LocalBroadcastManager.getInstance(this).unregisterReceiver(broadcastReceiver);
AppProfile.save(this);
IMG.pauseRequests(this);

if(Dips.isEInk()) {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
}

@Override
Expand All @@ -758,8 +762,11 @@ protected void onResume() {
AppsConfig.isCloudsEnable = UITab.isShowCloudsPreferences();

LOG.d(TAG, "onResume");
//getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
if(Dips.isEInk()) {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}else{
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
LOG.d("FLAG clearFlags", "FLAG_KEEP_SCREEN_ON", "clear");


Expand Down

0 comments on commit 1cf4a73

Please sign in to comment.