-
-
Notifications
You must be signed in to change notification settings - Fork 761
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
959 additions
and
729 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
.buildlog/ | ||
.history | ||
.svn/ | ||
local.properties | ||
|
||
# IntelliJ related | ||
*.iml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
.../src/main/kotlin/app/revanced/manager/flutter/utils/packageInstaller/InstallerReceiver.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package app.revanced.manager.flutter.utils.packageInstaller | ||
|
||
import android.content.BroadcastReceiver | ||
import android.content.Context | ||
import android.content.Intent | ||
import android.content.pm.PackageInstaller | ||
import app.revanced.manager.flutter.MainActivity | ||
|
||
class InstallerReceiver : BroadcastReceiver() { | ||
override fun onReceive(context: Context, intent: Intent) { | ||
when (val status = intent.getIntExtra(PackageInstaller.EXTRA_STATUS, -1)) { | ||
PackageInstaller.STATUS_PENDING_USER_ACTION -> { | ||
val confirmationIntent = intent.getParcelableExtra<Intent>(Intent.EXTRA_INTENT) | ||
if (confirmationIntent != null) { | ||
context.startActivity(confirmationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)) | ||
} | ||
} | ||
|
||
else -> { | ||
val packageName = intent.getStringExtra(PackageInstaller.EXTRA_PACKAGE_NAME) | ||
val message = intent.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE) | ||
val otherPackageName = intent.getStringExtra(PackageInstaller.EXTRA_OTHER_PACKAGE_NAME) | ||
MainActivity.PackageInstallerManager.result!!.success(mapOf( | ||
"status" to status, | ||
"packageName" to packageName, | ||
"message" to message, | ||
"otherPackageName" to otherPackageName | ||
)) | ||
} | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...rc/main/kotlin/app/revanced/manager/flutter/utils/packageInstaller/UninstallerReceiver.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package app.revanced.manager.flutter.utils.packageInstaller | ||
|
||
import android.content.BroadcastReceiver | ||
import android.content.Context | ||
import android.content.Intent | ||
import android.content.pm.PackageInstaller | ||
import app.revanced.manager.flutter.MainActivity | ||
|
||
class UninstallerReceiver : BroadcastReceiver() { | ||
override fun onReceive(context: Context, intent: Intent) { | ||
when (val status = intent.getIntExtra(PackageInstaller.EXTRA_STATUS, -1)) { | ||
PackageInstaller.STATUS_PENDING_USER_ACTION -> { | ||
val confirmationIntent = intent.getParcelableExtra<Intent>(Intent.EXTRA_INTENT) | ||
if (confirmationIntent != null) { | ||
context.startActivity(confirmationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)) | ||
} | ||
} | ||
|
||
else -> { | ||
MainActivity.PackageInstallerManager.result!!.success(status) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip | ||
distributionSha256Sum=9d926787066a081739e8200858338b4a69e837c3a821a33aca9db09dd4a41026 | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.