Skip to content

Commit cc76ec6

Browse files
committed
Fix nullptr in standard release
1 parent ef5c9ef commit cc76ec6

File tree

4 files changed

+36
-36
lines changed

4 files changed

+36
-36
lines changed

README.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,66 +9,66 @@
99

1010

1111
## Features
12-
* Shows any website in a borderless full-screen window using Android System WebView.
13-
* Create home screen shortcuts and retrieves icons in suitable resolution.
14-
* Various settings (JavaScript, Cookies, adblocking, location access) can be set for every web app individually
15-
* Navigation with multi-touch gestures while browsing.
16-
* Opt-in adblock using an AdBlock Plus custom webview.
17-
* Less memory footprint and no privacy-invading app permissions in comparison to native apps
18-
* Dark mode for Android 10+
12+
Shows any website in a borderless full-screen window using Android System WebView.
13+
Create home screen shortcuts and retrieves icons in suitable resolution.
14+
Various settings (JavaScript, Cookies, adblocking, location access) can be set for every web app individually
15+
Navigation with multi-touch gestures while browsing.
16+
Opt-in adblock using an AdBlock Plus custom webview.
17+
Less memory footprint and no privacy-invading app permissions in comparison to native apps
18+
Dark mode for Android 10+
1919

2020
## Pro Features
21-
* Sandbox containers: Web Apps are loaded in fully separated sandboxes, cookies or other data are not shared with other Web Apps
22-
* Experimental dark mode also available for websites (configurable)
23-
* True fullscreen mode ("immersive") without any menu bars
21+
Sandbox containers: Web Apps are loaded in fully separated sandboxes, cookies or other data are not shared with other Web Apps
22+
Experimental dark mode also available for websites (configurable)
23+
True fullscreen mode ("immersive") without any menu bars
2424

