-
Notifications
You must be signed in to change notification settings - Fork 739
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
Put EC permission shortcuts behind labs flag (PSG-630) #6634
Conversation
Signed-off-by: Johannes Marbach <[email protected]>
Signed-off-by: Johannes Marbach <[email protected]>
@@ -168,7 +173,7 @@ class WidgetActivity : VectorBaseActivity<ActivityWidgetBinding>() { | |||
private fun createElementCallPipParams(): PictureInPictureParams? { | |||
val actions = mutableListOf<RemoteAction>() | |||
val intent = Intent(ACTION_MEDIA_CONTROL).putExtra(EXTRA_CONTROL_TYPE, CONTROL_TYPE_HANGUP) | |||
val pendingIntent = PendingIntent.getBroadcast(this, REQUEST_CODE_HANGUP, intent, 0) | |||
val pendingIntent = PendingIntent.getBroadcast(this, REQUEST_CODE_HANGUP, intent, FLAG_IMMUTABLE) |
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.
This isn't strictly related to the intent of this PR but the widget kept crashing for me without this.
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.
Yes it seems mandatory started from Android 12: https://developer.android.com/about/versions/12/behavior-changes-12#pending-intent-mutability
Kudos, SonarCloud Quality Gate passed! |
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.
LGTM.
Signed-off-by: Johannes Marbach [email protected]
Type of change
Content
This is a follow-up on #6616 that puts the Element Call permission shortcuts behind a labs flag. Anyone can create a false widget of type
io.element.call
and silently acquire permissions so we don't want to enable this behavior by default.Tests
Can be tested e.g. in #ecwidgettest:matrix.org
Tested devices
Checklist
CC @onurays