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

Commit 85bdb47b authored by Song Pan's avatar Song Pan
Browse files

Catch all exception from statusReceiver.sendIntent.

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

Bug: 150217444
Test: atest AppIntegrityManagerServiceImplTest
Change-Id: I86eaa0bf7cb9d39fb23ee6aa71e80547bb95cc7e
(cherry picked from commit 1787f310)
parent 2c89e32d
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -40,7 +40,6 @@ import android.content.integrity.Rule;
import android.content.pm.PackageInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager;
import android.content.pm.PackageManagerInternal;
import android.content.pm.PackageManagerInternal;
import android.content.pm.PackageParser;
import android.content.pm.PackageUserState;
import android.content.pm.PackageUserState;
import android.content.pm.ParceledListSlice;
import android.content.pm.ParceledListSlice;
import android.content.pm.Signature;
import android.content.pm.Signature;
@@ -202,7 +201,7 @@ public class AppIntegrityManagerServiceImpl extends IAppIntegrityManager.Stub {
                                intent,
                                intent,
                                /* onFinished= */ null,
                                /* onFinished= */ null,
                                /* handler= */ null);
                                /* handler= */ null);
                    } catch (IntentSender.SendIntentException e) {
                    } catch (Exception e) {
                        Slog.e(TAG, "Error sending status feedback.", e);
                        Slog.e(TAG, "Error sending status feedback.", e);
                    }
                    }
                });
                });