lineage-sdk: Start Weather service in onUnlockUser.
After reboot the active WeatherProvider is started (onBootPhase)
too early, resulting in WeatherProvider not syncing anymore.
Start the active Provider when userland apps are ready to fix this,
like on 14.1:
0cee14b03c
Found by meiser@xda
lineage-15.1 ready Weatherproviders for testing:
https://github.com/nvertigo/android_vendor_nlos/tree/nlos-15.1/weatherproviders
Change-Id: I8d3eb7aacaf265c55d5d0b5157731e04068a7c7d
This commit is contained in:
@@ -235,9 +235,13 @@ public class LineageWeatherManagerService extends LineageSystemService {
|
||||
|
||||
@Override
|
||||
public void onBootPhase(int phase) {
|
||||
if (phase == PHASE_ACTIVITY_MANAGER_READY) {
|
||||
bindActiveWeatherProviderService();
|
||||
}
|
||||
// Do nothing. We need userland apps to be fully up and running.
|
||||
// We will connect in onUnlockUser instead.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUnlockUser(int userHandle) {
|
||||
bindActiveWeatherProviderService();
|
||||
}
|
||||
|
||||
private void bindActiveWeatherProviderService() {
|
||||
|
||||
Reference in New Issue
Block a user