Skip to content

Commit

Permalink
fix for android 15 screen edge to edge. v 11.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
apps4av committed Nov 7, 2024
1 parent 6eb7042 commit 8f36abe
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Redistribution and use in source and binary forms, with or without modification,
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="402"
android:versionName="11.0.2"
android:versionCode="403"
android:versionName="11.0.3"
android:installLocation="auto">

<!-- Network State Permissions to detect Internet status -->
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/assets/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ <h3 class="western" align="center">Notice</h3>
<p><B>CAUTION</b> - Before flight the user <B>must always ensure</b> that Avare is updated to and thoroughly tested on the latest version, and <b>ensure that all Avare databases and charts are kept current</b>. If Avare and its databases and charts are not of the exact same version, the <B><U>GPS position displayed may be inaccurate</u></b>, because <b>the FAA sometimes changes the format</b> of their materials. <u>Avare does not automatically fetch</u> any databases and charts when they are expired, so it is the user's sole responsibility to update any expired charts and databases. To do so, ensure that your device has an internet connection and then just press the <B>Map, Menu, Preferences, Download,</b> and <b>Update</b> buttons in Avare.</p>

<h3 class="western">Avare Releases</h3>
<p><b>11.0.3</b></p>
<ul>
<li>Fix for Android - 15 screen.</li>
</ul>
<p><b>11.0.2</b></p>
<ul>
<li>New LMFS website.</li>
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/java/com/ds/avare/BaseActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.app.Activity;
import android.location.GpsStatus;
import android.location.Location;
import android.os.Build;
import android.os.Bundle;
import android.view.Window;

Expand All @@ -21,6 +22,12 @@ public class BaseActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
Helper.setTheme(this);
//apply theme style

// apply this for android v35 or above, opt out of edge to edge enforcement
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
this.getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false);
}

super.onCreate(savedInstanceState);

Expand Down
7 changes: 7 additions & 0 deletions app/src/main/java/com/ds/avare/PrefActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import android.content.ServiceConnection;
import android.location.GpsStatus;
import android.location.Location;
import android.os.Build;
import android.os.Bundle;
import android.os.IBinder;
import android.preference.PreferenceActivity;
Expand Down Expand Up @@ -59,6 +60,12 @@ public void enabledCallback(boolean enabled) {
public void onCreate(Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
Helper.setTheme(this);

// apply this for android v35 or above, opt out of edge to edge enforcement
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
this.getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false);
}

super.onCreate(savedInstanceState);

addPreferencesFromResource(R.xml.preferences);
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/values-v35/values-v35.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="OptOutEdgeToEdgeEnforcement">
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>
</resources>

0 comments on commit 8f36abe

Please sign in to comment.