323164 Commits

Author SHA1 Message Date
Dan Albert
110e007fb8 Add missing includes.
Test: mma
Bug: None
Change-Id: Iec8b0a7854091946a4bb6e804c5f4cce39a52b47
2017-10-11 12:41:33 -07:00
Treehugger Robot
7d1789867b Merge "LoggingPrintStream: Make visible for testing" 2017-10-10 20:57:55 +00:00
Brad Ebinger
432c2b0fb9 Merge "Require DownloadRequest#Builder to have mandatory Source URI" 2017-10-10 18:27:36 +00:00
Treehugger Robot
b085deece9 Merge "Parcel: Avoid NPE in finalization" 2017-10-10 17:20:56 +00:00
Treehugger Robot
0c614c7018 Merge "{Event,Security}Log: Unify code" 2017-10-10 16:41:12 +00:00
Andreas Gampe
e2456d602f LoggingPrintStream: Make visible for testing
The class must be public to avoid test issues. If the class is
package-private, the test would have to be in the boot class-
path:

 Rejecting re-init on previously-failed class java.lang.Class<com.android.internal.os.LoggingPrintStreamTest$TestPrintStream>: java.lang.IllegalAccessError: Class com.android.internal.os.LoggingPrintStream extended by class com.android.internal.os.LoggingPrintStreamTest$TestPrintStream is inaccessible (declaration of 'com.android.internal.os.LoggingPrintStreamTest$TestPrintStream' appears in /data/app/com.android.frameworks.coretests-SD7GJmYE507ACoE9gu2mnw==/base.apk)
   at java.lang.Object java.lang.reflect.Constructor.newInstance0(java.lang.Object[]) (Constructor.java:-2)
   at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:334)
   at junit.framework.Test junit.framework.TestSuite.createTest(java.lang.Class, java.lang.String) (TestSuite.java:61)

Test: m
Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/LoggingPrintStreamTest.java
Change-Id: I26cead7954cf4309c8b3e16994c35a3f4a9eb798
2017-10-10 09:09:26 -07:00
Andreas Gampe
009b852133 Parcel: Avoid NPE in finalization
Check whether the guard is null to avoid:

 Uncaught exception thrown by finalizer
 java.lang.NullPointerException: Attempt to invoke virtual method 'void dalvik.system.CloseGuard.close()' on a null object reference
      at android.os.ParcelFileDescriptor.closeWithStatus(ParcelFileDescriptor.java:740)
      at android.os.ParcelFileDescriptor.finalize(ParcelFileDescriptor.java:990)
      at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:250)
      at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:237)
      at java.lang.Daemons$Daemon.run(Daemons.java:103)
      at java.lang.Thread.run(Thread.java:764)

Follow-up to commit da5a3e12f4f8f965c57d6f93c74190f43ea233f3.

Bug: 7426029
Bug: 10330121
Test: m
Change-Id: I903f1545ab784008727ff23bb95fe182bd95b62a
2017-10-10 08:06:42 -07:00
Treehugger Robot
a162726df7 Merge "LinkProperties: fix some indentation issues" 2017-10-10 14:02:35 +00:00
Hugo Benichi
bd87a3934c LinkProperties: fix some indentation issues
Test: no functional change
Change-Id: I469bba154feb382156e56043d83f066a5bd658aa
2017-10-10 18:25:50 +09:00
Andreas Gampe
2e220ef36c {Event,Security}Log: Unify code
Extract common code into eventlog_helper.

Bug: 67511924
Test: m
Test: Device boots
Test: cts-tradefed run commandAndExit cts -m CtsUtilTestCases -t android.util.cts.EventLogTest
Change-Id: Idafad832385f57c22f40dbb8570e95da6d44f08f
2017-10-09 20:15:00 -07:00
Brad Ebinger
ea737a8e1e Require DownloadRequest#Builder to have mandatory Source URI
This change modifies the API to require that the
DownloadRequest#Builder includes the Source URI as a mandatory,
non-null parameter.

