19293 Commits

Author SHA1 Message Date
RoboErik
1f7a39fee1 Merge "Fix registering global priority sessions" into lmp-dev 2014-08-11 18:20:32 +00:00
RoboErik
4d26598677 Fix registering global priority sessions
We were never setting a global priority session due to a change in
the way sessions were registered. This makes sure a global session
gets set correctly.

bug:16930866
Change-Id: I859846c9265e98bb1a37ff9d22808137e787ce18
2014-08-11 16:50:18 -07:00
Yuncheol Heo
e5910f70fc Merge "Use the system property for the HdmiControlService configuration." into lmp-dev 2014-08-11 19:42:53 +00:00
Yuncheol Heo
7d9acc7a3e Use the system property for the HdmiControlService configuration.
- We've used the system resoure overlay for this purpose, but we found
  that it's hard for OEM which uses PDK to override this.  Since the
  resource was already compiled and provided as a binary, so it's hard
  to change it.

Bug: 16965963
Change-Id: I868305d6f76c128d79c00ab6a8023656cd476c62
2014-08-12 15:55:52 +09:00
Wonsik Kim
05182b2d69 Merge "TIF: small refactoring around audio configuration update" into lmp-dev 2014-08-11 19:46:21 +00:00
Wonsik Kim
7587d298c9 TIF: small refactoring around audio configuration update
Bug: 16880310
Change-Id: Ic519ff0f67cb35a876784530d956fcf8cb7edbf7
2014-08-12 13:04:17 +09:00
Jeff Davidson
328e679b21 Merge "Security-related cleanup for network scoring." into lmp-dev 2014-08-12 00:32:51 +00:00
Jeff Davidson
ac7285dc1e Security-related cleanup for network scoring.
-Perform additional checks for the SCORE_NETWORKS permission when
broadcasting scoring requests to the active scorer and when accepting
score updates. In theory, these checks are unnecessary as we manually
check package manager when obtaining the list of valid scorers, but
they cannot hurt to add.

-Fix multi-user. Since the active scorer is a global setting, we
ensure that scoring can only be done by apps available to the primary
user / owner of the phone, and that the request scores broadcast is
sent to that user's profile. When the scorer is changed, we send that
to all user profiles as it's just informational, although it's
unlikely that apps outside the primary user's profile would need to
respond.

Bug: 14117916
Bug: 16399238
Change-Id: Iaf06bda244eec730b590a30a3f4ffab4965bde96
2014-08-11 15:46:20 -07:00
Jinsuk Kim
302938e9b5 Merge "CEC: Fix two bugs" into lmp-dev 2014-08-11 19:46:21 +00:00
Jinsuk Kim
1f8d1c576f CEC: Fix two bugs
- <Routing Change> goes out with invalid parameter (F.F.F.F) for
  old path if the active source/path is not set. Should have been
  set to internal path (0.0.0.0)
- <User Control Pressed> was still sent when active source was not
  set. Fixed to discard it.

Bug: 16966486
Bug: 16965446
Change-Id: I5abb062be42c17514b3ed7ac930d7a3535fc9132
2014-08-12 15:47:19 +09:00
Jungshik Jang
867b4e0c55 Set active port path to HdmiControlService
Set active port path to HdmiControlService so that the service
can handle proper event patch between cec and mhl devices.

Bug: 16215362
Change-Id: I2bd703916a422429b1029067fa3422e24de39274
2014-08-12 14:23:21 +09:00
Jinsuk Kim
502d8b3beb Merge "CEC: Make sure CEC switch info is always updated" into lmp-dev 2014-08-11 19:42:53 +00:00
Jinsuk Kim
bcfa0677d4 CEC: Make sure CEC switch info is always updated
The CEC switch information was not updated as expected if
Device Discovery action is in progress. Refactored to have the
update routine gets called regardless of the presence of action.

Conflicts:
	services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java

Bug: 16931883
Change-Id: I629e8b646bef54599c1a706bf1c797ecebf8616b
2014-08-12 07:54:58 +09:00
Jeff Sharkey
93f871126c Merge "Hack and ship: NetworkStats edition." into lmp-dev 2014-08-12 00:32:51 +00:00
Jeff Sharkey
eb2c2c790c Hack and ship: NetworkStats edition.
Some devices use clatd for catching raw IPv4 traffic when running on
a pure-IPv6 carrier network.  In those situations, the per-UID
stats are accounted against the clat iface, so framework users need
to combine both the "base" and "stacked" iface usage together.

This also means that policy rules (like restricting background data
or battery saver) need to apply to the stacked ifaces.

Finally, we need to massage stats data slightly:

-- Currently xt_qtaguid double-counts the clatd traffic *leaving*
the device; both against the original UID on the clat iface, and
against UID 0 on the final egress interface.

-- All clatd traffic *arriving* at the device is missing the extra
IPv6 packet header overhead when accounted against the final UID.

Bug: 12249687, 15459248, 16296564
Change-Id: I0ee59d96831f52782de7a980e4cce9b061902fff
2014-08-11 18:40:23 -07:00
Jeff Brown
6d2a9492e2 Eliminate power manager latency for boot completed.
The power manager disables the power button until boot completed
occurs.  If there are many pending broadcasts in the queue, it
may be possible for BOOT_COMPLETED to be delayed for several
seconds after boot.

To avoid the delay, introduced a new boot phase which is
sent to system services immediately when boot completed happens.

Bug: 13398280
Change-Id: I1833d2ffb20305009dd76363b43e534034f1d0a2
2014-08-11 17:13:03 -07:00
Jungshik Jang
7df52862da Hook up native mhl api to HdmiControl Service.
This change hooks up all apis defined in mhl hal to
java layer's HdmiMhlController and HdmiControlService.
Along with HdmiMhlController, this change includes followings.

1. HdmiMhlLocalDevice
A logical container for a mhl device connected to specific hdmi port

2. HdmiMhlFeatureAction
A base feature action class for mhl's state behaviors like RAP and RCP.

Bug: 16215362

Change-Id: If177999853f60b68bd079549660a3f4982cb9d9e
2014-08-12 11:05:42 +09:00
Jinsuk Kim
91e25eda41 Merge "Move input change event handling out of TVInputManager" into lmp-dev 2014-08-11 19:42:53 +00:00
Jinsuk Kim
d38bf476f6 Move input change event handling out of TVInputManager
HDMI input change event should be handled best in TIS implementation
of HDMI input since the input change request from TV/other device
needs to be properly coordinated. This requires the listener be
moved the input service.

Provided an interface in HdmiTvClient for the input service to access
the API through getSystemService(Context.HDMI_CONTROL_SERVICE).

Conflicts:
	services/core/java/com/android/server/tv/TvInputHardwareManager.java

Bug: 15570939
Change-Id: Ie2ad10d77907de3d4501f9c892ca553b75365467
2014-08-12 08:27:32 +09:00
RoboErik
7aef77bbf5 Remove sessions listeners that are disabled
Removes sessions listeners when their notification listener is
disabled. Also updates the dump for media sessions.

bug:15549450

Change-Id: Ibe51a4a42ef333e75a09f0fffa0f2b9b8939b85c
2014-08-11 22:32:55 +00:00
Sandeep Siddhartha
6df952ec22 Add debugging info to VIS via dump()
Change-Id: I9e8f4536de309256db835b30d94765bfc27d4e80
2014-08-11 09:38:38 -07:00
Yuncheol Heo
6d73986305 Merge "Make it not to go to sleep when changing TV's input to the others." into lmp-dev 2014-08-07 16:36:32 +00:00
Yuncheol Heo
64bafd9108 Make it not to go to sleep when changing TV's input to the others.
- Previously, we decided to make it go to sleep when changing TV's input
  to the others.  But, we found that the current molly couldn't wake up by
  CEC commands actively.  So, we'll revert the decision.
- In addition, during investigating this issue, we found that currently
  molly couldn't work with Samsung (SS) TV harmoniously.  SS TV will send
  <RoutingChange> and <RequestActiveSource> when it wakes up.  If there
  is no <ActiveSource> response, then it will change the input to the
  internal.  This CL handles this issue also.

Bug: 16803105
Change-Id: I5179561775b186b486fc3f2a042e759fcb07451b
2014-08-11 13:48:37 +09:00
Jeff Sharkey
3d1232f351 Merge "GID-based permissions are defined by "android"." into lmp-dev 2014-08-09 00:45:27 +00:00
Jeff Sharkey
fb2c4d1861 GID-based permissions are defined by "android".
This matches all other permissions defined by framework-res.apk,
instead of leaving it null.

