Merge "Fix infinite loop during package-usage.list file upgrade" into nyc-dev
am: 074e23c
* commit '074e23c37b841065eefc26a79175fb3140bdc998':
Fix infinite loop during package-usage.list file upgrade
Change-Id: I4b3a67885fd22282cc0b987d69265da04ead7de1
This commit is contained in:
@@ -1217,12 +1217,7 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
// Initial version of the file had no version number and stored one
|
||||
// package-timestamp pair per line.
|
||||
// Note that the first line has already been read from the InputStream.
|
||||
String line = firstLine;
|
||||
while (true) {
|
||||
if (line == null) {
|
||||
break;
|
||||
}
|
||||
|
||||
for (String line = firstLine; line != null; line = readLine(in, sb)) {
|
||||
String[] tokens = line.split(" ");
|
||||
if (tokens.length != 2) {
|
||||
throw new IOException("Failed to parse " + line +
|
||||
@@ -1241,8 +1236,6 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
reason++) {
|
||||
pkg.mLastPackageUsageTimeInMills[reason] = timestamp;
|
||||
}
|
||||
|
||||
line = readLine(in, sb);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user