17454 Commits

Author SHA1 Message Date
Craig Mautner
ffcfcaadfe Implement maxRecents and fix TaskPersister bug
Activities can now set the maximum number of times that they will
appear in the recent task lists when using DocCentric mode. The
default number is 15, the min 1, and the max 100.

Also a bug in TaskPersister that deleted files because it did not
properly parse their task ids is fixed.

Fixes bug 13736052.

Change-Id: I7ccb4e6f89d6202ff31c8577bb7b9d8d1b7e5e8d
2014-06-05 10:18:48 -07:00
Chris Wren
5116a821b9 Disable the attention light on devices that do not have it.
If the attention and notificaiton light are mapped to the same
physical LED, then pulsing the attention light can turn off the
notification light. See bug for detailed discussion.

Bug: 12900389
Change-Id: I2703af23f50ecc3e92140b9843aaf340d520bce5
2014-06-05 12:38:13 -04:00
Chris Wren
a344656a01 A notification that emerges from Zen Mode interception should beep.
If a notificaiton emerges from Zen Mode due to a ranking
reconsideration (possibly because a long-running query resolved an
important person) then it should get the oportunity buzz, beep, blink,
and send accessibility events.

Save what we need to know about the old notificaiton record on the new
record so we don't have to hold onto it.

Bug: 15383458
Change-Id: I15c7834fef03ff6a676e78e9d2caae24f00720ef
2014-06-05 12:38:13 -04:00
Matthew Williams
64939ae385 DO NOT MERGE Redact SyncService stuff from master
Cherry-pick over from master.
This changes the API surface area, deleting things we aren't releasing.
I'll do the internal clean-up at the same time I do the SyncManager
refactor to sit on top of the TaskManager.
Bug: 14997851

Change-Id: Ieebbbcd3324827098e88b36e45e6e82315a51e65
2014-06-04 22:46:25 +00:00
Robert Greenwalt
8ae980dcef DO NOT MERGE Report new network scores back to factories.
This is a first order approx of what we want - should probably be good enough in most cases.

bug:15277751

Change-Id: I10e3b25f6ad5c7e022ba966ed514d4e6a999180d
(cherry picked from commit 94a5c61cb82401dd777d0a7ac43183d92d955323)
2014-06-04 19:15:17 +00:00
Adrian Roos
1e9021aef8 Merge "Ensure trust agents are only provided by platform packages" into lmp-preview-dev 2014-06-04 13:18:40 +00:00
Robert Greenwalt
7722b379ef Merge "Fix legacy APIs." into lmp-preview-dev 2014-06-04 01:14:38 +00:00
Dianne Hackborn
7737ab44b1 Merge "Force write battery stats after a --history-since." into lmp-preview-dev 2014-06-04 00:54:45 +00:00
Dianne Hackborn
16b0b56c79 Force write battery stats after a --history-since.
This should help the stats be more consistent across
system restarts.

Change-Id: If1736608373aada8b55d72ecf80fbbc52bd288bd
2014-06-03 17:50:30 -07:00
Robert Greenwalt
2d37070ec1 Fix legacy APIs.
Two fixes.  First make sure we mark the request as handled by the network handling it.
Second, convert ensureRouteToHostForAddress to use the new legacyNetworkForType.

bug:14993207
Change-Id: I230968938ca0ed91f834b36a2af60caff2eab682
2014-06-03 17:22:11 -07:00
Craig Mautner
4021b3ba74 Merge "Force all windows to redraw before unblanking screen" into lmp-preview-dev 2014-06-04 00:21:01 +00:00
Craig Mautner
8a0da0184f Force all windows to redraw before unblanking screen
The screen turning on would show windows as they were when the screen
turned off. This fix forces all showing windows to redraw first and
only then allow the screen to turn on.

Fixes bug 15092354.

Change-Id: I52c3f47438176a5ac00ba9a4d5205b56a5aa48f9
2014-06-03 17:08:02 -07:00
John Spurlock
856edebad7 Zen: Stateful condition panel.
When DND is on, expanded panel shows the current time
condition, or time remaining.  The last time bucket
selected is remembered as the default option for the
next time.

Move the server-side countdown helper into a proper
condition provider, but register it in-process as a
system provider.

Move common countdown condition parsing into ZenModeConfig
to reuse from system components.

Keep the manual exit condition around in zen mode config
and add plumbing for getting / listening to the
controller.

Keep the last QS detail panel around instead of
recreating it every time.

Fix the time condition's plus and minus button
enabling logic, and enhance the click handler to
deal properly with the next or previous bucket.

