-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(deps): Update Android SDK Version to 34 #6
Conversation
In api 34 |
okay, I'll take a look later then |
@WSTxda please re-view PR |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { | ||
/* use PendingIntent for the SDK and above */ | ||
val pendingIntent = PendingIntent.getActivity( | ||
this, | ||
0, | ||
Intent("com.google.android.googlequicksearchbox.MUSIC_SEARCH").apply { | ||
flags = Intent.FLAG_ACTIVITY_NEW_TASK | ||
}, | ||
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is correct, although it cannot collapse system qs panel, apparently this behavior is now managed by the activity being opened or by the system itself. you could probably try some workarounds but honestly I feel like it's not worth it.
I was able to try the changes and the activity is also not invoked on HyperOS A14 for some reason (stupid probably)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is correct, although it cannot collapse system qs panel, apparently this behavior is now managed by the activity being opened or by the system itself. you could probably try some workarounds but honestly I feel like it's not worth it.
I was able to try the changes and the activity is also not invoked on HyperOS A14 for some reason (stupid probably)
Hmm, unfortunately I don't have Android 14 to test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code=START_ABORTED
apparently the system is blocking launch of the intent for security policy reason.
BAL_BLOCK
suggests that the action was blocked by Activity Management, which reinforces that somehow opening the intent is outside of security
08-25 01:15:03.157 1062 2196 I ActivityTaskManager: START u0 {act=com.google.android.googlequicksearchbox.MUSIC_SEARCH flg=0x10000000 cmp=com.google.android.googlequicksearchbox/.MusicSearchGatewayInternal} with LAUNCH_MULTIPLE from uid 10031 pid -1 (BAL_BLOCK) result code=START_ABORTED
Maybe that's why it doesn't initialize, maybe exploiting an internal API is the solution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I just don't understand one thing, in SDK 34, what happens, what would this collapse be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We currently use StartActivityAndCollapse
to get the behavior of, when tapping, launch the intent and close the system quick settings panel. This is required to display the search and display the results in the browser.
Without this behavior the entire process above is done without closing the panel.
As of sdk 34 this is no longer allowed, and apparently there are security restrictions. For this reason i kept the project with sdk 33.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aaa, so when the tile is clicked the panel is not closed, now I understand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, and open intent is blocked for security reason
Ok, i made the decision to just update the java, then keep the sdk target to 33, due this reason #6 (comment) |
OK, I won't close the PR, but I'll mark it as a draft. When I have time, I'll study it to see something that can replace this call without the depreciation, of course, that is, if you don't find it first. |
As you know, this PR is not ready, because
TileService#startActivityAndCollapse
is deprecated in SDK 34 and above.