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
Activity.createMainActivity(): handle <activity-alias> tags properly
This commit is contained in:
@@ -95,7 +95,7 @@ public class Activity extends ContextThemeWrapper implements Window.Callback, La
|
||||
Slog.i(TAG, intent.toString());
|
||||
if ((uri == null && intent.hasCategory("android.intent.category.LAUNCHER")) ||
|
||||
(uri != null && intent.hasDataScheme(uri.getScheme()))) {
|
||||
className = activity.className;
|
||||
className = activity.info.targetActivity != null ? activity.info.targetActivity : activity.className;
|
||||
isDefault = intent.hasCategory("android.intent.category.DEFAULT");
|
||||
if (isDefault)
|
||||
break;
|
||||
|
||||
@@ -2636,7 +2636,20 @@ public class PackageParser {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (parser.getName().equals("meta-data")) {
|
||||
if (parser.getName().equals("intent-filter")) {
|
||||
ActivityIntentInfo intent = new ActivityIntentInfo(a);
|
||||
if (!parseIntent(res, parser, attrs, true /*allowGlobs*/, true /*allowAutoVerify*/,
|
||||
intent, outError)) {
|
||||
return null;
|
||||
}
|
||||
if (intent.countActions() == 0) {
|
||||
Slog.w(TAG, "No actions in intent filter at "
|
||||
+ mArchiveSourcePath + " "
|
||||
+ parser.getPositionDescription());
|
||||
} else {
|
||||
a.intents.add(intent);
|
||||
}
|
||||
} else if (parser.getName().equals("meta-data")) {
|
||||
if ((a.metaData = parseMetaData(res, parser, attrs, a.metaData,
|
||||
outError)) == null) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user