-
Notifications
You must be signed in to change notification settings - Fork 502
adapt for play store #105
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
Open
zfdang
wants to merge
7
commits into
master
Choose a base branch
from
refactor
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
adapt for play store #105
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
611aa66
adapt for play store
zfdang 56ee969
update build workflow
zfdang 97cdfea
update build workflow
zfdang b2e3a79
fix proguard rules for navigation component crash
zfdang 8c2a42d
merge master into refactor
zfdang a716625
upgrade dependencies and add AAB build for Play Store
zfdang 4d0beff
fix CI workflow and broken privacy policy link
zfdang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -31,7 +31,7 @@ | |
| import androidx.lifecycle.MediatorLiveData; | ||
| import androidx.lifecycle.MutableLiveData; | ||
| import androidx.lifecycle.Observer; | ||
| import androidx.lifecycle.ViewModelProviders; | ||
| import androidx.lifecycle.ViewModelProvider; | ||
|
|
||
| import com.zfdang.touchhelper.R; | ||
| import com.zfdang.touchhelper.TouchHelperService; | ||
|
|
@@ -45,7 +45,7 @@ public class HomeFragment extends Fragment { | |
| public View onCreateView(@NonNull LayoutInflater inflater, | ||
| ViewGroup container, Bundle savedInstanceState) { | ||
| homeViewModel = | ||
| ViewModelProviders.of(this).get(HomeViewModel.class); | ||
| new ViewModelProvider(this).get(HomeViewModel.class); | ||
| View root = inflater.inflate(R.layout.fragment_home, container, false); | ||
|
|
||
| final Drawable drawableYes = ContextCompat.getDrawable(getContext(), R.drawable.ic_right); | ||
|
|
@@ -82,9 +82,16 @@ public void onChanged(Boolean aBoolean) { | |
| btAccessibilityPermission.setOnClickListener(new View.OnClickListener() { | ||
| @Override | ||
| public void onClick(View v) { | ||
| Intent intent_abs = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS); | ||
| intent_abs.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | ||
| startActivity(intent_abs); | ||
| 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(); | ||
|
Comment on lines
+85
to
+94
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
| }); | ||
|
|
||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value
150is 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.