fix: harden Android dev artifacts

This commit is contained in:
SimpleTest 2026-07-23 03:51:04 +03:00
parent 9c3456ad56
commit 4a1af1b658
9 changed files with 10 additions and 3 deletions

View File

@ -15,7 +15,6 @@
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config" android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/Theme.WhoNeedHelp" android:theme="@style/Theme.WhoNeedHelp"
android:usesCleartextTraffic="${usesCleartextTraffic}"> android:usesCleartextTraffic="${usesCleartextTraffic}">

View File

@ -119,7 +119,9 @@ public final class MainActivity extends ComponentActivity {
settings.setAllowContentAccess(false); settings.setAllowContentAccess(false);
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_NEVER_ALLOW); settings.setMixedContentMode(WebSettings.MIXED_CONTENT_NEVER_ALLOW);
settings.setMediaPlaybackRequiresUserGesture(true); settings.setMediaPlaybackRequiresUserGesture(true);
settings.setUserAgentString(settings.getUserAgentString() + " WhoNeedHelpAndroid/0.1"); settings.setUserAgentString(
settings.getUserAgentString() + " WhoNeedHelpAndroid/" + BuildConfig.VERSION_NAME
);
CookieManager cookieManager = CookieManager.getInstance(); CookieManager cookieManager = CookieManager.getInstance();
cookieManager.setAcceptCookie(true); cookieManager.setAcceptCookie(true);

View File

@ -1,5 +1,6 @@
package org.whoneedhelp.mobile; package org.whoneedhelp.mobile;
import android.annotation.SuppressLint;
import android.app.NotificationChannel; import android.app.NotificationChannel;
import android.app.NotificationManager; import android.app.NotificationManager;
import android.app.PendingIntent; import android.app.PendingIntent;
@ -15,6 +16,8 @@ import com.google.firebase.messaging.RemoteMessage;
import java.util.Map; import java.util.Map;
// The current Firebase Installation ID API invokes onRegistered; onNewToken is deprecated.
@SuppressLint("MissingFirebaseInstanceTokenRefresh")
public final class WhoNeedHelpMessagingService extends FirebaseMessagingService { public final class WhoNeedHelpMessagingService extends FirebaseMessagingService {
private static final String CHANNEL_ID = "who_need_help_updates"; private static final String CHANNEL_ID = "who_need_help_updates";

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <!-- API 33+ supplies the themed monochrome layer in mipmap-anydpi-v33. -->
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MonochromeLauncherIcon">
<background android:drawable="@color/ic_launcher_background" /> <background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" /> <foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon> </adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 16 KiB