4412 Commits

Author SHA1 Message Date
Dongwon Kang
fdce9e541e TIF: handle a race condition when a session is crashed
Currently, TIMS has a logic for handling session crash (binderDied).
However, this can be racy if the client calls an operation right before it gets
ITvInputClient.onSessionReleased() callback. This change handles those request
gracefully without causing a crash in the client side.

Bug: 18612616
Change-Id: I37241e05d53f3cca693e0239fc9ad5dce02fc925
2014-12-05 10:37:14 +09:00
Christopher Tate
3bec50908b Merge "Properly recognize repeating wakeup alarms" into lmp-mr1-dev 2014-12-02 23:44:20 +00:00
Christopher Tate
9939136121 Merge "Midnight should mean midnight" into lmp-mr1-dev 2014-12-02 23:44:00 +00:00
Jinsuk Kim
fb020862e0 Merge "CEC: Set the parameter of <System Audio Mode Request> right" into lmp-mr1-dev 2014-12-02 21:50:44 +00:00
Paul Lawrence
75f304f922 Merge changes Ibfb5c6ab,I712919ae into lmp-mr1-dev
* changes:
  Add mechanism for securely returning parameters though NativeDaemonConnector
  Revert "DO NOT MERGE: Don't log passwords returned from vdc"
2014-12-02 20:17:33 +00:00
Christopher Tate
864d42eb96 Properly recognize repeating wakeup alarms
The code in place was inappropriately treating all recurring alarms
as non-wakeup for purposes of deferral.  Worse, it was overriding the
"this deliverable batch of alarms includes a wakeup alarm" bookkeeping,
so could potentially cause inappropriate deferral of even standalone
wakeup alarms.

Bug 18591317

Change-Id: I2a62ed4badcaeb549c1ac4f086014aa829e45427
2014-12-02 11:48:53 -08:00
Christopher Tate
f6f8cca782 Midnight should mean midnight
...not noon-or-midnight.  Fix the initial fstrim delay to properly refer
to midnight rather than ambiguous 12-hour "zero" so that fstrim job
consideration always starts overnight rather than possibly at the following
day's noon, depending on when the device was booted.

Bug 18076397

Change-Id: Ife3cd5bdeb14c7832b6e2a2de88dcfd1ba731b67
2014-12-02 10:55:09 -08:00
Christoph Studer
27ef018846 Merge "NoMan/SysUI: Clear LEDs only when entering the shade" into lmp-mr1-dev 2014-12-02 18:49:51 +00:00
Marvin Paul
5aeed158df Merge "Added explicit sort order when fetching accounts." into lmp-mr1-dev 2014-12-02 18:36:32 +00:00
Marvin Paul
48fcd4e175 Added explicit sort order when fetching accounts.
In SQLite, if a sort order is not specified then the ordering is
undefined. In pre-L, SQLite would order accounts by the primary key.
But in L, the newer SQLite version appears to be ordering accounts by
the name.

Bug 18453759

Change-Id: I6bf2b0de59eca4c69472b4279b9e4194c3d3471e
2014-12-02 18:30:57 +00:00
Junda Liu
ef6178a99c Merge "Add hasMatchedTetherApnSetting to telmgr API." into lmp-mr1-dev 2014-12-02 18:18:24 +00:00
Christoph Studer
1f32c65697 NoMan/SysUI: Clear LEDs only when entering the shade
Don't clear notification LEDs when seeing notifications on the
lockscreen.

Also fix a bug where the LED didn't continue flashing after
the screen turned off.

For devices with doze capability, ensure that the LED continuing
to flash after screen off doesn't cause an immediate pulses, but
delay the first pulse by 10s.

Bug: 15449039
Change-Id: Id34d51a2c91ceaf069e49add1ab690bb855f9638
2014-12-02 16:52:13 +01:00
Christoph Studer
ff02faf8f3 Merge "NoMan: Optimize grouped notifications" into lmp-mr1-dev 2014-12-02 15:40:10 +00:00
Dongwon Kang
7cfe00f693 Merge "TIF: fix a race condition when TvInputManager is initialized" into lmp-mr1-dev 2014-12-02 07:26:07 +00:00
Lorenzo Colitti
32f3518dcc Merge "Only use mDefaultDns if the network claims to offer Internet" into lmp-mr1-dev 2014-12-02 06:47:52 +00:00
Jinsuk Kim
e653602168 CEC: Set the parameter of <System Audio Mode Request> right
The parameter should be the physical address of the source device
not that of AVR.

Bug: 18582101

Change-Id: I3f7fd71ab87f174babc0d2bb10b2661df19336eb
2014-12-02 15:38:39 +09:00
Jeff Sharkey
2705387df6 Merge "Include splits in dumpsys package output." into lmp-mr1-dev 2014-12-02 00:39:48 +00:00
Jeff Sharkey
c4d05fc0db Include splits in dumpsys package output.
Describe the currently installed splits, both in normal dumpsys
output and in checkin output.  Also include revisionCode of those
splits when defined (non-zero).

Bug: 18576300
Change-Id: Ie8140961fb7b9e0ed23fd6bc267157aab075dd78
2014-12-01 16:35:20 -08:00
Dongwon Kang
993f81e238 TIF: fix a race condition when TvInputManager is initialized
Currently, TvInputManagerService notifies the initial state of each
input via TvInputManagetCallback#onInputStateChanged after TvInputManager
is created. However, this is racy because the client may call methods
like getTvInputState() before the initialization.

This patch makes sure that the client gets the control when the initialization
finishes completely.

Bug: 18419452
Change-Id: I5d8141c20984013e68f2809120710c670557c9ad
2014-12-02 09:30:57 +09:00
Yuncheol Heo
f17024873b CEC: make it sure to send vendor commands when changing a setting.
- Remove 'oneway' from IHdmiVendorCommandListener.
- Add flush() method to HdmiCecController.
- Use IoThread for HdmiCecController.

Bug: 18495592
Change-Id: I497f7b49e94dd4402058ecc89cb5b7a3d58bf1e1
2014-12-02 07:52:16 +09:00
Craig Mautner
9dba107328 Merge "Force additional layout pass after drawing" into lmp-mr1-dev 2014-12-01 20:56:09 +00:00
Wale Ogunwale
997e632f59 Merge "Added unique id to display devices and their settings." into lmp-mr1-dev 2014-12-01 20:26:06 +00:00
Jeremy Joslin
500f781110 Merge "Fix the ordering of extra values in the PI." into lmp-mr1-dev 2014-12-01 19:36:04 +00:00
Jeff Sharkey
e4a5faa61e Merge "APK still has privileged flag after being moved from "/system/priv-app"" into lmp-mr1-dev 2014-12-01 18:56:57 +00:00
Lorenzo Colitti
829dfa7cd8 Only use mDefaultDns if the network claims to offer Internet
Currently, if a network does not specify DNS servers, we default
it to using 8.8.8.8. This was done because the emulator did not
specify DNS servers. However, it causes queries to fail slowly,
instead of failing fast, on networks that do not have
connectivity to 8.8.8.8.

Bug: 18327075
Change-Id: I0df13ff4a17ee65e640be96695a3af31b020963a
2014-12-02 03:40:16 +09:00
Amith Yamasani
731a5c1a29 Merge "Fix parsing bug that affects reading back guest restrictions" into lmp-mr1-dev 2014-12-01 18:32:11 +00:00
Akira Numata
48e17629b0 APK still has privileged flag after being moved from "/system/priv-app"
When an app is moved from "/system/priv-app" to another location
during OTA update, the privileged flag should be removed.

(cherry picked from commit 76bf60ead8132b86436ebbba40eaa8f2c8bbe812)

Change-Id: I39feeac7ece89c28045d196ae69fc974b1c6510b
2014-12-01 09:38:48 -08:00
Narayan Kamath
1d184acefa resolved conflicts for merge of 7377998d to lmp-mr1-dev
Change-Id: I21870e241de7d992e97d7b91e0058f85b5a25fbe
2014-11-27 09:57:35 +00:00
Jeremy Joslin
a68e7d730c Fix the ordering of extra values in the PI.
Bug: 18539720
Change-Id: I6bb69394b05923ca25bc1b4902bc2540a13812bd
2014-11-26 14:24:15 -08:00
Wale Ogunwale
361ca21acc Added unique id to display devices and their settings.
The display setting saved to disk were using a localized name for
the key. This is an issue if the user changes languages after the
display settings have been saved. We now use the non-localized
name for the display to access the settings if it is available,
else we fall back on the localized name.

