Skip to content
Snippets Groups Projects
Commit 07b81ea1 authored by xiaomei.li's avatar xiaomei.li Committed by Xiaomei Li
Browse files

Pinned apk file should be put in mPinnedFiles.

The apk file which was pinned should be add to the mPinnedFiles,
if not, the unpinApp can not found the PinnedFile from mPinnedFiles,
will not do the unpinFile for the pinned apk file.

Change-Id: I74f30650a590e746de2a98e8f9c5535ee2a9d37e
parent f4d84e1a
No related branches found
No related tags found
No related merge requests found
......@@ -885,6 +885,7 @@ public final class PinnerService extends SystemService {
}
synchronized (this) {
pinnedApp.mFiles.add(pf);
mPinnedFiles.put(pf.fileName, pf);
}
apkPinSizeLimit -= pf.bytesPinned;
......@@ -1356,18 +1357,6 @@ public final class PinnerService extends SystemService {
public List<PinnedFileStat> getPinnerStats() {
ArrayList<PinnedFileStat> stats = new ArrayList<>();
Collection<PinnedApp> pinnedApps;
synchronized(this) {
pinnedApps = mPinnedApps.values();
}
for (PinnedApp pinnedApp : pinnedApps) {
for (PinnedFile pf : pinnedApp.mFiles) {
PinnedFileStat stat =
new PinnedFileStat(pf.fileName, pf.bytesPinned, pf.groupName);
stats.add(stat);
}
}
Collection<PinnedFile> pinnedFiles;
synchronized(this) {
pinnedFiles = mPinnedFiles.values();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment