feat: Add option to clear home screen in settings (#6125)

Signed-off-by: abhixv <abhi.sharma1@hotmail.com>
This commit is contained in:
Abhishek Sharma authored and Pun Butrach committed 2026-01-10 20:51:01 +07:00
1 parent 9898749619
commit 5f3a03f4fb
1577 files changed
+112559 -80244

No files matched your search

@@ -94,11 +94,6 @@ public class AutoInstallsLayout {
public static AutoInstallsLayout get(Context context, LauncherWidgetHolder appWidgetHolder,
LayoutParserCallback callback) {
// LC: c51b2a221838aefb610b7146fc4ef7cb34e5e495
if (!BuildConfig.ENABLE_AUTO_INSTALLS_LAYOUT) {
return null;
}
Partner partner = Partner.get(context.getPackageManager(), ACTION_LAUNCHER_CUSTOMIZATION);
if (partner == null) {
return null;
@@ -269,13 +264,6 @@ public class AutoInstallsLayout {
return count;
}
private void addProfileId(XmlPullParser parser) {
Long profileId = mUserTypeToSerial.get(getAttributeValue(parser, ATTR_USER_TYPE));
if (profileId != null) {
mValues.put(Favorites.PROFILE_ID, profileId);
}
}
/**
* Parses container and screenId attribute from the current tag, and puts it in
* the out.
@@ -322,6 +310,10 @@ public class AutoInstallsLayout {
convertToDistanceFromEnd(getAttributeValue(parser, ATTR_X), mColumnCount));
mValues.put(Favorites.CELLY,
convertToDistanceFromEnd(getAttributeValue(parser, ATTR_Y), mRowCount));
Long profileId = mUserTypeToSerial.get(getAttributeValue(parser, ATTR_USER_TYPE));
if (profileId != null) {
mValues.put(Favorites.PROFILE_ID, profileId);
}
TagParser tagParser = tagParserMap.get(parser.getName());
if (tagParser == null) {
@@ -397,7 +389,7 @@ public class AutoInstallsLayout {
public int parseAndAdd(XmlPullParser parser) {
final String packageName = getAttributeValue(parser, ATTR_PACKAGE_NAME);
final String className = getAttributeValue(parser, ATTR_CLASS_NAME);
addProfileId(parser);
if (!TextUtils.isEmpty(packageName) && !TextUtils.isEmpty(className)) {
ActivityInfo info;
try {
@@ -446,7 +438,6 @@ public class AutoInstallsLayout {
public int parseAndAdd(XmlPullParser parser) {
final String packageName = getAttributeValue(parser, ATTR_PACKAGE_NAME);
final String className = getAttributeValue(parser, ATTR_CLASS_NAME);
addProfileId(parser);
if (TextUtils.isEmpty(packageName) || TextUtils.isEmpty(className)) {
if (LOGD)
Log.d(TAG, "Skipping invalid <favorite> with no component");
@@ -469,7 +460,7 @@ public class AutoInstallsLayout {
public int parseAndAdd(XmlPullParser parser) {
final String packageName = getAttributeValue(parser, ATTR_PACKAGE_NAME);
final String shortcutId = getAttributeValue(parser, ATTR_SHORTCUT_ID);
addProfileId(parser);
try {
LauncherApps launcherApps = mContext.getSystemService(LauncherApps.class);
launcherApps.pinShortcuts(packageName, Collections.singletonList(shortcutId),
@@ -503,7 +494,6 @@ public class AutoInstallsLayout {
public ComponentName getComponentName(XmlPullParser parser) {
final String packageName = getAttributeValue(parser, ATTR_PACKAGE_NAME);
final String className = getAttributeValue(parser, ATTR_CLASS_NAME);
addProfileId(parser);
if (TextUtils.isEmpty(packageName) || TextUtils.isEmpty(className)) {
return null;
}