OSDN Git Service

android-x86/frameworks-base.git
6 years agoMerge "Fix NPE when removing PIN locked SIM during E911 call"
Treehugger Robot [Fri, 6 Oct 2017 03:43:31 +0000 (03:43 +0000)]
Merge "Fix NPE when removing PIN locked SIM during E911 call"

6 years agoMerge "Display "No service" on status bar when SIM unready"
Jordan Liu [Thu, 5 Oct 2017 23:30:45 +0000 (23:30 +0000)]
Merge "Display "No service" on status bar when SIM unready"

6 years agoMerge "Fix documentation generation with OpenJDK 9 javadoc."
Tobias Thierer [Thu, 5 Oct 2017 23:01:03 +0000 (23:01 +0000)]
Merge "Fix documentation generation with OpenJDK 9 javadoc."

6 years agoFix NPE when removing PIN locked SIM during E911 call
Brad Ebinger [Thu, 5 Oct 2017 18:39:06 +0000 (11:39 -0700)]
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

6 years agoMerge "NativeActivity: Improve error message reporting"
Treehugger Robot [Thu, 5 Oct 2017 09:44:21 +0000 (09:44 +0000)]
Merge "NativeActivity: Improve error message reporting"

6 years agoMerge "Cosmetic Cleanups for IpSecService"
nharold [Thu, 5 Oct 2017 00:14:16 +0000 (00:14 +0000)]
Merge "Cosmetic Cleanups for IpSecService"

6 years agoCosmetic Cleanups for IpSecService
Nathan Harold [Wed, 4 Oct 2017 19:58:55 +0000 (12:58 -0700)]
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

6 years agoMerge changes from topic "ipsec-svc-cleanup"
nharold [Wed, 4 Oct 2017 20:00:52 +0000 (20:00 +0000)]
Merge changes from topic "ipsec-svc-cleanup"

* changes:
  Split IpSecServiceTest to add IPv6 Tests
  Add equals() for IpSecAlgorithm and IpSecConfig
  Input Validation for IpSecService

6 years agoNativeActivity: Improve error message reporting
dimitry [Wed, 4 Oct 2017 17:44:56 +0000 (19:44 +0200)]
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

6 years agoMerge "PBAP: Use ACTION_CONNECTION_STATE_CHANGED intent"
Treehugger Robot [Wed, 4 Oct 2017 17:01:00 +0000 (17:01 +0000)]
Merge "PBAP: Use ACTION_CONNECTION_STATE_CHANGED intent"

6 years agoPBAP: Use ACTION_CONNECTION_STATE_CHANGED intent
Jack He [Tue, 3 Oct 2017 02:08:30 +0000 (19:08 -0700)]
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

6 years agoMerge "New function signature for setResolverConfiguration"
Treehugger Robot [Wed, 4 Oct 2017 12:39:09 +0000 (12:39 +0000)]
Merge "New function signature for setResolverConfiguration"

6 years agoMerge "Revert work around clang-tidy segmentation fault."
Chih-hung Hsieh [Wed, 4 Oct 2017 06:26:42 +0000 (06:26 +0000)]
Merge "Revert work around clang-tidy segmentation fault."

6 years agoMerge "Convert java hwbinder mk -> bp."
Treehugger Robot [Wed, 4 Oct 2017 04:00:03 +0000 (04:00 +0000)]
Merge "Convert java hwbinder mk -> bp."

6 years agoConvert java hwbinder mk -> bp.
Steven Moreland [Mon, 2 Oct 2017 23:58:41 +0000 (16:58 -0700)]
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

6 years agoRevert work around clang-tidy segmentation fault.
Chih-Hung Hsieh [Wed, 4 Oct 2017 03:14:21 +0000 (20:14 -0700)]
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

6 years agoSplit IpSecServiceTest to add IPv6 Tests
Nathan Harold [Tue, 26 Sep 2017 18:44:23 +0000 (11:44 -0700)]
Split IpSecServiceTest to add IPv6 Tests

-Split IpSecServiceTest into parameterized
 and single tests.
-Add IPv6 parameters

Bug: 66954381
Test: this
Change-Id: Ib98c112560014f73bccc3d2842c31d297c7a07ef

6 years agoAdd equals() for IpSecAlgorithm and IpSecConfig
Nathan Harold [Tue, 26 Sep 2017 02:33:13 +0000 (19:33 -0700)]
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

6 years agoInput Validation for IpSecService
Nathan Harold [Wed, 23 Aug 2017 20:46:33 +0000 (13:46 -0700)]
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

