diff options
author | Luis Vidal <lvidal@cyngn.com> | 2016-04-13 01:08:11 -0700 |
---|---|---|
committer | Luis Vidal <lvidal@cyngn.com> | 2016-04-13 15:22:40 -0700 |
commit | fe1812fd38633e3c90abfa022d2d0d4a6029e2bf (patch) | |
tree | daf94e5c77692e5baa0475f01bd8edbb6034780c /system-api | |
parent | 377fffca6989304ec61e33dacb0dd3fba8345262 (diff) | |
download | vendor_cmsdk-fe1812fd38633e3c90abfa022d2d0d4a6029e2bf.zip vendor_cmsdk-fe1812fd38633e3c90abfa022d2d0d4a6029e2bf.tar.gz vendor_cmsdk-fe1812fd38633e3c90abfa022d2d0d4a6029e2bf.tar.bz2 |
Weather API: Delegate the responsability of rejecting back to back requests [1/2]
The Weather Manager Service should not impose rules regarding how
a weather provide service wants to react to back to back weather
update requests, nor impose the time a caller should wait before
a new request can be submitted. These constraints vary between
weather services, so it's up the each implementation to enforce
these constraints.
With this patch, the Weather manager service will pass the requests
as they come from the requester and it will be up to the active service
provider decide whether process or reject the request.
Changes to API:
- Moved the request statuses to new inner class RequestStatus in
CMWeatherManager
- Pass status arg to onLookupCityRequestCompleted()
- Added reject(int) method to ServiceRequest
Change-Id: I3512490688255e25395e955d506fe42ed52f8fe0
TICKET: CYNGNOS-2430
Diffstat (limited to 'system-api')
-rw-r--r-- | system-api/cm_system-current.txt | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/system-api/cm_system-current.txt b/system-api/cm_system-current.txt index f1652d3..40d6fa5 100644 --- a/system-api/cm_system-current.txt +++ b/system-api/cm_system-current.txt @@ -1360,14 +1360,19 @@ package cyanogenmod.weather { method public int requestWeatherUpdate(android.location.Location, cyanogenmod.weather.CMWeatherManager.WeatherUpdateRequestListener); method public int requestWeatherUpdate(cyanogenmod.weather.WeatherLocation, cyanogenmod.weather.CMWeatherManager.WeatherUpdateRequestListener); method public void unregisterWeatherServiceProviderChangeListener(cyanogenmod.weather.CMWeatherManager.WeatherServiceProviderChangeListener); - field public static final int WEATHER_REQUEST_ALREADY_IN_PROGRESS = -3; // 0xfffffffd - field public static final int WEATHER_REQUEST_COMPLETED = 1; // 0x1 - field public static final int WEATHER_REQUEST_FAILED = -2; // 0xfffffffe - field public static final int WEATHER_REQUEST_SUBMITTED_TOO_SOON = -1; // 0xffffffff } public static abstract interface CMWeatherManager.LookupCityRequestListener { - method public abstract void onLookupCityRequestCompleted(java.util.List<cyanogenmod.weather.WeatherLocation>); + method public abstract void onLookupCityRequestCompleted(int, java.util.List<cyanogenmod.weather.WeatherLocation>); + } + + public static class CMWeatherManager.RequestStatus { + ctor public CMWeatherManager.RequestStatus(); + field public static final int ALREADY_IN_PROGRESS = -3; // 0xfffffffd + field public static final int COMPLETED = 1; // 0x1 + field public static final int FAILED = -1; // 0xffffffff + field public static final int NO_MATCH_FOUND = -4; // 0xfffffffc + field public static final int SUBMITTED_TOO_SOON = -2; // 0xfffffffe } public static abstract interface CMWeatherManager.WeatherServiceProviderChangeListener { @@ -1468,6 +1473,7 @@ package cyanogenmod.weatherservice { method public void complete(cyanogenmod.weatherservice.ServiceRequestResult); method public void fail(); method public cyanogenmod.weather.RequestInfo getRequestInfo(); + method public void reject(int); } public final class ServiceRequestResult implements android.os.Parcelable { |