Skip to content

Commit 1358ebe

Browse files
committed
Fix off-by-one error when filtering application UIDs
A filtering check in writeLPr() mistakenly includes the first application UID (10000) with the result that the package with UID 10000 is missing from packages.list. This patch fix the error. Change-Id: I3651beb346290db8e09317391b95a77aed1946b6 Signed-off-by: Magnus Eriksson <eriksson.mag@gmail.com>
1 parent 1f9e749 commit 1358ebe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

services/java/com/android/server/pm/Settings.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ void writeLPr() {
971971

972972
// Avoid any application that has a space in its path
973973
// or that is handled by the system.
974-
if (dataPath.indexOf(" ") >= 0 || ai.uid <= Process.FIRST_APPLICATION_UID)
974+
if (dataPath.indexOf(" ") >= 0 || ai.uid < Process.FIRST_APPLICATION_UID)
975975
continue;
976976

977977
// we store on each line the following information for now:
@@ -2261,4 +2261,4 @@ void dumpReadMessagesLPr(PrintWriter pw, DumpState dumpState) {
22612261
pw.println("Settings parse messages:");
22622262
pw.print(mReadMessages.toString());
22632263
}
2264-
}
2264+
}

0 commit comments

Comments
 (0)