From 7af51ce521a43450f29fd8c2cb73f635cf78dea9 Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Fri, 4 Apr 2014 13:33:30 -0500 Subject: Tweak OEM mode Change-Id: Ic440e33fa22aa7b082097366f10b333cc945362a --- Android.mk | 9 ++++++--- data.cpp | 22 +--------------------- 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/Android.mk b/Android.mk index 2f1f6fcee..98c442791 100644 --- a/Android.mk +++ b/Android.mk @@ -75,6 +75,12 @@ ifneq ($(wildcard system/core/libsparse/Android.mk),) LOCAL_SHARED_LIBRARIES += libsparse endif +ifeq ($(TW_OEM_BUILD),true) + LOCAL_CFLAGS += -DTW_OEM_BUILD + BOARD_HAS_NO_REAL_SDCARD := true + TW_USE_TOOLBOX := true + TW_EXCLUDE_SUPERSU := true +endif ifeq ($(TARGET_USERIMAGES_USE_EXT4), true) LOCAL_CFLAGS += -DUSE_EXT4 LOCAL_C_INCLUDES += system/extras/ext4_utils @@ -278,9 +284,6 @@ endif ifneq ($(wildcard bionic/libc/include/sys/capability.h),) LOCAL_CFLAGS += -DHAVE_CAPABILITIES endif -ifeq ($(TW_OEM_BUILD),true) - LOCAL_CFLAGS += -DTW_OEM_BUILD -endif include $(BUILD_EXECUTABLE) diff --git a/data.cpp b/data.cpp index 738bc0f66..c9628a411 100644 --- a/data.cpp +++ b/data.cpp @@ -1109,28 +1109,8 @@ void DataManager::ReadSettingsFile(void) LOGINFO("Attempt to load settings from settings file...\n"); LoadValues(settings_file); Output_Version(); - GetValue(TW_HAS_DUAL_STORAGE, has_dual); - GetValue(TW_USE_EXTERNAL_STORAGE, use_ext); - GetValue(TW_HAS_EXTERNAL, has_ext); - if (has_dual != 0 && use_ext == 1) { - // Attempt to switch to using external storage - if (!PartitionManager.Mount_Current_Storage(false)) { - LOGERR("Failed to mount external storage, using internal storage.\n"); - // Remount failed, default back to internal storage - SetValue(TW_USE_EXTERNAL_STORAGE, 0); - PartitionManager.Mount_Current_Storage(true); - } - } else { - PartitionManager.Mount_Current_Storage(true); - } - - if (has_ext) { - string ext_path; - - GetValue(TW_EXTERNAL_PATH, ext_path); - PartitionManager.Mount_By_Path(ext_path, 0); - } #endif // ifdef TW_OEM_BUILD + PartitionManager.Mount_All_Storage(); update_tz_environment_variables(); #ifdef TW_MAX_BRIGHTNESS if (strcmp(EXPAND(TW_BRIGHTNESS_PATH), "/nobrightness") != 0) { -- cgit v1.2.3