From f17edfd49de922f970ec52fae543b0ce62263e66 Mon Sep 17 00:00:00 2001 From: Shikha Malhotra Date: Mon, 28 Mar 2022 17:12:35 +0000 Subject: [PATCH] Add a check that installD is available before using it Bug: b/226868221 Test: Manual Testing Change-Id: Ic463da00c8c8b56ab393c0b4a1969b408fc77f1e --- services/core/java/com/android/server/pm/Installer.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/core/java/com/android/server/pm/Installer.java b/services/core/java/com/android/server/pm/Installer.java index fff66629048d2..5fadd00b77ad2 100644 --- a/services/core/java/com/android/server/pm/Installer.java +++ b/services/core/java/com/android/server/pm/Installer.java @@ -287,6 +287,9 @@ public class Installer extends SystemService { * Sets in Installd that it is first boot after data wipe */ public void setFirstBoot() throws InstallerException { + if (!checkBeforeRemote()) { + return; + } try { mInstalld.setFirstBoot(); } catch (RemoteException e) {