Setup a password confirmation. #168
Open
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.
This pull request introduces a "Confirm Password" step in the Anti-Uninstall setup process for enhanced user experience and includes several string resource fixes for improved localization and build stability. Its purpose is to help prevent typos and errors by having users enter their chosen password twice, ensuring the typed versions match before setting up Anti-install mode.
Key Features & Changes:
Implemented Confirm Password Functionality:
•Modified nethical/digipaws/ui/fragments/anti_uninstall/SetupPasswordModeFragment.kt:
•Added logic to handle a new "Confirm Password" input field.
•Implemented validation to ensure:
•Password is not empty.
•Confirm Password is not empty.
•Password and Confirm Password match.
•Updated UI interactions to display error messages for the new validation rules
•Modified layout/fragment_setup_password_mode.xml:
•Added a TextInputLayout and TextInputEditText for the "Confirm Password" field.
•Added New String Resources to values/strings.xml (and presumably their translations would be needed):
•confirm_password: For the "Confirm Password" hint/label.
•password_cannot_be_empty: Error message.
•confirm_password_cannot_be_empty: Error message.
•passwords_do_not_match: Error message.
•block_making_changes_to_blockers_during_this_period: For the checkbox in SetupPasswordModeFragment.
Corrected String Formatting for end_time and start_time_02d_02d:
•Added proper positional argument indexing (e.g., %1$02d:%2$02d) to these strings in:•app/src/main/res/values/strings.xml (Default English)
•app/src/main/res/values-tr/strings.xml (Turkish)
•app/src/main/res/values-zh-rCN/strings.xml (Chinese - Simplified)
•This ensures the correct display of times across different languages.
Resolved Build Error for todays_stats in values/strings.xml:
•The string "Today's Stats" was causing an "Invalid unicode escape sequence" build error.
•The string was changed to "Todays Stats" (apostrophe removed) which resolved the build failure.
Updated Farsi Translations (values-fa/strings.xml):
•Added the missing Farsi translation for if_you_enable_this_you_won_t_be_able_to_change_configurations_such_as_adding_blocked_apps_keywords_and_more.•Confirmed existing translations for todays_stats, end_time, and start_time_02d_02d were correctly formatted.
Reasoning for Changes:
•The "Confirm Password" feature significantly improves the usability and error-prevention of the Anti-Uninstall setup.
•The string formatting corrections are crucial for proper localization.
•The fix for todays_stats was necessary for a successful application build.
•The Farsi translation update enhances localization.
•Defining all UI strings in resource files makes the codebase more robust.
These changes enhance a key security feature and improve the overall quality and stability of the app.