Bug: 16907551
Change-Id: I7e2d671443d987906b2f29aa1579bef6380e8a52
2014-08-10 13:58:05 -07:00
Dianne Hackborn
a351ab9698 Fix issues 16739817 and 16709247 in voice interaction service.
Issue #16739817 VIS doesn't start for non-primary user(s)
Issue #16709247 GSA is not the default voice interaction agent

These are both fixed by getting rid of the existing code for applying
the default voice recognizer, moving it in to the voice interaction
manager service, and extending it to also set up the default voice
interaction service.

Change-Id: If8d5936c28aebfa7eff77c8d99241c3a2ffdb0a4
2014-08-09 13:31:59 -07:00
Jungshik Jang
1f819bbfc8 Add IHdmiSystemAudioModeChangeListner to TvInputHardwareManager.
This is to update audio patch when HDMI-CEC system audio mode is changed.

Bug: 16113320
Change-Id: I312fffe511c0bce1c973bb66e9c16875e5dcee56
2014-08-11 13:51:37 +09:00
Jungshik Jang
61daf6b38e Hook up device power status change to TIF
Instead of introducing new api update existing
IDeviceEventListener

Bug: 16445063
Change-Id: I93bfc736a06a78e83c95877a53f4f241b51ed9c0
2014-08-11 10:40:29 +09:00
Christopher Tate
83b2fb8f73 Merge "Start using cancelFullBackup() when appropriate" into lmp-dev 2014-08-09 00:40:15 +00:00
Christopher Tate
bf1a4a81eb Start using cancelFullBackup() when appropriate
The API was in place but the framework wasn't yet calling it.

Bug 16524520

Change-Id: Ie368758c830a7d0ad11e7dd3142a0ed896069944
2014-08-09 00:48:47 +00:00
Jae Seo
7eb75dff7a TIF: Move watch history logging to TvProvider
There are only two kinds of watch events that can happen on the system:
 1. The current TV input session is tuned to a new channel.
 2. The session is released for some reason.
The former indicates the end of the previous log entry, if any, followed by the
start of a new entry. The latter indicates the end of the most recent entry for
the given session. Here the system supplies the database the smallest set of
information only that is sufficient to consolidate the log entries while
minimizing database operations in the system service.

Bug: 14791151, Bug: 15921205, Bug: 15988715, Bug: 16831555
Change-Id: Ifcb1a1273c14ee234919d819d082b1004eb92ebc
2014-08-10 10:39:52 -07:00
Adam Lesinski
81f6d857c1 Merge "Second iteration of the UsageStats API" into lmp-dev 2014-08-08 18:15:47 +00:00
Adam Lesinski
3516800b61 Second iteration of the UsageStats API
Based on feedback from API council, updated the API.
Also added support for querying the event log.

Change-Id: Ibaa008b9e5bd145acdfe8e20c25c2ed2d96be123
2014-08-08 12:08:15 -07:00
Chulwoo Lee
97f550485e Merge "TIF: Fix a bug of incorrect watch history" into lmp-dev 2014-08-07 16:37:11 +00:00
Chulwoo Lee
8d4ded0058 TIF: Fix a bug of incorrect watch history
When the user keeps watching one channel without tuning to the other
channel, the user can watch many programs. In this case as many watch
history records as the number of programs the user watched should be
inserted in watched_programs table.
But there is a bug now that only one record is logged for all the
programs and this CL fixes the bug and makes the watch history
logging work correctly for this case.
In addition, package information should be added to the content value
because it should be not null in programs table.

