Skip to content
This repository was archived by the owner on Apr 6, 2024. It is now read-only.

Update to latest upstream #152

Merged
merged 12 commits into from Jul 3, 2021
Merged

Update to latest upstream #152

merged 12 commits into from Jul 3, 2021

Conversation

ghost
Copy link

@ghost ghost commented Jul 3, 2021

No description provided.

mar-v-in and others added 12 commits June 27, 2021 22:19
to enable safe usage of settings no matter which process is getting/setting them.
Previously, different processes were accessing settings in an unsafe way and the warn methods were throwing Runtime exceptions which went largely unnoticed, but happened, especially on a fresh start of the OS.

Change-Id: Ie4134e7be2a7ca4a373790f45fbcbd09bf02ad86
This reverts commit 3eb3380.
See microg#1487 for details
@KevinX8 KevinX8 merged commit 42cde92 into TeamVanced:master Jul 3, 2021
@chirayudesai
Copy link

Hi there,

You'll want to add in something like:

4278: login: Switch to SettingsProvider for "Alt Sign in" | https://review.calyxos.org/c/CalyxOS/platform_external_microg_GmsCore/+/4278

to have the spoofing code work well with the SettingsProvider refactor.

@ghost
Copy link
Author

ghost commented Jul 6, 2021

Hi there,

You'll want to add in something like:

4278: login: Switch to SettingsProvider for "Alt Sign in" | https://review.calyxos.org/c/CalyxOS/platform_external_microg_GmsCore/+/4278

to have the spoofing code work well with the SettingsProvider refactor.

Should be already done in the current code, with the same previous (re-adapted) code.

@chirayudesai
Copy link

Hi there,
You'll want to add in something like:
4278: login: Switch to SettingsProvider for "Alt Sign in" | https://review.calyxos.org/c/CalyxOS/platform_external_microg_GmsCore/+/4278
to have the spoofing code work well with the SettingsProvider refactor.

Should be already done in the current code, with the same previous (re-adapted) code.

I don't see it at https://github.com/YTVanced/VancedMicroG/blob/4c9230d27994711465425d6942e3bf9419d9f182/play-services-core/src/main/java/org/microg/gms/auth/login/LoginActivity.java#L166

It's still calling getDefaultSharedPreferences directly, which should not be done.

@ghost
Copy link
Author

ghost commented Jul 6, 2021

Hi there,
You'll want to add in something like:
4278: login: Switch to SettingsProvider for "Alt Sign in" | https://review.calyxos.org/c/CalyxOS/platform_external_microg_GmsCore/+/4278
to have the spoofing code work well with the SettingsProvider refactor.

Should be already done in the current code, with the same previous (re-adapted) code.

I don't see it at

https://github.com/YTVanced/VancedMicroG/blob/4c9230d27994711465425d6942e3bf9419d9f182/play-services-core/src/main/java/org/microg/gms/auth/login/LoginActivity.java#L166

It's still calling getDefaultSharedPreferences directly, which should not be done.

This is the code to hide microg icon from launcher. I don't know if it's the case of change it.

@chirayudesai
Copy link

Hi there,
You'll want to add in something like:
4278: login: Switch to SettingsProvider for "Alt Sign in" | https://review.calyxos.org/c/CalyxOS/platform_external_microg_GmsCore/+/4278
to have the spoofing code work well with the SettingsProvider refactor.

Should be already done in the current code, with the same previous (re-adapted) code.

I don't see it at
https://github.com/YTVanced/VancedMicroG/blob/4c9230d27994711465425d6942e3bf9419d9f182/play-services-core/src/main/java/org/microg/gms/auth/login/LoginActivity.java#L166

It's still calling getDefaultSharedPreferences directly, which should not be done.

This is the code to hide microg icon from launcher. I don't know if it's the case of change it.

What happened was calling getDefaultSharedPreferences from everywhere would override settings.

So we changed it in microG to use SettingsProvider. So this should be changed here too - both the hide launcher icon part, and also the lines below it, which I covered in my linked patch.

https://github.com/YTVanced/VancedMicroG/blob/4c9230d27994711465425d6942e3bf9419d9f182/play-services-core/src/main/java/org/microg/gms/auth/login/LoginActivity.java#L169-L173

This should all be changed to use SettingsProvider to make sure it doesn't get overriden when something else writes to it.

My commit handles this for the Huawei button, but we don't have hide launcher icon. See CalyxOS/platform_external_microg_GmsCore@a68d262

@ghost
Copy link
Author

ghost commented Jul 6, 2021

Hi there,
You'll want to add in something like:
4278: login: Switch to SettingsProvider for "Alt Sign in" | https://review.calyxos.org/c/CalyxOS/platform_external_microg_GmsCore/+/4278
to have the spoofing code work well with the SettingsProvider refactor.

Should be already done in the current code, with the same previous (re-adapted) code.

I don't see it at
https://github.com/YTVanced/VancedMicroG/blob/4c9230d27994711465425d6942e3bf9419d9f182/play-services-core/src/main/java/org/microg/gms/auth/login/LoginActivity.java#L166

It's still calling getDefaultSharedPreferences directly, which should not be done.

This is the code to hide microg icon from launcher. I don't know if it's the case of change it.

What happened was calling getDefaultSharedPreferences from everywhere would override settings.

So we changed it in microG to use SettingsProvider. So this should be changed here too - both the hide launcher icon part, and also the lines below it, which I covered in my linked patch.

https://github.com/YTVanced/VancedMicroG/blob/4c9230d27994711465425d6942e3bf9419d9f182/play-services-core/src/main/java/org/microg/gms/auth/login/LoginActivity.java#L169-L173

This should all be changed to use SettingsProvider to make sure it doesn't get overriden when something else writes to it.

My commit handles this for the Huawei button, but we don't have hide launcher icon. See CalyxOS/platform_external_microg_GmsCore@a68d262

Sorry for the previous (nonsense) message.

I'll merge your code soon.

P.S: Same thing should eventually be done with others preferences?

@chirayudesai
Copy link

Sorry for the previous (nonsense) message.

I'll merge your code soon.

No worries, and to be clear we're using the exact same mechanism for brandSpoof, it's an extra button on the login screen.

P.S: Same thing should eventually be done with others preferences?

Yeah. it is done with all upstream preferences, but if you have added anything you should switch them all over.

See aa3a2d6 (and ofc my commit) for some examples.

@ghost
Copy link
Author

ghost commented Jul 6, 2021

Sorry for the previous (nonsense) message.
I'll merge your code soon.

No worries, and to be clear we're using the exact same mechanism for brandSpoof, it's an extra button on the login screen.

Yeah...I thought you followed another way.

In every case I'm currently working on hide microg icon switch and the one about duplication cast.

@ghost ghost mentioned this pull request Jul 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants