Commit Graph

22 Commits

Author SHA1 Message Date
Luis Vidal 02a71cc24e Weather API: Honor the values set for today's low/high temp
The vales passed to setTodaysHigh() and setTodaysLow() have no effect.
This patch fixes that problem. The values provided in the Builder
helper class will be actually set when the WeatherInfo object is built

Change-Id: I5f47b16a56fd577349d3b3d45ea7a753262f90ea
TICKET: CYNGNOS-2484
2016-04-18 16:52:29 -07:00
Adnan Begovic 18aa2f52eb cmsdk: Fix definition of live display tile, as its now dynamic.
Change-Id: I468e42b91996aad348fa0a1c85e0bc66597cf440
2016-04-18 12:27:47 -07:00
Steve Kondik 3944915061 livedisplay: Fix validator for the nudge counter
* This is a range counter starting from -3 (initial value) which
   counts upwards once a day. It's finally set to 1 when either the
   feature is used or we gave up with the nudges.

Change-Id: Ia19b381aa35c598b31b46071479ae590dc8d9ffd
2016-04-15 22:50:12 -07:00
Steve Kondik 0ec60c69a0 livedisplay: Don't explode if no modes are available
* Don't create the mode observer or try to publish tiles if none
   of the adaptive modes are supported.

Change-Id: Iee6fe8131b0614e10f35b5a03d65fb44c71c0da9
2016-04-15 02:38:42 -07:00
Steve Kondik 763e39ad54 livedisplay: Fix error checks when fetching config
Change-Id: I8ba43f32b2c45f626401f3cbc0050bc0593748c8
2016-04-14 20:34:59 -07:00
Luis Vidal ad5e5d019f Remove public default constructor from CMWeatherManager.RequestStatus [1/2]
RequestStatus holds only final constants and should not provide
public constructors. This class also should be final.

This patch also fix minor typos on RequestStatus javadoc

Change-Id: I0deb1d6a9b23eed83451dec352bb4c410e2378d6
TICKET: CYNGNOS-2441
2016-04-13 17:52:16 -07:00
d34d b49885a649 ExtViews: Pass input events to underlying Window
Change-Id: If4303a49dd0c637e9336dcf454e338b883906925
TICKET: CYNGNOS-2442
2016-04-13 17:35:37 -07:00
Luis Vidal fe1812fd38 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
2016-04-13 15:22:40 -07:00
Luis Vidal 377fffca69 Use temperature unit from CMSettings on weather update requests
Make sure the the weather update requests are using the temperature
unit set by the user in the weather settings

Change-Id: Iac3a891b5afbcf36a87386f828b40bcbd0e1de02
TICKET: CYNGNOS-2429
2016-04-13 14:56:24 -07:00
Luis Vidal ed4d063611 Add WEATHER_TEMPERATURE_UNIT to CMSettings [1/2]
Introduce WEATHER_TEMPERATURE_UNIT. This setting will be used to
store the temperature unit in which the weather data will be reported.

Users will be able to set this value in the weather settings menu.
Each weather service provider might choose to provide the user
with a way to overlay this value (for example via the settings
activity that each service provider can define)

Change-Id: Ib6e47c9790aba02e6c29bd7f783730efda9177f3
TICKET:CYNGNOS-2426
2016-04-13 12:45:25 -07:00
Luis Vidal ad0d8c53a0 Weather API: Return ID rather than RequestInfo [1/2]
Instead of exposing the RequestInfo object created by the WeatherMgr
return an ID to identify the request. This ID can be later used to
cancel the request if needed. The WeatherProviderService base class
keeps track of the ongoing requests and can map this ID to the
corresponding request

This patch also include the following minor changes:
- Use List instead of ArrayList in API
- Update javadoc to public methods to reflect API changes
- Use UUID random generator in immutable classes to generate the
  hashcode rather than relying solely in the hashcode of the builder
  object.

Change-Id: Ib88dd0ecddd6fdb016b77ac29709fbae092dea29
TICKET: CYNGNOS-2425
TICKET: CYNGNOS-2423
2016-04-13 11:57:38 -07:00
Steve Kondik 1dab5a0ca9 cmsdk: Refactoring LiveDisplay
* Moving LiveDisplay to CMSDK!
 * Completely redesigned the feature for future expansion.
 * No new features in this patch, but a proper API is being
   designed.