6 years agoMerge "Collapse Notification panel after tapping CLEAR ALL button"
Selim Cinek [Tue, 3 Oct 2017 21:07:57 +0000 (21:07 +0000)]
Merge "Collapse Notification panel after tapping CLEAR ALL button"

6 years agoMerge "fix AmrInputStream.read() hang"
Treehugger Robot [Tue, 3 Oct 2017 20:37:36 +0000 (20:37 +0000)]
Merge "fix AmrInputStream.read() hang"

6 years agoMerge "Adds a filtering bitmask to DownloadStateCallback"
Brad Ebinger [Tue, 3 Oct 2017 20:23:00 +0000 (20:23 +0000)]
Merge "Adds a filtering bitmask to DownloadStateCallback"

6 years agoMerge "Remove verification for DownloadReceiver when failure"
Brad Ebinger [Tue, 3 Oct 2017 18:32:04 +0000 (18:32 +0000)]
Merge "Remove verification for DownloadReceiver when failure"

6 years agoMerge "Decouple Content Name Locale from Content Language Locale"
Brad Ebinger [Tue, 3 Oct 2017 18:31:49 +0000 (18:31 +0000)]
Merge "Decouple Content Name Locale from Content Language Locale"

6 years agoAdds a filtering bitmask to DownloadStateCallback
Brad Ebinger [Fri, 29 Sep 2017 22:12:08 +0000 (15:12 -0700)]
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

6 years agoDisplay "No service" on status bar when SIM unready
Wenting Xiong [Thu, 13 Oct 2016 09:38:16 +0000 (17:38 +0800)]
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

6 years agoFix documentation generation with OpenJDK 9 javadoc.
Tobias Thierer [Tue, 3 Oct 2017 11:15:02 +0000 (12:15 +0100)]
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

6 years agoMerge "Update dalvik.bytecode package"
Orion Hodson [Tue, 3 Oct 2017 07:57:14 +0000 (07:57 +0000)]
Merge "Update dalvik.bytecode package"

6 years agoMerge "Replace strcpy with memcpy."
Treehugger Robot [Tue, 3 Oct 2017 04:09:48 +0000 (04:09 +0000)]
Merge "Replace strcpy with memcpy."

6 years agoCollapse Notification panel after tapping CLEAR ALL button
Reifu Sato [Thu, 28 Sep 2017 06:10:09 +0000 (15:10 +0900)]
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

6 years agoMerge "Delete jack support"
Treehugger Robot [Tue, 3 Oct 2017 01:17:25 +0000 (01:17 +0000)]
Merge "Delete jack support"

6 years agofix AmrInputStream.read() hang
Wonsik Kim [Mon, 2 Oct 2017 23:16:34 +0000 (16:16 -0700)]
fix AmrInputStream.read() hang

Test: AmrInputStream.read() no longer hangs
Change-Id: I5b3e1c7667891ce250e447c32213511077c5b5df

6 years agoMerge "Add moveObject method to change object's path and parent."
Treehugger Robot [Mon, 2 Oct 2017 23:53:56 +0000 (23:53 +0000)]
Merge "Add moveObject method to change object's path and parent."

6 years agoNew function signature for setResolverConfiguration
Ben Schwartz [Mon, 2 Oct 2017 17:08:06 +0000 (13:08 -0400)]
New function signature for setResolverConfiguration

Bug: 64753847
Test: Tests pass.  Normal web browsing works normally.
Change-Id: I2dc2b6ef1c82d9b408501fa73be9c7d0f8672d06

6 years agoAdd moveObject method to change object's path and parent.
Jerry Zhang [Wed, 27 Sep 2017 00:49:52 +0000 (17:49 -0700)]
Add moveObject method to change object's path and parent.

This is needed to implement the MTP MOVE_OBJECT operation.

Bug: 66679910
Test: Move objects and folders, verify mediastore is consistent
Change-Id: I2f4f0c43134fb3ff82745166c051712cc1736b7f

6 years agoDelete jack support
Colin Cross [Wed, 27 Sep 2017 21:43:27 +0000 (14:43 -0700)]
Delete jack support

Remove references to jack makefiles that no longer exist.

Bug: 65302138
Test: m -j checkbuild
Change-Id: I9fbee7db0167300edf59a85badeff87b4b25f846
Merged-In: I9fbee7db0167300edf59a85badeff87b4b25f846
(cherry picked from commit c6fbe4ef07faaee070f96c380682c5392386be6a)

6 years agoMerge "ConnectivityServiceTest: fix flaky testNetworkRequestMaximum"
Treehugger Robot [Mon, 2 Oct 2017 10:24:48 +0000 (10:24 +0000)]
Merge "ConnectivityServiceTest: fix flaky testNetworkRequestMaximum"

6 years agoConnectivityServiceTest: fix flaky testNetworkRequestMaximum
Hugo Benichi [Fri, 29 Sep 2017 00:34:08 +0000 (09:34 +0900)]
ConnectivityServiceTest: fix flaky testNetworkRequestMaximum

Registered requests are not keyed by PendingIntents in
ConnectivityService, which means that unregistering a request with a
PendingIntent causes a linear search in all registered requests.

testNetworkRequestMaximum was registering too many PendingIntents
simultaneously, causing the unregistration loop to have n^2
complexity and to take a long time to take effect.

To make the unregistering loop less likely to trigger a timeout on
waitForIdle, this patch changes the test to not register MAX_REQUEST
number of PendingIntent, but instead mixes a small number of
PendingIntents with NetworkCallbacks to reach MAX_REQUEST number of
simultaneously registered requests.

When unregistering these requests, callbacks are unregistered first.

Bug: 32561414
Test: runtest frameworks-net
Change-Id: I48b882c884abe20b388190b7f28baee293446f37

6 years agoMerge "Bluetooth HID Device: Fix a typo"
Hansong Zhang [Sat, 30 Sep 2017 04:35:54 +0000 (04:35 +0000)]
Merge "Bluetooth HID Device: Fix a typo"

6 years agoDecouple Content Name Locale from Content Language Locale
Brad Ebinger [Fri, 29 Sep 2017 01:00:46 +0000 (18:00 -0700)]
Decouple Content Name Locale from Content Language Locale

There was an assumption that content language Locale was
a 1:1 mapping with content locale name, which is not the
case. This change separates the two and provides a new
API for retreiving the set of Locales for content name.

Test: Manual
Change-Id: I44cb527ceb77fe321500f9d5fc00f6880ee52cb7

6 years agoBluetooth HID Device: Fix a typo
Hansong Zhang [Wed, 27 Sep 2017 23:59:01 +0000 (16:59 -0700)]
Bluetooth HID Device: Fix a typo

Fixed a typo in BluetoothInputHost. "DIGITIZER_TABLED" should be
"DIGITIZER_TABLET".

Test: Not needed.
Change-Id: I06ffc536f5912d53319b4d325f77991d65ab04f2

6 years agoMerge "AmrInputStream is not a public API"
Treehugger Robot [Fri, 29 Sep 2017 19:50:37 +0000 (19:50 +0000)]
Merge "AmrInputStream is not a public API"

6 years agoRemove verification for DownloadReceiver when failure
Brad Ebinger [Fri, 29 Sep 2017 18:04:05 +0000 (11:04 -0700)]
Remove verification for DownloadReceiver when failure

When the ACTION_DOWNLOAD_RESULT_INTERNAL intent is received
with a failure result, don't require that extras exist
in the receiver.

Test: Manual, Testapps
Change-Id: I9ac43a33aff88755cbc804890ce230743195f44d

6 years agoAmrInputStream is not a public API
Marco Nelissen [Fri, 29 Sep 2017 17:15:34 +0000 (10:15 -0700)]
AmrInputStream is not a public API

and nobody should be using it. Add some warnings to that effect.

Change-Id: I8029ccd665fd147b4708a68f61c6aa055004a5c1

6 years agoMerge "Change BlockingSocketReader to use MessageQueue fd handling"
Treehugger Robot [Fri, 29 Sep 2017 02:12:32 +0000 (02:12 +0000)]
Merge "Change BlockingSocketReader to use MessageQueue fd handling"

6 years agoMerge "Add frameworks base config and move text blobs there"
Mathieu Chartier [Thu, 28 Sep 2017 23:43:46 +0000 (23:43 +0000)]
Merge "Add frameworks base config and move text blobs there"

6 years agoMerge "VintfRuntimeInfo: do not fetch files that are not needed"
Treehugger Robot [Thu, 28 Sep 2017 22:11:43 +0000 (22:11 +0000)]
Merge "VintfRuntimeInfo: do not fetch files that are not needed"

6 years agoAdd frameworks base config and move text blobs there
Mathieu Chartier [Fri, 11 Aug 2017 21:35:46 +0000 (14:35 -0700)]
Add frameworks base config and move text blobs there

Bug: 64259751
Test: clean oat files && make and flash

(cherry picked from commit a023b86c3b4554b90ed6edfd63cedddb4f0100f9)

Merged-In: I7c898d69e66257fe0a7827ebbab1fcff4aa6473e
Change-Id: Ifb40ec51e7184984853c0d2382f040d2dea63168

