-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Feature - Add Custom Share Permissions #14729
base: master
Are you sure you want to change the base?
Conversation
alperozturk96
commented
Mar 26, 2025
•
edited
Loading
edited
- Tests written, or not not needed
/** | ||
* get the permissions on the basis of selection | ||
*/ | ||
private fun getSelectedPermission() = when { |
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.
No need this function anymore. clickEvents assigns value for the permission
cbf504a
to
c27d9ee
Compare
bf9eb82
to
5eae6b1
Compare
/** | ||
* Sets checked/visibility state on the given {@link MenuItem} based on the given criteria. | ||
* | ||
* @param menuItem the {@link MenuItem} to be setup | ||
*/ | ||
public static void setupHideFileDownload(MenuItem menuItem, | ||
boolean hideFileDownload, | ||
boolean isFileDrop) { | ||
if (isFileDrop) { | ||
menuItem.setVisible(false); | ||
} else { | ||
menuItem.setVisible(true); | ||
menuItem.setChecked(hideFileDownload); | ||
} | ||
} | ||
|
||
/** | ||
* sets up the password {@link MenuItem}'s title based on the fact if a password is present. | ||
* | ||
* @param password the password {@link MenuItem} | ||
* @param isPasswordProtected flag is a password is present | ||
*/ | ||
public static void setupPasswordMenuItem(MenuItem password, boolean isPasswordProtected) { | ||
if (isPasswordProtected) { | ||
password.setTitle(R.string.share_password_title); | ||
} else { | ||
password.setTitle(R.string.share_no_password_title); | ||
} | ||
} | ||
|
||
/** | ||
* sets up the expiration date {@link MenuItem}'s title based on the fact if an expiration date is present. | ||
* | ||
* @param expirationDate the expiration date {@link MenuItem} | ||
* @param expirationDateValue the expiration date | ||
* @param res Resources to load the corresponding strings. | ||
*/ | ||
public static void setupExpirationDateMenuItem(MenuItem expirationDate, long expirationDateValue, Resources res) { | ||
if (expirationDateValue > 0) { | ||
expirationDate.setTitle(res.getString( | ||
R.string.share_expiration_date_label, | ||
SimpleDateFormat.getDateInstance().format(new Date(expirationDateValue)) | ||
)); | ||
} else { | ||
expirationDate.setTitle(R.string.share_no_expiration_date_label); | ||
} | ||
} | ||
|
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.
Unused functions
3fcc813
to
1b1bc00
Compare
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
322132d
to
351e29c
Compare
Signed-off-by: alperozturk <[email protected]>
blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed. |
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/14729.apk |