Change-Id: Ic8f55678f9141bf3386b2a1cf2fd1e8b3916c278
2016-04-13 01:37:08 -07:00
Roman Birg 620b1eb908 cmsdk: compile as aar
for common resources

TICKET: CYNGNOS-2305
Change-Id: Idc1872b5fa3884754b49b08d2f8381f18fba234d
Signed-off-by: Roman Birg <roman@cyngn.com>
Signed-off-by: Adnan Begovic <adnan@cyngn.com>
2016-04-12 15:27:07 -07:00
d34d 16d3dc672e LLS: Deprecate collapseNotificationPanel [1/2]
collapseNotificationPanel is no longer applicable with the updated
UX so deprecate it and document that it will essentially be a no-op

Change-Id: I285bb48e3a9ffec8d554f880edf17e5105c94018
TICKET: CYNGNOS-2392
2016-04-12 09:09:33 -07:00
Luis Vidal 34bf4866db Fix nomenclature for RequestInfo types [1/2]
- Renamed TYPE_GEO_LOCATION_REQ to TYPE_WEATHER_BY_GEO_LOCATION_REQ
  and TYPE_WEATHER_LOCATION_REQ to TYPE_WEATHER_BY_WEATHER_LCATION_REQ
- Prevent null argument on setter methods. Documentation updated to
  warn user of IllegalArgumentException if null is passed

Change-Id: I6ba8fb7fb3a10d8c964414b58e00d9ce77a74e84
TICKET: CYNGNOS-2377
2016-04-08 13:19:48 -07:00
Luis Vidal baaf4a1baf Refactor WeatherInfo class
- Builder constructor takes now 3 args: city name, temp and temp
  unit. This is the minimun data that a weather service should
  provide when a weather update request is processed.
- Float members have been changed to double. Setter/getter methods
  updated.
- New setter/getter methods have been added to set current day high
  and low temp. Forecast list should be used only to provide weather
  forecast for upcoming days (this has been clearly documented).
  WeatherContract was updated to include these 2 new columns
- Added javadoc to all public methods
- Timestamp is not longer required in constructor. A new method
  setTimestamp has been added

Change-Id: Ia1edcfef0e2268f3881fed076c6ad74a81ca7334
TICKET: CYNGNOS-2365
TICKET: CYNGNOS-2382
TICKET: CYNGNOS-2356
TICKET: CYNGNOS-2360
2016-04-08 11:17:22 -07:00
Luis Vidal 06d5c89c43 Add state member to WeatherLocation class
Some weather service providers might require an additional
state (territory) field to better identify a location, so
a new field has been added to WeatherLocation class to hold
this data.

This patch also adds javadoc to public methods

TICKET: CYNGNOS-2384

Change-Id: I927f58d436f044df3c8af496b0f27e017f5e73e3
2016-04-08 10:55:44 -07:00
Luis Vidal 343245f4e6 Add API to cancel an active weather request
Add new API cancelRequest to CMWeatherManager. This will allow
clients to cancel a request that was previuosly submitted to
the weather service.

As part of this change, requestWeatherUpdate(weatherLocation),
requestWeatherUpdate(Location) and lookupCity(cityName) will
now return the RequestInfo object created if the request
was successfully submitted to the weather manager service

TICKET: CYNGNOS-2383
TICKET: CYNGNOS-2385

Change-Id: Ic122f91e0ea8a24d81dbed48741ef1e33567b56c
2016-04-07 22:42:43 -07:00
Adnan Begovic d8c2556c31 cmsdk: Actually return the system property in Build.
TICKET: CYNGNOS-2379
Change-Id: I7c7f3726b34db2b26d63fb4ef95df469fdf7e989
2016-04-06 15:19:22 -07:00
Adnan Begovic 6b879f36e4 cmsdk: Introduce Fig, api level 6.
Change-Id: I2916b1462c1f0b9582f4fefac82f60c20f820b85
TICKET: CYNGNOS-2303
2016-04-01 16:36:38 -07:00
Adnan Begovic 877a0234fa cmsdk: Add release notes for api level 5.
Change-Id: I2ba738197286ce8f5128b08a6a800e06ec321822
2016-04-01 15:53:01 -07:00
Adnan Begovic 5f6c9f40c7 cmsdk: Move sdk classes under new sdk directory.
TICKET: CYNGNOS-2299
Change-Id: Ia6c6a1ee901f4f94446c379cbceabfdfced651ef
2016-04-01 12:22:14 -07:00