add lots of java APIs needed for Whatsapp

This commit is contained in:
Julian Winkler
2024-06-15 22:32:01 +02:00
parent b81f53e4b2
commit bb50bbfa91
61 changed files with 383 additions and 71 deletions

View File

@@ -472,6 +472,8 @@ public class ApplicationInfo extends PackageItemInfo {
*/
public int installLocation = PackageInfo.INSTALL_LOCATION_UNSPECIFIED;
public String[] splitSourceDirs;
public void dump(Printer pw, String prefix) {
super.dumpFront(pw, prefix);
if (className != null) {

View File

@@ -1670,7 +1670,12 @@ public class PackageManager {
*/
public ServiceInfo getServiceInfo(ComponentName component,
int flags) throws NameNotFoundException {
return null;
for (PackageParser.Service s : Context.pkg.services) {
if (s.className.equals(component.getClassName())) {
return s.info;
}
}
return new ServiceInfo();
}
/**

View File

@@ -2245,6 +2245,7 @@ public class PackageParser {
return false;
}
XmlUtils.skipCurrentTag(parser);
outInfo.addCategory(value);
} else if (nodeName.equals("data")) {
XmlUtils.skipCurrentTag(parser);
} else if (!RIGID_PARSER) {