Skip to content
This repository was archived by the owner on May 2, 2025. It is now read-only.

Commit e110c30

Browse files
committed
## 4.6.0.3
* Bug Fixes * migrate to the latest ukraine strings * free up the labels if the sensor field of view has been released. * do not overwrite an existing iconset blindly - clobbering users iconsets. * protect against a crash in certificate enrollment (Playstore Crash Log) * unable to reproduce crash log from a Nokia 3.1 A (Playstore Crash Log) * remove query all packages on the playstore publication apk * fix incorrect rendering of the overlayed layers on Navigation icons
1 parent d0f9048 commit e110c30

File tree

16 files changed

+574
-567
lines changed

16 files changed

+574
-567
lines changed

VERSION.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Version History
22

3+
## 4.6.0.3
4+
5+
* Bug Fixes
6+
* migrate to the latest ukraine strings
7+
* free up the labels if the sensor field of view has been released.
8+
* do not overwrite an existing iconset blindly - clobbering users iconsets.
9+
* protect against a crash in certificate enrollment (Playstore Crash Log)
10+
* unable to reproduce crash log from a Nokia 3.1 A (Playstore Crash Log)
11+
* remove query all packages on the playstore publication apk
12+
* fix incorrect rendering of the overlayed layers on Navigation icons
13+
314
## 4.6.0.2
415

516
* Bug Fixes