Bug:15344758
Change-Id: Ie7018a1c20e20f6d7e5f9e7874188374e6f8e2ab
2014-06-03 19:05:55 -04:00
Chris Wren
52eba54eca Apply Zen Mode later, after we've found the old record.
Copy the extracted signales from the previous record to the new
record.  Do this before the signal extractors are called so that code
can decide what to do with the information.

Bug: 15383769
Change-Id: Ifa24fa0e4380f08979c2126b63d29794aa50a787
2014-06-03 14:58:51 -04:00
Robert Greenwalt
32aa65a112 Fix Legacy NetworkInfo API
Make the connectivity changed broadcasts send correct NetworkInfos.
Also update the results of getNetwork.

bug:15290306
bug:15191336
bug:14993207
Change-Id: Ie99ad25f3ebb90d18348e7013761b139e7481866
(cherry picked from commit 16fe1c18289de200d2249e51db8c0986619f487b)
2014-06-03 14:00:56 +00:00
Adrian Roos
18ea893a23 Ensure trust agents are only provided by platform packages
Prevents the TrustManagerService from binding to any non-platform
trust agents and updates the SampleTrustAgent to use the new
permission.

Bug: 15287044
Change-Id: I38c3deebd5ad359075e68f52d19417bab5ab43db
2014-06-03 15:49:19 +02:00
Robert Greenwalt
1062171090 Merge "Refactor NetworkFactory." into lmp-preview-dev 2014-06-03 02:59:22 +00:00
Dongwon Kang
7b2ae34b97 Merge "Add onAudioStreamChanged and onClosedCaptionStreamChanged callbacks from TIS to application." into lmp-preview-dev 2014-06-03 02:31:28 +00:00
Robert Greenwalt
55691b8cc7 Refactor NetworkFactory.
Make NetworkFactory a concrete class and divide responsibilites between it and NetworkAgent.
Factory will track requests and by default give a single connect/disconnect api for ease
of use.  Then NetworkAgent is created and destroyed as needed with very simple logic.

Change-Id: I401c14a6e5466f2fc63b04219b97ff85bb9af291
(cherry picked from commit 9a17b9c5a256cb4bb14821c5ee89b03b99c045e8)
2014-06-03 01:26:48 +00:00
Robert Greenwalt
49fa8e15ba Merge "Rewrite startUsingNetworkFeature for new API" into lmp-preview-dev 2014-06-03 01:26:19 +00:00
Dongwon Kang
a3be12a236 Add onAudioStreamChanged and onClosedCaptionStreamChanged callbacks from TIS to application.
Bug: 14628404
Change-Id: I40abf647e9d608c2c793d007fd2fe0d511535bdd
2014-06-03 09:53:05 +09:00
Jae Seo
6fbe3982b0 Merge "TvContract: Address the feedback from the API review" into lmp-preview-dev 2014-06-03 00:26:05 +00:00
Sungsoo Lim
5a26f00c84 Merge "Add ClientState for handling the crash of clients." into lmp-preview-dev 2014-06-03 00:23:09 +00:00
Sungsoo Lim
72ad7bf915 Add ClientState for handling the crash of clients.
Bug: 15054040
Change-Id: I4dd8d1c350186fe705daa20c9944bc8e4dd556c2
2014-06-03 09:09:14 +09:00
Chulwoo Lee
e7bb7d6bb2 Add a way to get the class name of SetupActivity and SettingsActivity
Now, there can be only one SetupActivity and one SettingsActivity for
one TIS apk though one TIS apk can contain several services. Each TIS
need to be able to have its own SetupActivity and SettingsActivity.

BUG: 15177340
Change-Id: I2d944e3ef35c3a981483ba643fd27b15925bab16
2014-06-03 08:56:35 +09:00
Jae Seo
bd23fa0ba1 TvContract: Address the feedback from the API review
This change addresses the following comments from the council:
- Provider authority should be "android.media.tv"
- Rename COLUMN_DATA to COLUMN_INTERNAL_PROVIDER_DATA and add comment to
  indicate data is internal to the provider that inserted it, and should
  not be decoded by other apps. It would be nice to restrict read access
  to this column, but not essential.
- Hide COLUMN_LOCKED since implementation isn't defined yet, also
  questions about how it interacts with Unicorn.
