7880 Commits

Author SHA1 Message Date
Dianne Hackborn
bfd89b35ba Don't forget to close files.
Change-Id: Ibfe465e1d7a947bbe40da17e8e8a2713856f95b5
2011-12-15 18:22:54 -08:00
Glenn Kasten
cf45596da3 Merge "Improve resistance to leaks for ConfigEvent" 2011-12-15 16:17:04 -08:00
Glenn Kasten
2efd1184f9 Merge "Use NULL not 0 for pointers" 2011-12-15 16:16:55 -08:00
Joe Onorato
44fcb83b38 Add a new ui mode for "appliance"
The idea is that this is a device which is more-or-less headless.  It
might have some limited interaction capabilities, but it's not something
that you want to rely on having.

Change-Id: Ib92f53a120bf83de781728011721a4859def7d9f
2011-12-15 16:16:14 -08:00
Glenn Kasten
afb40b5fcf setActiveTrack and setBufferProvider can't fail
Return void, not status_t, from setActiveTrack and setBufferProvider.

These methods returned status_t, but the callers never checked the
return value.  Since these aren't externally visible APIs, they now
return void, and assert on bad input parameters.

Change-Id: I530ed29484596ae41e8659826ca425149c51c2a1
2011-12-15 15:55:51 -08:00
Jeff Sharkey
3df273e458 Move NMS observers to RemoteCallbackList.
Internally uses Binder.linkToDeath() to handle case where remote
observer dies.

Change-Id: I9ae0ee6e011a9715172fa079098b108f895ae956
2011-12-15 15:55:00 -08:00
Jeff Sharkey
27c751dc00 Merge "Restrict app data on metered networks." 2011-12-15 15:37:21 -08:00
Glenn Kasten
af62dbca02 Simplify enable/disable mixing
The MIXING enum isn't needed, and now returns void instead of status_t.

Change-Id: Ibe4ec24081d75ad4ab78b9c7191fc9077959c4e9
2011-12-15 15:00:28 -08:00
Jeff Sharkey
f60d0afd1e Restrict app data on metered networks.
This separates the definition of "metered network" and "network with
limit."  For now, all mobile networks are considered metered.

Bug: 5571454
Change-Id: I394cd385bd33add75e53bfc9cf2fefd06a00208a
2011-12-15 14:30:04 -08:00
Glenn Kasten
4b220f0a7b Improve resistance to leaks for ConfigEvent
A Vector of pointers is risky, as there is no ownership (and the
ThreadBase destructor was not deleting them, so if there were any left
over at end it would leak).  Replaced by a Vector of values.

Change-Id: Iddde72dc30134adfcf724dec26cbe0a742509b8c
2011-12-15 12:51:52 -08:00
Marco Nelissen
18cb28756c Add ContentProvider.dump()
This is similar to the existing dump() facility for services.
ContentProviders can now implement dump() and that info will be shown
when running "dumpsys activity provider" and when taking a bugreport.

Change-Id: I33b3b132e3c4f920153355cc368eda2f725a715f
2011-12-15 12:13:59 -08:00
Jeff Sharkey
8a0a72c7c1 Merge "Move NMS to CONNECTIVITY_INTERNAL permission." 2011-12-15 11:53:05 -08:00
Glenn Kasten
c434c90cc2 Use NULL not 0 for pointers
Change-Id: Iab3f9abbdab617dc5a599e657ec46a0b0a002eef
2011-12-15 09:18:17 -08:00
Jeff Sharkey
4529bb66c4 Move NMS to CONNECTIVITY_INTERNAL permission.
Change-Id: I6043c1b9cb10aeeafb93d1b5c60da571d2fec5c9
2011-12-14 17:51:13 -08:00
Glenn Kasten
25adf47477 Merge "Fix indentation and whitespace" 2011-12-14 17:35:36 -08:00
Glenn Kasten
927cc6c7e8 Merge "Improve AudioFlinger error logging" 2011-12-14 17:35:24 -08:00
Glenn Kasten
a55d4f9dab Merge "AudioMixer uninitialized simple fields" 2011-12-14 17:35:14 -08:00
Glenn Kasten
a763b44ee1 AudioMixer uninitialized simple fields
Change-Id: I47e3849f048d4d990c9634f9c8a2ca2de0339e93
2011-12-14 17:25:28 -08:00
Glenn Kasten
9818a9da59 Improve AudioFlinger error logging
Change-Id: I8ce9aff4038cd7fa0067600faa8080b137db1939
2011-12-14 17:22:40 -08:00
Glenn Kasten
da7923ac29 Merge "Audio C++ comments" 2011-12-14 16:56:31 -08:00
Glenn Kasten
fb2ab9efc3 Fix indentation and whitespace
Use git diff -w to verify.

