diff options
| author | Tom Marshall <tdm.code@gmail.com> | 2017-08-24 13:50:01 +0000 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2022-08-21 19:38:13 +0300 |
| commit | af3d500b0b8c145c802ed670bb4758a7ad702709 (patch) | |
| tree | de7cfcdbf88169395cf2094dad7ce29d77041c4b /install | |
| parent | 3ad88f06ac50cd754994ba6c6a5033a81af98486 (diff) | |
recovery: ui: Support hardware virtual keys
* Also swipe left -> KEY_BACK
Change-Id: I6bd8054485d680df35abb86cb79f1dda683e4459
Diffstat (limited to 'install')
| -rw-r--r-- | install/fuse_install.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/install/fuse_install.cpp b/install/fuse_install.cpp index 197e1deb..09d04a8e 100644 --- a/install/fuse_install.cpp +++ b/install/fuse_install.cpp @@ -99,13 +99,16 @@ static std::string BrowseDirectory(const std::string& path, Device* device, Reco if (chosen_item == static_cast<size_t>(RecoveryUI::KeyError::INTERRUPTED)) { return ""; } - - const std::string& item = entries[chosen_item]; - if (chosen_item == 0) { - // Go up but continue browsing (if the caller is BrowseDirectory). + if (chosen_item == Device::kGoHome) { + return "@"; + } + if (chosen_item == Device::kGoBack || chosen_item == 0) { + // Go up but continue browsing (if the caller is browse_directory). return ""; } + const std::string& item = entries[chosen_item]; + std::string new_path = path + "/" + item; if (new_path.back() == '/') { // Recurse down into a subdirectory. |
