Send additional Extras in first screen broadcasts, to help with app archiving.
- refactor FirstScreenBroadcast.java into FirstScreenBroadcastHelper.kt - send Extras to include installed/archived items on first screen - send Extras to include installed/archived widgets on all screens. - truncate items to limit Broadcast size Bug: 322314760 Test: unit testing and E2E test of B&R Flag: launcher_broadcast_installed_apps Change-Id: I214149ac0c63f177d3d1ca0b6d0cb11be37f4ae0
This commit is contained in:
1 parent
62b5e43d85
commit
7cc4302f10
7 files changed
+849
-10
No files matched your search
@@ -16,9 +16,10 @@
|
||||
|
||||
package com.android.launcher3.util;
|
||||
|
||||
import static com.android.launcher3.model.data.ItemInfoWithIcon.FLAG_INSTALL_SESSION_ACTIVE;
|
||||
import static android.view.WindowManager.PROPERTY_SUPPORTS_MULTI_INSTANCE_SYSTEM_UI;
|
||||
|
||||
import static com.android.launcher3.model.data.ItemInfoWithIcon.FLAG_INSTALL_SESSION_ACTIVE;
|
||||
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
@@ -150,6 +151,18 @@ public class PackageManagerHelper implements SafeCloseable{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the installing app package for the given package
|
||||
*/
|
||||
public String getAppInstallerPackage(@NonNull final String packageName) {
|
||||
try {
|
||||
return mPm.getInstallSourceInfo(packageName).getInstallingPackageName();
|
||||
} catch (NameNotFoundException e) {
|
||||
Log.e(TAG, "Failed to get installer package for app package:" + packageName, e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the application info for the provided package or null
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user