Change-Id: Ib65be0a1ecf65d6cad516110604e3855bf68a638
2011-12-14 16:54:05 -08:00
Glenn Kasten
3e62a5bd8c Merge "Use const char correctly in AudioFlinger" 2011-12-14 15:40:35 -08:00
Glenn Kasten
478e37d60c Merge "Use units after all times" 2011-12-14 15:40:27 -08:00
Glenn Kasten
46f54359b6 Merge "Remove redundant clear()" 2011-12-14 15:40:01 -08:00
Glenn Kasten
788b3120e2 Merge "Fix includes" 2011-12-14 15:39:52 -08:00
Glenn Kasten
e5fb263a36 Audio C++ comments
Change-Id: I84906ebb9dfcfa5b96b287d18364b407f02a30c1
2011-12-14 14:38:26 -08:00
Glenn Kasten
778170d705 Fix includes
Remove unused #include dlfcn.h

Add #include String8.h
Forward class declaration is only for references and pointers.
In this case, we need the full class declaration,
and were incorrectly depending on another header file to do it.

Change-Id: Iff65cceb3982698cc1ebaeec405695fc190c03ff
2011-12-14 13:33:51 -08:00
Glenn Kasten
51e445f701 Remove redundant clear()
Change-Id: Ie5e4e63cbc8fa85ef50451dddf8f149fa864b132
2011-12-14 13:31:40 -08:00
Glenn Kasten
62de3db2d6 Use const char correctly in AudioFlinger
Use const char [] instead of const char * to eliminate unnecessary pointer.
Make the array audio_interfaces also const, in addition to the strings.

Change-Id: I31f33d1dcb9a657ee136f4280fd2d46492496831
2011-12-14 13:14:22 -08:00
Irfan Sheriff
dd73df35b8 Merge "Track scan count by UID" 2011-12-14 12:06:00 -08:00
Irfan Sheriff
8cef06798e Track scan count by UID
Helps track down misbehaving apps that are initiating
too many scans

Bug:5722180
Change-Id: I0bc396cf5e68ed53b900e8a65abb56acdbd8d8a5
2011-12-14 10:58:49 -08:00
Jeff Sharkey
17b2890487 Merge "Avoid reading network stats when disabled." 2011-12-14 10:12:17 -08:00
Glenn Kasten
cbfe2e1d52 Use units after all times
Change-Id: I48d3f29c37228b5d03189e4c9600824c9360cac9
2011-12-14 09:42:18 -08:00
Jeff Sharkey
418d12dc8f Avoid reading network stats when disabled.
Bug: 5518868
Change-Id: Idb5c588b018bf735597ad7ff904ecc69224dd0a0
2011-12-13 15:43:47 -08:00
Makoto Onuki
d73b79bb31 Cherry-picking Id45abeba and Ia065dec6 for MR1
-------------------------------------------------------
MCC detection fixes for CountryDetector

- Don't get and cache phone tpe at the initialization time.  At this point
TelephonyManager is probably not ready yet.

- Refresh MCC whenever we get the service state changed callback, even when
the state hasn't actually changed, in order to make sure we get refresh
country properly when MCC changes.

- Also remove the initialization of mPhoneStateListener, which prevented us from
registering phone state listener properly.

- Also fix tests which were already failing.

Bug 5670680

-------------------------------------------------------
Add logging to country detector logic

This is for debugging purposes to verify the effects of
change Id45abeba1b1e843053ac2c946861b439ca568de4.

Bug: 5670680
Change-Id: I238d953484e2c8135f7dac70fce8662c8300a286
2011-12-13 14:02:32 -08:00
Dianne Hackborn
ee4d45f305 am 0be53567: am 19a06fe9: Merge "Fix issue #5755172: Soft menu key disappears when menu is open" into ics-mr1
* commit '0be53567c1c2299c548d3204d2b9240108fbd53a':
  Fix issue #5755172: Soft menu key disappears when menu is open
2011-12-13 13:44:14 -08:00
Dianne Hackborn
73ab6a49db Fix issue #5755172: Soft menu key disappears when menu is open
We need to work more like before in determining whether the menu
key is needed -- in some cases look back in the window list to
determine this if we don't know the value from the current window.

This requires adding a new private flag indicating whether the
compat menu state is known for a window, which is set by
PhoneWindow as part of its existing process of computing the flag
for its own windows.

