From 2dea53ef2b96fe09083d9cad42b5f07b6ad83ab5 Mon Sep 17 00:00:00 2001 From: Jerry Zhang Date: Wed, 2 May 2018 17:15:03 -0700 Subject: recovery: Get UI and locale from device. This removes some reliance on the global locale and ui variables. Test: Recovery works Bug: 78793464 Change-Id: I78f1a2b321f5d50aa58b10735a73ae137283353a --- device.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'device.h') diff --git a/device.h b/device.h index 8788b2d14..9510fbedb 100644 --- a/device.h +++ b/device.h @@ -58,6 +58,12 @@ class Device { return ui_; } + // Sets the UI object to the given UI. Used to override the default UI in case initialization + // failed, or we want a stub for some reason. + virtual void SetUI(RecoveryUI* ui) { + ui_ = ui; + } + // Called when recovery starts up (after the UI has been obtained and initialized and after the // arguments have been parsed, but before anything else). virtual void StartRecovery() {}; -- cgit v1.2.3