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

Commit 5f3716d1 authored by Fan Zhang's avatar Fan Zhang
Browse files

Catch a rare NPE due in SuggestionController

In monkey test, suggestion service can detach right before UI tries to query.

Change-Id: Ic2eeb81140f5b5d38688fbe92d20f68b9fa48c34
Fixes: 69979152
Test: monkey
parent caf5358e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -104,6 +104,9 @@ public class SuggestionController {
        }
        try {
            return mRemoteService.getSuggestions();
        } catch (NullPointerException e) {
            Log.w(TAG, "mRemote service detached before able to query", e);
            return null;
        } catch (RemoteException e) {
            Log.w(TAG, "Error when calling getSuggestion()", e);
            return null;