BUG: 16177411
Change-Id: I058f9db927b5d684a1af7852630f50ec2d2743b6
2014-08-09 00:22:55 +09:00
Calin Juravle
8ad7f2051d Use native ISA for dex code (in case there's a NativeBridge)
In the presence of a native bridge it is more efficient to compile the
dex directly to the native ISA than to use the shared library ISA as a
reference.

This can be achieve by configuring the readonly system properties to map
between the .so ISA and the desired dex code .ISA (e.g.
ro.dalvik.vm.isa.ISA1=ISA2).

Bug: 16185267

(cherry picked from commit I50baa7b37e1465b9adf72d6f6b96f526a08d59c7)
(cherry picked from commit I8fe453a800812e382e8f41b5f7922997aa9c18a9)

Change-Id: I6c9684149691285310c961189b58af8c7f47aff4
2014-08-08 15:37:17 +01:00
Jinsuk Kim
5008486b09 CEC: Content observer to handle TV Setting update
Replaced the API setOption with content observer to read/get informed of
the CEC settings.

Bug: 16855247

Change-Id: Ieff2399bbfe83f05af4448e7337f91ef40d1e24d
2014-08-08 21:30:14 +00:00
Svetoslav
7c91b34364 Merge "Polish the new cross-profile app widget APIs" into lmp-dev 2014-08-07 18:49:59 +00:00
Svetoslav
8e1d299da2 Polish the new cross-profile app widget APIs
bug:14991269

Change-Id: I5996f8c69a3d151ff1ecd8f19403dd606f588150
2014-08-08 20:35:59 +00:00
John Spurlock
5c8ea2c369 Merge "New api to sync zen mode state from listeners." into lmp-dev 2014-08-08 18:15:47 +00:00
Amith Yamasani
40bc0186d0 Merge "No need to send PRE_BOOT_COMPLETED for new users" into lmp-dev 2014-08-08 17:26:08 +00:00
Amith Yamasani
c2f20b66fd No need to send PRE_BOOT_COMPLETED for new users
Since the primary purpose is to upgrade databases, no need
to send this broadcast. If system apps care to be informed early
on new user creation, USER_INITIALIZE is an early broadcast.

Also remove some logs that spew when switching users.

Bug: 16846465
Change-Id: Ibd7f8630ce1f41f8cadbda616de05844b127d1a8
2014-08-08 12:15:17 -07:00
Narayan Kamath
a3d98c2508 Merge "Reduce the frequency of calls to isDexOptNeededInternal." into lmp-dev 2014-08-07 18:53:12 +00:00
Narayan Kamath
05e8f801b5 Reduce the frequency of calls to isDexOptNeededInternal.
The package manager maintains a set of dexopted instruction
sets as a fast path to avoid calling expensive code. We were
correctly adding elements to that list while performing dexopt,
but were *not* adding elements to the list when isDexOptNeededInternal
told us things were up to date. As a result, we'd hit the slow path
100% of the time on userdebug builds in the steady state, i.e, when
the system did not dexopt anything since boot.

With this change, we make sure isDexOptNeededInternal is called
precisely once per boot in such case.

This patch also fixes broken logic for apps that have multiple
code paths. We must mark the paths as dexopted only if we've
processed all paths.

bug: 16828525
bug: 16868741
Change-Id: Icb59121fe915d892e677d9b7e9a4efd11555ae27
2014-08-08 17:39:59 +00:00
Nicolas Prevot
c3093eb86b Merge "Making getProviderMimeType work across users." into lmp-dev 2014-08-07 18:39:40 +00:00
Nicolas Prevot
1dddc7fc79 Making getProviderMimeType work across users.
For apps with cross-user uri grants, but without INTERACT_ACROSS_USERS.

BUG: 16128346

Change-Id: I0136cd274eaf457804d196c09f746f66c1fe599f
2014-08-08 15:26:23 +01:00
Jeff Sharkey
6c0b9da65e Handle null IPackageDeleteObserver.
Bug: 16862614
Change-Id: I0c197a994b89d49123027f24fe46827c2b994ab6
2014-08-08 05:08:58 +00:00
Robin Lee
faa4b3cb06 Disallow switching managed profile to foreground
Another check in the ActivityManager to stop us from getting into an
invalid state by a fat-fingered 'am switch' etc.

@bug 16814252

Change-Id: Id65ab647d5a535cc2f965139a1b717cf65aa7e69
2014-08-07 10:15:45 +01:00
Yuncheol Heo
7dea98f6f9 Allow to use device's own physical address.
- Fixed JavaDoc.

Change-Id: I6fdbf6596b5f2e41a238b36e128ba0889725c813
2014-08-07 17:58:59 +09:00
Yuncheol Heo
2849b7ccd1 Go to nap when receiving <Active Source> for the other devices.
- Previously, it went to sleep when it got <Active Source>, but this
  causes the other side-effects like can't-wake-up when changing to HDMI
  port directly.

Bug: 15578870
Change-Id: I0ca5bd2372c9e5e7446592d66483900eeba75500
2014-08-07 17:30:08 +09:00