[Settings] Cleanup unused code

Remove unused code since mRebuildAsync is always set to true.

Bug: 240851254
Change-Id: I8f40d9beb6658e1d8cb649bef99f41ac510dfb1c
Test: build pass
This commit is contained in:
Bonian Chen
2022-07-31 15:07:58 +00:00
parent e6add33163
commit 90960c8a12

View File

@@ -792,10 +792,8 @@ public class ApplicationsState {
// Rebuilding of app list. Synchronized on mRebuildSync.
final Object mRebuildSync = new Object();
boolean mRebuildRequested;
boolean mRebuildAsync;
AppFilter mRebuildFilter;
Comparator<AppEntry> mRebuildComparator;
ArrayList<AppEntry> mRebuildResult;
ArrayList<AppEntry> mLastAppList;
boolean mRebuildForeground;
@@ -901,11 +899,9 @@ public class ApplicationsState {
synchronized (mRebuildingSessions) {
mRebuildingSessions.add(this);
mRebuildRequested = true;
mRebuildAsync = true;
mRebuildFilter = filter;
mRebuildComparator = comparator;
mRebuildForeground = foreground;
mRebuildResult = null;
if (!mBackgroundHandler.hasMessages(BackgroundHandler.MSG_REBUILD_LIST)) {
Message msg = mBackgroundHandler.obtainMessage(
BackgroundHandler.MSG_REBUILD_LIST);
@@ -985,15 +981,10 @@ public class ApplicationsState {
synchronized (mRebuildSync) {
if (!mRebuildRequested) {
mLastAppList = filteredApps;
if (!mRebuildAsync) {
mRebuildResult = filteredApps;
mRebuildSync.notifyAll();
} else {
if (!mMainHandler.hasMessages(MainHandler.MSG_REBUILD_COMPLETE, this)) {
Message msg = mMainHandler.obtainMessage(
MainHandler.MSG_REBUILD_COMPLETE, this);
mMainHandler.sendMessage(msg);
}
if (!mMainHandler.hasMessages(MainHandler.MSG_REBUILD_COMPLETE, this)) {
Message msg = mMainHandler.obtainMessage(
MainHandler.MSG_REBUILD_COMPLETE, this);
mMainHandler.sendMessage(msg);
}
}
}