2525
## Download Options
2626
[![IzzyOnDroid Download Badge](graphics/IzzyOnDroid.png)](https://apt.izzysoft.de/fdroid/index/apk/com.cylonid.nativealpha)
27-
[![APK Download Badge](graphics/apk_badge.png)](https://github.com/cylonid/NativeAlphaForAndroid/releases/download/v1.01/NativeAlpha-standard-universal-release-v1.1.apk)
27+
[![APK Download Badge](graphics/apk_badge.png)](https://github.com/cylonid/NativeAlphaForAndroid/releases/download/v1.1/NativeAlpha-standard-universal-release-v1.1.apk)
2828

2929
## Latest Changes (v1.1)
30-
* Support for mailto and tel hyperlinks
31-
* Support for file picker dialogs
32-
* Support for DRM-protected content
33-
* Enhanced support for video playback
34-
* Enabled for usage with non-internet addresses
35-
* Color theme will from now on always follow system settings
30+
Support for mailto and tel hyperlinks
31+
Support for file picker dialogs
32+
Support for DRM-protected content
33+
Enhanced support for video playback
34+
Enabled for usage with non-internet addresses
35+
Color theme will from now on always follow system settings
3636

3737
## FAQ
38-
*Q: Why would I need this app if any mobile browser can do the same?*
38+
Q: Why would I need this app if any mobile browser can do the same?
3939

4040
A: Mobile browsers usually only are able to create shortcuts which give a native, borderless fullscreen experience if the website has a Progressive Web App (PWA) manifest. Unfortunately, most websites do not offer this feature yet. Additionally, you cannot set different settings for different websites with an usual browser.
4141

42-
*Q: Is this a web browser?*
42+
Q: Is this a web browser?
4343

4444
A: No. As stated, this app relies on the system built-in Android WebView in order to display the website. For privacy reasons, you can opt to use alternative webviews such as [Bromite](https://www.bromite.org/system_web_view) on rooted phones. Always make sure to use to most recent version of any WebView implementation you use!
4545

46-
*Q: Why isn't the sandbox feature enabled by default?*
46+
Q: Why isn't the sandbox feature enabled by default?
4747

4848
A: The sandboxing approach is recommended for specific usage rather than general usage because it can limit the performance of the application and increase the disk usage. Therefore, use it for privacy-invasive websites or websites where you want to be logged in twice, but not for any website just because you can.
4949

50-
*Q: Why is it not possible to find an icon for a certain website?*
50+
Q: Why is it not possible to find an icon for a certain website?
5151

5252
A: This problem can occur due to multiple reasons. In most cases, the website does not offer a high-resolution icon. If you are a website maintainer and your website icon cannot be found, look at [RealFaviconGenerator](https://realfavicongenerator.net) for further information. If you think it should work, feel free to post the URL and I will look into it.
5353

5454

55-
*Q: In constrast to your promise, this app has a large memory footprint!*
55+
Q: In constrast to your promise, this app has a large memory footprint!
5656

5757
A: This is because Native Alpha makes use of caching in the same way your browser app does, i.e., it saves web content locally on your device. Then it can be loaded faster if you visit the same page again. You can either delete cache regularly yourself or set the "Clear cache after usage" setting in the global settings if memory footprint is a concern for you. However, then websites will take a longer time to load because everything has to be loaded from net.
5858

5959
## Used libraries/resources
60-
* [CircularProgressBar](https://github.com/lopspower/CircularProgressBar)
61-
* [JSoup](https://jsoup.org/)
62-
* [AboutPage](https://github.com/medyo/android-about-page)
63-
* [AdBlock+WebView](https://github.com/adblockplus/libadblockplus-android)
64-
* [MovableFloatingActionButton](https://stackoverflow.com/questions/46370836/android-movable-draggable-floating-action-button-fab)
65-
* [Android About Page](https://github.com/medyo/android-about-page)
66-
* [Android Databinding](https://developer.android.com/topic/libraries/data-binding)
67-
* [AboutLibraries](https://github.com/mikepenz/AboutLibraries)
60+
[CircularProgressBar](https://github.com/lopspower/CircularProgressBar)
61+
[JSoup](https://jsoup.org/)
62+
[AboutPage](https://github.com/medyo/android-about-page)
63+
[AdBlock+WebView](https://github.com/adblockplus/libadblockplus-android)
64+
[MovableFloatingActionButton](https://stackoverflow.com/questions/46370836/android-movable-draggable-floating-action-button-fab)
65+
[Android About Page](https://github.com/medyo/android-about-page)
66+
[Android Databinding](https://developer.android.com/topic/libraries/data-binding)
67+
[AboutLibraries](https://github.com/mikepenz/AboutLibraries)
6868

6969
For testing purposes:
70-
* [Robolectric](https://github.com/robolectric/robolectric)
71-
* [Espresso](https://developer.android.com/training/testing/espresso/)
70+
[Robolectric](https://github.com/robolectric/robolectric)
71+
[Espresso](https://developer.android.com/training/testing/espresso/)
7272

7373
A list of used open-source libraries can also be found inside the app ("About" section).
7474

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ android {
4747
applicationId "com.cylonid.nativealpha"
4848
minSdkVersion 26
4949
targetSdkVersion 31
50-
versionCode 1100
50+
versionCode 1101
5151
versionName "1.1"
5252

5353
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

app/src/main/java/com/cylonid/nativealpha/WebViewActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ protected void onCreate(Bundle savedInstanceState) {
108108
ProcessPhoenix.triggerRebirth(this, Utility.createWebViewIntent(webapp, this));
109109
}
110110

111-
if (!packageName.equals(processName)) {
111+
if (!packageName.equals(processName) & SandboxManager.getInstance() != null) {
112112
if (SandboxManager.getInstance().isSandboxUsedByAnotherApp(webapp)) {
113113
SandboxManager.getInstance().unregisterWebAppFromSandbox(webapp.getContainerId());
114114
ProcessPhoenix.triggerRebirth(this, Utility.createWebViewIntent(webapp, this));

app/src/main/java/com/cylonid/nativealpha/model/DataManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public void saveWebAppData() {
9595
String json = gson.toJson(websites);
9696
editor.putString(shared_pref_webappdata, json);
9797
editor.putInt(shared_pref_max_id, max_assigned_ID);
98-
editor.putInt(shared_pref_next_container, SandboxManager.getInstance().getNextContainer());
98+
if (SandboxManager.getInstance() != null) editor.putInt(shared_pref_next_container, SandboxManager.getInstance().getNextContainer());
9999
editor.apply();
100100
}
101101

@@ -134,7 +134,7 @@ public void loadAppData() {
134134
}
135135

136136
max_assigned_ID = appdata.getInt(shared_pref_max_id, max_assigned_ID);
137-
SandboxManager.getInstance().setNextContainer(appdata.getInt(shared_pref_next_container, 0));
137+
if (SandboxManager.getInstance() != null) SandboxManager.getInstance().setNextContainer(appdata.getInt(shared_pref_next_container, 0));
138138

139139
//Check legacy global settings
140140
if (appdata.getBoolean(shared_pref_global_settings_json, false)) {

0 commit comments

Comments
 (0)