OSDN Git Service

Don't overly hide the Files preference.
authorDaniel Nishi <dhnishi@google.com>
Mon, 1 May 2017 18:30:14 +0000 (11:30 -0700)
committerDaniel Nishi <dhnishi@google.com>
Tue, 2 May 2017 22:42:55 +0000 (15:42 -0700)
commitf7fa542eb69b598ac014bb9b54b9e5b105c51e59
treee7ecd3bdf14078456dd33855e5b2a5fefe1e3bb4
parentb2d85af91e1d3a33dd80def07d6f45f14b20860a
Don't overly hide the Files preference.

This occurred this because the files preference was initialized during
displayPreference(), but the volume used to initialize it was not being
set until after the displayPreference() call. In this case, the files
preference would hide itself and never come back.

This fixes this by double-checking the Files visibility status whenever
we set the volume.

Change-Id: I0b1a7a9566e9caece39ec58706fbca034ef4c1c2
Fixes: 37790776
Test: Settings robotest
src/com/android/settings/deviceinfo/storage/StorageItemPreferenceController.java
tests/robotests/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceControllerTest.java