This commit is contained in:
Your Name
2024-03-04 01:13:29 -06:00
parent 54c32d7526
commit fc2268e1fe
73 changed files with 41 additions and 47 deletions

View File

@@ -1,4 +1,4 @@
#Mon Mar 04 01:08:49 CST 2024
#Mon Mar 04 01:13:19 CST 2024
base.0=/home/brian/Desktop/vpnhotspotmod/mobile/build/intermediates/dex/freedomDebug/mergeExtDexFreedomDebug/classes.dex
base.1=/home/brian/Desktop/vpnhotspotmod/mobile/build/intermediates/dex/freedomDebug/mergeProjectDexFreedomDebug/0/classes.dex
base.10=/home/brian/Desktop/vpnhotspotmod/mobile/build/intermediates/desugar_lib_dex/freedomDebug/classes1000.dex

View File

@@ -1,5 +1,5 @@
repositories {
system: GIT
local_root_path: "$PROJECT_DIR"
revision: "c7272190a891ad579733970c31e3d3c45ea64743"
revision: "54c32d7526f03da55766dfb87a85897dbe36d083"
}

View File

@@ -1 +1 @@
ä<EFBFBD><EFBFBD><EFBFBD>c<EFBFBD>h<EFBFBD><EFBFBD>Ҕ<EFBFBD>y<EFBFBD>n<EFBFBD><EFBFBD><EFBFBD><EFBFBD>и<EFBFBD>
ä<EFBFBD><EFBFBD><EFBFBD>c<EFBFBD>h<EFBFBD><EFBFBD>Ҕ<EFBFBD>y<EFBFBD>n<EFBFBD><EFBFBD><EFBFBD><EFBFBD>и<EFBFBD><EFBFBD><EFBFBD>

View File

@@ -1 +1 @@
ɠ<EFBFBD>cϫ<EFBFBD>S<EFBFBD>lЉ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>}<EFBFBD>z<EFBFBD>y
ɠ<EFBFBD>cϫ<EFBFBD>S<EFBFBD>lЉ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>}<EFBFBD>z<EFBFBD>y۱

View File

@@ -1,6 +1,6 @@
package hanson.xyz.vpnhotspotmod;
@kotlin.Metadata(mv = {1, 9, 0}, k = 1, xi = 48, d1 = {"\u00004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\u0018\u00002\u00020\u00012\u00020\u0002B\u0005\u00a2\u0006\u0002\u0010\u0003J\u0010\u0010\u0006\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\tH\u0002J\u0018\u0010\n\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\t2\u0006\u0010\u000b\u001a\u00020\fH\u0016J \u0010\r\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\t2\u0006\u0010\u000e\u001a\u00020\u000f2\u0006\u0010\u0010\u001a\u00020\u000fH\u0002R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u0011"}, d2 = {"Lhanson/xyz/vpnhotspotmod/MyBroadcastReceiver;", "Landroid/content/BroadcastReceiver;", "Lhanson/xyz/vpnhotspotmod/net/TetheringManager$StartTetheringCallback;", "()V", "handler", "Landroid/os/Handler;", "createNotificationChannel", "", "context", "Landroid/content/Context;", "onReceive", "intent", "Landroid/content/Intent;", "showNotification", "title", "", "message", "mobile_freedomDebug"})
@kotlin.Metadata(mv = {1, 9, 0}, k = 1, xi = 48, d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u0018\u00002\u00020\u00012\u00020\u0002B\u0005\u00a2\u0006\u0002\u0010\u0003J\u0018\u0010\u0006\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\u000bH\u0016R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006\f"}, d2 = {"Lhanson/xyz/vpnhotspotmod/MyBroadcastReceiver;", "Landroid/content/BroadcastReceiver;", "Lhanson/xyz/vpnhotspotmod/net/TetheringManager$StartTetheringCallback;", "()V", "handler", "Landroid/os/Handler;", "onReceive", "", "context", "Landroid/content/Context;", "intent", "Landroid/content/Intent;", "mobile_freedomDebug"})
public final class MyBroadcastReceiver extends android.content.BroadcastReceiver implements hanson.xyz.vpnhotspotmod.net.TetheringManager.StartTetheringCallback {
@org.jetbrains.annotations.NotNull
private final android.os.Handler handler = null;
@@ -12,12 +12,6 @@ public final class MyBroadcastReceiver extends android.content.BroadcastReceiver
/**
* Called when tethering has been successfully started.
*/
private final void createNotificationChannel(android.content.Context context) {
}
private final void showNotification(android.content.Context context, java.lang.String title, java.lang.String message) {
}
@java.lang.Override
public void onReceive(@org.jetbrains.annotations.NotNull
android.content.Context context, @org.jetbrains.annotations.NotNull

View File

@@ -66,31 +66,31 @@ class MyBroadcastReceiver : BroadcastReceiver(), TetheringManager.StartTethering
// */
// override fun onTetheringFailed(error: Int? = null) { }
private fun createNotificationChannel(context: Context) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val name = "Tethering Notification"
val descriptionText = "Notifications for tethering status"
val importance = NotificationManager.IMPORTANCE_DEFAULT
val channel = NotificationChannel("TETHERING_STATUS", name, importance).apply {
description = descriptionText
}
val notificationManager: NotificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
notificationManager.createNotificationChannel(channel)
}
}
private fun showNotification(context: Context, title: String, message: String) {
createNotificationChannel(context)
val notificationBuilder = NotificationCompat.Builder(context, "TETHERING_STATUS")
.setSmallIcon(R.drawable.ic_launcher_foreground)
.setContentTitle(title)
.setContentText(message)
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
val notificationManager = ContextCompat.getSystemService(context, NotificationManager::class.java)
notificationManager?.notify(System.currentTimeMillis().toInt(), notificationBuilder.build())
}
// private fun createNotificationChannel(context: Context) {
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// val name = "Tethering Notification"
// val descriptionText = "Notifications for tethering status"
// val importance = NotificationManager.IMPORTANCE_DEFAULT
// val channel = NotificationChannel("TETHERING_STATUS", name, importance).apply {
// description = descriptionText
// }
// val notificationManager: NotificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
// notificationManager.createNotificationChannel(channel)
// }
// }
//
// private fun showNotification(context: Context, title: String, message: String) {
// createNotificationChannel(context)
//
// val notificationBuilder = NotificationCompat.Builder(context, "TETHERING_STATUS")
// .setSmallIcon(R.drawable.ic_launcher_foreground)
// .setContentTitle(title)
// .setContentText(message)
// .setPriority(NotificationCompat.PRIORITY_DEFAULT)
//
// val notificationManager = ContextCompat.getSystemService(context, NotificationManager::class.java)
// notificationManager?.notify(System.currentTimeMillis().toInt(), notificationBuilder.build())
// }
override fun onReceive(context: Context, intent: Intent) {
@@ -107,19 +107,19 @@ class MyBroadcastReceiver : BroadcastReceiver(), TetheringManager.StartTethering
for (startable in config.startables.values) startable.start(App.app)
}
TetheringManager.startTethering(TetheringManager.TETHERING_WIFI, false, this)
showNotification(context, "Tethering Status", "Wi-Fi tethering started")
// showNotification(context, "Tethering Status", "Wi-Fi tethering started")
}
"WIFI_TETHER_STOP" -> {
TetheringManager.stopTethering(TetheringManager.TETHERING_WIFI)
}
TetheringManager.ACTION_TETHER_STATE_CHANGED -> {
val tetheredInterfaces = intent.getStringArrayListExtra(TetheringManager.EXTRA_ACTIVE_TETHER)
val message = if (tetheredInterfaces != null && tetheredInterfaces.isNotEmpty()) {
"Tethering interfaces changed. Monitoring service called for ${tetheredInterfaces.joinToString(", ")}"
} else {
"No active tethering interfaces found"
}
showNotification(context, "Tethering Status", message)
// val message = if (tetheredInterfaces != null && tetheredInterfaces.isNotEmpty()) {
// "Tethering interfaces changed. Monitoring service called for ${tetheredInterfaces.joinToString(", ")}"
// } else {
// "No active tethering interfaces found"
// }
// showNotification(context, "Tethering Status", message)
if (tetheredInterfaces != null && tetheredInterfaces.isNotEmpty()) {
Toast.makeText(context, "Tethering interfaces changed", Toast.LENGTH_SHORT).show()
tetheredInterfaces.forEach { iface ->
@@ -127,10 +127,10 @@ class MyBroadcastReceiver : BroadcastReceiver(), TetheringManager.StartTethering
putExtra(TetheringService.EXTRA_ADD_INTERFACES, arrayOf(iface))
context.startForegroundService(this)
}
Toast.makeText(context, "Monitoring service called for $iface", Toast.LENGTH_SHORT).show()
// Toast.makeText(context, "Monitoring service called for $iface", Toast.LENGTH_SHORT).show()
}
} else {
Toast.makeText(context, "No active tethering interfaces found", Toast.LENGTH_SHORT).show()
// Toast.makeText(context, "No active tethering interfaces found", Toast.LENGTH_SHORT).show()
}
}
}