atak/ATAK/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ buildscript {
2626
apply from: '../../gradle/versions.gradle', to: project
2727

2828
ext.ATAK_VERSION = "4.6.0"
29-
ext.ATAK_VERSION_SUBMINOR = ".2"
29+
ext.ATAK_VERSION_SUBMINOR = ".3"
3030

3131
ext.isDevKitEnabled = { ->
3232
return getProperty('takRepoMavenUrl', null) != null &&

atak/ATAK/app/src/civSmall/AndroidManifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@
66
<!-- for the civilian small version, do not include the SEND_SMS permission -->
77
<uses-permission android:name="android.permission.SEND_SMS" tools:node="remove"/>
88

9+
<!-- for the civilian small version, do not include the QUERY_ALL_PACKAGES permission -->
10+
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" tools:node="remove" />
11+
12+
913
</manifest>

atak/ATAK/app/src/main/java/com/atakmap/android/icons/IconsMapAdapter.java

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import android.content.Context;
77
import android.content.Intent;
88
import android.content.SharedPreferences;
9-
import android.content.SharedPreferences.Editor;
109
import android.graphics.Bitmap;
1110
import android.graphics.BitmapFactory;
1211
import android.os.AsyncTask;
@@ -18,11 +17,9 @@
1817
import com.atakmap.android.user.icon.Icon2525cPallet;
1918
import com.atakmap.android.user.icon.SpotMapPallet;
2019
import com.atakmap.android.user.icon.UserIconPalletFragment;
21-
import com.atakmap.android.util.ATAKConstants;
2220
import com.atakmap.android.util.NotificationUtil;
2321
import com.atakmap.app.R;
2422
import com.atakmap.coremap.filesystem.FileSystemUtils;
25-
import com.atakmap.coremap.io.IOProvider;
2623
import com.atakmap.coremap.io.IOProviderFactory;
2724
import com.atakmap.coremap.locale.LocaleUtil;
2825
import com.atakmap.coremap.log.Log;
@@ -75,38 +72,6 @@ public IconsMapAdapter(Context context) {
7572
*/
7673
public static synchronized UserIconDatabase initializeUserIconDB(
7774
Context context, SharedPreferences prefs) {
78-
File iconDB = new File(UserIconDatabase.DATABASE_NAME);
79-
boolean iconDBexists = IOProviderFactory.exists(iconDB);
80-
81-
//check if the latest default iconset is loaded
82-
String versionCode = String.valueOf(ATAKConstants.getVersionCode());
83-
if (FileSystemUtils.isEmpty(versionCode))
84-
versionCode = "unknown";
85-
86-
//check which default iconset is loaded (based on ATAK version)
87-
//force load if DB does not exist
88-
String currentVersion = prefs.getString(
89-
"iconset.default.loaded.version", "");
90-
91-
if (!iconDBexists
92-
|| !versionCode.equals(currentVersion)) {
93-
Log.d(TAG, "Replacing iconset version: " + currentVersion);
94-
//if the copy succeeded, make a note in the preferences
95-
Editor editor = prefs.edit();
96-
editor.putString("iconset.default.loaded.version", versionCode);
97-
editor.apply();
98-
Log.d(TAG, "Updated to iconset version: " + versionCode);
99-
100-
// XXX - this is not per-provider sufficient
101-
102-
// delete the file, this will trigger the UserIconDatabase to rebuild
103-
IOProviderFactory.delete(new File(UserIconDatabase.DATABASE_NAME),
104-
IOProvider.SECURE_DELETE);
105-
} else {
106-
Log.d(TAG,
107-
"Already running latest iconset version: " + versionCode);
108-
}
109-
11075
return UserIconDatabase.instance(context);
11176
}
11277

atak/ATAK/app/src/main/java/com/atakmap/android/maps/graphics/GLSensorFOV.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ public GLSensorFOV(MapRenderer surface, SensorFOV subject) {
8080
refreshStyle();
8181
}
8282

83+
/**
84+
* Ensures that the labels exist
85+
* @return true if the labels did not exist and were created.
86+
*/
8387
protected boolean ensureLabel() {
8488
if (_labelIDl == GLLabelManager.NO_ID) {
8589
//Log.d("GLSensorFOV", "ensureLabel");
@@ -164,7 +168,11 @@ public void draw(GLMapView ortho, int renderPass) {
164168
if (_surfaceControl == null)
165169
_surfaceControl = ortho.getControl(SurfaceRendererControl.class);
166170

167-
ensureLabel();
171+
if(ensureLabel()) {
172+
// if the labels did not previously exist, go ahead and update the
173+
// polygon to reassociated them with the sensor field of view.
174+
updatePolygon();
175+
}
168176

169177
_poly.draw(ortho);
170178

@@ -227,6 +235,8 @@ public void release() {
227235
l.release();
228236
rangeLines = null;
229237
}
238+
239+
removeLabel();
230240
}
231241

232242
@Override

atak/ATAK/app/src/main/java/com/atakmap/android/navigation/models/LoadoutItemModel.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
import android.text.TextUtils;
55

6+
import androidx.annotation.Nullable;
7+
68
import com.atakmap.android.math.MathUtils;
79
import com.atakmap.android.navigation.NavButtonManager;
810
import com.atakmap.android.navigation.views.loadout.LoadoutManager;
@@ -21,8 +23,6 @@
2123
import java.util.Set;
2224
import java.util.UUID;
2325

24-
import androidx.annotation.Nullable;
25-
2626
/**
2727
* Model used for a button loadout (the tool buttons in the top left)
2828
*/
@@ -396,8 +396,16 @@ else if (s1 != null)
396396
if (q == null)
397397
q = models.size();
398398
int min = Math.min(s, q);
399-
models.addAll(min, noOrder);
400399

400+
try {
401+
models.addAll(min, noOrder);
402+
} catch (Exception e) {
403+
// Playstore Crash: NullPointerException during menu sorting
404+
// Experienced on a Nokia 3.1 A Android 9 (SDK 28) - unable
405+
// to find steps for reproduction. Just add to the end of the
406+
// models.
407+
models.addAll(noOrder);
408+
}
401409
// Update sort order with new tools included
402410
setSortOrder(models);
403411
}

atak/ATAK/app/src/main/java/com/atakmap/android/navigation/views/buttons/NavButtonDrawable.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,10 @@ private void drawShadow(Canvas canvas) {
311311
//_baseDrawable.setColorFilter(null);
312312

313313
// Draw the base drawable to the scratch bitmap
314-
drawToScratch(_baseDrawable);
314+
if (_baseDrawable instanceof LayerDrawable)
315+
drawToScratch(((LayerDrawable) _baseDrawable).getDrawable(0));
316+
else
317+
drawToScratch(_baseDrawable);
315318

316319
// Generate and render shadow
317320
if (_shadowRadius > 0) {

atak/ATAK/app/src/main/java/com/atakmap/net/CertificateEnrollmentClient.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ public void enroll(final Context context, final String desc,
9898
this.certificateEnrollmentCompleteCallback = certificateEnrollmentCompleteCallback;
9999

100100
this.view = MapView.getMapView();
101+
if (view == null) {
102+
// Possibly caused by ATAK crashing while the preference screen is open
103+
Log.d(TAG, "mapview is null, cannot enroll");
104+
return;
105+
}
106+
101107
this.appCtx = view.getContext();
102108

103109
view.post(new Runnable() {

0 commit comments

Comments
 (0)