6 years agoMerge "Rename libz-host -> libz"
Dan Willemsen [Thu, 28 Sep 2017 20:57:43 +0000 (20:57 +0000)]
Merge "Rename libz-host -> libz"

6 years agoMerge "Frameworks: Move Log holder to be preloaded"
Treehugger Robot [Thu, 28 Sep 2017 20:57:35 +0000 (20:57 +0000)]
Merge "Frameworks: Move Log holder to be preloaded"

6 years agoMerge "Don't cancel by UID when an app is disabled or uninstalled"
Makoto Onuki [Thu, 28 Sep 2017 16:19:05 +0000 (16:19 +0000)]
Merge "Don't cancel by UID when an app is disabled or uninstalled"

6 years agoFrameworks: Move Log holder to be preloaded
Andreas Gampe [Wed, 27 Sep 2017 18:57:27 +0000 (11:57 -0700)]
Frameworks: Move Log holder to be preloaded

To avoid issues with late initialization, let the holder be
initialized in the zygote.

(cherry picked from commit 61a3e8c23a7c62c389433113802a0d74f4ab53cf)

Bug: 65927416
Test: m
Merged-In: I6f454df46d4c64d295e1f2510793d5087b74fb74
Change-Id: I6f454df46d4c64d295e1f2510793d5087b74fb74

6 years agoMerge "Fix NPE in NsdServiceTest"
Hugo Benichi [Thu, 28 Sep 2017 12:13:18 +0000 (12:13 +0000)]
Merge "Fix NPE in NsdServiceTest"

6 years agoChange BlockingSocketReader to use MessageQueue fd handling
Erik Kline [Mon, 10 Jul 2017 11:17:30 +0000 (20:17 +0900)]
Change BlockingSocketReader to use MessageQueue fd handling

Convert the simplistic blocking read in a separate thread model to
the MessageQueue OnFileDescriptorEventListener model, albeit still
on a separate thread.

Test: as follows
    - built
    - flashed
    - booted
    - "runtest frameworks-net" passes
    - basic IpManager functions still work,
      including ConnectivityPacketTracker
Bug: 62476366
Bug: 67013397
Change-Id: I1f4a6707eba402338947fe3f5392a26660f05714

6 years agoMerge "Do not throw on call to isTetheringSupported w/o permission"
Jean Chalard [Thu, 28 Sep 2017 07:39:14 +0000 (07:39 +0000)]
Merge "Do not throw on call to isTetheringSupported w/o permission"

6 years agoDo not throw on call to isTetheringSupported w/o permission
Chalard Jean [Tue, 26 Sep 2017 06:45:18 +0000 (15:45 +0900)]
Do not throw on call to isTetheringSupported w/o permission

...just return false instead.

Test: Made an app to test this. Made sure it doesn't have
Test: the required permission. Checked it crashes with
Test: SecurityException without this change. Checked that it
Test: doesn't with it.

Merged-In: Ib5b17a7f68c1327f47fe1f54c0454c51f4226907
Change-Id: Id20d3c240ec5d70d085e0366b92ab3a514f3e7c8
(cherry picked from commit 8f76fc38ec1682667de2caf3940fbfb71744d368)

6 years agoFix NPE in NsdServiceTest
Hugo Benichi [Tue, 26 Sep 2017 05:51:11 +0000 (14:51 +0900)]
Fix NPE in NsdServiceTest

Continuous test dashboards report that quit() can crash sometimes
due to mThread being null.

This patch adds a null guard in tearDown().

Bug: 32561414
Test: runtest frameworks-net
Change-Id: If66fb47e31e77d25b4741a786f12eb78f0b9102e

6 years agoRename libz-host -> libz
Dan Willemsen [Wed, 27 Sep 2017 23:20:31 +0000 (16:20 -0700)]
Rename libz-host -> libz

Test: m host
Change-Id: I2806dde519602bc31b622ae3b3f55ab8b1287744

6 years agoVintfRuntimeInfo: do not fetch files that are not needed
Yifan Hong [Tue, 26 Sep 2017 22:07:34 +0000 (15:07 -0700)]
VintfRuntimeInfo: do not fetch files that are not needed

... to avoid unnecessary denials.

Test: CtsDeviceInfo
Bug: 66960848
Change-Id: I28821c44285a7de424a79b8a374feac6718605b1

6 years agoMerge "Modify Bluetooth Class of Device from Android stack"
Treehugger Robot [Wed, 27 Sep 2017 19:43:17 +0000 (19:43 +0000)]
Merge "Modify Bluetooth Class of Device from Android stack"