Bug: 18190800
Change-Id: I837c06a8935df10727229a1aa2bb6eeb3953707f
2014-11-26 13:40:52 -08:00
Jeff Sharkey
293f0f380b Merge "package_info GID shouldn't have write." into lmp-mr1-dev 2014-11-26 18:49:33 +00:00
Craig Mautner
7641e817e5 Force additional layout pass after drawing
If AppWindowToken.allDrawn is changed from true to false an
additional layout pass is required to change WindowStateAnimator.
mDrawState from READ_TO_SHOW to HAS_DRAWN.

Fixes bug 18456175

Change-Id: Iddac657e5303a4154309889417374c0c6994c4df
2014-11-26 09:50:18 -08:00
Jeff Davidson
8c99018a98 Merge "Handle package changes in NetworkScoreService." into lmp-mr1-dev 2014-11-26 15:55:18 +00:00
Paul Jensen
be3736d387 Merge "Don't let NetworkMonitor state stop user-initiated transitions." into lmp-mr1-dev 2014-11-26 12:05:01 +00:00
Narayan Kamath
7377998dac resolved conflicts for merge of a42f7c1d to lmp-sprout-dev
Change-Id: I8e53c9d7e0014b4ffc621c561b737aa2dae5460c
2014-11-26 10:39:08 +00:00
Jinsuk Kim
1c72ba8ac3 Merge "CEC: Do not compare active input when updating" into lmp-mr1-dev 2014-11-26 05:58:40 +00:00
Dianne Hackborn
4298db73ce Merge "Re-tune low memory killer params." into lmp-mr1-dev 2014-11-26 01:44:22 +00:00
Dianne Hackborn
824aeab2db Re-tune low memory killer params.
Drop the minimums back down to their old values.

Revert what I think was a mistake in bumping up the last two
maximums to the same value as was being forced for 64 bit.

Smarten the 64 bit adjustment to be relative to the values picked,
rather than hard-coded.

Change-Id: Ibee9625073469ad4722a1b6684c9fb2b9f0a4681
2014-11-25 17:26:36 -08:00
Christopher Tate
7265abe77a Be increasingly aggressive about fstrim if it isn't being run
The current heuristics depend on devices being alive at midnight+ in
order to run periodic background fstrim operations.  This unfortunately
means that people who routinely turn their devices off overnight wind
up with their devices *never* running fstrim, and this causes major
performance and disk-life problems.

We now backstop this very-friendly schedule with an increasingly
aggressive one.  If the device goes a defined time without a background
fstrim, we then force the fstrim at the next reboot.  Once the
device hits the midnight+ idle fstrim request time, then we already
aggressively attempt to fstrim at the first available moment
thereafter, even if it's days/weeks later without a reboot.

'Available' here means charging + device idle.  If the device never
becomes idle then we can't do much without rendering an in-use device
inoperable for some number of minutes -- but we have no evidence of
devices ever failing to run fstrim due to this usage pattern.

A new Settings.Global element (type 'long', called
"fstrim_mandatory_interval") is the source of the backstop time.  If
this element is zero or negative, no mandatory boot-time fstrim will
ever be performed.  If the element is not supplied on a given device,
the default backstop is 3 days.

Adds a new string to display in the upgrading dialog when doing
the fstrim.  Note it is too late for this to be localized, but since
this operation can take a long time it is probably better to have
it show *something* even if not localized, rather than just sit there.

Bug 18486922

Change-Id: I5b265ca0a65570fb8931251aa1ac37b530635a2c
2014-11-25 16:35:06 -08:00
Amit Mahajan
3749541a20 Merge "Adding helper functions to retrieve settings that are stored per subId." into lmp-mr1-dev 2014-11-25 20:39:09 +00:00
John Spurlock
bc6f59a1ef Merge "VolumeZen: Introduce internal vs external ringer mode." into lmp-mr1-dev 2014-11-25 18:40:55 +00:00
John Spurlock
661f2cf458 VolumeZen: Introduce internal vs external ringer mode.
Stabilize mapping between ringer-mode=silent and zen=priority
by keeping track of two ringer modes:
 - Internal ringer mode: Used for underlying stream muting
 - External ringer mode: Reported to clients

