summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2015-12-04 05:26:55 +0100
committerEthan Yonker <dees_troy@teamw.in>2015-12-22 22:15:54 +0100
commit2d50cada066e7c84ebb5b7a3d973a35853cb9412 (patch)
tree0e29bcc9827790ab8030e498498ead351b17858e /partitionmanager.cpp
parentpixelflinger: Fix local src arch includes (diff)
downloadandroid_bootable_recovery-2d50cada066e7c84ebb5b7a3d973a35853cb9412.tar
android_bootable_recovery-2d50cada066e7c84ebb5b7a3d973a35853cb9412.tar.gz
android_bootable_recovery-2d50cada066e7c84ebb5b7a3d973a35853cb9412.tar.bz2
android_bootable_recovery-2d50cada066e7c84ebb5b7a3d973a35853cb9412.tar.lz
android_bootable_recovery-2d50cada066e7c84ebb5b7a3d973a35853cb9412.tar.xz
android_bootable_recovery-2d50cada066e7c84ebb5b7a3d973a35853cb9412.tar.zst
android_bootable_recovery-2d50cada066e7c84ebb5b7a3d973a35853cb9412.zip
Diffstat (limited to 'partitionmanager.cpp')
-rw-r--r--partitionmanager.cpp30
1 files changed, 2 insertions, 28 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index d459612e7..5194be804 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -1395,34 +1395,8 @@ void TWPartitionManager::Update_System_Details(void) {
if (FreeStorage != NULL) {
// Attempt to mount storage
if (!FreeStorage->Mount(false)) {
- // We couldn't mount storage... check to see if we have dual storage
- int has_dual_storage;
- DataManager::GetValue(TW_HAS_DUAL_STORAGE, has_dual_storage);
- if (has_dual_storage == 1) {
- // We have dual storage, see if we're using the internal storage that should always be present
- if (current_storage_path == DataManager::GetSettingsStoragePath()) {
- if (!FreeStorage->Is_Encrypted) {
- // Not able to use internal, so error!
- gui_msg(Msg(msg::kError, "unable_to_mount_internal=Unable to mount internal_storage"));
- }
- DataManager::SetValue(TW_STORAGE_FREE_SIZE, 0);
- } else {
- // We were using external, flip to internal
- DataManager::SetValue(TW_USE_EXTERNAL_STORAGE, 0);
- current_storage_path = DataManager::GetCurrentStoragePath();
- FreeStorage = Find_Partition_By_Path(current_storage_path);
- if (FreeStorage != NULL) {
- DataManager::SetValue(TW_STORAGE_FREE_SIZE, (int)(FreeStorage->Free / 1048576LLU));
- } else {
- gui_msg(Msg(msg::kError, "unable_to_locate=Unable to locate {1}")("internal storage partition"));
- DataManager::SetValue(TW_STORAGE_FREE_SIZE, 0);
- }
- }
- } else {
- // No dual storage and unable to mount storage, error!
- gui_msg(Msg(msg::kError, "unable_to_mount_storage=Unable to mount storage"));
- DataManager::SetValue(TW_STORAGE_FREE_SIZE, 0);
- }
+ gui_msg(Msg(msg::kError, "unable_to_mount_storage=Unable to mount storage"));
+ DataManager::SetValue(TW_STORAGE_FREE_SIZE, 0);
} else {
DataManager::SetValue(TW_STORAGE_FREE_SIZE, (int)(FreeStorage->Free / 1048576LLU));
}