- Fix typo in ORIGINAL_NETWORK documentation.
- All provider MIME types need to be changed to follow platform
  conventions: "vnd.android.cursor.dir/channel",
  "vnd.android.cursor.dir/program", etc. (Notice singular tense and no
  package prefixes since they're part of the platform API.)
- Rename Programs.COLUMN_DATA to COLUMN_INTERNAL_PROVIDER_DATA, along
  with docs update, for the same reasons as above.
- Rename COLUMN_DESCRIPTION to COLUMN_SHORT_DESCRIPTION and update docs
  to indicate it's a recommended maximum length, not a hard cap.
- COLUMN_GENRE should be split into two columns: COLUMN_BROADCAST_GENRE
  (from broadcast standard) and COLUMN_CANONICAL_GENRE (from an Android
  standard). Define a subclass with the Android canonical genres, which
  are simple strings that are comma-separated when inserted into
  COLUMN_CANONICAL_GENRE.

Bug: 15345342
Change-Id: I7f8e70aef617475a59d096fd73a551e7df8a1d3a
2014-06-02 16:44:37 -07:00
Robert Greenwalt
562cc54536 Rewrite startUsingNetworkFeature for new API
bug:14993207
Change-Id: I041a80faa07bf3094af13a6c606f3b15aa03f789
(cherry picked from commit 09fe5e618b09965183cf53fba87c39025a19e8d1)
2014-06-02 23:29:20 +00:00
Dianne Hackborn
0bec638839 Merge "Some battery stats history fixes." into lmp-preview-dev 2014-06-02 22:57:41 +00:00
Jae Seo
3c784d6359 Merge "Put TV Input Framework under android.media.tv, including TvContract" into lmp-preview-dev 2014-06-02 21:03:58 +00:00
Craig Mautner
481acb86e4 Merge "Compare task userId with userId profiles." into lmp-preview-dev 2014-06-02 20:40:16 +00:00
Dianne Hackborn
fc0641340f Some battery stats history fixes.
- Now the full wake history uses the history tag if it can.
  Hopefully this will still result in a consistent history,
  since that isn't really want the tag is for...  but the
  current implementation in places will probably make this work.

- Possibly fix a bug with inconsistent state between partial
  history snapshots: after a snapshot is printed, don't allow
  any more batching into the most recent history entry, so the
  next snapshot will not miss anything that might get placed
  into it soon after.

Also rework command line arguments for enable/disable to make these
commands instead of options.

Change-Id: Ia33445cad1538bf8df549cef284f1e736efbc079
2014-06-02 12:42:12 -07:00
Jae Seo
d5cc4a281e Put TV Input Framework under android.media.tv, including TvContract
Bug: 15345342
Change-Id: I665ca23f0f074ce29cb2e047109b209178532107
2014-06-02 11:02:52 -07:00
Craig Mautner
e0d50cc15b Compare task userId with userId profiles.
Change comparison of Task.mUserId from comparing with only the
current user id to comparing with all current profile user ids.

Fixes bug 14930145.

Change-Id: Ibbae08da6f4eaa31b171becdd8957293758f527b
2014-06-02 10:11:53 -07:00
RoboErik
e78755e180 Merge "Minimum work to make volume handling work with sessions" into lmp-preview-dev 2014-06-02 17:10:07 +00:00
Jungshik Jang
3ef57d99b3 DO NOT MERGE: Start Device Discovery after logical address allocation.
Usually TV initiates Device Discovery sequence after logical address
allocation of local devices. For that added new callback interface
to AddressAllocationCallback to HdmiCecDevice.
Along with this, add onAddressAllocated to HdmiLocalDevice so that
start sending local device information once logical allocation is done.

Change-Id: I4cdc5dd7770674a17a0f23c383a6c1ca221e3104
2014-06-02 11:07:25 +09:00
Jinsuk Kim
e74282b70b DO NOT MERGE: Stop publishing HdmiCecService, start publishing HdmiControlService
HdmiCecService will soon be deprecated and replaced with HdmiControlService.
Stopped publishing the service, and turned the corresponding manager to
stub so that it will do nothing but print out a warning msg instead.

Will help the app transition to the new service in the meantime. Once
the migration is finished, will gut out all the HdmiCecService/
HdmiCecManager stuff.

Change-Id: Ic34a69c4fb99f4e5a2c8323538195204ab16a545
2014-06-02 11:02:51 +09:00
Jinsuk Kim
48a0729d62 DO NOT MERGE: Do not reply with <Feature Abort> to CEC Broadcast message
Broadcast message is not targeted to a specific device but for
announcement. Individual reponse with <Feature Abort> is neither
necessary nor useful. Changed to send the message back only for
direct messages.

Change-Id: I927aa8e58a9868e158ed945c753492207e7c97f6
2014-06-02 11:01:45 +09:00
Jinsuk Kim
e1e63c7c54 DO NOT MERGE: Dispatch incoming CEC messages to feature actions
This CL dispatches incoming CEC messages to feature actions that
the service manages.

Change-Id: I9221d6a25648846327d00fe5404aaf1e8ec786ce
2014-06-02 11:00:55 +09:00
Jungshik Jang
d42a7a322b DO NOT MERGE: Implement device discovery sequence.
When device discover is launched it goes through the following step

1. clear all existing devices
2. send <Polling Message> of all logical addresses
  excecpt one of local device
3. Once got all allocated logical addresses, gather physical address of
  them
4. Once got physical address of them, gather display name of them
5. Once got display names, gather vendor id of them
5. Once got vendor id of them, register all gathered info to
  internal device info list.

Change-Id: Ic9aca3b15d88ac7650f10b6d0bfa9c97923975e8
2014-06-02 10:59:03 +09:00
Jinsuk Kim
a8fd44b74b DO NOT MERGE: Fix a couple of bugs in CEC services
- Correct conversion for byte to int for cec opcode
- Use the right Handler.obtainMessage() to pass an integer variable

Change-Id: Ie3e86225f1702decce454aeb197911a371f51c17
2014-06-02 10:58:02 +09:00
Jungshik Jang
c47e26ca2f DO NOT MERGE: Add cec message handler to hdmi cec jni implementation
Notification for incoming cec message can be issued
from any thread but jni can call java method
in the thread that jni knows like service thread.
So this change delegates incoming message to
jni-friendly thread, service thread by exploit
looper of service thread.

Change-Id: If3b141d917df3e209912af1778eb509777199969
2014-06-02 10:55:50 +09:00
Jinsuk Kim
2c2a301762 DO NOT MERGE: Fix a bug using wrong addresses for CEC logical address allocation
Change-Id: I41da586c16dca4f325d147bb3abe5d4e09f7b91c
2014-06-02 10:54:53 +09:00
Jinsuk Kim
16e24a2d14 DO NOT MERGE: Hook up the CEC playback API to service internal logic.
This change enables CEC playback API (oneTouchPlay, queryDisplayStatus).
Also updated local device list type to SparseArray to make it easy
to get one based on device type.

Change-Id: I6f88b2dac2d873c493a90411549a4e5719a5e460
2014-06-02 10:53:58 +09:00
Jungshik Jang
562ef5c513 DO NOT MERGE: Add HdmiCecDeviceInfo to HdmiCecLocalDevice
As HdmiCecLoclaDevice is a wrapper for local devices
it should include cec device info.

Change-Id: I479665b2aa6bd56470b79dbbb7fb1015f6356090
2014-06-02 10:50:37 +09:00
Jungshik Jang
9d499bfe4a DO NOT MERGE: Implement <Polling Message>.
When Device Discovery is launched or Hot-plug detection is
launched, the first step of it is to send <Polling Message>
to all remote devices. According to type of feature,
it may have different retry count for sending <Polling Message>.

As <Polling Message> to all devices should be serialized operation
it runs on io thread as single operation.

Along with this, added assertRunOnIoThread and
assertRunOnServiceThread used to make sure that all methods are
called in proper thread.

Change-Id: I2d2df0216867c188e99ba24b216ec73f3396eeae
2014-06-02 10:48:57 +09:00
Yuncheol Heo
61ced38d61 DO NOT MERGE: Add the constants for the callback result of SendCecCommand().
- Move the send failure warning messages into HdmiCecController.sendCommand()
  from each Actions.
- Stringfy with more detail messages for some opcodes.

Change-Id: Ib7ce24dd2a1f290e6c3a0b26738772ef1d4a9630
2014-06-02 10:46:36 +09:00
Jinsuk Kim
47927f756a DO NOT MERGE: CEC Initialization per device type
CEC initialization may vary from device type to type. Changed logical address
map to HdmiCecLocalDevice map to handle it. These per-type classes for local
device will be extended also to take care of incoming CEC commands that should
require different action based on device type.

Change-Id: Ia59a464607b14e942fcf83e63aa1d6310ca6a575
2014-06-02 10:45:18 +09:00
Jungshik Jang
404d704158 DO NOT MERGE: Add SendMessageCallback to Hdmi control service.
As we have separate IO thread, we should have async callback
mechanism to get result of send request.
For that, I added SendMessageCallback interface to HdmiControl
Service
Along with this, replace message-based IO handling with
post Runnable based one for consistency

Change-Id: I61cf5b751b4f2af3b34956060869f3512f161d11
2014-06-02 10:42:03 +09:00
Dongwon Kang
0bf8a21464 Merge "Add a path for generic event from a session to an application in Tv Input Framework." into lmp-preview-dev 2014-06-01 23:09:31 +00:00
Jorim Jaggi
d48d7a6d50 Merge "Fade scrim in unlock animation." into lmp-preview-dev 2014-05-31 01:09:19 +00:00