Test: Manual, Telephony Test MBMS app
Change-Id: I7d44e977314a57fdf063aa233bfb978b48ebf1db
2017-10-10 00:06:04 +00:00
Treehugger Robot
c30a6ac2f1 Merge "EventLog: Check for exception after add()" 2017-10-09 23:15:50 +00:00
Treehugger Robot
a98866a6b6 Merge "SecurityLog: Apply 7b25bb8 to SecurityLog" 2017-10-09 22:18:25 +00:00
Andreas Gampe
ca06d8b5ad EventLog: Check for exception after add()
When reading events, calling Collection.add() may result in an
OutOfMemoryError or immutability error. Check for an exception
after the call in EventLog and SecurityLog.

Bug: 67511924
Test: m
Test: Device boots
Change-Id: If0fbf6b01051b5311eeb88d3f52470cd8b1eec59
2017-10-09 14:18:11 -07:00
Andreas Gampe
c1211c47ae SecurityLog: Apply 7b25bb8 to SecurityLog
Apply logging rewrites from commit 7b25bb8ec79e420e9655a00301cbca80a38cde2d
to SecurityLog.

Test: manual confirm event log messages from services continue
Bug: 31992412
Bug: 31456426
Change-Id: If482a89690fa9fd1da6b5e13398df4bab47ca200
2017-10-09 13:27:30 -07:00
Chalard Jean
ed8d236319 Merge "Add some useful helpers and constants." 2017-10-06 09:37:38 +00:00
Treehugger Robot
3506aaf992 Merge "Log NAT update descriptions when receiving netlink errors" 2017-10-06 09:16:18 +00:00
Erik Kline
4a8bcdef6d Log NAT update descriptions when receiving netlink errors
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
    - new logging messages observed

    2017-10-06T13:15:25.190 - [OffloadController] ERROR Error updating NAT conntrack entry >TCP (192.168.43.222, 58054) -> (198.35.26.112, 443)<: android.system.ErrnoException: NetlinkErrorMessage{...
Bug: 29337859
Bug: 32163131
Bug: 64976634
Bug: 67396342

Merged-In: Ia1f0b97f89a9848a64099d01184fcbc2056a1b34
Merged-In: I426b0a0545d56aba7924c416799b37731e7e4b18
Change-Id: Ie05d4e6588d75f8a9798f40b68a317e24b3b5050
(cherry picked from commit a5ae9056e74a13d394c4bb6c36f9255214ffb68b)
2017-10-06 16:56:06 +09:00
Chalard Jean
e5659bd316 Add some useful helpers and constants.
Test: Pulled out of a client app ; the client app is behaving
Test: identically to how it was behaving before. Wrote unit
Test: tests in frameworks-net.

Change-Id: I397137748a95c65cee2e1e1b243a1a260e83a6f7
2017-10-06 13:38:46 +09:00
Treehugger Robot
b7dc3a3b21 Merge "Fix NPE when removing PIN locked SIM during E911 call" 2017-10-06 03:43:31 +00:00
Jordan Liu
a666dbb628 Merge "Display "No service" on status bar when SIM unready" 2017-10-05 23:30:45 +00:00
Tobias Thierer
ed6ae8f2b1 Merge "Fix documentation generation with OpenJDK 9 javadoc." 2017-10-05 23:01:03 +00:00
Brad Ebinger
7130675c53 Fix NPE when removing PIN locked SIM during E911 call
There is the possibility of mCallback being null while
the Keyguard still has a PhoneStateListener registered
for onSimStateChanged callback. This can cause a NPE.

Bug: 66986066
Test: Manual, PIN/PUK locked SIM
Change-Id: I799c9521f787e800e259c3bdce9edee3f844f5f3
2017-10-05 11:39:06 -07:00
Treehugger Robot
de3150db1e Merge "NativeActivity: Improve error message reporting" 2017-10-05 09:44:21 +00:00
nharold
5ade9a228d Merge "Cosmetic Cleanups for IpSecService" 2017-10-05 00:14:16 +00:00
Nathan Harold
d6f50b260d Cosmetic Cleanups for IpSecService
This is a follow-up CL to address comments
on aosp/466677
-Rename ManagedResourceArray.get()
-Comment cleanup

Bug: 38397094
Test: runtest frameworks-net
Change-Id: I6fbdd89c4a864fe1d8a19c68947f582d7b1f0f21
2017-10-04 13:04:55 -07:00
nharold
9778c7884f Merge changes from topic "ipsec-svc-cleanup"
* changes:
  Split IpSecServiceTest to add IPv6 Tests
  Add equals() for IpSecAlgorithm and IpSecConfig
  Input Validation for IpSecService
2017-10-04 20:00:52 +00:00
dimitry
f66a22335d NativeActivity: Improve error message reporting
The error message is not necessary a dlerror(). For the devices with
native bridge it is reported by NB implementation.

Bug: http://b/67412560
Test: manual
Change-Id: I05377c3490199c40419831b5aae27cb30d4a321b
2017-10-04 19:48:11 +02:00
Treehugger Robot
cfe51aabd2 Merge "PBAP: Use ACTION_CONNECTION_STATE_CHANGED intent" 2017-10-04 17:01:00 +00:00
Jack He
37ab815c96 PBAP: Use ACTION_CONNECTION_STATE_CHANGED intent
* Use ACTION_CONNECTION_STATE_CHANGED to broadcast connection state
  change to comply with BluetoothProfile interface requirement
* Use BluetoothProfile.STATE_* variables to represent connection
  states for PBAP profile

Bug: 63873163
Test: Connect to car kits
Change-Id: I7dfcfc1b3a3e4868ea5e313f62ad5e504d58b9c2
2017-10-04 16:22:57 +00:00
Treehugger Robot
8052930f4f Merge "New function signature for setResolverConfiguration" 2017-10-04 12:39:09 +00:00
Chih-hung Hsieh
a47e513464 Merge "Revert work around clang-tidy segmentation fault." 2017-10-04 06:26:42 +00:00
Treehugger Robot
53c945fb71 Merge "Convert java hwbinder mk -> bp." 2017-10-04 04:00:03 +00:00
Steven Moreland
eddafe990f Convert java hwbinder mk -> bp.
This library is used to avoid a circular dependency
between frameworks.jar and HIDL hal definition libs.
It is not installed on the device.

Bug: 33420795
Test: m -j hwbinder and things it depends on
Change-Id: I44cc670383f80275026ea892151524599b713087
2017-10-04 03:40:15 +00:00
Chih-Hung Hsieh
ca8dbebe1e Revert work around clang-tidy segmentation fault.
Bug: 34740546
Test: build with WITH_TIDY=1 and
WITH_TIDY_CHECKS="*,-readability-*,-google-readability-*,-google-runtime-references"

Change-Id: If99c75cab6a2bec0c6b38aa17189668b4943478d
2017-10-03 20:23:10 -07:00
Nathan Harold
2e9a520024 Split IpSecServiceTest to add IPv6 Tests
-Split IpSecServiceTest into parameterized
 and single tests.
-Add IPv6 parameters

Bug: 66954381
Test: this
Change-Id: Ib98c112560014f73bccc3d2842c31d297c7a07ef
2017-10-03 19:45:59 -07:00
Nathan Harold
19ce70b089 Add equals() for IpSecAlgorithm and IpSecConfig
Add equality testing methods to support tests
for parceling and un-parceling IpSecConfig.

Bug: 38397094
Test: runtest -x IpSecConfigTest.java
Change-Id: I31e318334d39ed6e9daf5ec8f3be7dcec75e12ad
2017-10-03 19:45:58 -07:00
Nathan Harold
a10003d5de Input Validation for IpSecService
All of the input to IpSecService over the Binder
interface needs to be validated both for sanity
and for safety.

-Sanity check all the parameters coming from binder.
-Added setters for IpSecConfig to decouple the test
 from the IpSecManager. This was needed because the
 input validation caused the tests to fail due to a
 null parameter that was previously un-tested.
-Added the mode flag to the IpSecConfig bundle this
 oversight was found during testing.
-Expose the getResourceId() methods for testing in
 UdpEncapsulationSocket, SecurityParameterIndex, and
 IpSecTransform classes.
-Remove the unneeded getIpSecConfig() from
 IpSecTransform: unneeded now that we can synthesize
 configs.

Bug: 38397094
Test: runtest frameworks-net
Change-Id: I5241fc7fbfa9816d54219acd8d81a9f7eef10dd4
2017-10-03 19:45:55 -07:00
Selim Cinek
ca8b270063 Merge "Collapse Notification panel after tapping CLEAR ALL button" 2017-10-03 21:07:57 +00:00
Treehugger Robot
5b6a02eb8b Merge "fix AmrInputStream.read() hang" 2017-10-03 20:37:36 +00:00
Brad Ebinger
177bd65211 Merge "Adds a filtering bitmask to DownloadStateCallback" 2017-10-03 20:23:00 +00:00
Brad Ebinger
f78beae681 Merge "Remove verification for DownloadReceiver when failure" 2017-10-03 18:32:04 +00:00
Brad Ebinger
a830e83028 Merge "Decouple Content Name Locale from Content Language Locale" 2017-10-03 18:31:49 +00:00
Brad Ebinger
c74ae34ddb Adds a filtering bitmask to DownloadStateCallback
Adds the ability for an EMBMS app to specify a filtering
bitmask to DownloadStateCallback, which is used to filter
out callbacks that the EMBMS app doesn't need to listen
to.

Test: Testapps
Change-Id: Id7f26ba3c3606c644b0ca3376df1107f5834facb
2017-10-03 09:48:51 -07:00
Wenting Xiong
d1aa25063e Display "No service" on status bar when SIM unready
Introduce carrier config to forcibly display "No Service" instead of
"Emergency calls only" when SIM is unready.

Test: manual - checked displaying "No service" on status bar
Bug: 29191964
Change-Id: I744ec9a3c70376199ba94d68331604276ea761c3
2017-10-03 20:59:38 +09:00
Tobias Thierer
85edc2bc95 Fix documentation generation with OpenJDK 9 javadoc.
"make docs" breaks ("lint: @attr must be a field") on three @attr ref
statements in LinearLayoutManager. These are the only @attr ref
statements that reference the support library's resources from
framework (the others are within framework or within the support
library); it may be that the R class that they're referencing is
merely in the wrong package, but changing it to com.android.internal.R
or android.R didn't fix the issue.

Since LinearLayoutManager is an internal class, it's not worth the
effort of trying to make this work. This CL drops the three offending
@attr ref statements, thereby fixing the build.

Bug: 62049770
Test: Treehugger

Change-Id: Ife01201019f4fffd5552da11591661539ca40fdd
2017-10-03 12:45:57 +01:00
Orion Hodson
537d63fe1a Merge "Update dalvik.bytecode package" 2017-10-03 07:57:14 +00:00
Treehugger Robot
bb115bac41 Merge "Replace strcpy with memcpy." 2017-10-03 04:09:48 +00:00
Reifu Sato
d191ee87a5 Collapse Notification panel after tapping CLEAR ALL button
Usually, notification panel is automatically collapsed
after tapping "CLEAR ALL" button but is not collapsed
if all dismissable notifications are scrolled out.

In this case, dismissed notification is still displayed
until notification panel is once collapsed.
And that "dismissed" notification causes several issues.

To avoid this, collapse notification panel automatically
after tapping "CLEAR ALL" button even when all dismissable
notifications are scrolled out.

Fixes: 67246876
Test: manual - post ongoing and dismissable notifications,
               and tap CLEAR ALL button.

Change-Id: I048255cde6fdb4cedd2c3472e345ff63c744af68
2017-10-03 11:16:26 +09:00
Treehugger Robot
1704df64ce Merge "Delete jack support" 2017-10-03 01:17:25 +00:00