amirzaidi / Launcher3

The Launcher3 fork known as "Rootless Pixel Launcher"
Other
3.81k stars 641 forks source link

Feature Request: Android Pie recents overview #548

Open Jolanrensen opened 5 years ago

Jolanrensen commented 5 years ago

In the latest source code of Google's Launcher3 there's the "com.google.android.apps.nexuslauncher/com.android.quickstep.RecentsActivity" (well the aosp version obviously isn't called nexuslauncher, that's just the pixel version). This houses the dock part in the overview. In framework-res.apk there's a string that points to this activity (config_recentsComponentName) and this can easily be modified (only with root AFAIK) to point to this launcher3 version. I don't think this activity is in your version yet, is it?
Edit: wow I'm stupid, I just found it in your source code. Is it working already (if I change the string of my framework-res.apk)?

amirzaidi commented 5 years ago

If you were to compile the very barebones p branch and install that then yes, it would work. I don't recommend it though. No idea in what direction I want to take P, since I can't compile Quickstep with the regular SDK. Only the base Launcher3 works out of the box on the P branch, and that's not something many are waiting for.

Jolanrensen commented 5 years ago

Aah, understandable, stupid idea maybe, but what if you surround all the sdk 28 stuff with if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.P){ //code }? It doesn't have to run at all if not on Pie, right?

amirzaidi commented 5 years ago

That's not the problem, the problem is that many of the calls are hidden in the Android Studio SDK, and only visible in the AOSP SDK, meaning that I cannot compile the quickstep code at all without removing all the calls to hidden APIs.

MarcPoggiWiko commented 5 years ago

Do you think Google will finally revise its sdk to open those calls for a public use. Question is , does that feature can only be reserved for OEM launchers ?

Jolanrensen commented 5 years ago

@amirzaidi or you'd have to go the rom-developer route and use not-yet-compiled Aosp where you fiddle with Launcher3 because I suppose those calls are necessary for the launcher. However this would probably imply that for each Android version you need a different launcher3 version...

amirzaidi commented 5 years ago

The Lawnchair team has shown me a way to get the new recents on Pie with root, and how to compile it with Android Studio. But then again that would only work for rooted Pie users, which is a miniscule fraction of my userbase. I will have to think about where I go from here.

Jolanrensen commented 5 years ago

So it's impossible to compile that version using anything lower than Pie? Hmm, tricky... What you could do is have 2 versions, as I assume the Pie+ user base will only increase. But that would of course require more work. You could also perhaps make a non-root version and a root version in the form of a magisk module (that would install the correct version depending on the SDK version). I think there are more people willing to root on Pie if it would mean custom launchers with recents support.

suphon-t commented 5 years ago

@Jolanrensen You can’t even compile it with the standard Android Pie SDK. There are some hacks needed for it unless you’re compiling with AOSP.

Jolanrensen commented 5 years ago

Wow Google is being serious, I see. Would it perhaps be possible to have the quickstep activity as a separate apk hooked into the system and built with AOSP and have it closely tied in with launcher3? So that you could compile launcher3 without AOSP as normal and have recents functionality as an add-on for it for rooted Android Pie+ users? You could essentially just call intents between the app itself and the add-on with quickstep in this case right?

I mean it's mostly speculation on my end, but maybe it could trigger an idea on yours

amirzaidi commented 5 years ago

Sounds like a cool idea but I will have to see how feasible it is to implement it.

MarcPoggiWiko commented 5 years ago

Dear AmirZaidi ,

are you allowed to share with us Google Team instructions for compiling the quickstep launcher flavor with Android Studio . I am really interesting in testing that new feature for our coming P devices. Regards

MarcPoggiWiko commented 5 years ago

@paphonb , your late comment is right , we could finally make it work ... by reflexion you can get an access to hidden / system api methods , considering you can push your launcher into system partition , ... Pay attention also only quickstep apk is designed to work along with the framework . If an other apk name is choosen , need to adapt the some framework-res resource accordingly , ... not a straight forward process . Hope Google will open soon that feature to third app launcher , because at the moment it is just not possible , ...

suphon-t commented 5 years ago

@MarcPoggiWiko You can't access the hidden APIs with reflections. On API28 and above, the system will just pretend like the methods/fields aren't there and throw NoSuch___Exception unless the calling package is whitelisted.

Also I don't think changing a string in framework-res is going to be a problem when you build AOSP for your devices anyway.

TheDoctor12 commented 5 years ago

I don't know if this could possibly help but there is a case in which quickstep can run without root access. It's this one https://forum.xda-developers.com/crossdevice-dev/sony-themes-apps/pie-xperia-10-10-plus-launcher-t3905699

amirzaidi commented 5 years ago

@TheDoctor12 https://forum.xda-developers.com/showpost.php?p=79047414&postcount=134

This would only work for those specific Sony software builds, and that's because Sony decided to keep the Quickstep provider linking to a non-existing package name on their OS

mlleemiles commented 5 years ago

Is it possible to push such update exclusively for devices like Xperia?