From ffe5219ef47c87893a52c59def710db63e224d36 Mon Sep 17 00:00:00 2001 From: Aayush Gupta Date: Fri, 3 Jan 2025 12:07:47 +0700 Subject: [PATCH 1/2] README: Mention about required permissions and their usecases Signed-off-by: Aayush Gupta --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 99c01c0eb..c56fddff0 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,24 @@ Please visit [Aurora Wiki](https://gitlab.com/AuroraOSS/AuroraStore/-/wikis/home - [Telegram](https://t.me/AuroraSupport) - [XDA Developers](https://forum.xda-developers.com/t/app-5-0-aurora-store-open-source-google-play-client.3739733/) +## Permissions + +- `android.permission.INTERNET` to download and install/update apps from the Google Play servers +- `android.permission.ACCESS_NETWORK_STATE` to check internet availability +- `android.permission.FOREGROUND_SERVICE` to download apps without interruption +- `android.permission.FOREGROUND_SERVICE_DATA_SYNC` to download apps without interruption +- `android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS` to auto-update apps without interruption (optional) +- `android.permission.MANAGE_EXTERNAL_STORAGE` to access the OBB directory to download APK expansion files for games or large apps +- `android.permission.READ_EXTERNAL_STORAGE` to access the OBB directory to download APK expansion files for games or large apps +- `android.permission.WRITE_EXTERNAL_STORAGE` to access the OBB directory to download APK expansion files for games or large apps +- `android.permission.QUERY_ALL_PACKAGES` to check updates for all installed apps +- `android.permission.REQUEST_INSTALL_PACKAGES` to install and update apps +- `android.permission.REQUEST_DELETE_PACKAGES` to uninstall apps +- `android.permission.ENFORCE_UPDATE_OWNERSHIP` to silently update apps +- `android.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION` to silently update apps +- `android.permission.POST_NOTIFICATIONS` to notify user about ongoing downloads, available updates, and errors (optional) +- `android.permission.USE_CREDENTIALS` to allow users to sign into their personal Google account via microG + ## Screenshots From df10c8b5eb08c939562ef6de844d51103e7755d4 Mon Sep 17 00:00:00 2001 From: Aayush Gupta Date: Sat, 4 Jan 2025 14:01:39 +0700 Subject: [PATCH 2/2] fixup! AppDetails: Fix user review + minor cleanup Signed-off-by: Aayush Gupta --- .../view/ui/details/AppDetailsFragment.kt | 40 +++++++++---------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/app/src/main/java/com/aurora/store/view/ui/details/AppDetailsFragment.kt b/app/src/main/java/com/aurora/store/view/ui/details/AppDetailsFragment.kt index 569e33abc..4243f71f4 100644 --- a/app/src/main/java/com/aurora/store/view/ui/details/AppDetailsFragment.kt +++ b/app/src/main/java/com/aurora/store/view/ui/details/AppDetailsFragment.kt @@ -717,6 +717,7 @@ class AppDetailsFragment : BaseFragment() { updateAppDescription(app) updateAppRatingAndReviews(app) + updateUserReview() updateAppDevInfo(app) updateAppPermission(app) @@ -828,26 +829,25 @@ class AppDetailsFragment : BaseFragment() { } } - private fun updateUserReview(review: Review) { + private fun updateUserReview(review: Review? = null) { binding.layoutDetailsReview.apply { - layoutUserReview.visibility = View.VISIBLE - inputTitle.setText(review.title) - inputReview.setText(review.comment) - userStars.rating = review.rating.toFloat() + layoutUserReview.isVisible = !authProvider.isAnonymous + btnPostReview.setOnClickListener { + viewModel.postAppReview( + app.packageName, + Review( + title = inputTitle.text.toString(), + rating = userStars.rating.toInt(), + comment = inputReview.text.toString() + ), + app.testingProgram?.isSubscribed ?: false + ) + } - if (!authProvider.isAnonymous && app.isInstalled) { - btnPostReview.setOnClickListener { - addOrUpdateReview( - app, - Review().apply { - title = inputTitle.text.toString() - rating = userStars.rating.toInt() - comment = inputReview.text.toString() - } - ) - } - } else { - layoutUserReview.visibility = View.GONE + if (review != null) { + inputTitle.setText(review.title) + inputReview.setText(review.comment) + userStars.rating = review.rating.toFloat() } } } @@ -1025,8 +1025,4 @@ class AppDetailsFragment : BaseFragment() { private fun addAvgReviews(number: Int, max: Long, rating: Long): RelativeLayout { return RatingView(requireContext(), number, max.toInt(), rating.toInt()) } - - private fun addOrUpdateReview(app: App, review: Review, isBeta: Boolean = false) { - viewModel.postAppReview(app.packageName, review, isBeta) - } }