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:
Steve Kondik
2018-12-03 09:55:47 +01:00
committed by Han Wang
parent 0c66c31d1f
commit eaf833a4e4

View File

@@ -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() {