The mapping between external ringer mode + zen is:
 - normal = all
 - vibrate = all
 - silent = priority (read-write) or none (read)

Changes include:
 - Remove "zen check" from audio service, back to audio
   service having no knowledge of zen.
 - Maintain a new external ringer mode in audio service,
   this is the ringer mode reported through AudioManager
   to callers, also mapped to the change intent.
 - Introduce a "ringer mode delegate" to the local
   audio manager interface, responsible for observing
   external / internal mode changes, and making changes
   if necessary.
 - Internal ringer mode changes are still interesting
   to the volume dialog, wire up a callback through
   the existing IVolumeController interface.
 - On devices without vibration, the mapping is the same
   but since no ringer mode change is possible, disable
   the icon toggle and remove the mute icon when volume=0.
 - On devices with vibration, volume down presses should
   pulse the vibrate icon (and vibrate) as a hint that this
   is as low as the device can go using the keys.  Since
   the mechanics are similar to the existing zen=none hint,
   pull into shared helper.
 - Log ringer mode changes to the zen log, include calling
   package information for issue diagnosis.
 - Include whether vibration is supported in the audio service
   dump.
 - Update the status bar icon policy to use the internal ringer
   mode, not the external mode (for vibrate icon).
 - Update the "Muted by <x>" logic, include current suppressor
   in dumpsys, ensure suppression icon is enabled & !clickable,
   regardless of zen mode.

Bug: 17884168
Bug: 15471679
Bug: 16824970
Change-Id: Ia7d3bb23ce6d1e37b24fb6521d1c1ab9bb8f60c0
2014-11-25 13:20:46 -05:00
Andres Morales
59093d925d Merge "Define permission for system apps to query size of block" into lmp-mr1-dev 2014-11-25 17:35:21 +00:00
Andres Morales
6b0c7acd7f Define permission for system apps to query size of block
Allows ManagedProvisioning to determine whether there's a
challenge and thus whether to disable NFC provisioning.

Other implementation option: new hidden boolean API method.
Can't think of benefit of new API method "isBlockInUse", other
than doesn't leak PDB size and is more explicitly tied to the
use case. Open to either impl if anyone has opinions on the matter.

Bug: 18508767
Change-Id: I28d2eb5a0837ff85cb91f140b17ce1dd843fe9d6
2014-11-25 15:55:28 +00:00
Jinsuk Kim
449c019f22 CEC: Do not compare active input when updating
A recent change sets the active path ahead of calling
updateActiveInput. Removes the check between new and active
path as it is always successful thus stops the flow.

Bug: 18506537
Change-Id: I29471ffc6194baa1fad62063f1d192caa9000afd
2014-11-25 15:01:56 +09:00
Alan Viverette
662039c687 Merge "Update IME selection dialog layout for Material" into lmp-mr1-dev 2014-11-25 00:53:43 +00:00
Amit Mahajan
421a53900d Adding helper functions to retrieve settings that are stored per subId.
Bug: 18392680
Change-Id: I360bc19c4501020afd9dfa1cfb7e66ce2fad9536
2014-11-24 15:57:41 -08:00
Alan Viverette
505e3abb8d Update IME selection dialog layout for Material
Also cleans up simple_list_item_2.xml formatting.

BUG: 18314215
Change-Id: I12b6ff19fca891524da7137b85dd576f85ee266a
2014-11-24 15:22:11 -08:00
Tom Taylor
4cd3e47e58 Merge "Issues with messaging apps on non-primary user account" into lmp-mr1-dev 2014-11-24 23:14:42 +00:00
Jeff Sharkey
aebb65cb68 package_info GID shouldn't have write.
Fix permissions on packages.list and package-usage.list to only
allow read access from the package_info GID.

Bug: 18473765
Change-Id: I9b9ef13f4a00a8355619bbcdacc836f9abfa0376
2014-11-24 15:00:18 -08:00