Skip to content

[Device Management] Show correct device type icons (PSG-775) #7292

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

Merged
merged 5 commits into from
Oct 5, 2022

Conversation

mnaturel
Copy link
Contributor

@mnaturel mnaturel commented Oct 5, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Display the correct device type icon on item in lists and in the session overview view.
Adding mapping from DeviceInfo to Realm entity for the user agent field with the corresponding migration.

Motivation and context

Closes #7277

Screenshots / GIFs

Tests

  • Login to an account in https://synapse-prefill.lab.element.dev (Synapse deployment with experimental feature flags for MSC3852 (exposure of user agent))
  • Enable the new device manager feature flag
  • Go to Settings -> Security & Privacy -> Show all sessions (WIP, V2)
  • Check there are correct icons for device types of each of the sessions in the other sessions list and in the session overview views

Tested devices

  • Physical
  • Emulator
  • OS version(s): Android 11

Checklist

@mnaturel mnaturel force-pushed the feature/mna/device-manager-type-icons branch from 5f6c740 to f02b689 Compare October 5, 2022 08:14
@mnaturel mnaturel marked this pull request as ready for review October 5, 2022 08:16
@mnaturel mnaturel requested review from a team and jmartinesp and removed request for a team October 5, 2022 08:16
Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of questions.

@@ -0,0 +1 @@
[Device Management] Show correct device type icons
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be 'wip'?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have used ".wip" for all related PRs for the new device manager feature since it is under development (behind feature flag).

@@ -30,7 +30,7 @@ import org.matrix.android.sdk.internal.util.database.RealmMigrator
* mark existing keys as safe.
* This migration can take long depending on the account
*/
internal class MigrateCryptoTo019(realm: DynamicRealm) : RealmMigrator(realm, 18) {
internal class MigrateCryptoTo019(realm: DynamicRealm) : RealmMigrator(realm, 19) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this cause any issues?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully no. The target version is only used in RealmMigrator for log purpose.

Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM then

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 5, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

59.5% 59.5% Coverage
0.0% 0.0% Duplication

@bmarty bmarty merged commit 80c210e into develop Oct 5, 2022
@bmarty bmarty deleted the feature/mna/device-manager-type-icons branch October 5, 2022 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Device Management] Show correct device type icons
3 participants