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

Commit aff4dbb0 authored by Doug Zongker's avatar Doug Zongker Committed by Android (Google) Code Review
Browse files

Merge "recovery locale handling fixes" into jb-mr1-dev

parents d52ef348 8b240ccc
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -249,18 +249,13 @@ int res_create_localized_surface(const char* name, gr_surface* pSurface) {
    size_t height = info_ptr->height;
    size_t stride = 4 * width;

    printf("image size is %d x %d\n", width, height);

    int color_type = info_ptr->color_type;
    int bit_depth = info_ptr->bit_depth;
    int channels = info_ptr->channels;
    printf("color_type %d bit_depth %d channels %d\n",
           color_type, bit_depth, channels);

    if (!(bit_depth == 8 &&
          (channels == 1 && color_type == PNG_COLOR_TYPE_GRAY))) {
        return -7;
        printf("exiting -7\n");
        goto exit;
    }

@@ -276,8 +271,6 @@ int res_create_localized_surface(const char* name, gr_surface* pSurface) {
        printf("row %d: %s %d x %d\n", y, loc, w, h);

        if (y+1+h >= height || matches_locale(loc)) {
            printf("  taking this one\n");

            surface = malloc(sizeof(GGLSurface));
            if (surface == NULL) {
                result = -8;
@@ -301,7 +294,6 @@ int res_create_localized_surface(const char* name, gr_surface* pSurface) {
            *pSurface = (gr_surface) surface;
            break;
        } else {
            printf("   skipping\n");
            int i;
            for (i = 0; i < h; ++i, ++y) {
                png_read_row(png_ptr, row, NULL);
+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ static const char *INTENT_FILE = "/cache/recovery/intent";
static const char *LOG_FILE = "/cache/recovery/log";
static const char *LAST_LOG_FILE = "/cache/recovery/last_log";
static const char *LAST_INSTALL_FILE = "/cache/recovery/last_install";
static const char *LOCALE_FILE = "/cache/recovery/locale";
static const char *LOCALE_FILE = "/cache/recovery/last_locale";
static const char *CACHE_ROOT = "/cache";
static const char *SDCARD_ROOT = "/sdcard";
static const char *TEMPORARY_LOG_FILE = "/tmp/recovery.log";
−2.95 KiB (1.46 KiB)
Loading image diff...
−2.22 KiB (844 B)
Loading image diff...
+352 B (6.63 KiB)
Loading image diff...
Loading