Support uninstalling an app by dragging from all apps to trash can.
This commit is contained in:
@@ -1765,12 +1765,21 @@ public final class Launcher extends Activity
|
||||
}
|
||||
}
|
||||
|
||||
void startApplicationDetailsActivity(String packageName) {
|
||||
void startApplicationDetailsActivity(ComponentName componentName) {
|
||||
String packageName = componentName.getPackageName();
|
||||
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
|
||||
Uri.fromParts("package", packageName, null));
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
void startApplicationUninstallActivity(ComponentName componentName) {
|
||||
String packageName = componentName.getPackageName();
|
||||
String className = componentName.getClassName();
|
||||
Intent intent = new Intent(
|
||||
Intent.ACTION_DELETE, Uri.fromParts("package", packageName, className));
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
void startActivitySafely(Intent intent, Object tag) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
try {
|
||||
@@ -2277,18 +2286,21 @@ public final class Launcher extends Activity
|
||||
hideOrShowToolbarButton(true, allAppsButton, showSeq);
|
||||
hideOrShowToolbarButton(true, configureButton, showSeq);
|
||||
hideOrShowToolbarButton(false, marketButton, hideSeq);
|
||||
mDeleteZone.setHandle(allAppsButton);
|
||||
break;
|
||||
case ALL_APPS:
|
||||
hideOrShowToolbarButton(true, configureButton, showSeq);
|
||||
hideOrShowToolbarButton(true, marketButton, showSeq);
|
||||
hideOrShowToolbarButton(false, searchButton, hideSeq);
|
||||
hideOrShowToolbarButton(false, allAppsButton, hideSeq);
|
||||
mDeleteZone.setHandle(marketButton);
|
||||
break;
|
||||
case CUSTOMIZE:
|
||||
hideOrShowToolbarButton(true, allAppsButton, showSeq);
|
||||
hideOrShowToolbarButton(false, searchButton, hideSeq);
|
||||
hideOrShowToolbarButton(false, marketButton, hideSeq);
|
||||
hideOrShowToolbarButton(false, configureButton, hideSeq);
|
||||
mDeleteZone.setHandle(allAppsButton);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user