13#include "android/log.h"
17#define LOG(args...) __android_log_print(ANDROID_LOG_INFO, "GeckoUpdater" , ## args)
26 LOG(
"Starting to apply update ...\n");
32 LOG(
"Finished applying update\n");
37 assert(0.0f <= progress && progress <= 100.0f);
39 static const size_t kProgressBarLength = 50;
40 static size_t sLastNumBars;
41 size_t numBars = size_t(
float(kProgressBarLength) * progress / 100.0f);
42 if (numBars == sLastNumBars)
46 sLastNumBars = numBars;
48 size_t numSpaces = kProgressBarLength - numBars;
49 std::string bars(numBars,
'=');
50 std::string spaces(numSpaces,
' ');
51 LOG(
"Progress [ %s%s ]\n", bars.c_str(), spaces.c_str());
int InitProgressUI(int *argc, char ***argv)
void UpdateProgressUI(float progress)