You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
make K-9 Mail launch
This commit is contained in:
@@ -538,11 +538,7 @@ public class Context extends Object {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
Class<? extends Activity> cls = Class.forName(intent_.getComponent().getClassName()).asSubclass(Activity.class);
|
||||
Constructor<? extends Activity> constructor = cls.getConstructor();
|
||||
Activity activity = constructor.newInstance();
|
||||
activity.intent = intent_;
|
||||
activity.getWindow().native_window = this_application.native_window;
|
||||
Activity activity = Activity.internalCreateActivity(intent_.getComponent().getClassName(), this_application.native_window, intent_);
|
||||
Activity.nativeStartActivity(activity);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -5,6 +5,8 @@ import android.os.Bundle;
|
||||
import android.os.Parcelable;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
public class Intent implements Parcelable {
|
||||
public static final String ACTION_MAIN = "android.intent.action.MAIN";
|
||||
@@ -350,4 +352,16 @@ public class Intent implements Parcelable {
|
||||
public Intent setClassName(Context packageContext, String className) {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String resolveTypeIfNeeded(ContentResolver resolver) {
|
||||
return type;
|
||||
}
|
||||
|
||||
public Set<String> getCategories() {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
public byte[] getByteArrayExtra(String name) {
|
||||
return extras.getByteArray(name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,9 @@ import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import android.net.Uri;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
public class IntentFilter {
|
||||
@@ -64,4 +67,12 @@ public class IntentFilter {
|
||||
public final Iterator<String> actionsIterator() {
|
||||
return actions.iterator();
|
||||
}
|
||||
|
||||
public boolean hasAction(String action) {
|
||||
return actions.contains(action);
|
||||
}
|
||||
|
||||
public int match(String action, String type, String scheme, Uri data, Set<String> categories, String logTag) {
|
||||
return -1/*NO_MATCH_TYPE*/;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1814,10 +1814,10 @@ public class PackageManager {
|
||||
// TODO: we shouldn't just automatically grant these once we have bubblewrap set up
|
||||
// for now, the app can access anything it wants, so no point telling it otherwise
|
||||
case "android.permission.WRITE_EXTERNAL_STORAGE":
|
||||
return PERMISSION_GRANTED;
|
||||
case "android.permission.READ_EXTERNAL_STORAGE":
|
||||
return PERMISSION_GRANTED;
|
||||
case "com.google.android.c2dm.permission.SEND":
|
||||
case "com.fsck.k9.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION":
|
||||
case "net.thunderbird.android.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION":
|
||||
return PERMISSION_GRANTED;
|
||||
default:
|
||||
System.out.println("PackageManager.checkPermission: >" + permName + "< not handled\n");
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package android.content.pm;
|
||||
|
||||
import android.content.IntentFilter;
|
||||
|
||||
public class ResolveInfo {
|
||||
public ActivityInfo activityInfo = new ActivityInfo();
|
||||
public ServiceInfo serviceInfo = new ServiceInfo();
|
||||
public IntentFilter filter = new IntentFilter();
|
||||
|
||||
public static class DisplayNameComparator {
|
||||
|
||||
|
||||
@@ -1466,6 +1466,10 @@ public class Resources {
|
||||
theme = mAssets.createTheme();
|
||||
}
|
||||
|
||||
public Resources getResources() {
|
||||
return Resources.this;
|
||||
}
|
||||
|
||||
private final AssetManager mAssets;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user