Commit Graph

626 Commits

Author SHA1 Message Date
Elliott Hughes
c951761164 resolved conflicts for merge of fc136843 to stage-aosp-master
Change-Id: I4791f0ffa324a313b8390fbde6d8f82f716ecf74
2013-06-28 16:41:19 -07:00
Elliott Hughes
fc136843fc Merge "Switch frameworks/base over from @hidden Charsets to public StandardCharsets." 2013-06-28 23:31:35 +00:00
Elliott Hughes
aa40ac667e Switch frameworks/base over from @hidden Charsets to public StandardCharsets.
Bug: 3484927
Change-Id: I5d136d2ee629588538602766a182ae14ce5fc63c
2013-06-28 16:24:48 -07:00
Vinit Deshapnde
930a8513db Fix an NPE in NsdManager
The NPE happens because NSD Manager doesn't always notify with a 'good'
notification for SERVICE_FOUND. It can get in a situation where a
SERVICE_FOUND is recevied from MDnsDs demon when processing StopDiscovery
on the messaging thread. When that happens, NsdService sends a message
to NsdManager with an invalid index of the listener.

The fix is twofold. First, we fix NsdService to not generate a message if
it doesn't have a good listener index. And second, we also fix NsdManager
to watch for invalid index.

Change-Id: I3d63af10bded13c72e8e437a1ebf74a666760432
2013-06-25 19:45:03 -07:00
The Android Open Source Project
316ee71f18 am d163b18c: (-s ours) Reconcile with jb-mr2-release jb-mr2-zeroday-release - do not merge
* commit 'd163b18c155aa5bf34730bdc2467d3e759b4a269':
  Import translations. DO NOT MERGE
  Do not allow 0 or smaller periodicity for syncs. b/9295383
  Save Notification large icon to extras.
  Workaround possible use after delete
  Do not block notifications or toasts for SYSTEM_UID or PHONE_UID.
  Don't orphan footers with transient state Bug #8725945
  Avoid logging sensitive data.
2013-06-11 15:37:06 -07:00
The Android Open Source Project
d163b18c15 Reconcile with jb-mr2-release jb-mr2-zeroday-release - do not merge
Change-Id: I7100db02d39d7d91bb3c2b8eea070a48a8f7c139
2013-06-11 14:56:52 -07:00
Jeff Sharkey
0608373482 Avoid logging sensitive data.
When building commands to send across NativeDaemonConnector, scrub
sensitive arguments to prevent them from being logged.

Bug: 8609800
Change-Id: I84b16791749264a010f7e59f9918f68d71bac6b9
2013-06-10 15:17:32 -07:00
Kenny Root
c4af47ebf9 resolved conflicts for merge of e96a8207 to master
Change-Id: I90801b35ed0c00078a47faadc7fbb05d2e5fe381
2013-06-10 11:09:28 -07:00
Jeff Sharkey
682fa4bd0b Avoid logging sensitive data.
When building commands to send across NativeDaemonConnector, scrub
sensitive arguments to prevent them from being logged.

Bug: 8609800
Change-Id: I84b16791749264a010f7e59f9918f68d71bac6b9
2013-06-07 15:09:32 -07:00
Robert Greenwalt
a6f2ecd2c0 am 8c04cd04: am 341666c4: Merge "Fix sync problem in NsdManager" into jb-mr2-dev
* commit '8c04cd041dfc96ef4af662d50aad63d998314d27':
  Fix sync problem in NsdManager
2013-05-06 16:20:30 -07:00
Dianne Hackborn
f7c56ef9dd Start combining threads in system process.
This introduces four generic thread that services can
use in the system process:

- Background: part of the framework for all processes, for
work that is purely background (no timing constraint).
- UI: for time-critical display of UI.
- Foreground: normal foreground work.
- IO: performing IO operations.

I went through and moved services into these threads in the
places I felt relatively comfortable about understanding what
they are doing.  There are still a bunch more we need to look
at -- lots of networking stuff left, 3 or so different native
daemon connectors which I didn't know how much would block,
audio stuff, etc.

Also updated Watchdog to be aware of and check these new
threads, with a new API for other threads to also participate
in this checking.

