Commit Graph

431241 Commits

Author SHA1 Message Date
Jeffrey Vander Stoep
7dfbd004da Merge "InetDiagSocketTest: ignore test that times out"
am: 152ced4b87

Change-Id: Iff27cea9d43b6a044e0f91cc88fad46664b4660b
2019-10-01 04:11:14 -07:00
Jeffrey Vander Stoep
152ced4b87 Merge "InetDiagSocketTest: ignore test that times out" 2019-10-01 10:44:24 +00:00
Chalard Jean
4355ad58c6 Merge "Rename some Vpn fields."
am: d1c510f749

Change-Id: I4aac3d05aa5b879be67f1e3673e1d930e2160cb8
2019-10-01 02:34:10 -07:00
Chalard Jean
d1c510f749 Merge "Rename some Vpn fields." 2019-10-01 09:08:07 +00:00
Jeff Vander Stoep
69b83c9b3c InetDiagSocketTest: ignore test that times out
Test: atest InetDiagSocketTest
Change-Id: Ieef0ca291924c0d81b1110bd25020d57fa9f0fec
Bug: 141870193
2019-10-01 08:21:41 +00:00
Tobias Thierer
3548c97042 Merge changes Iaf918ce3,I60032b97
am: 2efe92bdbe

Change-Id: I076249c9ccf563905c52b272a8c25c14da8e5711
2019-10-01 00:23:44 -07:00
Treehugger Robot
2efe92bdbe Merge changes Iaf918ce3,I60032b97
* changes:
  Introduce vendor.mime.types
  android.mime.types: Fix typo.
2019-10-01 07:02:16 +00:00
Chalard Jean
fe9ddd50ac Merge "Opportunistic cleanup"
am: 15da7c17b5

Change-Id: I5ac4ae5f941e741a88c595ae5f12b804a758abe6
2019-09-30 22:38:25 -07:00
Chalard Jean
15da7c17b5 Merge "Opportunistic cleanup" 2019-10-01 05:25:57 +00:00
Hall Liu
7fe39a8776 Merge "Add carrier config for ignoring user RTT setting"
am: e93165456c

Change-Id: I73a4ab7963525669ccc74ef634345077e0ce618f
2019-09-30 18:46:17 -07:00
Hall Liu
e93165456c Merge "Add carrier config for ignoring user RTT setting" 2019-10-01 01:37:05 +00:00
Brad Ebinger
64418f4c31 Merge "Integrate the active emergency session listener in TelephonyRegistry"
am: 4a54c2fa2b

Change-Id: I890a913c18332669dee8f21baf81db78a50a0fb0
2019-09-30 16:08:04 -07:00
Brad Ebinger
4a54c2fa2b Merge "Integrate the active emergency session listener in TelephonyRegistry" 2019-09-30 22:48:25 +00:00
Shuo Qian
b61230c51d Integrate the active emergency session listener in TelephonyRegistry
Add Telecom shell command: "adb shell telecom set-system-dialer"

Test: PhoneStateListener cts
Bug: 135204580
Merged-In: I5eaada6a671606642a849f0ff6fe964332d80d5f
Change-Id: I5eaada6a671606642a849f0ff6fe964332d80d5f
2019-09-30 20:43:42 +00:00
Ryan Mitchell
f26f7a206f Merge "Fix memory leak in aapt2"
am: 5491eb92fc

Change-Id: I13967aeb1c57ef196820a9f3beecd53fc490d91e
2019-09-30 12:41:15 -07:00
Jeffrey Vander Stoep
0b6d974713 Merge "Fix FD leak in ConnectivityManager.getConnectionOwnerUid"
am: 20bdc26698

Change-Id: Idb8ecfa8313ed6c795af7fe97961ef002384580d
2019-09-30 12:35:46 -07:00
Ryan Mitchell
5491eb92fc Merge "Fix memory leak in aapt2" 2019-09-30 18:10:53 +00:00
Jeffrey Vander Stoep
20bdc26698 Merge "Fix FD leak in ConnectivityManager.getConnectionOwnerUid" 2019-09-30 17:41:30 +00:00
Tobias Thierer
324349142c Introduce vendor.mime.types
Like mime.types and android.mime.types, this file specifies mappings
between MIME types and file extensions. Unlike those files, it can
only be used to define _additional_ mapping but not modify (change,
remove) any mappings defined by those files.

This is done by prepending '?' to every line element from
vendor.mime.types that doesn't already have one; when there is a
leading "?", it is ignored so that it's okay to move a line from
{android,vendor}.mime.types without necessarily changing it.

Test: Checked manually that vendor.mime.types works as expected.
  Specifically, after adding these lines to vendor.mime.type:

    audio/mpeg testmpeg
    audio/testmpeg mp3
    ?mime/foo ?fooext

  the following test passes:

    MimeTypeMap map = MimeTypeMap.getSingleton();
    // Original mapping is unchanged
    assertEquals("mp3", map.getExtensionFromMimeType("audio/mpeg"));
    assertEquals("audio/mpeg", map.getMimeTypeFromExtension("mp3"));

    // Map from the key to existing value is added
    assertEquals("audio/mpeg", map.getMimeTypeFromExtension("testmpeg"));
    assertEquals("mp3", map.getExtensionFromMimeType("audio/testmpeg"));

    // Completely new mapping is added both ways
    assertEquals("mime/foo", map.getMimeTypeFromExtension("fooext"));
    assertEquals("fooext", map.getExtensionFromMimeType("mime/foo"));

Bug: 141842825
Change-Id: Iaf918ce39324709ff58a8e0f9612e4827a673323
2019-09-30 17:10:53 +01:00
Tobias Thierer
e25c54f328 android.mime.types: Fix typo.
Test: Treehugger
Change-Id: I60032b97251146006c2dc95b4be19c3d2d70697f
2019-09-30 14:16:51 +01:00
Jeff Vander Stoep
59940afb16 Fix FD leak in ConnectivityManager.getConnectionOwnerUid
Add unit tests to verify that bug has been fixed.

Re-enable testGetConnectionOwnerUid() unit tests in presubmit. These
were disabled due to test flakiness caused by expected failures passing
as a result of other sockets on the system. This is fixed by checking
that failures do not have the UID of the calling process instead of
INVALID_UID since previously some Qualcomm telephony sockets were
causing lookup successes.

Test: atest InetDiagSocketTest#testGetConnectionOwnerUid
Test: ls -1 /proc/<pid of system_server>/fd | wca
Test: atest --generate-new-metrics 200 InetDiagSocketTest#testGetConnectionOwnerUid
   To verify flakes have been cleaned up.
Bug: 141603906
Bug: 141459241
Change-Id: Ib76674f10e4bd24952c557bac7b9c65fba42fdb2
2019-09-30 12:46:03 +02:00
Chalard Jean
afdecd51ca Opportunistic cleanup
Test: FrameworksNetTests NetworkStackTests
Change-Id: I370ad15fb0d8301f9720caf5296365c04aebeb62
2019-09-30 19:12:25 +09:00
Tobias Thierer
ffd40f7bd4 Merge changes from topics "bug136256059_attempt2", "bug136256059_builder"
am: 6ed8fce33f

Change-Id: If95ba459b29a3fd2eede6390bbab18f95f762587
2019-09-30 02:38:49 -07:00
Tobias Thierer
821f77fc77 Make MimeMap final and introduce MimeMap.Builder.
am: fd9657d032

Change-Id: I4e416a3e4b9fc0c9c7b4f4b624a86cd40233d97a
2019-09-30 02:38:40 -07:00
Tobias Thierer
2b754d1fb3 Move default MimeMap implementation to frameworks.
am: 878c77b704

Change-Id: Ic8f8c2c1fc10809e3245ee6b729e69a4ecb30ffa
2019-09-30 02:38:30 -07:00
Tobias Thierer
6ed8fce33f Merge changes from topics "bug136256059_attempt2", "bug136256059_builder"
* changes:
  MimeMapImpl.createDefaultInstance() -> DefaultMimeMapFactory.create().
  Make MimeMap final and introduce MimeMap.Builder.
  Move default MimeMap implementation to frameworks.
2019-09-30 09:15:53 +00:00
Howard Chen
1975c67bdb Merge changes from topics "dsu_ashmem", "dsu_clean_up"
am: 417aed2c61

Change-Id: I3382c8a7aca1fadb9e7ef37d050b52e1fff69155
2019-09-28 04:56:30 -07:00
Treehugger Robot
417aed2c61 Merge changes from topics "dsu_ashmem", "dsu_clean_up"
* changes:
  Use Ashmem to reduce buffer copies
  Clean up usage on deprecated GSID methods
2019-09-28 11:45:28 +00:00
jungshik
47d023fb40 Merge "Use NotoSansMyanmar (pure Unicode) fonts"
am: b44f88b3c9

Change-Id: I1bf0297ccfb4a67654df24520c8e98d119d58d28
2019-09-27 19:52:17 -07:00
jungshik
b44f88b3c9 Merge "Use NotoSansMyanmar (pure Unicode) fonts" 2019-09-28 02:40:04 +00:00
Bowgo Tsai
5d0a0f151e Merge "Add /system_ext sepolicy support to SELinuxMMAC.java"
am: 62031438a7

Change-Id: Id09ffdb7f16a5b7886632ccf31a96ecc6243c9a7
2019-09-27 17:51:43 -07:00
Treehugger Robot
62031438a7 Merge "Add /system_ext sepolicy support to SELinuxMMAC.java" 2019-09-28 00:28:57 +00:00
Stan Iliev
7b5a8dfe4a Merge changes from topic "textureview_readback"
am: fc733e1d5e

Change-Id: Ic1308ec895badad285cc90a370de8d844cad4250
2019-09-27 10:57:36 -07:00
Treehugger Robot
fc733e1d5e Merge changes from topic "textureview_readback"
* changes:
  Improve integer aligned coordinate detection
  Improve logic when to use filtering in readback and TextureView
2019-09-27 17:36:31 +00:00
Tobias Thierer
af0cef987d MimeMapImpl.createDefaultInstance() -> DefaultMimeMapFactory.create().
The class no longer implements MimeMap, so the name MimeMapImpl
no longer made sense.

Test: Treehugger
Bug: 136256059
Change-Id: I2cbc70a7769232b704a9bdfde2def832c1e292b8
2019-09-27 17:25:13 +01:00
Nataniel Borges
7b5f4f1261 Merge changes from topic "flicker-rotation"
am: f2a739d5f0

Change-Id: I189755fcce0f1576870d252dbe1f4f30a7aa6ea4
2019-09-27 09:21:55 -07:00
Nataniel Borges
4a77093a0d New FlickerTests: Start app warm and cold at both 0 and 90 degrees
am: d051c3b767

Change-Id: Ie1e7143488dcd4a29287b5802d32359c0c3f0839
2019-09-27 09:21:44 -07:00
Nataniel Borges
af3a5e4969 New FlickerTests: Start IME alongside the app (0 and 90 degrees)
am: 4bfe816030

Change-Id: Ia0c5764de88d26e8bf5df5e8b09108f610845821
2019-09-27 09:21:27 -07:00
Nataniel Borges
679b4f29a1 New FlickerTests: Start IME tests with app rotated by 90 degrees
am: 89888bf124

Change-Id: I751551f28763adf691d64c17362c79c0061baa94
2019-09-27 09:20:54 -07:00
Anna Trostanetski
c1abc25905 Merge "Rate limit non statsd logs."
am: e8e6390829

Change-Id: Ib6ef1c746f26ceb384f7ed586bfc769a05da271c
2019-09-27 09:15:37 -07:00
Tobias Thierer
fd9657d032 Make MimeMap final and introduce MimeMap.Builder.
This CL topic introduces a new @CorePlatformApi MimeMap.Builder
and uses it to make MimeMap a concrete, final, immutable type.

This has the following advantages:

 - Consistency of behavior of MimeMap implementations with regards
   to lower-casing and treatment of null is trivial to guarantee
   because there is only one implementation.
 - The @CorePlatformApi surface now makes more sense. The responsibility
   for lower-casing and treatment of null was previously split between
   MimeMap in libcore and  MimeMapImpl in frameworks/base, which is why
   MimeMap.toLowerCase() and MimeMap.isNullOrEmpty() were in the
   @CorePlatformApi.
 - Most of the logic now lives in libcore / ART module.
   frameworks/base now has minimal logic. This makes it easier to write
   (in a follow-up CL) a CTS test that asserts all the default mappings,
   because that test can now duplicate that small amount of logic in
   order to read from a copy of the same data files.

Note: The semantics of the @CorePlatformApi Builder.put(String, List<String>)
are fairly complex, which isn't great. This was done because:
 - By following the semantics of the *mime.types file format, it allows
   us to minimize the logic in frameworks/base.
 - It's simpler than having multiple overloads of put() for
   mimeType -> file extension mapping and vice versa,
   and for whether or not any existing mapping should be overwritten.
   If we had named classes for MimeType and FileExtension with
   appropriate case-insensitive equals and hashCode semantics, then
   we could instead have API such as
      builder.asMimeToExtensionMap().put(...)
   but existing API (e.g. Intent.getType(), android.webkit.MimeTypeMap)
   has set precedent for treating these as Strings.

Bug: 136256059
Test: atest CtsLibcoreTestCases
Test: atest CtsMimeMapTestCases

Change-Id: I9a185a689745726dd79b15117892001461fa4a0d
2019-09-27 17:02:31 +01:00
Tobias Thierer
878c77b704 Move default MimeMap implementation to frameworks.
This is the second attempt to submit this CL. The first attempt
regressed on app startup because RuntimeInit installed the
custom MimeMap from commonInit() which runs post-fork of the zygote,
but that was fixed by installing it pre-fork.

This CL topic moves the default MimeMap implementation to frameworks.
Libcore starts with a minimal implementation sufficient to pass
CtsLibcoreTestCases,  but frameworks can inject the real implementation.
Before this CL topic, the data files and logic (MimeMapImpl) were part of
core-*.jar on device; after this CL, they instead live in framework.jar.

Tests from MimeMapTest that check behavior of that default
implementation also move to a non-libcore CTS test.

Planned work for follow-up CL:
 1. Make CTS more opinionated, with a plan to assert that all of
    the default mappings are present. How exactly the expectated
    mapping will be bundled in CTS is still TBD.
 2. Add a vendor.mime.types file (defaults to empty) where vendors
    can add additional mappings; I plan to make it such that mappings
    in that file are parsed last but never override any earlier
    mappings, as if each mime type / file extension was prefixed
    with '?'.
 3. Perhaps enforce that public APIs android.webkit.MimeTypeMap
    and java.net.URLConnection.getFileNameMap() behave consistently
    with MimeMap.getDefault().

Test: atest CtsLibcoreTestCases
Test: atest CtsMimeMapTestCases
Test: Checked that CtsLibcoreTestCases still passes on a build that
      is missing the MimeMap.setDefault() call from RuntimeInit.java.
Test: Checked that app startup time does not regress as part of this
      CL topic - see http://b/136256059#comment17
Bug: 136256059

Change-Id: I716914bf1a7e6205e539f0551f010615dacb17a8
2019-09-27 16:53:15 +01:00
Treehugger Robot
f2a739d5f0 Merge changes from topic "flicker-rotation"
* changes:
  New FlickerTests: Run split screen tests at 0 and 90 degrees
  New FlickerTests: Start app warm and cold at both 0 and 90 degrees
  New FlickerTests: Start IME alongside the app (0 and 90 degrees)
  New FlickerTests: Start IME tests with app rotated by 90 degrees
2019-09-27 14:21:58 +00:00
Anna Trostanetski
e8e6390829 Merge "Rate limit non statsd logs." 2019-09-27 13:13:04 +00:00
atrost
a8f3c48495 Rate limit non statsd logs.
Limit 1 log per app launch as the statd logs as this is spamming logs.
Consider increasing in the future to once every x minutes/seconds if
needed.

Bug: 138374585
Bug: 141714588
Test: flash device
Change-Id: I3ed696fb557527d807d03aecc64c0207d7b93f08
2019-09-27 11:25:06 +00:00
Chalard Jean
85dc33f512 Rename some Vpn fields.
This member has an extremely confusing name, and the logic
handling it being convoluted does not help. This change renames
the member and add comments.

Bug: 112341346
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: Icfb6098d1c9e6293078ea7eede3f24a2fabe9d6b
2019-09-27 20:24:34 +09:00
Lorenzo Colitti
e21f0cf185 Merge "Properly test TrafficController permissions on package updates."
am: 0e45bfabfe

Change-Id: Ia6d480739fadaa7b3277d9b6e9abc303b8e551b4
2019-09-26 22:48:57 -07:00
Treehugger Robot
0e45bfabfe Merge "Properly test TrafficController permissions on package updates." 2019-09-27 05:35:25 +00:00
Grace Jia
d6c7484390 Merge "CallScreeningService API changed."
am: 5b78c2324b

Change-Id: I94dd0a9fbf1c84a07c0594df0f653e10db3711fa
2019-09-26 16:53:07 -07:00
Treehugger Robot
5b78c2324b Merge "CallScreeningService API changed." 2019-09-26 23:32:26 +00:00