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

Commit ad00ceb7 authored by Jian Zhou's avatar Jian Zhou Committed by Gerrit - the friendly Code Review server
Browse files

Settings: Fix force close in settings

Settings force close when click to open volumn which status is in change.

Disbale the item when status is in change.

Change-Id: I8fc4bc55ffbaf1335043b88e85bbac739e4d9fc5
CRs-Fixed: 1077857
parent a1965d0e
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -169,8 +169,13 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index
                    privateTotalBytes += path.getTotalSpace();
                }
            } else if (vol.getType() == VolumeInfo.TYPE_PUBLIC) {
                mExternalCategory.addPreference(
                        new StorageVolumePreference(context, vol, COLOR_PUBLIC));
                StorageVolumePreference ExStorageVolumePreference =
                        new StorageVolumePreference(context, vol, COLOR_PUBLIC);

                //Disable preference when in change
                ExStorageVolumePreference.setEnabled(vol.getState()!= VolumeInfo.STATE_CHECKING
                    && vol.getState() != VolumeInfo.STATE_EJECTING);
                mExternalCategory.addPreference(ExStorageVolumePreference);
            }
        }