6 years agoUpdate dalvik.bytecode package
Orion Hodson [Fri, 22 Sep 2017 09:04:56 +0000 (10:04 +0100)]
Update dalvik.bytecode package

BUG: 66562179
Test: m checkapi
Change-Id: Ifeecbecbd7334b55126b6e0f51eb5e8b516e341a

6 years agoMerge "Delete the legacy framework code for manipulating ND offload."
Lorenzo Colitti [Wed, 27 Sep 2017 10:46:36 +0000 (10:46 +0000)]
Merge "Delete the legacy framework code for manipulating ND offload."

6 years agoMerge "Adds necessary permissions to system apis"
Jean Chalard [Wed, 27 Sep 2017 09:50:42 +0000 (09:50 +0000)]
Merge "Adds necessary permissions to system apis"

6 years agoMerge "Declare support for Ethernet if the service is running."
Treehugger Robot [Wed, 27 Sep 2017 08:23:34 +0000 (08:23 +0000)]
Merge "Declare support for Ethernet if the service is running."

6 years agoDelete the legacy framework code for manipulating ND offload.
Lorenzo Colitti [Wed, 27 Sep 2017 04:17:47 +0000 (13:17 +0900)]
Delete the legacy framework code for manipulating ND offload.

This only worked on broadcom devices, and was superseded in
M by a wifi HAL call made by IpManager.

Test: bullhead builds, boots
Change-Id: I711cae7dafe171c2c8b4e84a229adbcad27f3d14

6 years agoDeclare support for Ethernet if the service is running.
Lorenzo Colitti [Thu, 24 Aug 2017 13:35:10 +0000 (22:35 +0900)]
Declare support for Ethernet if the service is running.

On some devices, support for TYPE_ETHERNET is not specified in
the networkAttributes config resource, even though the device is
capable of supporting Ethernet (e.g., via USB host adapters).
This leads to Ethernet working but various connectivity APIs
behaving as if it was not - for example, no CONNECTIVITY_ACTION
broadcasts will be issues when it connects or disconnects.

Ensure that ConnectivityService always treats Ethernet as
available if the service is running. Currently the service is
started if the device supports FEATURE_ETHERNET or
FEATURE_USB_HOST.

Bug: 37359230
Test: bullhead builds, boots
Test: ConnectivityServiceTest passes
Test: Ethernet is available even if removed from networkAttributes resource
Test: ConnectivityManagerTest CTS test passes
Change-Id: I58801bf4f0bbdc3ff6345ec6bfdc911ce045c8ab

6 years agoAdds necessary permissions to system apis
Udam Saini [Wed, 7 Jun 2017 19:06:28 +0000 (12:06 -0700)]
Adds necessary permissions to system apis

adds privileged permission for getCaptivePortalServerUrl
adds tether privileged permission for
startTethering,isTetheringSupported

bug:62348162

Test: make and manual testing
Change-Id: I8eb8e3c9dcd7201abe9ea303ee57fe99073d67eb

6 years agoMerge "[DO NOT MERGE] Fix another AddAccountSettings memory leak"
Fyodor Kupolov [Wed, 27 Sep 2017 00:25:16 +0000 (00:25 +0000)]
Merge "[DO NOT MERGE] Fix another AddAccountSettings memory leak"

6 years agoReplace strcpy with memcpy.
Yunlian Jiang [Wed, 13 Sep 2017 19:01:15 +0000 (12:01 -0700)]
Replace strcpy with memcpy.

This fixes the warning
Call to function 'strcpy' is insecure as it does not provide bounding of
the memory buffer. As a side effect, it sliences the warning
frameworks/base/tools/aapt/Images.cpp:1270:50: warning: Potential leak
of memory pointed to by field 'data' [clang-analyzer-unix.Malloc]
frameworks/base/tools/aapt2/compile/Png.cpp:562:42: warning: Potential
leak of memory pointed to by field 'data' [clang-analyzer-unix.Malloc].

Bug: None
Test: The warning is gone.

Change-Id: I25f68ff85bea7069c21549c7deb7920d1877069e

6 years ago[DO NOT MERGE] Fix another AddAccountSettings memory leak
tiansiming [Wed, 20 Sep 2017 05:59:13 +0000 (13:59 +0800)]
[DO NOT MERGE] Fix another AddAccountSettings memory leak

The memory leak will always occur in AddAccoutSettings
when Bundle with an invalid intent returned in the addAccount we implement.

Bug:https://issuetracker.google.com/issues/66088681
Test:Install the app through the github offered in above link,
then press the "Test" item in ChooseAccountActivity (adb shell am start -n
'com.android.settings/.accounts.ChooseAccountActivity') serveal times.
Check the activity number by "adb shell dumpsys meminfo com.android.settings".

Change-Id: Id15fc73521d0ddc6ca891b6029ad04cd4427dbfe
Signed-off-by: tiansiming <tiansiming@xiaomi.com>
6 years agoMerge changes from topic "re-enable-ipsec"
nharold [Tue, 26 Sep 2017 21:46:39 +0000 (21:46 +0000)]
Merge changes from topic "re-enable-ipsec"

* changes:
  Re-Expose IpSecService API Surface
  Re-Enable Starting of the IpSecService

6 years agoDon't cancel by UID when an app is disabled or uninstalled
Makoto Onuki [Wed, 30 Aug 2017 21:53:16 +0000 (14:53 -0700)]
Don't cancel by UID when an app is disabled or uninstalled

Instead, cancel by UID/package.

Bug: 64536115
Test: DO NOT MERGE
Change-Id: Ib1c973e19dbbea1a537de91a96e6a21c787faeaf
Merged-in: I8f50c459cf321ac43fd2a6696cb8d4c593accd67

6 years agoMerge changes Ia47e566b,Ib94d79a9
Hugo Benichi [Tue, 26 Sep 2017 09:48:10 +0000 (09:48 +0000)]
Merge changes Ia47e566b,Ib94d79a9

* changes:
  Separate connectivity event buffer for bug reports
  Extract RingBuffer class from NetdEventListenerService

6 years agoSeparate connectivity event buffer for bug reports
Hugo Benichi [Fri, 15 Sep 2017 05:18:57 +0000 (14:18 +0900)]
Separate connectivity event buffer for bug reports

This patch uses the RingBuffer class previously extracted out of
NetdEventListenerService for buffering connectivity events in two
independent buffers:
 - the current existing buffer used for metrics reporting
 - a new rolling buffer, used for bug report dumpsys.

This improves the suefulness of connectivity metrics for bug reports
by solving these three issues tied to the usage of the existing metrics
reporting buffer:
 - the buffer is always cleared when metrics reporting happens. If a bug
 report is taken shortly after, there is no past connectivity event
 added to that bug report.
 - the buffer has a max capacity and starts dropping new events when it
 saturates, until metrics reporting happens. When this happens, a bug
 report will not contain recent connectivity events.
 - some types of event are rate limited to avoid flooding the metrics
 buffer. events dropped due to rate limits never appears in the bug
 report, but the new bug report buffer ignores rate limiting.

Bug: 65164242
Bug: 65700460
Test: runtest frameworks-net,
      manually inspecting ouput of $ adb shell dumpsys connmetrics -a

Change-Id: Ia47e566b0c9a6629a26afb7067d5a8efadc25aef

6 years agoExtract RingBuffer class from NetdEventListenerService
Hugo Benichi [Thu, 14 Sep 2017 07:31:38 +0000 (16:31 +0900)]
Extract RingBuffer class from NetdEventListenerService

This patch takes out the ring buffer array added for NFLOG wakeup packet
events logging and extract it into its own class for reuse. This new
RingBuffer class has the two minimal useful functions append() and
toArray().

Bug: 65164242
Bug: 65700460
Test: runtest frameworks-net, with new unit test
Change-Id: Ib94d79a93f4e99661b7d0fac67117b91d57af980

6 years agoMerge "Fixed that telephony registry service reference incorrectly assigned"
Treehugger Robot [Mon, 25 Sep 2017 19:14:04 +0000 (19:14 +0000)]
Merge "Fixed that telephony registry service reference incorrectly assigned"

6 years agoFixed that telephony registry service reference incorrectly assigned
Jack Yu [Fri, 22 Sep 2017 06:48:29 +0000 (23:48 -0700)]
Fixed that telephony registry service reference incorrectly assigned

The reference to telephony registry service was assigned
prior telephony registry service was ready. Fixed by
casting the binder every time when we use it.

Test: Manual
Bug: 65593241
Merged-In: Ib234cdfd93130f7af44ef79271b106fffb8ebad5
Change-Id: Ib234cdfd93130f7af44ef79271b106fffb8ebad5
(cherry picked from commit 66420e258a97e864985530ae7a1e208c978dbc7a)

6 years agoMerge "Move code around for deleting oat artifacts."
Nicolas Geoffray [Mon, 25 Sep 2017 08:32:51 +0000 (08:32 +0000)]
Merge "Move code around for deleting oat artifacts."

6 years agoMerge "Special handling of priv-apps in PMS."
Nicolas Geoffray [Mon, 25 Sep 2017 08:22:34 +0000 (08:22 +0000)]
Merge "Special handling of priv-apps in PMS."

6 years agoMerge "Naming fix and add comments"
Hans Boehm [Mon, 25 Sep 2017 04:09:30 +0000 (04:09 +0000)]
Merge "Naming fix and add comments"

6 years agoMerge changes from topic "equalizer_1"
Treehugger Robot [Sat, 23 Sep 2017 02:39:42 +0000 (02:39 +0000)]
Merge changes from topic "equalizer_1"

* changes:
  Fixing code formatting to comform to checkstyle
  Add sensor HAL process into dump list

6 years agoMerge changes from topic "equalizer"
Peng Xu [Sat, 23 Sep 2017 00:17:10 +0000 (00:17 +0000)]
Merge changes from topic "equalizer"

* changes:
  Update Java doc of SensorManager.createDirectChannel
  sensors: pass sensor handle along with injected event

6 years agoFixing code formatting to comform to checkstyle
Peng Xu [Fri, 22 Sep 2017 18:50:33 +0000 (11:50 -0700)]
Fixing code formatting to comform to checkstyle

Fix following types of issue
  * over 100 char/line
  * missing space
  * trailing spaces
  * array bracket position
  * variable naming convention (some cases)
  * indentation
  * long expression wrapping operator position
  * missing curly brace for one line scope
  * function modifier order

Things not changed in this CL:
  * Redundant public modifiers.
  * A few local variable names.
  * Suggested @deprecate but function is actually @removed.

Test: m and m docs
Change-Id: I5c22648888487edaa5954026a166cfd810a8a912

6 years agoNaming fix and add comments
Hans Boehm [Wed, 20 Sep 2017 22:59:12 +0000 (15:59 -0700)]
Naming fix and add comments

Also fix up imports to make repohooks happy and some whitespace issues.

A very small step towards making this code more understandable.

Bug: 65760710

Test: Builds.
Change-Id: I0396c06bb303e0b06ad0cbbbff4fdc1ac527ac6c

6 years agoMerge changes from topic "avrcp_cherry_picks"
Myles Watson [Fri, 22 Sep 2017 16:37:33 +0000 (16:37 +0000)]
Merge changes from topic "avrcp_cherry_picks"

* changes:
  Bluetooth: Add AVRCP 1.3 as a developer option for AVRCP version (1/2)
  Add equal overloads to some MediaDescription and MediaQueue objects (2/3)

6 years agoBluetooth: Add AVRCP 1.3 as a developer option for AVRCP version (1/2)
Ajay Panicker [Fri, 1 Sep 2017 18:58:38 +0000 (11:58 -0700)]
Bluetooth: Add AVRCP 1.3 as a developer option for AVRCP version (1/2)

This is requied for the 2012 Mazda 3 carkit as the carkit refuses to send
AVRCP commands other than passthrough commands when the version is anything
else. AVRCP 1.3 is compatible with most carkits on the market and can be
used to get most carkits working at the cost of losing many features.

Bug: 37943083
Test: Set AVRCP 1.3 in developer options and see that SDP and the AVRCP
      capabilites have updated to reflect this.
      TestTracker: 105915/3975

Change-Id: I637b695e5cd8baa5f054ca0dda81372080a96269

6 years agoAdd equal overloads to some MediaDescription and MediaQueue objects (2/3)
Ajay Panicker [Fri, 21 Jul 2017 20:29:57 +0000 (13:29 -0700)]
Add equal overloads to some MediaDescription and MediaQueue objects (2/3)

Bug: 64686424
Test: Connect to carkit and see that NowPlayingChanged only gets sent when
      the queue changes, run cts test
Change-Id: I58c9dd0bf976485a2efefd042cd667ee433e07e1
(cherry picked from commit 6edb68bea68d5f324384f3e9e411118eb8dfc781)

6 years agoSpecial handling of priv-apps in PMS.
Nicolas Geoffray [Fri, 8 Sep 2017 12:01:40 +0000 (13:01 +0100)]
Special handling of priv-apps in PMS.

If pm.dexopt.priv-apps is set to false, don't do any dexopt on it, and
check the APKs have uncompressed and aligned code.

bug: 30972906
bug: 63920015

Test: works as expected when pm.dexopt.priv-apps is true or false
Change-Id: I72a322defb459549617028e030f1aec997223af5

6 years agoMerge "fixed handling of data URI schemes in Intent.toUri"
Treehugger Robot [Fri, 22 Sep 2017 09:04:16 +0000 (09:04 +0000)]
Merge "fixed handling of data URI schemes in Intent.toUri"

6 years agoMove code around for deleting oat artifacts.
Nicolas Geoffray [Fri, 22 Sep 2017 08:01:32 +0000 (09:01 +0100)]
Move code around for deleting oat artifacts.

Test: make and boot
(partially cherry-picked from commit 246dccf9327631597767afe418ce43ae6d07d102)

Change-Id: Id3ce5fdee116df264241dfdee95734ac4bbad7ce

6 years agoMerge "Add checking values not to save illegal value to appwidgets.xml"
Treehugger Robot [Fri, 22 Sep 2017 02:17:47 +0000 (02:17 +0000)]
Merge "Add checking values not to save illegal value to appwidgets.xml"

6 years agofixed handling of data URI schemes in Intent.toUri
Christopher Schuster [Fri, 21 Jul 2017 21:53:52 +0000 (14:53 -0700)]
fixed handling of data URI schemes in Intent.toUri

Data URIs in intents can use schemes with digits and some special
characters (see RFC 2396 and 3986). This patch fixes how these
data URIs are handled by Intent.toUri to support these schemes.

Bug: 63930680
Test: run cts android.content.cts.IntentTest#testUris
Change-Id: I0dbb72325f59f372abba83be9e14c59d5665a053
Signed-off-by: Christopher Schuster <levjj@google.com>
6 years agoMerge "Remove StructGroupSourceReq"
vichang [Thu, 21 Sep 2017 12:42:15 +0000 (12:42 +0000)]
Merge "Remove StructGroupSourceReq"

6 years agoMerge "Implement ConnectivityService TODO and fix many race conditions"
Hugo Benichi [Thu, 21 Sep 2017 12:00:48 +0000 (12:00 +0000)]
Merge "Implement ConnectivityService TODO and fix many race conditions"

6 years agoMerge "Also support 464xlat on SUSPENDED networks"
Treehugger Robot [Thu, 21 Sep 2017 11:47:33 +0000 (11:47 +0000)]
Merge "Also support 464xlat on SUSPENDED networks"

6 years agoImplement ConnectivityService TODO and fix many race conditions
Hugo Benichi [Wed, 20 Sep 2017 02:20:14 +0000 (11:20 +0900)]
Implement ConnectivityService TODO and fix many race conditions

This patch implements an outstanding TODO in ConnectivityService to add
synchronization over the map of network request ids to network agent
info objects.

This structure is accessed from multiple threads:
 - Binder thread on public aidl methods, most notably via
   getDefaultNetwork().
 - Internal handler.

This leads to many race conditions that can crash the system server and
reboot the phone if getDefaultNetwork() is called on a Binder thread to
service a public ConnectivityManager api while the default network state
is being updated on the internal handler after losing the default
network.

Bug: 65911184
Test: runtest frameworks-net
Change-Id: I86c830ebd559e31d4576a7606705a056afb064ac

6 years agoAlso support 464xlat on SUSPENDED networks
Erik Kline [Thu, 21 Sep 2017 08:28:10 +0000 (17:28 +0900)]
Also support 464xlat on SUSPENDED networks

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 65684232

Change-Id: I1b10aab01554b1f926ec7157dba78645fdaff90f

6 years agoMerge "have OffloaderController store and re-push more state"
Treehugger Robot [Thu, 21 Sep 2017 08:35:44 +0000 (08:35 +0000)]
Merge "have OffloaderController store and re-push more state"

6 years agohave OffloaderController store and re-push more state
Erik Kline [Tue, 19 Sep 2017 08:56:10 +0000 (17:56 +0900)]
have OffloaderController store and re-push more state

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 29337859
Bug: 32163131
Bug: 64976634
Merged-In: If3a859736a1b3730e4e3d0d2685f3e5432927796
Merged-In: If9afc160fa2f8b5da66cb0a6a35dfcb4f1839d36
Change-Id: Ib1421438a1e748722fc41f1fbfb01ada187bb1c8
(cherry picked from commit 7334b0e2cc5ec7f8803c463a1e674cceb7e4c3ba)

6 years agoAdd sensor HAL process into dump list
Peng Xu [Wed, 12 Jul 2017 04:12:11 +0000 (21:12 -0700)]
Add sensor HAL process into dump list

Test: use "adb shell am hang --allow-restart" to trigger an ANR,
      trace of /vendor/bin/hw/android.hardware.sensors@1.0-service
      shows up in /data/anr/traces.txt
Bug: 63096400
Change-Id: If2996eeb215c5339602babd84595107aa4402aed
Merged-In: If2996eeb215c5339602babd84595107aa4402aed