Repository navigation
Improve codebase based on code review findings - #114
Merged
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This pull request implements comprehensive improvements identified during the codebase review. Each issue has been addressed in an individual, atomic commit:
fix: make PackageWidgetDescription equals and hashCode null-safe and comprehensive (
f2d86bb)equalsandhashCodeinPackageWidgetDescriptionby comparing all relevant fields (packageName,activityName,className,idName,description,text,clickable,onlyClick, and safe coordinates comparison).position == null.SkipAdRulesTestverifying reflexivity, symmetry, null-safety, and copy behavior.fix: dismiss and clean up accessibility overlay views on unbind and interrupt (
0655dc0)overlayViewTarget,overlayViewCustomization,overlayImageTarget) inTouchHelperServiceImpl.dismissActivityCustomizationDialog()and hooked it intoonUnbind(),onInterrupt(), andbtQuitto prevent window leaks when service stops while customization overlay is open.onInterrupt()inTouchHelperServiceto service implementation.fix: prevent potential NPE on broadcast reception in broadcast receivers (
f166a7c)equalschecks inPackageChangeReceiverandUserPresentReceiver.fix: upgrade rules URL to HTTPS and handle ActivityNotFoundException safely (
51f4db8)https://touchhelper.zfdang.com/rules.startActivitycalls withtry-catch (ActivityNotFoundException)inManagePackageWidgetsDialogFragmentandHomeFragmentto prevent crashes on stripped or custom ROMs lacking standard intents.refactor: use scheduleWithFixedDelay instead of scheduleAtFixedRate (
6594a68)scheduleAtFixedRatetoscheduleWithFixedDelayinTouchHelperServiceImplto avoid burst periodic execution when system resumes from sleep or under heavy load.perf: load and sort whitelist apps asynchronously off main thread (
40ac357)SettingsFragment.AppInformationimplementingComparable<AppInformation>.androidx.appcompat.app.AlertDialogand passed parent view when inflating items.refactor: improve Settings thread safety and defensive copies (
ab9d1ba)volatileand synchronized whitelist accessors returning defensive copy collections.activityInfoorapplicationInfo.refactor: apply modern Android standards and clean up layout lint warnings (
811d543)<fragment>to<androidx.fragment.app.FragmentContainerView>inactivity_main.xmland retrievedNavControllerviaNavHostFragment.android:labelonMainActivityinAndroidManifest.xml.layout_package_information.xml, removed obsolete layout parameters, added constraint bounds to prevent text overlap, and migrated to start/end padding.layout_manage_package_widgets.xml..omc/in.gitignore.Verification
./gradlew testDebugUnitTestand./gradlew testReleaseUnitTestpassed../gradlew lintDebugpassed without new warnings or errors.