[Device Notifier] Keep the device label & icon after unmounting
ClosedPublic

Authored by thsurrel on Nov 23 2018, 10:02 PM.

Details

Summary

When unmounting a device, the device notifier keeps the information
of the device and its icon for a few seconds before it disappears.
But the binding on the label and the icon was making them go blank
before, leaving an emblem without an icon and a 'This device can
now be safely removed' notice without the name of the device
(although it did not always happen, this I am not sure why).

The problem appeared with commit 61b2b173e8d68623a3681fd27c0ad0348bf41191

Test Plan

Unmount a removable device with the device notifier: for a few
seconds, the device name and icon should still be displayed

An example of the problem:

Diff Detail

Repository
R120 Plasma Workspace
Branch
arc_notifier_labels (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 5297
Build 5315: arc lint + arc unit
thsurrel created this revision.Nov 23 2018, 10:02 PM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 23 2018, 10:02 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
thsurrel requested review of this revision.Nov 23 2018, 10:02 PM
filipf added a subscriber: filipf.Nov 24 2018, 9:48 PM

I tested both the old and new code and it seemed same to me, it would probably take more attempts to trigger the bug you described. But for what it's worth the new code didn't cause any issues that I could notice.

thsurrel edited the summary of this revision. (Show Details)Nov 26 2018, 8:59 AM
thsurrel edited the test plan for this revision. (Show Details)

Hi @filipf, thanks for trying that out.
I realized that the problem is only present when working with master, the problem appeared with a recent commit. I updated the summary accordingly.

This patch fixes a regression that appeared in this cycle, that would be good if someone could review it so that we don't ship it with 5.15.

davidedmundson accepted this revision.Jan 8 2019, 1:34 PM
davidedmundson added a subscriber: davidedmundson.

That's a very clever and neat solution.

This revision is now accepted and ready to land.Jan 8 2019, 1:34 PM

Thank you very much for taking a look. If you have a bit of time, I have two other patches about the device notifier that have been waiting for a while: D17402 and D16212.

This revision was automatically updated to reflect the committed changes.