Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a179062a authored by Han Wang's avatar Han Wang
Browse files

KeyguardStateMonitor: Don't get IUsbRestrict service in constructor

 * If boot up is "too fast" and Trust HAL starts a bit slowly,
   we may end up getting a NULL IUsbRestrict service in
   constructor. This causes a NPE later in onShowingStateChanged().

 * To avoid this, we just try to get IUsbRestrict service in
   onShowingStateChanged(). This adds a little overhead, but prevents
   possible crashes.

Change-Id: Idc09cc1700aad8753244789a1f14ea1d5267f77c
parent e4f75f0e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment