Commit graph

11 commits

Author SHA1 Message Date
Ben Fennema
3cd6491a22 Revert "recovery: fix UI error when directories too many [1/1]"
This reverts commit 159a5473a2.

Reason for revert: This breaks menu scrolling on wear devices
Bug: 309813434

Change-Id: If68683fcef0e9689fa6cfea1af5aab559f99fb3a
2023-11-09 02:07:25 +00:00
weifang.liu
159a5473a2 recovery: fix UI error when directories too many [1/1]
PD#SWPL-109807
PD#SWPL-140491
BUG=296817261

Problem:
UI error when directories too many

Solution:
check if select menu exceed screen size

Verify:
ohm

Change-Id: I4905a5766985aa5b9f59cd30613f4c90c07c16ab
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
2023-10-25 09:46:47 +08:00
fredchiou
b44702a80a recovery_ui:Add support for multiple connectors switch
Bug: 199253219
Test: display can switch in recovery
Change-Id: If58ea5423f64420db3e5bd9307194b56129d6543
2022-08-29 13:16:29 +00:00
Mark Salyzyn
30017e78bc recovery: fastbootd: retry opening graphics
Recovery and fastbootd hardening.

With GKI we find in certain situations the timing of the drivers
loading is delayed as compared to a monolithic kernel.  This
exasperates an existing race where during second stage init, the
graphics driver might not have completely instantiated by the time
fastboot or recovery menu ui is being set up.

To address this, we call gr_init() every 10ms until either 5 seconds
timeout or success.  If we timeout, there will be no TUI (minui), but
this is better than if we just tried once and dropped the TUI and was
effectively running headless.  5 seconds timeout is arbitrary, based
on the default in init for wait for file; but makes sense as any
longer will impact flashstation and fastboot flashall enough to be
a cause for consternation.

It should be noted that both recovery and fastbootd can still service
adb or fastboot gadgets headless.  For instance if the device tree is
misconfigured as a permanent issue that would head for the timeout.
Prefering to give up after a timeout so that device can be flashed by
fastbootd, or rebooted by recovery adbd, over the protocol is
advantageous for tool stability.

Architectural Concern:

The graphics driver, if not well written, may panic the kernel if we
try to access it too soon while it is probing.  On such devices it
will be necessary to hold off in 'on init' or 'on early-init' phases
until the graphics drivers have completely probed.  Or better yet,
fix the driver.  This problem would happen in any case occasionally
even without this adjustments, but could conceivably be amplified by
the loop trying to open the graphics device.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 151950334
Test: make sure user space fastbootd comes up reliably for a GKI kernel
Change-Id: I1ce31a01544a58cdf7b9d657c1146bee77894e46
2020-05-15 13:29:18 -07:00
zhang sanshan
0d81b89472 Recovery UI meet issue if image size is too large
When display screen size is too small, some images in recovery
resource cannot caculate the right display position. So the
image cannot show in the screen.
Limit the calculated position to avoid such issue.

Change-Id: Iebebfe0dfbc568ee3a6b6a31b81d060b3ce5f940
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
2020-02-21 16:20:47 +00:00
Joshua Lambert
94a83be42a Revert "Add mechanism for device-specific loop images"
This reverts commit fd6a2c226d.

Reason for revert: Mechanism already exists:
https://source.android.com/devices/tech/ota/nonab/device_code#recovery-ui-images

Change-Id: Ic7b640b5d435cfb6f5c2610a2534405fb9415936
2019-12-09 20:24:18 +00:00
Joshua Lambert
fd6a2c226d Add mechanism for device-specific loop images
Bug: 144974129
Test: Manual - Testing OTA and Factory Reset
1) Tested with matching device name ({devicename}00000.png)
2) Tested with no matching device name (uses loop00000.png default)
3) Tested with empty string device name (uses loop00000.png default)

Change-Id: I4c73af82ab8826d1a43fe193a7616bc219d536e4
2019-12-06 12:56:50 -08:00
Tianjie Xu
e5032219fe Create a new function to return the help message for menu
Then we can override this function in the device specific recovery ui;
and allow customizing the help message.

Bug: 137965958
Test: Check the menu on sailfish
Change-Id: I09f23166f4205c5edf6c62eb42c8ada0fa710b26
2019-07-25 13:22:03 -07:00
Tao Bao
fa8e02af7c recovery_ui: Remove redundant menu creation.
Test: Boot into recovery and "Run graphics test".
Change-Id: Icbf1c230b4af57cf32b3c7a4b30ddbabc21d5618
2019-06-27 09:07:51 -07:00
xunchang
9d05c8a357 Fall back to en-US if localized bitmap is missing for a locale
We used to show the image for the last locale or an empty image, if
the localized image is missing for a specific locale. As the default
english one is more meaningful to users, we should just error out and
fall back to use the default locale when the image loading fails.

Bug: 128934634
Test: run graphic test, locale test
Change-Id: Iafd3e8466aec63b4952d1959b2a3d37e358677d4
2019-04-22 14:39:51 -07:00
Tianjie Xu
8f397309b4 Move librecovery_ui to a sub-directory
This helps to expose librecovery_ui for device specific RecoveryUi.

Bug: 76436783
Test: mma, unit tests pass
Change-Id: Ic6c3d301d5833e4a592e6ea9d9d059bc4e4919be
(cherry picked from commit b5108c372c)
2019-03-21 10:46:11 -07:00
Renamed from screen_ui.cpp (Browse further)