mirror of
https://github.com/Katana-Official/SPatch-Update.git
synced 2026-03-25 05:59:46 +08:00
App: Transfer to Mundo
This commit is contained in:
@@ -59,7 +59,7 @@ import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import lu.die.fozacompatibility.FozaActivityManager;
|
||||
import net_62v.external.MetaActivityManager;
|
||||
|
||||
/**
|
||||
* A simple callback interface which also provides the results of the task.
|
||||
@@ -525,7 +525,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
|
||||
mLauncher.startActivitySafely(v, appInfo.intent, appInfo);
|
||||
}
|
||||
else try{
|
||||
Intent reserver = FozaActivityManager.get().obtainSplashLaunchIntent(
|
||||
Intent reserver = MetaActivityManager.obtainSplashLaunchIntent(
|
||||
0,
|
||||
appInfo.componentName.getPackageName(),
|
||||
mLauncher
|
||||
|
||||
@@ -26,6 +26,7 @@ import android.content.res.Resources;
|
||||
import android.graphics.PointF;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.TransitionDrawable;
|
||||
import android.os.RemoteException;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.ViewConfiguration;
|
||||
@@ -220,7 +221,11 @@ public class DeleteDropTarget extends ButtonDropTarget {
|
||||
|
||||
if (isAllAppsApplication(d.dragSource, item)) {
|
||||
// Uninstall the application if it is being dragged from AppsCustomize
|
||||
mLauncher.startApplicationUninstallActivity((ApplicationInfo) item);
|
||||
try {
|
||||
mLauncher.startApplicationUninstallActivity((ApplicationInfo) item);
|
||||
} catch (RemoteException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else if (isWorkspaceOrFolderApplication(d)) {
|
||||
LauncherModel.deleteItemFromDatabase(mLauncher, item);
|
||||
} else if (isWorkspaceFolder(d)) {
|
||||
|
||||
@@ -61,6 +61,7 @@ import android.os.Debug;
|
||||
import android.os.Environment;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.os.RemoteException;
|
||||
import android.os.StrictMode;
|
||||
import android.os.SystemClock;
|
||||
import android.os.UserManager;
|
||||
@@ -114,9 +115,8 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import lu.die.foza.SuperAPI.FozaCore;
|
||||
import lu.die.fozacompatibility.FozaActivityManager;
|
||||
import lu.die.fozacompatibility.FozaPackageManager;
|
||||
import net_62v.external.MetaActivityManager;
|
||||
import net_62v.external.MetaPackageManager;
|
||||
|
||||
/**
|
||||
* Default launcher application.
|
||||
@@ -434,7 +434,11 @@ public final class Launcher extends Activity
|
||||
// On large interfaces, we want the screen to auto-rotate based on the current orientation
|
||||
unlockScreenOrientation(true);
|
||||
LauncherLoader.instance().waitForAndGetInitialService(() -> {
|
||||
FozaPackageManager.get().acquireObtainAppSplash();
|
||||
try {
|
||||
MetaPackageManager.acquireObtainAppSplash();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
});
|
||||
}
|
||||
@@ -2022,7 +2026,7 @@ public final class Launcher extends Activity
|
||||
else
|
||||
{
|
||||
try{
|
||||
Intent reserveIntent = FozaActivityManager.get().obtainSplashLaunchIntent(
|
||||
Intent reserveIntent = MetaActivityManager.obtainSplashLaunchIntent(
|
||||
0,
|
||||
((ShortcutInfo) tag).intent.getComponent().getPackageName(),
|
||||
this
|
||||
@@ -2125,10 +2129,10 @@ public final class Launcher extends Activity
|
||||
startActivitySafely(null, intent, "startApplicationDetailsActivity");
|
||||
}
|
||||
|
||||
void startApplicationUninstallActivity(ApplicationInfo appInfo) {
|
||||
if(FozaPackageManager.get().isInnerAppInstalled(appInfo.componentName.getPackageName()))
|
||||
void startApplicationUninstallActivity(ApplicationInfo appInfo) throws RemoteException {
|
||||
if(MetaPackageManager.isInnerAppInstalled(appInfo.componentName.getPackageName()))
|
||||
{
|
||||
FozaPackageManager.get().uninstallAppFully(appInfo.componentName.getPackageName());
|
||||
MetaPackageManager.uninstallAppFully(appInfo.componentName.getPackageName());
|
||||
int messageId = R.string.cling_dismiss;
|
||||
Toast.makeText(this, messageId, Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.android.launcher2
|
||||
|
||||
import android.content.Intent
|
||||
import lu.die.foza.SuperAPI.FozaCore
|
||||
import lu.die.fozacompatibility.FozaPackageManager
|
||||
import net_62v.external.MetaCore
|
||||
import net_62v.external.MetaPackageManager
|
||||
|
||||
object LauncherLoader {
|
||||
// For java
|
||||
@@ -10,12 +10,12 @@ object LauncherLoader {
|
||||
fun instance() = this
|
||||
fun waitForAndGetInitialService(
|
||||
serviceCallback : () -> Unit
|
||||
) = FozaCore.registerCoreCallback(
|
||||
) = MetaCore.registerCoreCallback(
|
||||
serviceCallback
|
||||
)
|
||||
fun obtainLaunchIntentByPackage(
|
||||
src : String
|
||||
) = FozaPackageManager.get().getLaunchIntentForPackage(
|
||||
) = MetaPackageManager.getLaunchIntentForPackage(
|
||||
Intent(Intent.ACTION_MAIN).setPackage(src) /* Package Name */
|
||||
)
|
||||
}
|
||||
@@ -63,7 +63,8 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import lu.die.fozacompatibility.FozaPackageManager;
|
||||
import net_62v.external.MetaPackageManager;
|
||||
|
||||
|
||||
/**
|
||||
* Maintains in-memory state of the Launcher. It is expected that there should be only one
|
||||
@@ -2118,7 +2119,11 @@ public class LauncherModel extends BroadcastReceiver {
|
||||
}
|
||||
}
|
||||
});
|
||||
FozaPackageManager.get().acquireObtainAppSplash();
|
||||
try {
|
||||
MetaPackageManager.acquireObtainAppSplash();
|
||||
} catch (RemoteException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user