OSDN Git Service

android-x86/frameworks-base.git
7 years agoMerge "ActivityManagerService: fix nativehelper includes"
Treehugger Robot [Thu, 27 Jul 2017 17:00:13 +0000 (17:00 +0000)]
Merge "ActivityManagerService: fix nativehelper includes"

7 years agoMerge "Tidy up RulesManagerService code"
Neil Fuller [Thu, 27 Jul 2017 16:48:58 +0000 (16:48 +0000)]
Merge "Tidy up RulesManagerService code"

7 years agoActivityManagerService: fix nativehelper includes
Steven Moreland [Wed, 26 Jul 2017 19:21:58 +0000 (12:21 -0700)]
ActivityManagerService: fix nativehelper includes

Bug: 63762847
Test: none

Merged-In: I9f9497990fbf0697d05445f563ad46a28d6d6eeb
Change-Id: I964c88cb74f0287dfc6634fbfcd3210a7d984213

7 years agoMerge "NetworkNotificationManager: correctly handle existing notifications"
Treehugger Robot [Thu, 27 Jul 2017 14:36:47 +0000 (14:36 +0000)]
Merge "NetworkNotificationManager: correctly handle existing notifications"

7 years agoMerge "Alter condition for starting RulesManagerService"
Treehugger Robot [Thu, 27 Jul 2017 13:25:49 +0000 (13:25 +0000)]
Merge "Alter condition for starting RulesManagerService"

7 years agoMerge "Revert "Default 'persist.sys.timezone' property to GMT if not set on init.""
Treehugger Robot [Thu, 27 Jul 2017 13:01:05 +0000 (13:01 +0000)]
Merge "Revert "Default 'persist.sys.timezone' property to GMT if not set on init.""

7 years agoNetworkNotificationManager: correctly handle existing notifications
Hugo Benichi [Tue, 25 Jul 2017 12:57:51 +0000 (21:57 +0900)]
NetworkNotificationManager: correctly handle existing notifications

This patch corrects a regression added by commit fb2609d3eee1 that did
not take into account the case of multiple notifications shown for a
single network id. Given how network notifications are triggered, it can
happen that NO_INTERNET and SIGN_IN notifications are both triggered for
the same network when captive portal detection is slow.

Contrary to the situation before commit fb2609d3eee1, a notification
priority order is introduced so that SIGN_IN always overrides
NO_INTERNET, and NO_INTERNET is ignored if SIGN_IN is already present.

Bug: 63676954
Bug: 62503737
Test: runtest frameworks-net, added new unit tests
Change-Id: Ib8658601e8d4dc6c41b335ab7dd8caa0cccd9531

7 years agoMerge "Remove CoreTests: HeapTest"
Narayan Kamath [Thu, 27 Jul 2017 11:26:10 +0000 (11:26 +0000)]
Merge "Remove CoreTests: HeapTest"

7 years agoRevert "Default 'persist.sys.timezone' property to GMT if not set on init."
Przemyslaw Szczepaniak [Wed, 26 Jul 2017 12:12:43 +0000 (12:12 +0000)]
Revert "Default 'persist.sys.timezone' property to GMT if not set on init."

Telephony code depends on persist.sys.timezone not being set as a signal
to deduce a timezone from sim card information.

This reverts commit 20e020536ebf999c4acb759960ae6e4bfff6ba67.

Bug: 64056758
Change-Id: I8db204bcffbdb960124b1ae0e02d53b27dd310a4

7 years agoTidy up RulesManagerService code
Neil Fuller [Wed, 26 Jul 2017 12:56:25 +0000 (13:56 +0100)]
Tidy up RulesManagerService code

1) Remove error handling TODO; no obvious issues.
2) Avoid avoid a NullPointerException in dumpsys code when current
state cannot be read.
3) Remove unnecessary public modifier.

Bug: 31008728
Test: make
Change-Id: Iab5fae74b74f54bf9d19410f0f4c9ed94365a162

7 years agoRemove CoreTests: HeapTest
Lucas Gomez Jimenez [Tue, 25 Jul 2017 13:11:35 +0000 (15:11 +0200)]
Remove CoreTests: HeapTest

It is largely redundant due to other tests in art/ and libcore/

Test: Run CoreTests

Change-Id: I97485c522fed157d650b95225ad6641e4184d7bf

7 years agoAlter condition for starting RulesManagerService
Neil Fuller [Wed, 26 Jul 2017 11:11:58 +0000 (12:11 +0100)]
Alter condition for starting RulesManagerService

Modify the condition used for starting RulesManagerService:
use mOnlyCore rather than disableNonCoreServices. mOnlyCore is
important for the secure lock screen and when mOnlyCore is true
the RulesManagerService cannot perform trust checks. Therefore,
disable the RulesManagerService when mOnlyCore == true.

disableNonCoreServices is apparently not used.

Bug: 64057583
Test: Boot device with time zone updates enabled and with a lock
pattern set.
Merged-In: Idd7cb6e11b1a91dfe7394f6c98f8fa3e0eec9dce
Change-Id: Idd7cb6e11b1a91dfe7394f6c98f8fa3e0eec9dce

