Skip to content

Commit

Permalink
V2.6
Browse files Browse the repository at this point in the history
Fix keep screen on
Fix rare crash
  • Loading branch information
woheller69 committed Feb 11, 2024
1 parent e0d13fd commit 8ac78c1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ android {
applicationId "org.woheller69.browser"
minSdkVersion 29
targetSdkVersion 33
versionCode 2500
versionName "2.5"
versionCode 2600
versionName "2.6"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
Expand Down
20 changes: 10 additions & 10 deletions app/src/main/java/de/baumann/browser/activity/BrowserActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,15 @@ public void onPause(){
for (int i=0; i<BrowserContainer.size();i++){
String url = ((NinjaWebView) (BrowserContainer.get(i))).getUrl();
String settings = ((NinjaWebView) (BrowserContainer.get(i))).getSettingsBackup();
if (!url.equals(URL_ABOUT_BLANK)) { //do not save empty tabs (about:blank)
if (currentAlbumController == BrowserContainer.get(i)) {
openTabs.add(0, url);
openTabSettings.add(0, settings);
} else {
openTabs.add(url);
openTabSettings.add(settings);
if (url != null) {
if (!url.equals(URL_ABOUT_BLANK)) { //do not save empty tabs (about:blank)
if (currentAlbumController == BrowserContainer.get(i)) {
openTabs.add(0, url);
openTabSettings.add(0, settings);
} else {
openTabs.add(url);
openTabSettings.add(settings);
}
}
}
}
Expand Down Expand Up @@ -339,7 +341,7 @@ public void onResume() {
super.onResume();
HelperUnit.initTheme(this);
initTabDialog();

getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
ScriptUnit.initScripts(this);

//disable Microphone, Camera, and Location if permissions have been withdrawn
Expand Down Expand Up @@ -1361,7 +1363,6 @@ public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callb
FrameLayout.LayoutParams.MATCH_PARENT
));

customView.setKeepScreenOn(true);
((View) currentAlbumController).setVisibility(View.GONE);
setCustomFullscreen(true);

Expand All @@ -1379,7 +1380,6 @@ public void onHideCustomView() {
FrameLayout decorView = (FrameLayout) getWindow().getDecorView();
decorView.removeView(fullscreenHolder);

customView.setKeepScreenOn(false);
((View) currentAlbumController).setVisibility(View.VISIBLE);
setCustomFullscreen(false);

Expand Down
2 changes: 2 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/2600.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Translations
Bugfixes

0 comments on commit 8ac78c1

Please sign in to comment.