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

Commit a1122651 authored by Joseph Pirozzo's avatar Joseph Pirozzo Committed by Sanket Agarwal
Browse files

PBAP Handle IllegalArgumentException

When purging call log at startup handle the IllegealArugmentException
incase the call log content provider does not exist.

bug: 28671866
Change-Id: Ic02b4382be94f62908c90f175b9f165f3742240c
(cherry picked from commit 0d4b767f)
parent c87c400b
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -435,8 +435,11 @@ final class PbapClientStateMachine extends StateMachine {
            // The device ID is the name of the account.
            accountManager.removeAccountExplicitly(acc);
        }
        try {
            mContext.getContentResolver().delete(CallLog.Calls.CONTENT_URI, null, null);

        } catch (IllegalArgumentException e) {
            // CallLogs could not be deleted, they may not exist yet.
        }
    }

    public void dump(StringBuilder sb) {