7 years agoMerge "Silence a memory leak warning from the static analyzer"
Treehugger Robot [Wed, 26 Jul 2017 00:12:51 +0000 (00:12 +0000)]
Merge "Silence a memory leak warning from the static analyzer"

7 years agoSilence a memory leak warning from the static analyzer
George Burgess IV [Tue, 25 Jul 2017 21:22:07 +0000 (14:22 -0700)]
Silence a memory leak warning from the static analyzer

The analyzer assumes that the given `put` operation may fail. This
shouldn't be the case, so mark it with a LOG_ALWAYS_FATAL_IF. Doing so
silences a warning about potential memory leaks originating from
TessellationCache::getRoundRect.

Bug: 27101951
Test: mma. Warning is gone.
Change-Id: I3adeacd6c2c9c03caecd989e2a1267c51e8ef905

7 years agoMerge "Adding 4 standard short codes required by Android Constellation"
Treehugger Robot [Tue, 25 Jul 2017 16:12:23 +0000 (16:12 +0000)]
Merge "Adding 4 standard short codes required by Android Constellation"

7 years agoMerge "Remove TODO related to WakeLocks"
Treehugger Robot [Tue, 25 Jul 2017 14:42:40 +0000 (14:42 +0000)]
Merge "Remove TODO related to WakeLocks"

7 years agoMerge "Bootstrap IpReachabilityMonitor unit tests"
Treehugger Robot [Tue, 25 Jul 2017 13:05:47 +0000 (13:05 +0000)]
Merge "Bootstrap IpReachabilityMonitor unit tests"

7 years agoRemove TODO related to WakeLocks
Neil Fuller [Tue, 25 Jul 2017 12:14:32 +0000 (13:14 +0100)]
Remove TODO related to WakeLocks

There's no need to keep a WakeLock in the RulesManager - if
the device goes to sleep it should continue the work when
it wakes up again. All I/O is handled via AtomicFile and should
be robust to corruption, etc. and this reduces the likelihood
of issues caused by sudden sleeps.

Bug: 31008728
Test: make
Change-Id: I3d5076ca7d2f39076f76bdb745cedde214eac21b

7 years agoBootstrap IpReachabilityMonitor unit tests
Hugo Benichi [Mon, 24 Jul 2017 00:30:52 +0000 (09:30 +0900)]
Bootstrap IpReachabilityMonitor unit tests

Bug: 62918393
Test: runtest frameworks-net

Change-Id: I236029f460dc3631ef9f5d8312dc1c6faf9807df

7 years agoMerge "Add dump info to IpSecService"
Treehugger Robot [Tue, 25 Jul 2017 02:38:47 +0000 (02:38 +0000)]
Merge "Add dump info to IpSecService"

7 years agoMerge "Zygote: Increase wrap-pid timeout to thirty seconds"
Treehugger Robot [Tue, 25 Jul 2017 00:06:02 +0000 (00:06 +0000)]
Merge "Zygote: Increase wrap-pid timeout to thirty seconds"

7 years agoAdd dump info to IpSecService
ludi [Mon, 22 May 2017 17:52:23 +0000 (10:52 -0700)]
Add dump info to IpSecService

Bug:38350824

Test: runtest frameworks-net

Change-Id: Ifa11d55e9d337016ad865baada627db3aa8c2db3

7 years agoMerge "Update DexFile#getDexOptNeeded usages to reflect API change"
Shubham Ajmera [Mon, 24 Jul 2017 19:11:29 +0000 (19:11 +0000)]
Merge "Update DexFile#getDexOptNeeded usages to reflect API change"

7 years agoAdding 4 standard short codes required by Android Constellation
Carlos Vinueza [Thu, 20 Jul 2017 23:40:35 +0000 (16:40 -0700)]
Adding 4 standard short codes required by Android Constellation

This set is last minute addition to the whitelist free short code batch
2017 Q2 - Android Partner Engineering
Includes 4 country wide SMS standard short codes required by the
Constellation team.

Test: manual - uploaded modified file onto test device and tested
sending SMS to changed shortcodes to verify behaviour.

Bug: 37355429

Change-Id: Iffad649a74dcc7afd6a3574a92825d309df2d3ba
Signed-off-by: Carlos Vinueza <chinesco@google.com>
7 years agoZygote: Increase wrap-pid timeout to thirty seconds
Andreas Gampe [Fri, 21 Jul 2017 18:41:00 +0000 (11:41 -0700)]
Zygote: Increase wrap-pid timeout to thirty seconds

Some lowend devices under heavy instrumentation may not be able to
send the pid in the current five seconds. Drop the safety and
ignore watchdog debug builds, and move the timeout to thirty seconds.

Make the ZygoteConnection constants sharable in their own @hide class.
Add an assert into the watchdog that the wait time is less than the
watchdog time on non-debug builds.

Bug: 63904739
Bug: 63638768
Test: m
Test: manual test
Test: cts-tradefed run commandAndExit cts-dev -m CtsWrapWrapDebugTestCases
Change-Id: I80abdda54cd94e935de5a52b9f3c9192d0e31060

7 years agoMerge "CaptivePortalLoginActivity: improve logging"
Treehugger Robot [Mon, 24 Jul 2017 11:21:21 +0000 (11:21 +0000)]
Merge "CaptivePortalLoginActivity: improve logging"

7 years agoMerge "Revert "Revert "Update for less arguments in hidl toBinder."""
Treehugger Robot [Fri, 21 Jul 2017 23:18:09 +0000 (23:18 +0000)]
Merge "Revert "Revert "Update for less arguments in hidl toBinder."""

7 years agoUpdate DexFile#getDexOptNeeded usages to reflect API change
Shubham Ajmera [Wed, 19 Jul 2017 00:12:21 +0000 (17:12 -0700)]
Update DexFile#getDexOptNeeded usages to reflect API change

Test: make and boot
Merged-in: I68f9f617d6722a7ba8b00aa2181cb38a165cfc51
Bug: 36598475
(partially cherry-picked from commit 246dccf9327631597767afe418ce43ae6d07d102)

Change-Id: If90690d6234dc8727df2b2fb485f0c8d50970a92

7 years agoRevert "Revert "Update for less arguments in hidl toBinder.""
Steven Moreland [Fri, 21 Jul 2017 19:29:54 +0000 (19:29 +0000)]
Revert "Revert "Update for less arguments in hidl toBinder.""

This reverts commit 243bcfda3ac35735a959f8abcc45186aba0af116.

(originally reverted due to merge conflicts)

Bug: 32172906
Test: hidl_test

Change-Id: I70fde3ffe0d2c67390f7152acedd45c39009a134

7 years agoMerge "Make slight API and doc adjustments"
Hall Liu [Fri, 21 Jul 2017 21:09:34 +0000 (21:09 +0000)]
Merge "Make slight API and doc adjustments"

7 years agoMerge "Revert "Update for less arguments in hidl toBinder.""
Steven Moreland [Fri, 21 Jul 2017 19:14:24 +0000 (19:14 +0000)]
Merge "Revert "Update for less arguments in hidl toBinder.""

7 years agoRevert "Update for less arguments in hidl toBinder."
Steven Moreland [Fri, 21 Jul 2017 19:13:05 +0000 (19:13 +0000)]
Revert "Update for less arguments in hidl toBinder."

This reverts commit de2a9dfe3a7f343d4c1568d644ae0ddce7725a8d.

Change-Id: I6f451b0a05759501f59921747d95c6ae5b7ce656

7 years agoMerge "Update for less arguments in hidl toBinder."
Treehugger Robot [Fri, 21 Jul 2017 17:49:39 +0000 (17:49 +0000)]
Merge "Update for less arguments in hidl toBinder."

7 years agoMerge "NFC DTA Integration"
Treehugger Robot [Fri, 21 Jul 2017 17:38:53 +0000 (17:38 +0000)]
Merge "NFC DTA Integration"

7 years agoNFC DTA Integration
Love Khanna [Wed, 17 May 2017 10:22:16 +0000 (15:52 +0530)]
NFC DTA Integration

Test: compiles.
Merged-In: I07cbb321ffbdbe9d93d632c8a56f3bc53218e592
Change-Id: I07cbb321ffbdbe9d93d632c8a56f3bc53218e592

7 years agoUpdate for less arguments in hidl toBinder.
Steven Moreland [Thu, 20 Jul 2017 16:24:56 +0000 (09:24 -0700)]
Update for less arguments in hidl toBinder.

Removed unnecessary templatization argument.

Test: hidl_test_java
Bug: 32172906
Change-Id: I88cd2bf7abc3065ece4e28698ba5e0d836b1d0e3

7 years agoMerge "IpManagerTest: fix flaky test for real"
Treehugger Robot [Fri, 21 Jul 2017 08:07:40 +0000 (08:07 +0000)]
Merge "IpManagerTest: fix flaky test for real"

7 years agoIpManagerTest: fix flaky test for real
Hugo Benichi [Fri, 21 Jul 2017 05:12:26 +0000 (14:12 +0900)]
IpManagerTest: fix flaky test for real

Commit c10fe5f46367 tried to fix the flaky unit test for a default
ProvisioningConfiguration but failed to reinitialize the mock class
involved, so that in practice the flaky assertion is as flaky as before.

This patch correctly resets the mock after the default assertions are
done once an IpManager object is created.

Bug: 32561414
Bug: 62918393
Test: runtest frameworks-net
Change-Id: I516b6981f96e83a90cb372a727c41f0b2ea59801

7 years agoMake slight API and doc adjustments
Hall Liu [Fri, 14 Jul 2017 20:39:54 +0000 (13:39 -0700)]
Make slight API and doc adjustments

* Fix a compile error on Java 7
* Update initialization mechanism to allow exceptions and return codes
* App-facing api for StreamingService#dispose no longer throws an
IllegalArgumentException
* Add REASON_NONE to stream state change reasons

Change-Id: I4710c6e56b35f74188f5877f0cf74b7773c1e9b7

7 years agoMerge "Logging improvements for time zone updates"
Neil Fuller [Thu, 20 Jul 2017 17:58:12 +0000 (17:58 +0000)]
Merge "Logging improvements for time zone updates"

7 years agoLogging improvements for time zone updates
Neil Fuller [Thu, 20 Jul 2017 10:00:35 +0000 (11:00 +0100)]
Logging improvements for time zone updates

Logging improvements for time zone updates:
1) Add EventLog entries time zone update service interactions.
2) Add more information to dumpsys logs to improve debugging.

Unit tests run with:

make -j30 FrameworksServicesTests
adb install -r -g \
  "out/target/product/angler/data/app/FrameworksServicesTests/FrameworksServicesTests.apk"
adb shell am instrument -e package com.android.server.timezone -w \
  com.android.frameworks.servicestests \
  "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"

Bug: 31008728
Test: See above for unit testing.
Test: Internal xTS tests
Test: adb shell dumpsys timezone
Test: adb logcat -b events -v threadtime -v printable -v uid -d *:v
Change-Id: I9356f4694e60b49e4b06aadd632d1bad517b8a29

7 years agoMerge "Add unit test for IpSecService"
Di Lu [Thu, 20 Jul 2017 07:27:16 +0000 (07:27 +0000)]
Merge "Add unit test for IpSecService"

7 years agoMerge "Add unit test for IpSecManager"
Di Lu [Thu, 20 Jul 2017 05:42:53 +0000 (05:42 +0000)]
Merge "Add unit test for IpSecManager"

7 years agoMerge "Zygote: Poll with timeout for pid"
Treehugger Robot [Thu, 20 Jul 2017 05:25:24 +0000 (05:25 +0000)]
Merge "Zygote: Poll with timeout for pid"

7 years agoAdd unit test for IpSecService
ludi [Fri, 12 May 2017 16:15:00 +0000 (09:15 -0700)]
Add unit test for IpSecService

Test: runtest frameworks-net

Bug:38259578
Change-Id: I4a049d5fdec79e36692e3b12306bd0758c19ad75

7 years agoMerge "Add Configuration to APF Policy"
Treehugger Robot [Thu, 20 Jul 2017 03:34:57 +0000 (03:34 +0000)]
Merge "Add Configuration to APF Policy"

7 years agoZygote: Poll with timeout for pid
Andreas Gampe [Thu, 13 Jul 2017 02:17:52 +0000 (19:17 -0700)]
Zygote: Poll with timeout for pid

Do not use a blocking readInt. Poll for available bytes with a timeout.

(cherry picked from commit cbc421406193308667a38b0bebc16c4064a19e83)

Bug: 63638768
Test: m
Test: cts-tradefed run commandAndExit cts-dev -m CtsWrapWrapDebugTestCases
Change-Id: Ib2131c00aa47dd10bb940d8678bbbfb5a0346ad5

7 years agoMerge "frameworks/base: use proper nativehelper headers"
Treehugger Robot [Thu, 20 Jul 2017 02:42:49 +0000 (02:42 +0000)]
Merge "frameworks/base: use proper nativehelper headers"

7 years agoAdd Configuration to APF Policy
Ahmed ElArabawy [Tue, 13 Jun 2017 01:01:11 +0000 (18:01 -0700)]
Add Configuration to APF Policy

in b/37702435 battery was drained due to reception of
Ethernet frames with Eth-type < 0x600 (non ehternet II frames)

This change adds an XML file to drop/allow these frames
Dropping helps tp avoid acquiring a wakelock for the
reception of these packets, while allowing them may be needed
for some protocols
The Change allow the OEM to override the system settings

Bug: 37702435
Test: runtest frameworks-net
Merged-In: Idb6c215896ef230a8136ff4ecefc90ccdc5c1c6d
Merged-In: I16346bb98a0b9259f7c3f51e318c472cfc1bb492

Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
(cherry pick from commit 4dd7c58fc8fcc5a2c50de5e8eff05ddc5c3b0b8b)

Change-Id: Ie466baf1e6395d6c28245e41179232ea8e523845

7 years agoAdd unit test for IpSecManager
ludi [Fri, 12 May 2017 16:15:00 +0000 (09:15 -0700)]
Add unit test for IpSecManager

Test: runtest frameworks-net

Bug:38259578
Change-Id: Idb76aab899ccb7145bef2b7dce36e115c25fa6ca

7 years agoMerge "Add details to Download progress callback"
Treehugger Robot [Thu, 20 Jul 2017 00:23:48 +0000 (00:23 +0000)]
Merge "Add details to Download progress callback"

7 years agoMerge "Add timezone for Telecom event date formatting"
Treehugger Robot [Wed, 19 Jul 2017 23:46:52 +0000 (23:46 +0000)]
Merge "Add timezone for Telecom event date formatting"

7 years agoAdd details to Download progress callback
Robert Greenwalt [Sat, 17 Jun 2017 00:37:20 +0000 (17:37 -0700)]
Add details to Download progress callback

Split decode into max size and current size.

Test: builds
Change-Id: Ice18d7f0e9ae99b3c24fe10843da80abd0d912d7

7 years agoAdd timezone for Telecom event date formatting
Hall Liu [Wed, 19 Jul 2017 21:57:56 +0000 (14:57 -0700)]
Add timezone for Telecom event date formatting

