Draft: Issue 5789: Make App Lounge usable in case of GPlay timeout by showing open source apps
Description
As reproduced in e/backlog#5413 (comment 227995), App Lounge is completely unusable if GPlay cannot be reached at all. This MR fixes that by showing cleanapk data instead, as well as the timeout dialog.
Issue(s)
e/backlog#5413 (closed)
e/backlog#5789 (closed)
Test environment
Test procedures
Check if App Lounge times out after 10 seconds. Commands to be run on a rooted device. Use adb root
to start a adbd as root.
- Block GPlay:
adb shell iptables -A OUTPUT -o wlan0 -m string --string android.clients.google.com --algo kmp -j DROP adb shell iptables -A OUTPUT -o wlan0 -m string --string clients3.google.com --algo kmp -j DROP adb shell iptables -A OUTPUT -o wlan0 -m string --string play-lh-googleusercontent.com --algo kmp -j DROP
- Unblock GPlay
adb shell iptables -D OUTPUT -o wlan0 -m string --string android.clients.google.com --algo kmp -j DROP adb shell iptables -D OUTPUT -o wlan0 -m string --string clients3.google.com --algo kmp -j DROP adb shell iptables -D OUTPUT -o wlan0 -m string --string play-lh-googleusercontent.com --algo kmp -j DROP
- Block cleanapk
adb shell iptables -A OUTPUT -o wlan0 -m string --string api.cleanapk.org --algo kmp -j DROP
- Unblock cleanapk
adb shell iptables -D OUTPUT -o wlan0 -m string --string api.cleanapk.org --algo kmp -j DROP
- GPlay - blocked, Cleanapk - unblocked: App Lounge should load open source data (except Home Fragment), and also display a timeout dialog.
- GPlay - blocked, Cleanapk - blocked: For all tabs App Lounge should not show any data and only display timeout dialog.
- GPlay - unblocked, Cleanapk - blocked: Timeout dialog only in Updates fragment. Should show GPlay updates behind the dialog so that if user cancels the dialog, the GPlay updates are visible.
- GPlay - unblocked, Cleanapk - unblocked: Normal operation.
Technical details
If auth data json stored in SharedPreference cannot be validated by a network call to GPlay servers, then the actual authData is never initialized. If authData is null, then App Lounge keeps trying to regenerate authData from network doing nothing else. As such at one point it does show the timeout dialog, but as it was not loading any other data, it becomes completely useless.
Situation does not improve if user selects to show only open source apps, App Lounge keeps trying to refresh GPlay auth data.
This MR fixes that by check authData is null or not, if yes then tries to load cleanapk information before showing timeout dialog.
Screenshots
Timeout is reduced to 5 seconds for the sake of illustration
As it can be seen, App Lounge attempts to load open source info before showing timeout dialog.
Home fragment only shows timeout dialog and not open source apps because that was the intended design.
Check list
-
Self review -
Test procedure explained -
Tested on fresh install -
Tested applied as an update -
License -
Internal documentation -
User documentation