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

Commit f0e1bcb9 authored by Zhizhi Liu's avatar Zhizhi Liu
Browse files

Handle IllegalArgumentException to avoid TvSettings crash.

When the suggested settings summary uri is unknown, TvSettings would crash.
Handle the exception to avoid this.
b/72644591

Test: Using a wrong uri for summary, it won't crash anymore.
Change-Id: I4ee635e066c8f8e8e29e240c8c185795d0fe3d2c
parent a9d41352
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -258,7 +258,13 @@ public class CandidateSuggestion {
        if (TextUtils.isEmpty(method)) {
            return null;
        }
        return mContext.getContentResolver().call(uri, method, null /* args */, null /* bundle */);
        try {
            return mContext.getContentResolver().call(uri, method, null /* args */,
                    null /* bundle */);
        } catch (IllegalArgumentException e){
            Log.d(TAG, "Unknown summary_uri", e);
            return null;
        }
    }

    /**