Output event times in local time rather than in UTC for compatibility
with the rest of the timestamps in the bug report

Test: manual
Change-Id: I2d458f09aec635a43e3d0565e8f8da803124f368

7 years agoMerge "Fix static analyzer complaints"
Treehugger Robot [Wed, 19 Jul 2017 17:26:36 +0000 (17:26 +0000)]
Merge "Fix static analyzer complaints"

7 years agoframeworks/base: use proper nativehelper headers
Steven Moreland [Wed, 19 Jul 2017 16:50:45 +0000 (09:50 -0700)]
frameworks/base: use proper nativehelper headers

libnativehelper exports headers under nativehelper. These were
available before incorrectly as global headers in order to give
access to jni.h.

Test: modules using frameworks/base find headers
Bug: 63762847
Change-Id: I0f9f231acdebe460f279135462f43d3e32eff64d

7 years agoMerge "Adding 26 free short codes for DCB and other purposes"
Treehugger Robot [Wed, 19 Jul 2017 14:13:36 +0000 (14:13 +0000)]
Merge "Adding 26 free short codes for DCB and other purposes"

7 years agoCaptivePortalLoginActivity: improve logging
Hugo Benichi [Wed, 19 Jul 2017 12:20:53 +0000 (21:20 +0900)]
CaptivePortalLoginActivity: improve logging

- fix a type in onPageStarted
- map ssl error codes to names in onReceivedSslError

Bug: 62332137
Test: build
Change-Id: Ic789f54e06f539e47b60a67225b04b30cacded55

7 years agoMerge "Re-enable some test cases"
Neil Fuller [Wed, 19 Jul 2017 09:40:52 +0000 (09:40 +0000)]
Merge "Re-enable some test cases"

7 years agoMerge "ConnectivityServiceTest: fix testNetworkInfoOfTypeNone"
Treehugger Robot [Wed, 19 Jul 2017 07:54:45 +0000 (07:54 +0000)]
Merge "ConnectivityServiceTest: fix testNetworkInfoOfTypeNone"

7 years agoConnectivityServiceTest: fix testNetworkInfoOfTypeNone
Hugo Benichi [Wed, 19 Jul 2017 01:10:52 +0000 (10:10 +0900)]
ConnectivityServiceTest: fix testNetworkInfoOfTypeNone

This patch fixes a couple of flakyness issues with
testNetworkInfoOfTypeNone. It also fixes some typos and naming issues.

Bug: 6291839362918393
Test: runtest frameworks-net
Change-Id: I1c56557ab113d3ef57dbc06a6e882634d03c5b09

7 years agoMerge "IpManager: fix test for default ProvisioningConfiguration"
Treehugger Robot [Wed, 19 Jul 2017 00:58:11 +0000 (00:58 +0000)]
Merge "IpManager: fix test for default ProvisioningConfiguration"

7 years agoMerge "NetworkCapabilities: Unhide TRANSPORT_LOWPAN"
Treehugger Robot [Tue, 18 Jul 2017 23:09:58 +0000 (23:09 +0000)]
Merge "NetworkCapabilities: Unhide TRANSPORT_LOWPAN"

7 years agoMerge "GC in heapDumpFinished to cleanup hprof fd"
Treehugger Robot [Tue, 18 Jul 2017 22:30:31 +0000 (22:30 +0000)]
Merge "GC in heapDumpFinished to cleanup hprof fd"

7 years agoGC in heapDumpFinished to cleanup hprof fd
Billy Lam [Tue, 18 Jul 2017 19:01:44 +0000 (12:01 -0700)]
GC in heapDumpFinished to cleanup hprof fd

Previously the fd associated with the dump file was
not closed until the next GC. While this did not
affect AMS, external systems relying on monitoring
the close event on the file could not accurately
know when a dump operation was finished.

Bug: 62907010
Test: Manually flashed and tested

Change-Id: I0f6988099f479468f674eb7483f1f14529852270

7 years agoMerge changes from topic 'tether-offload-cherrypick'
Lorenzo Colitti [Tue, 18 Jul 2017 18:45:29 +0000 (18:45 +0000)]
Merge changes from topic 'tether-offload-cherrypick'

* changes:
  Add code to dump OffloadController state.
  Fetch tethering offload stats.
  Allow more than one source of tethering statistics.

7 years agoMerge "Launch NetD in a different thread"
nharold [Tue, 18 Jul 2017 17:56:35 +0000 (17:56 +0000)]
Merge "Launch NetD in a different thread"

7 years agoMerge "Remove ALOGD_IF_SLOW"
Tom Cherry [Tue, 18 Jul 2017 17:20:39 +0000 (17:20 +0000)]
Merge "Remove ALOGD_IF_SLOW"

7 years agoFix static analyzer complaints
George Burgess IV [Wed, 21 Jun 2017 06:53:29 +0000 (23:53 -0700)]
Fix static analyzer complaints

frameworks/base/core/jni/android_view_MotionEvent.cpp:383:12: warning:
Potential leak of memory pointed to by 'event'

frameworks/base/core/jni/AndroidRuntime.cpp:975:20: warning: Null passed
to a callee that requires a non-null 1st parameter

