Revert "Add UI updates for incremental app installs."
This reverts commit 84269d349d.
Reason for revert: causes b/176884453 and b/176992421
Change-Id: I3398674a0acbad8329df5d341ae074ac073a6bf9
This commit is contained in:
1 parent
84269d349d
commit
229497d182
24 files changed
+163
-400
No files matched your search
@@ -35,13 +35,11 @@ import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.util.LongSparseArray;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.launcher3.InvariantDeviceProfile;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.LauncherSettings.Favorites;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.Workspace;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
@@ -94,9 +92,6 @@ public class LoaderCursor extends CursorWrapper {
|
||||
private final int restoredIndex;
|
||||
private final int intentIndex;
|
||||
|
||||
@Nullable
|
||||
private LauncherActivityInfo mActivityInfo;
|
||||
|
||||
// Properties loaded per iteration
|
||||
public long serialNumber;
|
||||
public UserHandle user;
|
||||
@@ -137,8 +132,6 @@ public class LoaderCursor extends CursorWrapper {
|
||||
public boolean moveToNext() {
|
||||
boolean result = super.moveToNext();
|
||||
if (result) {
|
||||
mActivityInfo = null;
|
||||
|
||||
// Load common properties.
|
||||
itemType = getInt(itemTypeIndex);
|
||||
container = getInt(containerIndex);
|
||||
@@ -252,10 +245,6 @@ public class LoaderCursor extends CursorWrapper {
|
||||
return info;
|
||||
}
|
||||
|
||||
public LauncherActivityInfo getLauncherActivityInfo() {
|
||||
return mActivityInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make an WorkspaceItemInfo object for a shortcut that is an application.
|
||||
*/
|
||||
@@ -275,25 +264,25 @@ public class LoaderCursor extends CursorWrapper {
|
||||
Intent newIntent = new Intent(Intent.ACTION_MAIN, null);
|
||||
newIntent.addCategory(Intent.CATEGORY_LAUNCHER);
|
||||
newIntent.setComponent(componentName);
|
||||
mActivityInfo = mContext.getSystemService(LauncherApps.class)
|
||||
LauncherActivityInfo lai = mContext.getSystemService(LauncherApps.class)
|
||||
.resolveActivity(newIntent, user);
|
||||
if ((mActivityInfo == null) && !allowMissingTarget) {
|
||||
if ((lai == null) && !allowMissingTarget) {
|
||||
Log.d(TAG, "Missing activity found in getShortcutInfo: " + componentName);
|
||||
return null;
|
||||
}
|
||||
|
||||
final WorkspaceItemInfo info = new WorkspaceItemInfo();
|
||||
info.itemType = Favorites.ITEM_TYPE_APPLICATION;
|
||||
info.itemType = LauncherSettings.Favorites.ITEM_TYPE_APPLICATION;
|
||||
info.user = user;
|
||||
info.intent = newIntent;
|
||||
|
||||
mIconCache.getTitleAndIcon(info, mActivityInfo, useLowResIcon);
|
||||
mIconCache.getTitleAndIcon(info, lai, useLowResIcon);
|
||||
if (mIconCache.isDefaultIcon(info.bitmap, user)) {
|
||||
loadIcon(info);
|
||||
}
|
||||
|
||||
if (mActivityInfo != null) {
|
||||
AppInfo.updateRuntimeFlagsForActivityTarget(info, mActivityInfo);
|
||||
if (lai != null) {
|
||||
AppInfo.updateRuntimeFlagsForActivityTarget(info, lai);
|
||||
}
|
||||
|
||||
// from the db
|
||||
|
||||
Reference in new issue
Block a user