-
Notifications
You must be signed in to change notification settings - Fork 8
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
SMBSync3 Fixes #4
Open
PhilZ-cwm6
wants to merge
141
commits into
Sentaroh:main
Choose a base branch
from
PhilZ-cwm6:patch_upstream
base: main
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
Conversation
This file contains 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
Move settings directory from /data/data to internal storage An optional setting should select /data/data, internal storage or app specific directory /storage/emulated/0/android/data/app_tag
After app reinstall or a new request to storage permissions, previous messages were not properly loaded and could be overwritten
Some labels had a wrong description
jcifs 1.3 library is recompiled with jcifs13 class and we keep the upstream jcifs-ng class to jcifs. This makes it possible to directly update the jcifs lib to the latest release by just swapping the library instead of recompiling jcifs-ng with a custom class JcifsFile2 is upgraded to support the new jcifs libs Utilities3 is upgraded to use updated wrapperForSlf4j that supports latest logging formats by slf4j and that are needed by jcifs-ng and any future external lib relying on slf4j logger
- fix SMB sync was broken when a custom port was set in destination - fix SMB sync error message displaying url:port:port error instead of url:port
- When editing an SMB server with a user/password set, the user/pass were empty and editing the server details caused the user/pass to be lost
Allow copy/paste in unhidden password field when importing an encrypted app settings file
…tings allow password confirmation field toggle and copy/paste when exporting settings with password
- Zip password: fix confirmation password view always disabled and a zip password could not be set - Zip password: enable password show/hide icon with confirmation password field toggle - Zip password: preserve password visibility view state on screen rotation
Properly toggle SMB password TextInputLayout view on use password check/uncheck (no functional changes, but for code clarity)
When option "Edit SMB Server Parameters" is unchecked, mask the SMB server password
On screen rotation, ensure SMB password cannot be shown if Edit SMB Server parameters option is unchecked Not needed because the check is also done later in setSyncFolderSmbListener: if the Edit SMB Server parameters option is unchecked, the ll_sync_folder_pswd_view is disabled and password is automatically masked
After screen rotation in SMB and ZIP, properly enable/disable Save button on view changes
- fix bug where the following spinners were disabled after screen rotation: + Sync Task Type spinner + Sync Wifi option spinner + DST offset spinner - remove orphan code
…aved In SMB server, if the option "Use account name and password" is unchecked, do not discard the current user/pass on screen rotation until user clicks "Save" button in SMB edit view
If settingSecurityReinitSmbAccountPasswordValue is set, the option Use SMB account/password could be wrongly checked
Deprecate Activity.startActivityForResult(), onActivityResult(), requestPermissions() and onRequestPermissionsResult() in favor of ActivityResultLauncher, registerForActivityResult, ActivityResultContracts
- Enable the Storage permissions access in menu. This menu will be later migrated to a menu showing access to all app permissions - When requesting storage permissions from menu, do not exit app if permission was already granted and user cancels the permission request
Deprecate startActivityForResult to request access to external removable storage (external SD) on App start and in Task Editor
EditSynTask views are properly saved and reloaded on configuration changes (screen rotation) and use of deprecated setRetainInstance() is not needed
Fixes warning : Do not place Android context classes in static fields (static reference to `NotifyEvent` which has field `context` pointing to `Context`); this is a memory leak
On returning from Settings (back button), setting were not reloaded
Deprecate PreferenceActivity and migrate to AppCompatActivity with PreferenceFragmentCompat as it was deprecated since Android 3.0 (API 11)
Dual pane view is not supported in androidx Preference library We need a custom fragment layout for this For now, disable the dual pane view in preferences
- apply option immediately - apply option also in Create/Edit password option
- Add menu to open app system permissions - Fix string resource in xml
To know if the app main activity is starting for the first time or is being recreated after being killed/restarted by Android system (system app permission change, low memory, system developer's option "Don't keep activities") we use Bundle savedInstanceState from onCreate() instead of relying on onRestoreInstanceState() method call This change is only for convenience as it is uncommon to use it in onRestoreInstanceState()
When system app permissions are changed, Android system recreates the activity effectively calling onCreate() This was causing an NPE crash if, while in app preferences (settings activity), the user moved to system app permissions and removed an app permission like storage access. The NPE occurred when returning to main app. In upstream source, this scenario would cause a false app prompt to restart if some settings (theme, text size, app directory...) are set to other than default values. This patch fixes the NPE crash and any useless prompt for app restart in such scenarios where onCreate() is called when back to main activity
Only code cleanup, no change in function
On Android versions before SDK 30, only enable storage is possible from this new option. Storage access can still be revoked inside app using "All app system permissions" menu
This menu is now useless since we have storage permission option in Settings / Advanced
- Restore original upstream custom list preference for non compressed file types - Deprecate legacy Preference Dialog implementation and migrate to androidx - Fix screen rotation did not properly preserve Ok button state - Add missing resources for edit compress file type dialogs - Fix compression file types list sorting was only applied in adapter and not persisted in saved preferences - Fix when editing file type entries in list, they were not sorted when back to the list view
- Deprecate getFragmentManager() - Notice about deprecated setTargetFragment(): Deprecated setTargetFragment() must be implemented because source file PreferenceDialogFragmentCompat.java implements @SuppressWarnings("deprecation") in onCreate() for deprecated getTargetFragment() method. Else, we get JavaExcption error "Target fragment must implement TargetFragment interface" Until PreferenceDialogFragmentCompat.java adds an alternative, we're stuck to using setTargetFragment() deprecated method here https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-preference-release/preference/preference/src/main/java/androidx/preference/PreferenceDialogFragmentCompat.java#78
For custom list preference (non compressed file types selection): - add option to undo delete entry - when list is modified, Ok button will only be enabled if the final resulting list is different from the original one - on screen rotation and activity killed, properly preserve all the custom preference list dialogs state
- Upgrade all tools and plugins to latest releases - Target SDK 33
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.
Open bugs:
Fixed bugs and added features:
check commit messages