Skip to content

Commit 9e86327

Browse files
committed
PackageManager
1 parent b59a489 commit 9e86327

File tree

4 files changed

+1059
-633
lines changed

4 files changed

+1059
-633
lines changed

PluginCore/src/com/plugin/core/PluginContextTheme.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
import com.plugin.content.PluginDescriptor;
1313
import com.plugin.core.localservice.LocalServiceManager;
14+
import com.plugin.core.systemservice.PackageManagerCompat;
15+
import com.plugin.core.systemservice.PluginPackageManager;
1416
import com.plugin.util.LogUtil;
1517
import com.plugin.util.RefInvoker;
1618

@@ -93,7 +95,13 @@ public Object getSystemService(String name) {
9395
Object service = getBaseContext().getSystemService(name);
9496

9597
if (service == null) {
96-
service = LocalServiceManager.getService(name);
98+
99+
if ("package_manager".equals(name)) {
100+
service = new PluginPackageManager(new PackageManagerCompat(getPackageManager()));
101+
} else {
102+
service = LocalServiceManager.getService(name);
103+
}
104+
97105
}
98106

99107
return service;

0 commit comments

Comments
 (0)