Fix inc /datadata wiping from RM.
Change-Id: I983bf83a7baf1494c7ff26199591bb93fab5ae74
This commit is contained in:
		@@ -26,7 +26,7 @@ LOCAL_MODULE := recovery
 | 
			
		||||
 | 
			
		||||
LOCAL_FORCE_STATIC_EXECUTABLE := true
 | 
			
		||||
 | 
			
		||||
RECOVERY_VERSION := ClockworkMod Recovery v3.0.0.6
 | 
			
		||||
RECOVERY_VERSION := ClockworkMod Recovery v3.0.0.8
 | 
			
		||||
LOCAL_CFLAGS += -DRECOVERY_VERSION="$(RECOVERY_VERSION)"
 | 
			
		||||
RECOVERY_API_VERSION := 2
 | 
			
		||||
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
 | 
			
		||||
 
 | 
			
		||||
@@ -43,7 +43,8 @@ int device_toggle_display(volatile char* key_pressed, int key_code) {
 | 
			
		||||
        return 1;
 | 
			
		||||
    // allow toggling of the display if the correct key is pressed, and the display toggle is allowed or the display is currently off
 | 
			
		||||
    if (ui_get_showing_back_button()) {
 | 
			
		||||
        return get_allow_toggle_display() && (key_code == KEY_HOME || key_code == KEY_MENU || key_code == KEY_END);
 | 
			
		||||
        return 0;
 | 
			
		||||
        //return get_allow_toggle_display() && (key_code == KEY_HOME || key_code == KEY_MENU || key_code == KEY_END);
 | 
			
		||||
    }
 | 
			
		||||
    return get_allow_toggle_display() && (key_code == KEY_HOME || key_code == KEY_MENU || key_code == KEY_POWER || key_code == KEY_END);
 | 
			
		||||
}
 | 
			
		||||
@@ -84,6 +85,9 @@ int device_handle_key(int key_code, int visible) {
 | 
			
		||||
            case KEY_END:
 | 
			
		||||
            case KEY_BACKSPACE:
 | 
			
		||||
            case KEY_BACK:
 | 
			
		||||
                if (ui_get_showing_back_button()) {
 | 
			
		||||
                    return SELECT_ITEM;
 | 
			
		||||
                }
 | 
			
		||||
                if (!get_allow_toggle_display())
 | 
			
		||||
                    return GO_BACK;
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -134,6 +134,14 @@ Value* FormatFn(const char* name, State* state, int argc, Expr* argv[]) {
 | 
			
		||||
        free(path);
 | 
			
		||||
        return StringValue(strdup(""));
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    if (strcmp(path, "/data") == 0 && has_datadata()) {
 | 
			
		||||
        ui_print("Formatting /datadata...\n", path);
 | 
			
		||||
        if (0 != format_volume("/datadata")) {
 | 
			
		||||
            free(path);
 | 
			
		||||
            return StringValue(strdup(""));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
done:
 | 
			
		||||
    return StringValue(strdup(path));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user