diff options
author | Luca Stefani <luca@osomprivacy.com> | 2024-02-16 21:11:35 +0100 |
---|---|---|
committer | Luca Stefani <luca@osomprivacy.com> | 2024-02-26 16:18:12 +0000 |
commit | a5c93b11452c94ec6948274e25ae689f043a2bf7 (patch) | |
tree | f1d6b37c87c0fce5cca4746889cbd04f7cd3783b | |
parent | ff6f53b24a9fa19ed75304265c3b9af92d56ea37 (diff) | |
download | Settings-a5c93b11452c94ec6948274e25ae689f043a2bf7.tar.gz |
Fix-up starting style&wallpaper from search
Make sure the index entry points to the fragment, rather
than the actual target package as that's not supported.
StyleSuggestionActivityBase handles starting the activity
as configured in the controller by creating an Intent
and using startActivity.
Test: m, search/start wallpaper in SettingsIntelligence.
Bug: 326889654
Change-Id: I3347a0473f269c817c5bd3233bcd69ffa962f716
Signed-off-by: Luca Stefani <luca@osomprivacy.com>
-rw-r--r-- | src/com/android/settings/wallpaper/WallpaperSuggestionActivity.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/com/android/settings/wallpaper/WallpaperSuggestionActivity.java b/src/com/android/settings/wallpaper/WallpaperSuggestionActivity.java index 675e10fc2a0..14ef4833588 100644 --- a/src/com/android/settings/wallpaper/WallpaperSuggestionActivity.java +++ b/src/com/android/settings/wallpaper/WallpaperSuggestionActivity.java @@ -17,7 +17,6 @@ package com.android.settings.wallpaper; import android.app.WallpaperManager; -import android.content.ComponentName; import android.content.Context; import android.content.Intent; @@ -81,10 +80,9 @@ public class WallpaperSuggestionActivity extends StyleSuggestionActivityBase imp SearchIndexableRaw data = new SearchIndexableRaw(context); data.title = controller.getTitle(); data.screenTitle = data.title; - ComponentName component = controller.getComponentName(); - data.intentTargetPackage = component.getPackageName(); - data.intentTargetClass = component.getClassName(); - data.intentAction = controller.getComponentActionName(); + data.intentTargetPackage = context.getPackageName(); + data.intentTargetClass = WallpaperSuggestionActivity.class.getName(); + data.intentAction = Intent.ACTION_MAIN; data.key = SUPPORT_SEARCH_INDEX_KEY; data.keywords = controller.getKeywords(); result.add(data); |