Catch all exception from statusReceiver.sendIntent.

Any exception here (e.g., NPE) will crash the entire system process.

Bug: N/A
Test: atest AppIntegrityManagerServiceImplTest
Change-Id: I86eaa0bf7cb9d39fb23ee6aa71e80547bb95cc7e
This commit is contained in:
Song Pan
2020-02-25 13:46:20 +00:00
parent 634b94dcec
commit 1787f31065

View File

@@ -40,7 +40,6 @@ import android.content.integrity.Rule;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManagerInternal;
import android.content.pm.PackageParser;
import android.content.pm.PackageUserState;
import android.content.pm.ParceledListSlice;
import android.content.pm.Signature;
@@ -202,7 +201,7 @@ public class AppIntegrityManagerServiceImpl extends IAppIntegrityManager.Stub {
intent,
/* onFinished= */ null,
/* handler= */ null);
} catch (IntentSender.SendIntentException e) {
} catch (Exception e) {
Slog.e(TAG, "Error sending status feedback.", e);
}
});