diff options
author | Paul Keith <javelinanddart@gmail.com> | 2019-02-06 19:09:21 -0600 |
---|---|---|
committer | Bruno Martins <bgcngm@gmail.com> | 2019-02-07 08:19:34 +0000 |
commit | 950336a92de583376aa89819609392a625e9ca1e (patch) | |
tree | 22e61602e1484fc6a2c2db1d468cd4eca93eb127 /sdm/service.cpp | |
parent | 75ac2f2facf7d04ccaa0a9d9f166a7e4d8ddbf2e (diff) | |
download | hardware_lineage_livedisplay-950336a92de583376aa89819609392a625e9ca1e.tar.gz hardware_lineage_livedisplay-950336a92de583376aa89819609392a625e9ca1e.tar.bz2 hardware_lineage_livedisplay-950336a92de583376aa89819609392a625e9ca1e.zip |
livedisplay: Fix racy init
* It turns out moving this to class main doesn't work as well
as some had thought it would, so restore the previous logic
to use class hal, and restart if the backend isn't up yet
Change-Id: Ib8b417d89108dcf80d0d159e8d84e5327944b2a1
Diffstat (limited to 'sdm/service.cpp')
-rw-r--r-- | sdm/service.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sdm/service.cpp b/sdm/service.cpp index f561ad9..bee3ef6 100644 --- a/sdm/service.cpp +++ b/sdm/service.cpp @@ -128,6 +128,11 @@ int main() { goto shutdown; } + if (!ab->isSupported() && !cb->isSupported() && !dm->isSupported() && !pa->isSupported()) { + // Backend isn't ready yet, so restart and try again + goto shutdown; + } + configureRpcThreadpool(1, true /*callerWillJoin*/); if (ab->isSupported()) { |