disable troubleshooting ping
This commit is contained in:
parent
b69389621d
commit
f2708352b9
|
|
@ -4,10 +4,10 @@
|
||||||
<selectionStates>
|
<selectionStates>
|
||||||
<SelectionState runConfigName="app">
|
<SelectionState runConfigName="app">
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
<DropdownSelection timestamp="2026-03-07T02:01:50.591889196Z">
|
<DropdownSelection timestamp="2026-03-07T04:13:08.327943277Z">
|
||||||
<Target type="DEFAULT_BOOT">
|
<Target type="DEFAULT_BOOT">
|
||||||
<handle>
|
<handle>
|
||||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=69K7MB899PKJGQBI" />
|
<DeviceId pluginId="PhysicalDevice" identifier="serial=a026a310" />
|
||||||
</handle>
|
</handle>
|
||||||
</Target>
|
</Target>
|
||||||
</DropdownSelection>
|
</DropdownSelection>
|
||||||
|
|
|
||||||
|
|
@ -42,11 +42,12 @@ public class IIABWatchdog {
|
||||||
private static final int MAX_DAYS = 5;
|
private static final int MAX_DAYS = 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs a full heartbeat pulse: sending stimulus and debug ping.
|
* Performs a full heartbeat pulse: sending stimulus.
|
||||||
*/
|
*/
|
||||||
public static void performHeartbeat(Context context) {
|
public static void performHeartbeat(Context context) {
|
||||||
sendStimulus(context);
|
sendStimulus(context);
|
||||||
performDebugPing(context);
|
// TROUBLESHOOTING: Uncomment to test NGINX status.
|
||||||
|
// performDebugPing(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -54,7 +55,7 @@ public class IIABWatchdog {
|
||||||
*/
|
*/
|
||||||
public static void sendStimulus(Context context) {
|
public static void sendStimulus(Context context) {
|
||||||
if (DEBUG_ENABLED) {
|
if (DEBUG_ENABLED) {
|
||||||
writeToBlackBox(context, "Pulse: Stimulating Termux...");
|
writeToBlackBox(context, context.getString(R.string.pulse_stimulating));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build the intent for Termux with exact payload requirements
|
// Build the intent for Termux with exact payload requirements
|
||||||
|
|
@ -86,7 +87,7 @@ public class IIABWatchdog {
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
// This catches specific permission errors on newer Android versions
|
// This catches specific permission errors on newer Android versions
|
||||||
Log.e(TAG, "Permission Denied: Ensure manifest has RUN_COMMAND and app is not restricted.", e);
|
Log.e(TAG, "Permission Denied: Ensure manifest has RUN_COMMAND and app is not restricted.", e);
|
||||||
writeToBlackBox(context, "CRITICAL: OS blocked Termux stimulus (SecurityException).");
|
writeToBlackBox(context, context.getString(R.string.critical_os_blocked));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.e(TAG, "Unexpected error sending intent to Termux", e);
|
Log.e(TAG, "Unexpected error sending intent to Termux", e);
|
||||||
writeToBlackBox(context, "Pulse Error: " + e.getMessage());
|
writeToBlackBox(context, "Pulse Error: " + e.getMessage());
|
||||||
|
|
@ -104,11 +105,11 @@ public class IIABWatchdog {
|
||||||
try (Socket socket = new Socket()) {
|
try (Socket socket = new Socket()) {
|
||||||
socket.connect(new InetSocketAddress(NGINX_IP, NGINX_PORT), 2000);
|
socket.connect(new InetSocketAddress(NGINX_IP, NGINX_PORT), 2000);
|
||||||
if (DEBUG_ENABLED) {
|
if (DEBUG_ENABLED) {
|
||||||
writeToBlackBox(context, "PING 8085: OK");
|
writeToBlackBox(context, context.getString(R.string.ping_ok));
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
if (DEBUG_ENABLED) {
|
if (DEBUG_ENABLED) {
|
||||||
writeToBlackBox(context, "PING 8085: FAIL (" + e.getMessage() + ")");
|
writeToBlackBox(context, context.getString(R.string.ping_fail, e.getMessage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
@ -116,13 +117,13 @@ public class IIABWatchdog {
|
||||||
|
|
||||||
public static void logSessionStart(Context context) {
|
public static void logSessionStart(Context context) {
|
||||||
if (DEBUG_ENABLED) {
|
if (DEBUG_ENABLED) {
|
||||||
writeToBlackBox(context, "HEARTBEAT SESSION STARTED");
|
writeToBlackBox(context, context.getString(R.string.session_started));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void logSessionStop(Context context) {
|
public static void logSessionStop(Context context) {
|
||||||
if (DEBUG_ENABLED) {
|
if (DEBUG_ENABLED) {
|
||||||
writeToBlackBox(context, "HEARTBEAT SESSION STOPPED");
|
writeToBlackBox(context, context.getString(R.string.session_stopped));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue