Skip to content

adapt for play store#105

Open
zfdang wants to merge 3 commits intomasterfrom
refactor
Open

adapt for play store#105
zfdang wants to merge 3 commits intomasterfrom
refactor

Conversation

@zfdang
Copy link
Copy Markdown
Owner

@zfdang zfdang commented Mar 20, 2026

No description provided.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on adapting the application for Play Store submission by addressing key requirements related to user privacy and accessibility service usage. It introduces a clear disclosure for the AccessibilityService API, adds a privacy policy link, and includes a throttling mechanism for accessibility events to improve performance and stability.

Highlights

  • Accessibility Service Disclosure: Introduced a prominent disclosure dialog for AccessibilityService API usage, explaining its purpose and data handling, before directing users to system settings.
  • Event Throttling: Implemented a throttling mechanism for content changed events within the AccessibilityService to prevent rapid processing and improve stability.
  • Privacy Policy Integration: Added a dedicated section in the 'About' screen to display a privacy policy link, along with its corresponding string resource.
  • Build Configuration Update: Modified gradle.properties to include a flag for suppressing unsupported compile SDK warnings, likely to ensure compatibility for Play Store submission.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adapts the application for the Google Play Store by adding a prominent disclosure for the Accessibility Service usage and a link to the privacy policy. It also introduces a throttling mechanism for CONTENT_CHANGED events to improve performance. My review includes a critical fix for gradle.properties where a newline is missing, a suggestion to extract hardcoded strings to resources for better maintainability and internationalization, and a recommendation to replace a magic number with a constant.

KEYSTORE_PASSWORD=touchhelper
KEY_ALIAS=touchhelper
KEY_PASSWORD=touchhelper No newline at end of file
KEY_PASSWORD=touchhelperandroid.suppressUnsupportedCompileSdk=35
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

It seems like a new property android.suppressUnsupportedCompileSdk=35 was appended to the KEY_PASSWORD line without a newline. This is incorrect and will likely cause build failures or unexpected behavior. Please add a newline before android.suppressUnsupportedCompileSdk=35.

KEY_PASSWORD=touchhelper
android.suppressUnsupportedCompileSdk=35

}

long currentTime = System.currentTimeMillis();
if (currentTime - lastContentChangedTime < 150) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The value 150 is a magic number. It's better to define it as a named constant to improve readability and maintainability, for example: private static final int CONTENT_CHANGED_THROTTLE_INTERVAL_MS = 150; at the class level.

Comment on lines +85 to +94
new androidx.appcompat.app.AlertDialog.Builder(getContext())
.setTitle("重要说明 (Prominent Disclosure)")
.setMessage("本应用需要使用无障碍服务(AccessibilityService API)来帮您在其他应用中自动查找并点击屏幕上的指定控件(例如各类重复性的按钮)。\n\n本应用属于自动化工具,所有的点击操作均基于您的配置和触发策略。\n本应用完全离线运行,不会收集、存储、传输或分享您的任何个人数据及敏感信息。\n\n请点击“同意”以继续前往系统设置中授权此服务。")
.setPositiveButton("同意", (dialog, which) -> {
Intent intent_abs = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
intent_abs.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent_abs);
})
.setNegativeButton("拒绝", null)
.show();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The title, message, and button texts for this AlertDialog are hardcoded. It's a best practice to extract these strings into strings.xml resources. This improves maintainability and makes it easier to support multiple languages in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant