Merge "Improve android secure handling" into android-4.4
diff --git a/minuitwrp/graphics.c b/minuitwrp/graphics.c
index fc34b6b..99f5841 100644
--- a/minuitwrp/graphics.c
+++ b/minuitwrp/graphics.c
@@ -69,6 +69,7 @@
static GGLSurface gr_mem_surface;
static unsigned gr_active_fb = 0;
static unsigned double_buffering = 0;
+static int gr_is_curr_clr_opaque = 0;
static int gr_fb_fd = -1;
static int gr_vt_fd = -1;
@@ -288,6 +289,8 @@
color[2] = ((b << 8) | b) + 1;
color[3] = ((a << 8) | a) + 1;
gl->color4xv(gl, color);
+
+ gr_is_curr_clr_opaque = (a == 255);
}
int gr_measureEx(const char *s, void* font)
@@ -463,8 +466,15 @@
void gr_fill(int x, int y, int w, int h)
{
GGLContext *gl = gr_context;
+
+ if(gr_is_curr_clr_opaque)
+ gl->disable(gl, GGL_BLEND);
+
gl->disable(gl, GGL_TEXTURE_2D);
gl->recti(gl, x, y, x + w, y + h);
+
+ if(gr_is_curr_clr_opaque)
+ gl->enable(gl, GGL_BLEND);
}
void gr_blit(gr_surface source, int sx, int sy, int w, int h, int dx, int dy) {
diff --git a/partition.cpp b/partition.cpp
index 29b071c..95f6bca 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -1591,12 +1591,6 @@
tar.setsize(Backup_Size);
if (tar.createTarFork() != 0)
return false;
- if (use_encryption)
- Full_FileName += "000";
- if (TWFunc::Get_File_Size(Full_FileName) == 0) {
- LOGERR("Backup file size for '%s' is 0 bytes.\n", Full_FileName.c_str());
- return false;
- }
return true;
}