This repository has been archived by the owner on Apr 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 395
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
Creation of a new notification privacy management screen
Handling the selection of radio button for the choice of notification privacy preferences
manuroe
reviewed
Apr 12, 2018
import butterknife.ButterKnife; | ||
import im.vector.R; | ||
|
||
public class NotificationPrivacyActivity extends RiotAppCompatActivity { |
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.
That would be nice to have a description of the class.
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M){ | ||
tvNeedPermission.setVisibility(View.VISIBLE); | ||
} else{ | ||
tvNeedPermission.setVisibility(View.GONE); |
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.
tv_apps_no_permission
needs to be hidden too.
} else { | ||
switchPreference.setEnabled((null != rules) && isConnected); | ||
switchPreference.setChecked(preferences.getBoolean(resourceText, false)); | ||
} | ||
} | ||
} | ||
} | ||
|
||
// If notifications are disable for the current user account or for the current user device |
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.
s/disable/disabled
@@ -145,6 +141,8 @@ | |||
private static final int REQUEST_PHONEBOOK_COUNTRY = 789; | |||
private static final int REQUEST_LOCALE = 777; | |||
private static final int REQUEST_NOTIFICATION_RINGTONE = 888; | |||
// TODO use this constant to handle startActivityForResult for notification privacy | |||
private static final int REQUEST_NOTIFICATION_PRIVACY = 999; |
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.
I am wondering if we could skip this key and call refreshNotificationPrivacy
on onResume
. Is it a stupid idea?
Don't display "no permission needed" sentence for os versions lower than API 23 (M)
manuroe
approved these changes
Apr 12, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
#2130
Fixing display issues for dark and black themes is in progress :