Change-Id: Ie2f11061cebde5f018d7383b3a910fbbd11d5e11
2013-05-02 17:42:40 -07:00
Robert Greenwalt
7aa7bb4dfb Fix sync problem in NsdManager
The NsdManager init was thinking it was done before the AsyncChannel
was fully setup and if the setup were slow and the app fast, the app
could make calls to the NsdManager that it wasn't ready for.

bug:8545006
Change-Id: I2cb2a7c0a1c7f3d2b81ac0f66d37346e6d2d720d
2013-05-02 15:45:32 -07:00
Irfan Sheriff
54824c9538 Add support for setMiracastMode
Usage is setMiracastMode(WifiP2pManager.MIRACAST_SOURCE) or
setMiracastMode(WifiP2pManager.MIRACAST_SINK) as an example.
Only available for internal use and can be called as long as
driver is active. P2p connection is not needed for it to be
called

Bug: 8493089
Change-Id: I1f87eaf3311212aae980077de26c05651a8cc811
2013-03-28 10:27:17 -07:00
Jeff Sharkey
39fb9cd9c2 Update TrafficStats docs to reflect behavior.
Bug: 8399623
Change-Id: If9ccd305e8a077f318a09ac1bb160b8efbf903aa
2013-03-26 13:46:09 -07:00
JP Abgrall
7de8125565 jni: net.TrafficStats: fix getIfaceStat, have it use the iface.
Missing iface8 in call to parseIfaceStats().

Bug: 8304054
Change-Id: Ibb01d86a0f7241cdd8f23401973840673f847efb
2013-03-04 18:53:07 +00:00
Dianne Hackborn
e3cbff53a4 Merge "Add version code constant for JB MR2." into jb-mr2-dev 2013-02-25 23:56:38 +00:00
Dianne Hackborn
e9d7207f86 Add version code constant for JB MR2.
Change-Id: I60fc76bbeb3c5e85d716179e9e3ea5758bafaf69
2013-02-25 15:55:37 -08:00
Jeff Sharkey
26c10de1b7 Require command and argument separation, cleanup.
When invoking NativeDaemonCommands, require that base command and
arguments are separate.  Clean up reverse tethering commands, and
remove deprecated throttle events.

Change-Id: I302a74130b4f7c3f3045815a56d566e89c8969f6
2013-02-25 11:02:50 -08:00
Jeff Sharkey
6d9c71ab65 Remove sscanf() warnings when parsing stats.
Change-Id: I15b7ba93d7ec121f9a7e19926f7436f2117b3b1a
2013-02-13 18:13:01 -08:00
Jeff Sharkey
51c819c4ea Parse network stats using native code.
Switch to parsing detailed network stats with native code, which
is 71% faster than ProcFileReader.

Change-Id: I2525aaee74d227ce187ba3a74dd08a2b06514deb
2013-02-13 17:40:49 -08:00
Jeff Sharkey
805bdac0a0 Use safe buffer sizes when parsing network stats.
Change-Id: I1733c1ddc48f9410136aee7af7889fdc7be8cc10
2013-02-07 15:02:55 -08:00
Jeff Sharkey
5fee2c9ee2 Improve TrafficStats UID APIs.
Deprecate transport layer statistics, leaving only the summarized
network layer statistics.

Improve documentation to be clear about layers where measurements
occur, and their behavior since boot.  Under the hood, move to using
xt_qtaguid UID statistics.

Bug: 6818637, 7013662
Change-Id: I9f26992e5fcdebd88c671e5765bd91229e7b0016
2013-02-07 13:59:26 -08:00
Jeff Sharkey
9e766ac165 Offer parsed TCP interface statistics.
Also switch to newer iface_stat_fmt numbers, which are measured at
XT level instead of dev.

Bug: 7903145, 6569689
Change-Id: Ibeb742966b8c89916ea31a49388a5dbe25a5f67f
2013-02-06 16:23:12 -08:00
Irfan Sheriff
7ea4797b4f am 26aad112: am 97e4518e: Merge "NsdService: Clear client info after resolution request is serviced."
* commit '26aad1128726b2bea374b52f826831d117815025':
  NsdService: Clear client info after resolution request is serviced.
2012-12-28 09:47:03 -08:00
Irfan Sheriff
26aad11287 am 97e4518e: Merge "NsdService: Clear client info after resolution request is serviced."
* commit '97e4518ef8cad0cbbb8d3ea78615098c26b6a0de':
  NsdService: Clear client info after resolution request is serviced.
2012-12-21 10:07:24 -08:00
Irfan Sheriff
97e4518ef8 Merge "NsdService: Clear client info after resolution request is serviced." 2012-12-20 14:43:17 -08:00
Jeff Sharkey
86230aca66 Fix metered SSID matching regression.
WifiInfo changed to return SSIDs with quotes included, so relax our
identity matching to accept matches regardless of quotedness.

Bug: 7695807
Change-Id: Ib5d06666035e06b2d4b2f7cb498767d63b1b1828
2012-12-18 17:07:01 -08:00
Robert Greenwalt
bded8b7b0d am 378bdacc: am b30a24c4: Merge "return value of String.replace() is ignored."
* commit '378bdaccbb79ee11662725a18355dda64690f416':
  return value of String.replace() is ignored.
2012-12-11 16:54:33 -08:00
Robert Greenwalt
378bdaccbb am b30a24c4: Merge "return value of String.replace() is ignored."
* commit 'b30a24c4db8d2ed5f3ecfda0f6197fa974ae56d7':
  return value of String.replace() is ignored.
2012-12-11 16:52:39 -08:00
Robert Greenwalt
b30a24c4db Merge "return value of String.replace() is ignored." 2012-12-11 16:34:35 -08:00
The Android Open Source Project
5c610497a8 am b04fea02: (-s ours) Reconcile with jb-mr1.1-release - do not merge
* commit 'b04fea024358435114427d53ef2bbff7cf07db7c':
2012-12-03 16:41:16 -08:00
The Android Open Source Project
b04fea0243 Reconcile with jb-mr1.1-release - do not merge
Change-Id: I3fbcd93e4cef710bf1562bc7844f4a62f3146e02
2012-12-03 16:39:07 -08:00
The Android Automerger
d7633bb0ad merge in jb-mr1.1-release history after reset to jb-mr1.1-dev 2012-12-03 15:54:28 -08:00
Jeff Sharkey
f057fea5b9 am bf76d97d: am 1f8f2839: am ed3fba65: Merge "Avoid null mobile interfaces." into jb-mr1.1-dev
* commit 'bf76d97d78b0e89eb524c472c15aa249ab4c1c26':
  Avoid null mobile interfaces.
2012-12-03 11:42:50 -08:00
Jeff Sharkey
bf76d97d78 am 1f8f2839: am ed3fba65: Merge "Avoid null mobile interfaces." into jb-mr1.1-dev
* commit '1f8f283975c7cf51081acd3ea494de2b5f431607':
  Avoid null mobile interfaces.
2012-12-03 11:40:23 -08:00
Jeff Sharkey
17ffba9700 Avoid null mobile interfaces.
Bug: 7634215
Change-Id: I6745f6a78c07ba11d98b4562a6b53386112ef652
2012-11-30 17:49:39 -08:00
The Android Open Source Project
6d155a4181 am 14418170: (-s ours) Reconcile with jb-mr1.1-release - do not merge
* commit '14418170ff49169130b05e51ac923206de0568e1':
  trigger kernel blocked stack trace on system server watchdog
2012-11-29 15:47:09 -08:00
The Android Open Source Project
14418170ff Reconcile with jb-mr1.1-release - do not merge
Change-Id: Ib7a3e7b3af9ef848b763cf498c6757ad5658fc80
2012-11-29 15:41:04 -08:00
Kenny Root
ebdcabef44 am 49e27d5f: am ae0edeb3: am c88047bf: Merge "Move NTP updates outside locks"
* commit '49e27d5f9d77316350be6a119bad717d38ce5d95':
  Move NTP updates outside locks
2012-11-27 18:42:45 -08:00
Kenny Root
49e27d5f9d am ae0edeb3: am c88047bf: Merge "Move NTP updates outside locks"
* commit 'ae0edeb3e56c6aae113f8c5eaa3a03b79c00a93e':
  Move NTP updates outside locks
2012-11-27 13:00:01 -08:00
The Android Automerger
c8c2da1d00 merge in jb-mr1.1-release history after reset to jb-mr1.1-dev 2012-11-16 11:29:29 -08:00
Jeff Sharkey
45dfdd6bc8 am 624a1eec: am bfea4f04: am f5377a72: Merge "Useful annotations for code documentation." into jb-mr1.1-dev
* commit '624a1eec46b507067e31f3d6979bb3758c8b65e1':
  Useful annotations for code documentation.
2012-11-16 10:37:59 -08:00
Anders 3 Fridlund
0e851c78e3 Move NTP updates outside locks
When the ServerThread handles ACTION_SHUTDOWN intent it sometimes get
stuck on mStatsLock in NetworkStatsService.java.
0  com.android.server.net.NetworkStatsService$5.onReceive()
1  android.app.LoadedApk$ReceiverDispatcher$Args.run()
2  android.os.Handler.handleCallback()
3  android.os.Handler.dispatchMessage()
4  android.os.Looper.loop()
5  com.android.server.ServerThread.run()
This happens when the NetworkStats thread is already holding the
mStatsLock while updating NTP.
0  libcore.io.Posix.getaddrinfo()
1  libcore.io.ForwardingOs.getaddrinfo()
2  java.net.InetAddress.lookupHostByName()
3  java.net.InetAddress.getAllByNameImpl()
4  java.net.InetAddress.getByName()
5  android.net.SntpClient.requestTime()
6  android.util.NtpTrustedTime.forceRefresh()
7  com.android.server.net.NetworkStatsService.performPoll()
8  com.android.server.net.NetworkStatsService.access$100()
9  com.android.server.net.NetworkStatsService$2.onReceive()
10 android.app.LoadedApk$ReceiverDispatcher$Args.run()
11 android.os.Handler.handleCallback()
12 android.os.Handler.dispatchMessage()
13 android.os.Looper.loop()
14 android.os.HandlerThread.run()
Since the NTP update consists of several socket operations it may get
stuck long enough to trigger a System Server Watchdog even though the
socket timeout is set to 20 second.
Further, the NTP update doesn't actually need to be performed inside
the locks and an attempt to change this was made earlier, but the code
wasn't actually moved outside the locks.

Change-Id: Ib37a2b8c2d51a01adb7ff01764f82309433703f0
2012-11-16 13:28:29 +01:00
Jeff Sharkey
624a1eec46 am bfea4f04: am f5377a72: Merge "Useful annotations for code documentation." into jb-mr1.1-dev
* commit 'bfea4f04f226f1adf374412628d5945c380382a7':
  Useful annotations for code documentation.
2012-11-15 11:56:19 -08:00
The Android Open Source Project
80fd441ee9 am 3e8ca675: (-s ours) Reconcile with jb-mr1.1-release - do not merge
* commit '3e8ca6759e6a3cde0c72bb9d1830cef8f77d5485':
2012-11-14 12:42:57 -08:00
The Android Open Source Project
3e8ca6759e Reconcile with jb-mr1.1-release - do not merge
Change-Id: I8bc0bebd74908751627e9e8e4100111b39e48710
2012-11-14 12:40:58 -08:00
The Android Automerger
29e0ddac72 merge in jb-mr1.1-release history after reset to jb-mr1.1-dev 2012-11-14 11:28:16 -08:00
Jeff Sharkey
526438dbe6 Useful annotations for code documentation.
Bug: 6537978
Change-Id: I806c3c09e3255f8789455f13bf37c1dde2a93f1f
2012-11-12 12:42:17 -08:00
The Android Open Source Project
a9be4f522d am cd3eb048: (-s ours) Reconcile with jb-mr1.1-release - do not merge
* commit 'cd3eb048ced78a5790bc8626842a6b82c8db7812':
2012-11-06 12:40:19 -08:00
The Android Open Source Project
cd3eb048ce Reconcile with jb-mr1.1-release - do not merge
Change-Id: Iff336b51ffc2893168e67406d96bc6dd97735b7e
2012-11-06 12:37:23 -08:00