Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: merge dev to main #1177

Merged
merged 10 commits into from
Sep 4, 2023
97 changes: 19 additions & 78 deletions .github/ISSUE_TEMPLATE/bug-issue.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 🐞 Bug report
description: Report a very clearly broken issue.
description: Create a new bug report.
title: 'bug: <title>'
labels: [bug]
body:
Expand All @@ -8,53 +8,20 @@ body:
value: |
# ReVanced Manager bug report

Important to note that your issue may have already been reported before. Please check for existing issues [here](https://github.com/revanced/revanced-manager/labels/bug).

- type: dropdown
attributes:
label: Type
options:
- Error while running the manager
- Error at runtime
- Cosmetic
- Other
validations:
required: true
Please check for existing issues [here](https://github.com/revanced/revanced-manager/labels/bug) before creating a new one.
- type: textarea
attributes:
label: Bug description
description: How did you find the bug? Any additional details that might help?
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce
description: Add the steps to reproduce this bug, including your environment.
placeholder: Step 1. Download some files. Step 2. ...
validations:
required: true
- type: textarea
attributes:
label: Android version
description: Android version used.
validations:
required: true
- type: textarea
attributes:
label: Manager version
description: Manager version used.
validations:
required: true
- type: textarea
attributes:
label: Target package name
description: App you tried to patch.
description:
- Describe your bug in detail
- Add steps to reproduce the bug if possible (Step 1. Download some files. Step 2. ...)
- Add images and videos if possible
- List selected patches if applicable
validations:
required: true
- type: textarea
attributes:
label: Target package version.
description: Version of the app you tried to patch.
label: Version of ReVanced Manager and version & name of application you tried to patch
validations:
required: true
- type: dropdown
Expand All @@ -64,57 +31,31 @@ body:
- Non-root
- Root
validations:
required: true
- type: textarea
attributes:
label: Patches selected.
description: Patches you selected for the app.
validations:
required: true
required: false
- type: textarea
attributes:
label: Device logs (exported using Manager settings).
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so there is no need for backticks.
label: Device logs
description: Export logs in ReVanced Manager settings.
render: shell
validations:
required: true
- type: textarea
attributes:
label: Installer logs (exported using Installer menu option) [unneeded if the issue is not during patching].
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so there is no need for backticks.
label: Patcher logs
description: Export logs in "Patcher" screen.
render: shell
validations:
required: false
- type: textarea
attributes:
label: Screenshots or video
description: Add screenshots or videos that show the bug here.
placeholder: Drag and drop the screenshots/videos into this box.
validations:
required: false
- type: textarea
attributes:
label: Solution
description: If applicable, add a possible solution.
validations:
required: false
- type: textarea
attributes:
label: Additional context
description: Add additional context here.
validations:
required: false
- type: checkboxes
id: acknowledgments
attributes:
label: Acknowledgments
description: Your issue will be closed if you haven't done these steps.
label: Acknowledgements
description: Your issue will be closed if you don't follow the checklist below!
options:
- label: I have searched the existing issues; this is new and no duplicate or related to another open issue.
- label: This request is not a duplicate of an existing issue.
required: true
- label: I have written a short but informative title.
- label: I have chosen an appropriate title.
required: true
- label: I properly filled out all of the requested information in this issue.
- label: All requested information has been provided properly.
required: true
- label: The issue is solely related to ReVanced Manager and not caused by patches.
- label: The issue is solely related to the ReVanced Manager
required: true
40 changes: 15 additions & 25 deletions .github/ISSUE_TEMPLATE/feature-issue.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,42 @@
name: ⭐ Feature request
description: Create a detailed feature request.
description: Create a new feature request.
title: 'feat: <title>'
labels: [feature-request]
body:
- type: dropdown
- type: markdown
attributes:
label: Type
options:
- Functionality
- Cosmetic
- Other
validations:
required: true
- type: textarea
attributes:
label: Issue
description: What is the current problem. Why does it require a feature request?
validations:
required: true
value: |
# ReVanced Manager feature request

Please check for existing feature requests [here](https://github.com/revanced/revanced-manager/labels/bug) before creating a new one.
- type: textarea
attributes:
label: Feature
description: Describe your feature in detail. How does it solve the issue?
label: Feature description
description: Describe your feature in detail.
validations:
required: true
- type: textarea
attributes:
label: Motivation
description: Why should your feature should be considered?
description: Explain why the lack of it is a problem.
validations:
required: true
- type: textarea
attributes:
label: Additional context
description: Add additional context here.
description: In case there is something else you want to add.
validations:
required: false
- type: checkboxes
id: acknowledgements
attributes:
label: Acknowledgements
description: Your issue will be closed if you haven't done these steps.
description: Your issue will be closed if you don't follow the checklist below!
options:
- label: I have searched the existing issues and this is a new and no duplicate or related to another open issue.
- label: This request is not a duplicate of an existing issue.
required: true
- label: I have written a short but informative title.
- label: I have chosen an appropriate title.
required: true
- label: I filled out all of the requested information in this issue properly.
- label: All requested information has been provided properly.
required: true
- label: The issue is related solely to the ReVanced Manager
- label: The issue is solely related to the ReVanced Manager
required: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ unlinked.ds
unlinked_spec.ds

# Android related
.gradle/
**/android/**/gradle-wrapper.jar
**/android/.gradle
**/android/captures/
Expand Down
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

// ReVanced
implementation "app.revanced:revanced-patcher:14.2.1"
implementation "app.revanced:revanced-patcher:14.2.2"

// Signing & aligning
implementation("org.bouncycastle:bcpkix-jdk15on:1.70")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import java.io.StringWriter
import java.util.logging.LogRecord
import java.util.logging.Logger


class MainActivity : FlutterActivity() {
private val handler = Handler(Looper.getMainLooper())
private lateinit var installerChannel: MethodChannel
Expand Down Expand Up @@ -182,7 +181,8 @@ class MainActivity : FlutterActivity() {
updateProgress(0.1, "Loading patches...", "Loading patches")

val patches = PatchBundleLoader.Dex(
File(patchBundleFilePath)
File(patchBundleFilePath),
optimizedDexDirectory = cacheDir
).filter { patch ->
val isCompatible = patch.compatiblePackages?.any {
it.name == patcher.context.packageMetadata.packageName
Expand Down
8 changes: 6 additions & 2 deletions lib/ui/views/app_selector/app_selector_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,14 @@ class AppSelectorViewModel extends BaseViewModel {
await DeviceApps.getApp(packageName, true) as ApplicationWithIcon?;
if (app != null) {
if (await checkSplitApk(packageName) && !isRooted) {
return showSelectFromStorageDialog(context);
if (context.mounted) {
return showSelectFromStorageDialog(context);
}
} else if (!await checkSplitApk(packageName) || isRooted) {
selectApp(app);
Navigator.pop(context);
if (context.mounted) {
Navigator.pop(context);
}
}
}
}
Expand Down
20 changes: 16 additions & 4 deletions lib/ui/views/installer/installer_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,23 @@ class InstallerView extends StatelessWidget {
bottom: false,
child: Scaffold(
floatingActionButton: Visibility(
visible: !model.isPatching,
visible: !model.isPatching && !model.hasErrors,
child: FloatingActionButton.extended(
label: I18nText('installerView.installButton'),
icon: const Icon(Icons.file_download_outlined),
onPressed: () => model.installTypeDialog(context),
label: I18nText(
model.isInstalled
? 'installerView.openButton'
: 'installerView.installButton',
),
icon: model.isInstalled
? const Icon(Icons.open_in_new)
: const Icon(Icons.file_download_outlined),
onPressed: model.isInstalled
? () => {
model.openApp(),
model.cleanPatcher(),
Navigator.of(context).pop(),
}
: () => model.installTypeDialog(context),
elevation: 0,
),
),
Expand Down
5 changes: 2 additions & 3 deletions lib/ui/views/navigation/navigation_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ class NavigationViewModel extends IndexTrackingViewModel {
Future<void> initialize(BuildContext context) async {
locator<Toast>().initialize(context);
final SharedPreferences prefs = await SharedPreferences.getInstance();
requestManageExternalStorage();
await requestManageExternalStorage();

if (prefs.getBool('permissionsRequested') == null) {
await Permission.storage.request();
await Permission.manageExternalStorage.request();
await prefs.setBool('permissionsRequested', true);
RootAPI().hasRootPermissions().then(
await RootAPI().hasRootPermissions().then(
(value) => Permission.requestInstallPackages.request().then(
(value) => Permission.ignoreBatteryOptimizations.request(),
),
Expand Down
25 changes: 21 additions & 4 deletions lib/ui/views/patches_selector/patches_selector_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ class _PatchesSelectorViewState extends State<PatchesSelectorView> {
supportedPackageVersions:
model.getSupportedVersions(patch),
isUnsupported: !isPatchSupported(patch),
isChangeEnabled: _managerAPI.isPatchesChangeEnabled(),
isChangeEnabled:
_managerAPI.isPatchesChangeEnabled(),
isNew: model.isPatchNew(
patch,
model.getAppInfo().packageName,
Expand All @@ -221,8 +222,23 @@ class _PatchesSelectorViewState extends State<PatchesSelectorView> {
padding: const EdgeInsets.symmetric(
vertical: 10.0,
),
child: I18nText(
'patchesSelectorView.universalPatches',
child: Container(
padding: const EdgeInsets.only(
top: 10.0,
bottom: 10.0,
left: 5.0,
),
child: I18nText(
'patchesSelectorView.universalPatches',
child: Text(
'',
style: TextStyle(
color: Theme.of(context)
.colorScheme
.primary,
),
),
),
),
),
...model.getQueriedPatches(_query).map((patch) {
Expand All @@ -236,7 +252,8 @@ class _PatchesSelectorViewState extends State<PatchesSelectorView> {
supportedPackageVersions:
model.getSupportedVersions(patch),
isUnsupported: !isPatchSupported(patch),
isChangeEnabled: _managerAPI.isPatchesChangeEnabled(),
isChangeEnabled:
_managerAPI.isPatchesChangeEnabled(),
isNew: false,
isSelected: model.isSelected(patch),
onChanged: (value) => model.selectPatch(
Expand Down