recovery: Remove duplicate variables and functions
am: 0ba21cff07
* commit '0ba21cff07ceafeaa43e17aa26e341d961f6f29f':
recovery: Remove duplicate variables and functions
This commit is contained in:
+2
-2
@@ -54,7 +54,6 @@ ScreenRecoveryUI::ScreenRecoveryUI() :
|
|||||||
currentIcon(NONE),
|
currentIcon(NONE),
|
||||||
installingFrame(0),
|
installingFrame(0),
|
||||||
locale(nullptr),
|
locale(nullptr),
|
||||||
rtl_locale(false),
|
|
||||||
progressBarType(EMPTY),
|
progressBarType(EMPTY),
|
||||||
progressScopeStart(0),
|
progressScopeStart(0),
|
||||||
progressScopeSize(0),
|
progressScopeSize(0),
|
||||||
@@ -76,7 +75,8 @@ ScreenRecoveryUI::ScreenRecoveryUI() :
|
|||||||
animation_fps(-1),
|
animation_fps(-1),
|
||||||
installing_frames(-1),
|
installing_frames(-1),
|
||||||
stage(-1),
|
stage(-1),
|
||||||
max_stage(-1) {
|
max_stage(-1),
|
||||||
|
rtl_locale(false) {
|
||||||
|
|
||||||
for (int i = 0; i < 5; i++) {
|
for (int i = 0; i < 5; i++) {
|
||||||
backgroundIcon[i] = nullptr;
|
backgroundIcon[i] = nullptr;
|
||||||
|
|||||||
+4
-3
@@ -71,9 +71,7 @@ class ScreenRecoveryUI : public RecoveryUI {
|
|||||||
Icon currentIcon;
|
Icon currentIcon;
|
||||||
int installingFrame;
|
int installingFrame;
|
||||||
const char* locale;
|
const char* locale;
|
||||||
bool rtl_locale;
|
|
||||||
|
|
||||||
pthread_mutex_t updateMutex;
|
|
||||||
GRSurface* backgroundIcon[5];
|
GRSurface* backgroundIcon[5];
|
||||||
GRSurface* backgroundText[5];
|
GRSurface* backgroundText[5];
|
||||||
GRSurface** installation;
|
GRSurface** installation;
|
||||||
@@ -136,9 +134,12 @@ class ScreenRecoveryUI : public RecoveryUI {
|
|||||||
void DrawTextLine(int* y, const char* line, bool bold);
|
void DrawTextLine(int* y, const char* line, bool bold);
|
||||||
void DrawTextLines(int* y, const char* const* lines);
|
void DrawTextLines(int* y, const char* const* lines);
|
||||||
|
|
||||||
void LoadBitmap(const char* filename, GRSurface** surface);
|
|
||||||
void LoadBitmapArray(const char* filename, int* frames, int* fps, GRSurface*** surface);
|
void LoadBitmapArray(const char* filename, int* frames, int* fps, GRSurface*** surface);
|
||||||
void LoadLocalizedBitmap(const char* filename, GRSurface** surface);
|
void LoadLocalizedBitmap(const char* filename, GRSurface** surface);
|
||||||
|
protected:
|
||||||
|
pthread_mutex_t updateMutex;
|
||||||
|
bool rtl_locale;
|
||||||
|
void LoadBitmap(const char* filename, GRSurface** surface);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // RECOVERY_UI_H
|
#endif // RECOVERY_UI_H
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ WearRecoveryUI::WearRecoveryUI() :
|
|||||||
currentIcon(NONE),
|
currentIcon(NONE),
|
||||||
intro_done(false),
|
intro_done(false),
|
||||||
current_frame(0),
|
current_frame(0),
|
||||||
rtl_locale(false),
|
|
||||||
progressBarType(EMPTY),
|
progressBarType(EMPTY),
|
||||||
progressScopeStart(0),
|
progressScopeStart(0),
|
||||||
progressScopeSize(0),
|
progressScopeSize(0),
|
||||||
@@ -81,7 +80,6 @@ WearRecoveryUI::WearRecoveryUI() :
|
|||||||
for (size_t i = 0; i < 5; i++)
|
for (size_t i = 0; i < 5; i++)
|
||||||
backgroundIcon[i] = NULL;
|
backgroundIcon[i] = NULL;
|
||||||
|
|
||||||
pthread_mutex_init(&updateMutex, NULL);
|
|
||||||
self = this;
|
self = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -321,13 +319,6 @@ void WearRecoveryUI::progress_loop() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WearRecoveryUI::LoadBitmap(const char* filename, GRSurface** surface) {
|
|
||||||
int result = res_create_display_surface(filename, surface);
|
|
||||||
if (result < 0) {
|
|
||||||
LOGE("missing bitmap %s\n(Code %d)\n", filename, result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void WearRecoveryUI::Init()
|
void WearRecoveryUI::Init()
|
||||||
{
|
{
|
||||||
gr_init();
|
gr_init();
|
||||||
|
|||||||
@@ -84,9 +84,6 @@ class WearRecoveryUI : public ScreenRecoveryUI {
|
|||||||
|
|
||||||
int current_frame;
|
int current_frame;
|
||||||
|
|
||||||
bool rtl_locale;
|
|
||||||
|
|
||||||
pthread_mutex_t updateMutex;
|
|
||||||
GRSurface* backgroundIcon[5];
|
GRSurface* backgroundIcon[5];
|
||||||
GRSurface* *introFrames;
|
GRSurface* *introFrames;
|
||||||
GRSurface* *loopFrames;
|
GRSurface* *loopFrames;
|
||||||
@@ -123,7 +120,6 @@ class WearRecoveryUI : public ScreenRecoveryUI {
|
|||||||
void update_screen_locked();
|
void update_screen_locked();
|
||||||
static void* progress_thread(void* cookie);
|
static void* progress_thread(void* cookie);
|
||||||
void progress_loop();
|
void progress_loop();
|
||||||
void LoadBitmap(const char* filename, GRSurface** surface);
|
|
||||||
void PutChar(char);
|
void PutChar(char);
|
||||||
void ClearText();
|
void ClearText();
|
||||||
void DrawTextLine(int x, int* y, const char* line, bool bold);
|
void DrawTextLine(int x, int* y, const char* line, bool bold);
|
||||||
|
|||||||
Reference in New Issue
Block a user