Now we can have a new API on WindowState to determine the value
of this flag for a window, which if needed walks back in the window list
to find a window the value is known for (or stops at what the policy
has determined is the top full-screen window, so we stop like we used
to at things like the lock screen or the bottom of an application).

Change-Id: I829de6d629b5af8bcb422cb85249ee4041c7205e
2011-12-13 11:32:11 -08:00
Jeff Sharkey
4dbfa44a21 am f0213bf1: am f0bbc494: Merge "Avoid NPE when missing network stats." into ics-mr1
* commit 'f0213bf1833e49744b29be97e44c3e9eaad9449d':
  Avoid NPE when missing network stats.
2011-12-12 20:23:47 -08:00
Jeff Sharkey
d04ff11d6f Avoid NPE when missing network stats.
Bug: 5750339
Change-Id: I4b739dbd076b270a5a2b2e2a1e0f6e445d8c124e
2011-12-12 18:51:26 -08:00
Katherine Kuan
da123492de Add logging to country detector logic
This is for debugging purposes to verify the effects of
change Id45abeba1b1e843053ac2c946861b439ca568de4.

Bug: 5670680
Change-Id: Ia065dec6ba651e7e77205f812b7606b15eebdc17
2011-12-12 18:07:58 -08:00
Irfan Sheriff
afb847a469 Merge "Clean up synchronization" 2011-12-12 15:35:25 -08:00
Irfan Sheriff
e744cfff7c Clean up synchronization
- Add delayed disk write in WifiConfigStore
- Remove synchronization and keep all access to config store
throught the state machine thread

Change-Id: I53768a17895e48da7b99542ac95c6c2fddbcb021
2011-12-12 15:00:02 -08:00
Robert Greenwalt
cc579b89fc Merge "Use the carrier-given dns addrs for tethering." 2011-12-12 14:02:02 -08:00
Chia-chi Yeh
2339fe3f8f am fa71962f: am 46a4e81d: Merge "VPN: delete the "abort" file before starting VPN daemons." into ics-mr1
* commit 'fa71962fe4595f484071ac0deb23f68d44932d83':
  VPN: delete the "abort" file before starting VPN daemons.
2011-12-12 13:15:34 -08:00
Irfan Sheriff
d9dc7fe61e am c34306e4: am 97ff7893: Merge "Fix wifi bring up at boot up" into ics-mr1
* commit 'c34306e46e0f53a9478216c2d5fd3129a3bc6f8e':
  Fix wifi bring up at boot up
2011-12-12 12:35:12 -08:00
Makoto Onuki
95ea6d6d5d Merge "MCC detection fixes for CountryDetector" 2011-12-10 13:23:59 -08:00
Irfan Sheriff
ecd7798ce4 am a3c7c358: am 583fdf00: Merge "Handle emergency call back mode correctly" into ics-mr1
* commit 'a3c7c35873235486787d58fa8310eebd87508bc9':
  Handle emergency call back mode correctly
2011-12-09 18:09:07 -08:00
Makoto Onuki
f9165b7e43 MCC detection fixes for CountryDetector
- Don't get and cache phone tpe at the initialization time.  At this point
TelephonyManager is probably not ready yet.

- Refresh MCC whenever we get the service state changed callback, even when
the state hasn't actually changed, in order to make sure we get refresh
country properly when MCC changes.

- Also remove the initialization of mPhoneStateListener, which prevented us from
registering phone state listener properly.

- Also fix tests which were already failing.

Bug 5670680

Change-Id: Id45abeba1b1e843053ac2c946861b439ca568de4
2011-12-09 17:55:18 -08:00
Robert Greenwalt
bb4fd0b444 Use the carrier-given dns addrs for tethering.
This fixes a complaint from carriers (that we used 8.8.8.8), but also
fixes the case where there is only room for one live radio
connection: the secondary connection (tethering) doesn't have a
default route to prevent on-device traffic from slipping out on the
tethering connection, but tethered dns is proxied through dnsmasq, so
it is appearing as on-device traffic and is unroutable.  By switching
to the carrier-indicated dns servers we can use the host-routes
already set for those and kill two bugs with one fix.

bug:5525764
bug:3045311
Change-Id: Ib1ccea81e0c0ed2d1462dc9721c2647124a790da
2011-12-09 17:12:03 -08:00
Jeff Brown
fa7fa9a5ba am 944c985b: am e0e9fd98: Merge "Fix system hotkey handling." into ics-mr1
* commit '944c985b4199e6e029568ea87004c9727e469cc0':
  Fix system hotkey handling.
2011-12-09 14:25:38 -08:00