For the former, it was surprising to me that the analyzer couldn't
figure out that `event == nativePtr` for the latter check. Filed
https://bugs.llvm.org/show_bug.cgi?id=33540 upstream about it.

For the latter, it was complaining because `className` could be NULL
(more precisely, we have a NULL check at the top of the function it's
declared in, so NULL is presumably a valid value).

Bug: None
Test: Ran mma; complaints are gone.
Change-Id: I26a91ae25934f95acbfdbe4f3641e081fbc66c6d

7 years agoAdd code to dump OffloadController state.
Lorenzo Colitti [Wed, 12 Jul 2017 16:48:26 +0000 (01:48 +0900)]
Add code to dump OffloadController state.

(cherry-picked from commit c2519c5feae397e18561e00acea9d5e456bfaabe)

Bug: 29337859
Bug: 32163131
Test: observed output of "adb shell dumpsys connectivity tethering"
Change-Id: Icc5aa605cd64a4a2bb5993941dcc4010cc0b1d8e
Merged-In: Icc5aa605cd64a4a2bb5993941dcc4010cc0b1d8e

7 years agoFetch tethering offload stats.
Lorenzo Colitti [Wed, 12 Jul 2017 06:48:07 +0000 (15:48 +0900)]
Fetch tethering offload stats.

Make tethering offload register an ITetheringStatsProvider and
fetch tethering stats from the hardware.

Currently we fetch stats in the following cases:

1. Just after changing upstreams, we fetch stats from the
   previous upstream.
2. When we are polled by NetworkStatsService.

(cherry-picked from commit 5a7dea1a8eb2cf53fc1d5a52004647de94150e62)

Bug: 29337859
Bug: 32163131
Test: builds, boots
Test: stats appear in tethering logs
Change-Id: If744f2e06cb6a3095a40199936b9afb76eff7b56
Merged-In: If744f2e06cb6a3095a40199936b9afb76eff7b56

7 years agoAllow more than one source of tethering statistics.
Lorenzo Colitti [Mon, 10 Jul 2017 10:06:57 +0000 (19:06 +0900)]
Allow more than one source of tethering statistics.

Currently, netd is the only source of tethering statistics.
In order to support multiple sources, define a new
ITetheringStatsProvider interface that can be registered with
NetworkManagmentService. Convert the existing code into the
first ITetheringStatsProvider.

(cherry picked from commit ef7b2a13ce4c34950b52de27dcf65b74388d7b3d)

Bug: 29337859
Bug: 32163131
Test: builds, boots
Test: tethering stats continue to be collected
Change-Id: Ie1b5a5e47ae4bf5af922365b09fa241e834236e4
Merged-In: Ie1b5a5e47ae4bf5af922365b09fa241e834236e4

7 years agoMerge "Remove a TODO associate with starting a thread"
Treehugger Robot [Tue, 18 Jul 2017 15:17:25 +0000 (15:17 +0000)]
Merge "Remove a TODO associate with starting a thread"

7 years agoAdding 26 free short codes for DCB and other purposes
Carlos Vinueza [Fri, 7 Jul 2017 19:19:29 +0000 (12:19 -0700)]
Adding 26 free short codes for DCB and other purposes

Whitelist free short code batch 2017 Q2 - Android Partner Engineering
The list includes 2 short codes used for spam reports in GB, 15 for free
carrier services and 9 for for Direct Carrier Billing purposes in
different geos.

Test: manual - uploaded modified file onto test device and tested
sending SMS to changed shortcodes to verify behaviour.

Bug: 37355429

Change-Id: Idb0a1b76619fc635659922083bd19423d96229f1
Signed-off-by: Carlos Vinueza <chinesco@google.com>
7 years agoRemove a TODO associate with starting a thread
Neil Fuller [Tue, 18 Jul 2017 13:02:01 +0000 (14:02 +0100)]
Remove a TODO associate with starting a thread

Switching to an alternative method to run something off
thread.

Bug: 31008728
Test: Internal automated testing / manual tests
Change-Id: Ia33ca29e8d83028a21af1dca22de75dd43eee119

7 years agoIpManager: fix test for default ProvisioningConfiguration
Hugo Benichi [Tue, 18 Jul 2017 07:17:49 +0000 (16:17 +0900)]
IpManager: fix test for default ProvisioningConfiguration

The test did not properly account for the stopAllIP() done in starting
state of the IpManager state machine, which could cause assertions to
fail when stopAllIP() is called again after stop().

Bug: 62988545
Test: runtest frameworks-net
Change-Id: I2c6eb76461a81c1d743bf448da36c58a99ce082d

7 years agoRe-enable some test cases
Neil Fuller [Tue, 18 Jul 2017 09:30:53 +0000 (10:30 +0100)]
Re-enable some test cases

Re-enable some test cases now the case they test has been
renabled (by commit 3d7a4143d5a2b771a02777354c9a11c981c63c59).

Tested with:

make -j30 FrameworksServicesTests
adb install -r -g \
  "out/target/product/angler/data/app/FrameworksServicesTests/FrameworksServicesTests.apk"
adb shell am instrument -e package com.android.server.timezone -w \
  com.android.frameworks.servicestests \
  "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"

Bug: 31008728
Test: See above
Change-Id: Ia26c4355e41d5b1010594a06bb8c4e8cef8528f7

7 years agoLaunch NetD in a different thread
Nathan Harold [Mon, 17 Jul 2017 21:01:53 +0000 (14:01 -0700)]
Launch NetD in a different thread

Calling run() launches in the current thread;
we want to call start() to launch in a separate
thread to unblock system initialization.

Bug: none
Test: compilation
Change-Id: Ia85059100add6a44a5e3262500b00ba8ca21e125

7 years agoMerge "Reference nativehelper/jni.h as jni.h"
Treehugger Robot [Tue, 18 Jul 2017 02:47:33 +0000 (02:47 +0000)]
Merge "Reference nativehelper/jni.h as jni.h"

7 years agoMerge "BootReceiver: check console-ramoops-0"
Treehugger Robot [Mon, 17 Jul 2017 22:24:39 +0000 (22:24 +0000)]
Merge "BootReceiver: check console-ramoops-0"

7 years agoMerge "Address post-commit review comments"
Neil Fuller [Mon, 17 Jul 2017 22:19:07 +0000 (22:19 +0000)]
Merge "Address post-commit review comments"

7 years agoMerge "Remove unnecessary TODOs"
Neil Fuller [Mon, 17 Jul 2017 22:15:42 +0000 (22:15 +0000)]
Merge "Remove unnecessary TODOs"

7 years agoMerge "Remove TODOs that are not needed"
Neil Fuller [Mon, 17 Jul 2017 22:15:08 +0000 (22:15 +0000)]
Merge "Remove TODOs that are not needed"

7 years agoMerge "Make BluetoothStateChangeCallback oneway to prevent waiting on response."
Treehugger Robot [Mon, 17 Jul 2017 21:47:31 +0000 (21:47 +0000)]
Merge "Make BluetoothStateChangeCallback oneway to prevent waiting on response."

7 years agoBootReceiver: check console-ramoops-0
Mark Salyzyn [Fri, 14 Jul 2017 20:08:47 +0000 (13:08 -0700)]
BootReceiver: check console-ramoops-0

On later kernels /sys/fs/pstore/console-ramoops becomes
/sys/fs/pstore/console-ramoops-0

Test: none
Bug: 63058217
Change-Id: Ia68c0b5741c35cb35f10be6bbce93e0f0c92480f

7 years agoReference nativehelper/jni.h as jni.h
Steven Moreland [Mon, 17 Jul 2017 19:08:45 +0000 (12:08 -0700)]
Reference nativehelper/jni.h as jni.h

nativehelper will no longer export nativehelper/jni.h so that everywhere
can reference this file with the same name.

Bug: 63762847
Change-Id: I8d2e9587439efa2d6ab03a5bdfa749fc620759e1

7 years agoMake BluetoothStateChangeCallback oneway to prevent waiting on response.
xutianguo [Mon, 22 May 2017 06:03:33 +0000 (14:03 +0800)]
Make BluetoothStateChangeCallback oneway to prevent waiting on response.

Test: Connected bluetooth devices(included Headset/HID devices), and
made bluetooth enabling/disabling over 1000 times, no other side effect
observed.

Bug: 38485770

Change-Id: Ia3959d2441aece39a79ab2d662b57790a78df674
Signed-off-by: xutianguo <xutianguo@xiaomi.com>
(cherry picked from commit 95e1e21a639318bb3399c394707624393cfa2300)

7 years agoRemove unnecessary TODOs
Neil Fuller [Mon, 17 Jul 2017 17:02:29 +0000 (18:02 +0100)]
Remove unnecessary TODOs

The classes under test are not part of a public
API so they are not tested via CTS.

Bug: 31008728
Test: make droid
Change-Id: If10db42b6e79728a6625708d35a04c5002164866

7 years agoRemove TODOs that are not needed
Neil Fuller [Mon, 3 Jul 2017 13:38:50 +0000 (14:38 +0100)]
Remove TODOs that are not needed

Remove TODOs to add classes to the system API that are not needed
(since they are used by a platform-only app).

Bug: 31008728
Test: make droid
Change-Id: I0d75686ddeae929e9d87c5ca8703a609a1450d76
Merged-In: I600e7b08853b86b27463193411cf85207ae09ce8

7 years agoMerge "Check ManagedResource is NonNull before Checking Owner"
nharold [Mon, 17 Jul 2017 16:57:01 +0000 (16:57 +0000)]
Merge "Check ManagedResource is NonNull before Checking Owner"

7 years agoMerge "Update JNI code in preparation for ICU 59 switching to C++11 char16_t."
Treehugger Robot [Mon, 17 Jul 2017 16:46:09 +0000 (16:46 +0000)]
Merge "Update JNI code in preparation for ICU 59 switching to C++11 char16_t."

7 years agoUpdate JNI code in preparation for ICU 59 switching to C++11 char16_t.
Fredrik Roubert [Thu, 6 Apr 2017 20:13:51 +0000 (22:13 +0200)]
Update JNI code in preparation for ICU 59 switching to C++11 char16_t.

ICU 59 (update pending on the aosp/icu59 branch) has switched to using
the C++11 char16_t data type, which is a distinct type from uint16_t
(which is what JNI's jchar is typedef'd as), even though they are
bitwise identical.

All code that passes UTF-16 data between ICU4C and JNI must therefore be
updated with typecasts in the appropriate places before ICU 59 is merged
to aosp/master.

Bug: 37554848
Test: make
Change-Id: Ibbc90d2b603382d4715551d05c4a6a462529542d
Merged-In: Ic84a94be82acbef41f80cc113d5da485ce54ae29

7 years agoMerge "Track libcore commit 58228b82c64808eddac02736f18f5003730443a0"
Przemyslaw Szczepaniak [Mon, 17 Jul 2017 10:37:35 +0000 (10:37 +0000)]
Merge "Track libcore commit 58228b82c64808eddac02736f18f5003730443a0"

7 years agoMerge "Add more details to dumpsys meminfo -d"
Treehugger Robot [Fri, 14 Jul 2017 21:21:39 +0000 (21:21 +0000)]
Merge "Add more details to dumpsys meminfo -d"

7 years agoAdd more details to dumpsys meminfo -d
Mathieu Chartier [Thu, 13 Jul 2017 22:01:34 +0000 (15:01 -0700)]
Add more details to dumpsys meminfo -d

Added new subitems for
.dex:
boot vdex
app vdex
app odex

.art
app art
boot art

Fixed accounting for dalvik other to be subitems of other subsection
instead of dalvik.

Sample output:
261,892K: Native
213,196K: .dex mmap
    111,620K: .App vdex
    65,070K: .App dex
    36,506K: .Boot vdex
192,320K: EGL mtrack
161,835K: .so mmap
134,922K: .apk mmap
85,612K: Dalvik
    74,656K: .Heap
    4,526K: .Zygote
    4,218K: .LOS
    2,212K: .NonMoving
64,906K: Unknown
52,119K: .oat mmap
42,828K: Dalvik Other
    32,704K: .LinearAlloc
    3,672K: .JITCache
    3,248K: .IndirectRef
    3,204K: .GC
40,754K: .art mmap
    31,133K: .Boot art
    9,621K: .App art
21,976K: Other mmap
20,704K: Stack
16,270K: Gfx dev
9,200K: GL mtrack
3,428K: Other dev
2,744K: .ttf mmap
1,116K: Ashmem
1,052K: .jar mmap
0K: Cursor
0K: Other mtrack

Test: dumpsys meminfo -d
Test: dumpsys meminfo -s
Test: dumpsys meminfo
Test: dumpsys meminfo <pid>
Test: dumpsys memifno -d <pid>

Bug: 32331673

(cherry picked from commit 95550dd39440196d364767fc18d441ed5a0e36d6)

Change-Id: I7557ee09510651c7b5ddee646c92adbcdd3472db

7 years agoMerge "Clean up streaming API docs and organize errors"
Treehugger Robot [Fri, 14 Jul 2017 02:32:21 +0000 (02:32 +0000)]
Merge "Clean up streaming API docs and organize errors"

7 years agoMerge "IpManager: define InitialConfiguration"
Treehugger Robot [Thu, 13 Jul 2017 20:45:21 +0000 (20:45 +0000)]
Merge "IpManager: define InitialConfiguration"

7 years agoIpManager: define InitialConfiguration
Hugo Benichi [Fri, 23 Jun 2017 01:07:08 +0000 (10:07 +0900)]
IpManager: define InitialConfiguration

This patch adds a InitialConfiguration class to IpManager for specifying
IP information in IpManager ProvisioningConfiguration at IpManager
startup.

At the moment this InitialConfiguration is not used, but is validated in
startProvsiioning if ProvisioningConfiguration includes one. It will be
integrated into IpManager IP provisioning logic in follow-up patches.

This patch also includes an example of data driven unit tests using a
table of test case. The highlights of this methodology are:
  1) easy extensibility for new test case,
  2) rich and informative error messages,
Unfortunately Java support for inlined data structure literals is poor
and some companion static methods for data generation are required for
enabling this methodology.

Bug: 62988545
Test: added new test in FrameworksNetTests,
      $ runtest frameworks-net
      $ runtest frameworks-wifi
Merged-In: I060b02603af7d73a6407df89344bf0c000574af2

(cherry pick of commit 2757fcf3a13b0addc4a168a12c72ac2fc418b012)

Change-Id: I48dbf89232d7758f1b07ed4d76ce93281e5c6b53

7 years agoMerge "Add configureRpcThreadpool to java interface"
Treehugger Robot [Thu, 13 Jul 2017 19:11:39 +0000 (19:11 +0000)]
Merge "Add configureRpcThreadpool to java interface"

7 years agoTrack libcore commit 58228b82c64808eddac02736f18f5003730443a0
Przemyslaw Szczepaniak [Wed, 12 Jul 2017 15:48:41 +0000 (16:48 +0100)]
Track libcore commit 58228b82c64808eddac02736f18f5003730443a0

Test: CtsLibcoreTestCases
Bug: 62949898
Change-Id: Icc41052e9476cc08bf3fa9579964f141d164c36c