Commit graph

8 commits

Author SHA1 Message Date
Prashant Malani
7a491225bb recovery: Remove SetColor, and other refactoring for WearUI
The only difference from SetColor in ScreenRecoveryUI is the that the
LOG messages have slightly different colors. That's not enough to
warrant a duplicate function. So this patch removes SetColor and uses
the parent class version.

This patch also moves the DrawTextLine* functions into ScreenRecoveryUI
since they're mostly the same. It also moves char_width and char_height
into the class instead of keeping them as static variables.

Bug: 27407422
Change-Id: I30428c9433baab8410cf710a01c9b1c44c217bf1
2016-03-11 15:22:20 -08:00
Prashant Malani
0ba21cff07 recovery: Remove duplicate variables and functions
The function that modifies rtl_locale exists only in the base class,
and so the variable should not have a duplicate in the derived class,
otherwise there may be incosistent values when it is read by the derived
class (the thinking being that invoking the function will modify the
base class version of the variable, and not the derived class version).

Remove the updateMutex variable, and instead re-use the one in the base
class.

Also remove LoadBitmap from WearUI since it is identical to the one in
ScreenRecoveryUI.

Bug: 27407422
Change-Id: Idd823fa93dfa16d7b2c9c7160f8d0c2559d28731
2016-03-10 15:36:31 -08:00
Prashant Malani
f7f9e50528 Revert "recovery: More refactoring of WearUI"
This reverts commit 1c7b2230d8.

This change can lead to the derived class indirectly (and incorrectly) calling some functions from the base class, which can lead to unpredictable behavior.

Bug: 27407422
Change-Id: I126a7489b0787dc195e942e2ceea6769de20d70c
2016-03-10 03:40:20 +00:00
Prashant Malani
1c7b2230d8 recovery: More refactoring of WearUI
This patch performs the following modifications:
- Remove setBackground function, and currentIcon member variable.
- Remove common Progress*, Redraw and EndMenu functions.

Bug: 27407422
Change-Id: Ic3c0e16b67941484c3bc1d04c9b61288e8896808
Signed-off-by: Prashant Malani <pmalani@google.com>
2016-03-08 15:56:54 -08:00
Prashant Malani
7d9fd96dc9 recovery: Begin refactor of WearUI to use ScreenRecoveryUI
This is the first of a series of changes which move WearUI to subclass
ScreenRecoveryUI, to take advantage of several functions which are
common between the two recovery UI implementations, and already defined
in ScreenRecoveryUI.

This patch changes the base class of WearUI, removes redundant
header includes, and also removes a common function.

Bug: 27407422

Change-Id: I8fd90826900f69272a82e23bd099790e8004d511
2016-03-08 14:37:49 -08:00
Prashant Malani
0eb41c3f37 Fixes to wear recovery for N
Bug: 27336841

Change-Id: If4632e9791cce2c39590a4012687271f59a60af1
2016-02-26 17:01:37 -08:00
Tao Bao
b723f4f38f res: Embed FPS into icon_installing.png.
We allow vendor-specific icon installing image but have defined private
animation_fps that can't be overridden. This CL changes the image
generator to optionally embed FPS (otherwise use the default value of
20) into the generated image.

For wear devices, they are using individual images instead of the
interlaced one. Change the animation_fps from private to protected so
that it can be customized.

Bug: 26009230
Change-Id: I9fbf64ec717029d4c54f72316f6cb079e8dbfb5e
2015-12-16 11:35:52 -08:00
Tao Bao
337db14f27 recovery: Factor out wear_ui.{cpp,h} into bootable/recovery.
Every watch has a (mostly identical) copy of the wear_ui. Factor them
out into a single copy for easier maintenance. Device-specific settings
should be defined in recovery_ui.cpp that inherits WearRecoveryUI class.

Bug: 22451422
Change-Id: Id07efca37d1b1d330e6327506c7b73ccf6ae9241
2015-08-24 17:31:47 -07:00