Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b699603f authored by Li YanJia's avatar Li YanJia Committed by Takamasa Kuramitsu
Browse files

Fix PrivateVolumeSettings be launched repeatedly

Symptom:
After manually pull out the removable sd card or usb storage in
StorageSettings screen, it automatically moves to
PrivateVolumeSettings screen. This time, launching
PrivateVolumeSettings Activity is triggered six times and end-user
has to press back key six times to exit PrivateVolumeSettings
screen.

Root cause:
When sd card is pulled out, StorageSettings got three state change
event (UNMOUNTED, BAD_REMOVAL and onDiskDestroyed) through
StorageEventListener that triggers launching PrivateVolumeSettings
screen. In addition StorageSettings register the listener two
times, then StorageSettings receives six event in total.
Therefore, PrivateVolumeSettings screen is launched six times.

Solution:
Skip launching PrivateVolumeSettings if it's already triggered.
And removed the duplicated listener registration.

Bug: 67612903

Change-Id: Iabef51677a393977b7be29fc54aa050434213500
parent c4b0fa58
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment