Commit 27f310da by Tim Van Patten Committed by Commit Bot

Fix SearchProvider

The SearchProvider was attempting to launch ANGLE's MainActivity class with the wrong fully qualified class name when Google's version (com.google.android.angle) was installed on the device: com.google.android.angle/.MainActivity Instead, the AndroidManifest.xml and SearchProvider need to use the fully qualified class name for com.android.angle.MainActivity since the package name will differ between the AOSP (com.android.angle) and Google (com.google.android.angle) versions. Bug: b:142320172 Change-Id: Iab6883736be2a21dff64993bcaedbcc4c0cfecf8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2099443Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
parent 14aaa1eb
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
android:forceQueryable="true" android:forceQueryable="true"
android:multiArch="true"> android:multiArch="true">
<activity android:name=".MainActivity" <activity android:name="com.android.angle.MainActivity"
android:label="@string/angle_preferences" android:label="@string/angle_preferences"
android:description="@string/angle_preferences_summary" android:description="@string/angle_preferences_summary"
android:theme="@style/Theme.Settings" android:theme="@style/Theme.Settings"
......
...@@ -63,8 +63,7 @@ public class SearchProvider extends SearchIndexablesProvider ...@@ -63,8 +63,7 @@ public class SearchProvider extends SearchIndexablesProvider
ref[COLUMN_INDEX_RAW_KEYWORDS] = context.getString(R.string.keywords); ref[COLUMN_INDEX_RAW_KEYWORDS] = context.getString(R.string.keywords);
ref[COLUMN_INDEX_RAW_INTENT_ACTION] = Intent.ACTION_MAIN; ref[COLUMN_INDEX_RAW_INTENT_ACTION] = Intent.ACTION_MAIN;
ref[COLUMN_INDEX_RAW_INTENT_TARGET_PACKAGE] = getContext().getApplicationInfo().packageName; ref[COLUMN_INDEX_RAW_INTENT_TARGET_PACKAGE] = getContext().getApplicationInfo().packageName;
ref[COLUMN_INDEX_RAW_INTENT_TARGET_CLASS] = ref[COLUMN_INDEX_RAW_INTENT_TARGET_CLASS] = "com.android.angle.MainActivity";
getContext().getApplicationInfo().packageName + ".MainActivity";
cursor.addRow(ref); cursor.addRow(ref);
return cursor; return cursor;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment