1423 Commits

Author SHA1 Message Date
Alex Klyubin
377e70ae9f Stop using 512 bit RSA keys in keyset unit tests.
This switches keyset unit tests from two unrealistically short 512 bit
RSA keys to a more realistic 2048 bit RSA key and a NIST P-256 EC key.

Change-Id: If615b97dff22a2a4f7f0e6015e410e98b8d395cd
2015-12-03 12:52:23 -08:00
Colin Cross
b4ff8e4815 Don't hardcode expected path to mainDexClasses
Use MAINDEXCLASSES defined by the build system instead of manually using
$(HOST_OUT_EXECUTABLES)/mainDexClasses.

Change-Id: Iede13c243ef0c4e374c8e80bab4a995cea76b9b1
2015-12-02 16:24:08 -08:00
Elliott Hughes
ea1831d211 am b57dd722: resolved conflicts for a884d81e to stage-aosp-master
* commit 'b57dd722f1dc0663417da37d3a82f8283ad3c982':
  constify JNINativeMethod function pointer tables
2015-09-24 17:14:10 +00:00
Elliott Hughes
b57dd722f1 resolved conflicts for a884d81e to stage-aosp-master
Change-Id: Ice485967fa96f13786024b6939b826638e906ff0
2015-09-24 10:01:32 -07:00
Daniel Micay
76f6a86de2 constify JNINativeMethod function pointer tables
Change-Id: I4036c924958221cbc644724f8eb01c5de3cd7954
2015-09-22 17:10:35 -04:00
Yuchao Zhou
77ad02fcc3 am c95668c5: am 88daa997: am c38ffecc: Merge "Moving BTtraffic from experiment location to here" into cw-d-mr1-dev
* commit 'c95668c5d4c3d29f8b9d1c0202415e5cbea47416':
  Moving BTtraffic from experiment location to here
2015-09-17 02:45:00 +00:00
Yuchao Zhou
88daa997fc am c38ffecc: Merge "Moving BTtraffic from experiment location to here" into cw-d-mr1-dev
* commit 'c38ffecc348687ae30c5fa2dc1761d9138b406b6':
  Moving BTtraffic from experiment location to here
2015-09-16 22:53:10 +00:00
Yuchao Zhou
2de4b74d80 Moving BTtraffic from experiment location to here
Change-Id: I1b0ec7fba87a098aa6509bd9be3f0e0ff624bf6e
2015-09-16 15:37:40 -07:00
Joshua Schwarz
78daa6d32d am bade9522: am 258a7cd9: Merge "Use LOCAL_MAC_ADDRESS permission in bluetoothtests." into cw-e-dev
* commit 'bade9522cf11141d3bd31ab9d56976a33d05fc64':
  Use LOCAL_MAC_ADDRESS permission in bluetoothtests.
2015-09-03 06:21:11 +00:00
Joshua Schwarz
12fa3d1909 Use LOCAL_MAC_ADDRESS permission in bluetoothtests.
Change-Id: If2b0797a4bc526e1fdb058d83d4d2bc676875cee
2015-09-01 18:03:18 -07:00
Shirish Kalele
4ecee3f88e am 558f1030: am 74f93f9a: am d7408469: am 027e3b7f: Merge "Fix check for caller being the active network scorer" into mnc-dev
* commit '558f10307c65e5c0a3e0e11a4abca4a083f751dc':
  Fix check for caller being the active network scorer
2015-08-07 20:55:42 +00:00
Shirish Kalele
1451df2816 am 027e3b7f: Merge "Fix check for caller being the active network scorer" into mnc-dev
* commit '027e3b7f51cd172dae89f69cc358363b0cf20f5f':
  Fix check for caller being the active network scorer
2015-08-07 20:30:38 +00:00
Shirish Kalele
4cab12d91d Fix check for caller being the active network scorer
Compare caller and scorer uids to decide if caller is the
active scorer instead of calling AppOps.checkPackage().

Bug: 23000690
Change-Id: I64285f965716f3aceb24f193d86ab9d6be7202c5
2015-08-06 12:53:59 -07:00
Erik Kline
f2a08d054c am 49aeed9f: am 5f950417: Merge "Fix use of reachable DNS server logic" into mnc-dev
* commit '49aeed9f3fe7d8e7af2fff549587546dfe4361d1':
  Fix use of reachable DNS server logic
2015-06-30 06:55:42 +00:00
Erik Kline
b36a3131d1 Fix use of reachable DNS server logic
Move reachable DNS server computation out of ConnectivityService
and split it into LinkProperties#isReachable() and a companion
change in WifiStateMachine's makeLinkProperties().

Restore previous ConnectivityService#updateDnses() behaviour, as
the pruning is done in WifiStateMachine now.

Bug: 19470192
Bug: 20733156
Bug: 22098233
Change-Id: I810ef74d504e5dc1ca2017d435cdadd6b82171e6
2015-06-30 12:12:37 +09:00
Yohei Yukawa
c8deda50fe am e564feba: am 4daf600e: Merge "Check system locale when picking up an initial SpellChecker." into mnc-dev
* commit 'e564feba53f71610afb3bc995497e853654fb2d6':
  Check system locale when picking up an initial SpellChecker.
2015-06-29 21:23:24 +00:00
Yohei Yukawa
174843afb6 Check system locale when picking up an initial SpellChecker.
Since Ia25e7b4f308778891929e31b8cbd741f6848cce4, the TSMS has
picked up the first found spell checker no matter regardless of
the system locale.

The primary goal of this CL is to introduce a low-risk fix for
the situation where two or more spell checker services are
pre-installed but they are well different from each other in
terms of supported languages.  Solving the problem in more
ambiguous and complicated situation is beyond the goal of
this CL.

With this CL, we still pick up the first found spell checker
but also require the spell checker supports a certain locale.
We will try several locales starting with the system locale
to some fallback locales until we find one appropriate spell
checker.  If no spell checker is picked up in this process,
we simply pick up the first one as we have done.

Examples about what locales will be checked are:

A. System locale: en_US
  1. en_US
  2. en_GB
  3. en

B. System locale: en
  1. en
  2. en_US
  3. en_GB

C. System locale: en_IN
  1. en_IN
  2. en_US
  3. en_GB
  4. en

D. System locale: ja_JP
  1. ja_JP
  2. ja
  3. en_US
  4. en_GB
  5. en

E. System locale: fil_PH
  1. fil_PH
  2. fil
  3. en_US
  4. en_GB
  5. en

F. System locale: th_TH_TH
  1. th_TH_TH
  2. th_TH
  3. th
  4. en_US
  5. en_GB
  6. en

Bug: 22042994
Change-Id: I094f1c33430f7904a1dac6167431d6df64a07212
2015-06-26 18:02:54 -07:00
Ying Wang
b6b233b9ab am edb36bf7: am 45f143fe: Merge "Remove the obsolete LOCAL_PAGE_ALIGN_JNI_SHARED_LIBRARIES" into mnc-dev
* commit 'edb36bf73d3d38ca0c6a1227fa9d8cdafb0621d0':
  Remove the obsolete LOCAL_PAGE_ALIGN_JNI_SHARED_LIBRARIES
2015-06-26 21:27:17 +00:00
Ying Wang
559ea2fd8c Remove the obsolete LOCAL_PAGE_ALIGN_JNI_SHARED_LIBRARIES
Change-Id: I08c2439bcab934e23c697b93aec47b2c7bcba037
2015-06-26 13:51:18 -07:00
Makoto Onuki
8be96748ea am 4d6b7356: am f97497db: Merge "Fix Formatter.formatBytes() crash on non-EN locales" into mnc-dev
* commit '4d6b7356d89d8f49c550ad17cfd82f8742ab9808':
  Fix Formatter.formatBytes() crash on non-EN locales
2015-06-25 22:26:56 +00:00
Makoto Onuki
c7a14e442d Fix Formatter.formatBytes() crash on non-EN locales
Bug 22012651

Change-Id: I21b1834a35647527002e01d76a7eb3a6a0354512
2015-06-25 14:46:25 -07:00
Nick Kralevich
8fdc944a6f am 26c0b5e3: am 1c7f0860: Merge "overlaytests: fix testrunner.py md5sum invocation"
* commit '26c0b5e31294d4dce13379bc9bccaf555fe1e6c2':
  overlaytests:  fix testrunner.py md5sum invocation
2015-06-19 19:58:46 +00:00
Nick Kralevich
26c0b5e312 am 1c7f0860: Merge "overlaytests: fix testrunner.py md5sum invocation"
* commit '1c7f0860c7d1bf087eefebfb1aa411ffbdfb76e6':
  overlaytests:  fix testrunner.py md5sum invocation
2015-06-19 19:46:28 +00:00
Stephen Smalley
415fa1f5c0 overlaytests: fix testrunner.py md5sum invocation
The overlaytests testrunner.py script wants to invoke adb shell md5sum
to compute the md5 of a file, but wrongly invokes it as md5.  Maybe
it used to have that name, but it doesn't exist under that name in master.
Fix it.

Change-Id: I3ec4be162fab0cd3915f010f9b1add37b5397973
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-06-19 14:37:58 -04:00
Erik Kline
e1a6cf2caa Add a test that Network#getNetworkHandle() behaves sanely.
Additionally:
    - make zero more obvious for debugging, rather than emitting
      some inscrutable magic value.

Bug: 19537384
Change-Id: Iac9a3297a0dda1ba3d69fd01cf6de81f01fd837e
2015-06-15 15:18:38 +09:00
Chris Wren
17de4b2a73 Merge "remove usage of deprecated method setLatestEventInfo" into mnc-dev 2015-06-12 19:28:54 +00:00
Chris Wren
1ce4b6d3c6 remove usage of deprecated method setLatestEventInfo
Bug: 18510449
Change-Id: I56a77991c729990e501f402e007dfa79ee57621e
2015-06-12 10:16:04 -04:00
Jeff Sharkey
4f5e8b3ca4 Valid filenames have length limits!
ext4 filenames are at most 255 bytes.  vfat filenames are bit more
lax, but we're often saving them on ext4 through a FUSE daemon, so
limit them the same way.

Since package names are used as directory names, verify that they're
valid filenames.

Tests to verify behavior.

Bug: 18689171
Change-Id: If7df4c40d352954510b71de4ff05d78259c721ed
2015-06-11 19:16:27 -07:00
Casper Bonde
3b3d1fea94 SAP: Make it possible to enforce a 16-digit pin code (4/5)
This change enable the posibility to enforce using a
16-digit pin or MITM for a RFCOMM or L2CAP connection.

This is needed for the SIM access profile.

Change-Id: I3205013f9e758c353381442a86845dab467780f8
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
2015-06-09 21:42:22 +00:00
Erik Kline
d895999858 Make public Network#bindSocket(FileDescriptor).
Code that uses android.system.Os to create sockets as FileDescriptors
should be able to bind them to networks.  Note that FileDescriptors
could already be marked as "protected from VPNs" via
NetworkUtils#protectFromVpn(), but heretofore were not easily bound
to any particular network.

Bug: 21449922
Change-Id: I4bb86db5d95d5a55bb2d7e245848d11eaa351e65
2015-06-09 16:19:24 +09:00
Yohei Yukawa
92280cd309 Convert subtypes whose locale is "tl" to "fil".
On Android, "tl" is a historic hack for what should really
be "fil". Now that we properly support 3-letter language codes,
we should be using "fil" throughout. Given this historical usage,
IMEs that really want to support Tagalog (and not Filipino)
should use the ISO-639-3 code for Tagalog, which is "tgl".

For backward compatibility reasons, this CL uses the similar
approach to I26e3aa0333aa3c76c80a3c1c9090cc2b368c8e10.
InputMethodSubtype.getLocale() continues to return the "locale"
string parameter passed to the constructor as is, but in the
Android framework we do normalizations/conversions whenever
we need a valid ISO-639-3 code.

In I26e3aa0333aa3c76c80a3c1c9090cc2b368c8e10, we rely on the
conversion in the Locale constructor.  In this CL, we do replace
"tl" with "fil" by ourselves.

This CL also adds InputMethodSubtype#getLocaleObject() a hidden
API so that we can start relying on the Locale object at least
in the framework.

This CL is based on the investigation by Narayan Kamath and his
patch.

Bug: 20696126
Change-Id: I94f203bddceb9c87710cb187cc3cc0ee6d9092a5
2015-06-02 17:09:50 -07:00
Erik Kline
cd7ed16f00 LinkProperties function to compare provisioning and remove DNS servers
Adds:
    - enum ProvisioningChange
    - LinkProperties#compareProvisioning()
          return a ProvisioningChange value describing the delta in
          provisioning between two LinkProperties objects
    - LinkProperties#removeDnsServer()
    - make "@hide public" isIPv4Provisioned() and isIPv6Provisioned()

Bug: 18581716
Change-Id: I3df90b2b89617f693346f2dbe72e77c88ce91ffd
2015-05-21 20:43:47 +09:00
Erik Kline
cef7bc939f Set NLM_F_ACK in our RTM_NEWNEIGH requests
With NLM_F_ACK set in RTM_NEWNEIGH requests we get some response from
the kernel, whether there was an error or not.

Additionally:

    [1] add IpReachabilityMonitor#probeNeighbor() as a public
        static method, since it actually depends very little on the
        class internals and might be of larger use.

    [2] add a unittest for parsing NetlinkErrorMessages.

Bug: 18581716
Change-Id: I5d62e7a9972c7440f0483c38c77677436d3a1a25
2015-05-20 16:46:30 +09:00
Erik Kline
abd3142dca Close netlink socket when shutting down IpReachabilityMonitor
This forces the NetlinkSocketObserver thread to exit quickly, rather
than lingering until the next random netlink neighbor multicast message
arrives.

Additionally, add a small unittest to verify that multiple calls to
NetlinkSocket#close() are safe.

Change-Id: I101730fad7eee72f9c6e8a7e7bd10c634f2ceab4
2015-05-20 12:08:55 +09:00
Yohann Roussel
7bcaf9a997 [DO NOT MERGE] Allow compilation with Jack.
Adapt to Jack compilation specifics.

Fix bad import in VideoDumpActivity.
The extra semicolumn is ignored by javac because of
https://bugs.openjdk.java.net/browse/JDK-8027682 but is not
permitted by ecj or Jack.

This includes cherry-picks of the following changes:
248ef6f9c414db26fd1bc7ec3d4ee4f3b87d54cf
705555dc468e46560d02db102dfcedc1e5c70d9e
f50a51fb4c8d5ca973ce910a21bddf9f8466cb51
bf5ad8d9943c0e1b0b3f1b4524c277f369065d08

Change-Id: Ifbe063e3822a7d63b1681921b9788cfca898ba64
2015-05-19 18:17:39 +02:00
Clara Bayarri
e94561ecbc Merge "Fix Cancelling a text action activity deletes the selected text" into mnc-dev 2015-05-19 10:42:20 +00:00
Erik Kline
9ce5d602cd Add IpReachabilityMonitor#probeAll() to begin doing DNAv4/v6-like probing
Note that this change is not sufficient to force probing in all cases,
but does cause probing to occur on Linux if the target node hasn't been
confirmed as reachable in the past 5 seconds (delay_first_probe_time).

Bug: 18581716
Bug: 19866451
Bug: 20944464
Change-Id: I29393897118311b48c966c41e2cddb7a784f136f
2015-05-19 09:04:18 +09:00
Clara Bayarri
5b7665a1f2 Fix Cancelling a text action activity deletes the selected text
The implementation of onActivityResult in TextView did not check the
result code, hence treating the cancelled activity result as a
replacement by empty text.

Also added tests to catch this case and basic usage.

Bug: 21183019
Change-Id: Ibdafe89474dd69c5b70c67ec98fed46656f9fdcf
2015-05-15 16:32:50 +01:00
Clara Bayarri
18cc17a28d PhoneWindow ActionMode handling tests
Tests focusing on action mode creation, how the two types of
modes are handled together and how the lifecycle is handled.

Change-Id: I17fe7a83cba4651b295a8ce80bc449f2f2538048
2015-05-14 16:32:32 +01:00
Clara Bayarri
e094b2aff0 Merge "Tests for WindowDecorActionBar's startActionMode implementation" into mnc-dev 2015-05-14 09:28:46 +00:00
Clara Bayarri
2c7b461077 Tests for WindowDecorActionBar's startActionMode implementation
Change-Id: Ib7a79f3987fd565aabf4c5b093186ec669131522
2015-05-14 10:26:39 +01:00
Clara Bayarri
bff329b851 Merge "Tests for ActionBarContainer's startActionModeForChild" into mnc-dev 2015-05-14 09:25:27 +00:00
Clara Bayarri
e9b17ec0fd Tests for ActionBarContainer's startActionModeForChild
Change-Id: Ida782cb72f26689ec49a6674dcaeee7d2fb196d3
2015-05-14 10:24:41 +01:00
Erik Kline
6193aa3305 Add basic netlink library code.
Add netlink socket helpers and parsing code for basic netlink messages.
Additionally, support from some neighbor discovery -specific messages
is included.

Bug: 18581716
Change-Id: Ib2aa924222b63cdbebf09a8bf8ff35ee24269fc5
2015-05-13 15:18:39 +09:00
George Mount
fa21641122 Merge "Add CallbackRegistry." into mnc-dev 2015-05-07 14:34:58 +00:00
Neil Fuller
d6a2135262 Remove FloatMath methods from the API
Also removing FloatMathTest. The tests are being
moved into a legacy CTS suite.

Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: I397fd6bcc4d988db6301245f9d47460bd6c28821
2015-05-07 13:16:18 +00:00
George Mount
9189445c0a Add CallbackRegistry.
Change-Id: Ib1a30a0ec8b1ece25046d85676432fb0b819f952
2015-05-06 12:18:52 -07:00
Matthew Williams
303650c9cd Add full backup criteria to android manifest
BUG: 20010079
Api change: ApplicationInfo now has a fullBackupContent int
where -1 is (off) 0 is (on) and >0 indicates an xml
resource that should be parsed in order for a developer
to indicate exactly which files they want to include/exclude
from the backup set.
dd: https://docs.google.com/document/d/1dnNctwhWOI-_qtZ7I3iNRtrbShmERj2GFTzwV4xXtOk/edit#heading=h.wcfw1q2pbmae

Change-Id: I90273dc0aef5e9a3230c6b074a45e8f5409ed5ce
2015-05-03 16:19:27 -07:00
Joshua Schwarz
6bb65f0d83 am a4edc82e: am 4547dac0: Fix one-off error in reporting.
* commit 'a4edc82e9b50189b187996e8c4f4e851bdf83893':
  Fix one-off error in reporting.
2015-04-28 21:09:13 +00:00
Joshua Schwarz
a4edc82e9b am 4547dac0: Fix one-off error in reporting.
* commit '4547dac01f3136393cc708bb49ff546413a45d6c':
  Fix one-off error in reporting.
2015-04-28 18:28:18 +00:00