252465 Commits

Author SHA1 Message Date
Etan Cohen
e3d5fa1094 Merge changes from topic 'cherry-pick'
* changes:
  [NAN] Register WIFI_NAN_STATE_CHANGED as protected broadcast
  [NAN] Update API javadoc to clarify NAN status change broadcast scope
2016-09-30 20:45:02 +00:00
Tao Bao
42d25b5992 Merge "Handle the race condition when calling uncrypt services." 2016-09-30 20:30:43 +00:00
Jordan Liu
d1d682e446 Merge "Add config_carrier_wfc_ims_available to config.xml" 2016-09-30 18:42:45 +00:00
Etan Cohen
720d175757 [NAN] Register WIFI_NAN_STATE_CHANGED as protected broadcast
Broadcast can be registered protected (as in this CL) in which case they
are restricted to system apps. Broadcasts sent by the System Service must
be protected (so no one else can fake them).

The WIFI_NAN_STATE_CHANGED is sent by the System Service and no other apps
should be able to send them (e.g. to deny access to NAN to other apps).

(cherry-pick of commit b8ce87175e3a865feaad7c6aa49226f768729540)

Bug: 31811154
Test: build & run - enable/disable Wi-Fi to trigger bug
Change-Id: I77ea18291d68c38a63d64a75affc6b7ea114e549
2016-09-30 11:32:18 -07:00
Etan Cohen
4c22e8bede [NAN] Update API javadoc to clarify NAN status change broadcast scope
(cherry-pick of commit 1fceaf9d63cd572cad57e71f6cb66f0cb59183b5)

Bug: 31675932
Test: make -j 32 update-api (to generate doc)
Change-Id: I7263a15902c423c1c71c2c457c82e8caef5abceb
2016-09-30 11:31:47 -07:00
Randy Pan
673b47f234 Merge "Remove the obsoleted ScanResult.isAutoJoinCandidate" 2016-09-30 17:30:15 +00:00
Jordan Liu
786e4f7d23 Add config_carrier_wfc_ims_available to config.xml
The migration of this config to CarrierConfig breaks the build on
certain devices, so we should leave the original config in.

Bug: 29873049
Change-Id: I2f526c37198359de7adec4cfd4c391ccaa8ab0be
2016-09-30 09:43:49 -07:00
Przemyslaw Szczepaniak
c60c70dcf9 Merge "Add new StrictMode thread policy - DETECT_UNBUFFERED_IO" 2016-09-30 08:43:17 +00:00
Yoshinori Hirano
4adbbfc6d1 Allow operator/manufacturer setting to use priority
This allows apps which use OPERATOR_SETTING or
MANUFACTURER_SETTING intent to use priority.
The apps can put their setting in any position
in the dashboard of Settings app.

Bug: 29143388
Test: manual - installed SettingsTests.apk using priority into priv-app
               and opened Settings app

Change-Id: Ie5df36e8f3ed704583b1559c16ee3719c7545271
2016-09-30 12:26:54 +09:00
Treehugger Robot
1efb3e93e6 Merge "Fix code for new malloc debug enable." 2016-09-30 01:01:03 +00:00
Jordan Liu
3643dd1a7a Add editable_voicemail_number key to CarrierConfig
Add KEY_EDITABLE_VOICEMAIL_NUMBER_BOOL and default value to
CarrierConfigManager, and remove the references to the old config in
core/res/res/values/[config.xml/symbols.xml]

This value exists to fix http://b/14093735. If a SIM card has no
voicemail number available, since the default number is empty, we allow
users to edit the voicemail number when this flag is true.
Merged-In: I68a494e2176306e4e9181a8ccb0aa818f3e08154

Bug: 29873049
Change-Id: I68a494e2176306e4e9181a8ccb0aa818f3e08154
2016-09-29 17:21:15 -07:00
Tao Bao
794c8b0b3f Handle the race condition when calling uncrypt services.
We call uncrypt services to setup / clear bootloader control block (BCB)
for scheduling tasks under recovery (applying OTAs, performing FDR).
However, we cannot start multiple requests simultaneously. Because they
all use the same socket (/dev/socket/uncrypt) for communication and init
deletes the socket on service exits.

This CL fixes the issue by a) adding synchronized blocks for the service
requests; b) checking the availability of the socket before initiating a
new one.

Note that adding synchronized blocks to RecoverySystem doesn't help,
because the calls could be made from different processes (e.g. priv-app,
system_server).

Bug: 31526152
Test: FDR works while a priv-app keeps calling clear BCB.

Change-Id: I95308989e849a9c98a9503ac509f2bc51ed3de19
2016-09-29 16:07:19 -07:00
Jordan Liu
edc05eeccf Remove config in frameworks/base
Remove old config within frameworks/base. With move to CarrierConfig no
need for the old editable_voicemailnumber resources.
Merged-In: Ib70ac5f488b45f32b705e471478e13802ebe9dd7

Bug: 29873049
Change-Id: Ib70ac5f488b45f32b705e471478e13802ebe9dd7
2016-09-29 16:05:30 -07:00
Jordan Liu
5d71e2d671 Merge "Remove migrated config_carrier_wfc_ims_available" 2016-09-29 22:50:15 +00:00
Christopher Ferris
e336eea49a Fix code for new malloc debug enable.
When using am dumpheap -n, modify the code to print the new
way malloc debug works instead of the old way.

Also, the old code had a hard-coded number of backtrace frames. The
new code allows this to be variable so the code needed to be modified
for this too.

Test: am dumpheap -n <PID> <FILE> dumps properly.

Change-Id: Id79e4acbe04313090eb2b973f023e5b27591bb7d
2016-09-29 15:18:58 -07:00
Randy Pan
634d97add8 Remove the obsoleted ScanResult.isAutoJoinCandidate
Bug: 31565767
Test: unit tests
Change-Id: I3e1ee0e919c800c4d5eeaf94fdc68123b6de542e
2016-09-29 13:12:55 -07:00
Treehugger Robot
00b678dd2d Merge "Clear pending activity launches when force stop package" 2016-09-29 19:17:36 +00:00
Jordan Liu
14f4fd7d0b Merge "Add cdma_3waycall_flash_delay key to CarrierConfig" 2016-09-29 17:15:05 +00:00
Jordan Liu
8abf78dc58 Merge "Remove configs in frameworks/base" 2016-09-29 17:15:05 +00:00
liulvping
b55e42df97 Clear pending activity launches when force stop package
https://code.google.com/p/android/issues/detail?id=223731

It is possible that an activity in pending launches be resumed while
it's package was stopped by some other reason, like uninstall pkg.

Merged-In: I130ded89cee162aa59ac2bf330f026e49e16ef69
Change-Id: I130ded89cee162aa59ac2bf330f026e49e16ef69
Signed-off-by: liulvping <liulvping@xiaomi.com>
2016-09-29 16:42:16 +00:00
Shubham Ajmera
c95b2c85f3 Add new StrictMode thread policy - DETECT_UNBUFFERED_IO
This will enable the developers to check if they could replace an unbuffered
I/O operation with a corresponding buffered I/O operation.

The policy can be set as follow:
     StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
        .detectUnbufferedIO().build());

Test: vogar BlockGuardTest
Bug: 3018772
Change-Id: Ib804a8e9980ae40abfd216f8b87c250fd413bd5c
(cherry picked from commit 9b7184a8fd6c940872f1526667dd7933db4bdd5f)w
2016-09-29 16:36:12 +01:00
Neil Fuller
bd32321b4f Merge "Fix AnnotatedElement.getDeclaredAnnotation() generic signature" 2016-09-29 13:08:30 +00:00
Neil Fuller
8ac0f45384 Merge "Unhide constants related to type annotations" 2016-09-29 13:07:44 +00:00
Shinji Sogo
20445f7bd0 Don't compare FQDN with providerFriendlyName
FQDN and providor friendly name are obviously different, and if they're
compared they're almost always unmatched. FQDN of current configuration
should be checked with FQDN of new configuration.

Bug:31815374
Test: Test with the device

Change-Id: I6c8c8ca07b4abb038175e3999d387f0869ec7391
2016-09-29 19:43:11 +09:00
Treehugger Robot
b60951f670 Merge "Reset mCurrentUserId when fingerprintd died" 2016-09-29 05:00:42 +00:00
Jordan Liu
071a6ec8da Remove migrated config_carrier_wfc_ims_available
config_carrier_wfc_ims_available has already been migrated to
CarrierConfig. This commit removes reference to this carrier config from
non-prebuilt config files.

Merged-In: I74a3296494377e771d5d451db62c554485bbeb98
Merged-In: If47b743547b55e2ff3daf0357372a5d398c8b6ab

Bug: 29873049
Change-Id: I1cbfd074cdde67db6ad2a800198ac0fab37aecf0
2016-09-28 17:03:49 -07:00
Treehugger Robot
0ac1aa8256 Merge changes from topic 'cherry_ota_dexopt'
* changes:
  OtaDexopt: Fix after-ota space measure
  OtaDexoptService: Add tron logging
  OtaDexopt: Downgrade apps when low on space
  Installer: Support delete_odex command
  Package Manager: Sort list of packages to dexopt
2016-09-29 00:00:49 +00:00
Jordan Liu
c95c2344b5 Merge "Remove dial_string_replace configs" 2016-09-28 23:59:20 +00:00
Jordan Liu
715903f3c6 Merge "Add dial_string_replace key to CarrierConfig" 2016-09-28 23:58:35 +00:00
Treehugger Robot
afbe615993 Merge "wifi: add test target/directory for unit testing WiFi framework APIs" 2016-09-28 22:52:31 +00:00
Andreas Gampe
13018f3730 OtaDexopt: Fix after-ota space measure
Actually measure the available space.

Bug: 31458900
Change-Id: I16ecee6c275229bc21e908b88b24152484025bc8
(cherry picked from commit 8d1d2ab5b94f011ed611259df387391f1a1fe60f)
2016-09-28 15:01:06 -07:00
Andreas Gampe
112e01480f OtaDexoptService: Add tron logging
Log key properties of A/B OTA dexopting.

Bug: 31458900
Change-Id: Iba1e5a40ff8b4998d4d876800ee59940f01afb6e
(cherry picked from commit 77cc8172d31fff398b81a039b3fddc8acd1c609b)
2016-09-28 14:54:14 -07:00
Andreas Gampe
1920d7b434 OtaDexopt: Downgrade apps when low on space
When running low on space, attempt to "downgrade" apps to lower
states in the optimization flow to free up space before starting
the OTA.

Bug: 31347757
Change-Id: I3a44b106b83d86d7290f4c557267b319f28de12a
(cherry picked from commit dab38e000436bf8234955b0333eaecf389e65b6f)
2016-09-28 14:11:08 -07:00
Andreas Gampe
33c592da0c Installer: Support delete_odex command
Add support for deleting odex files.

Bug: 31347757
Change-Id: I29bca8751bcee8d6981c682fbbc816c73b78ac68
(cherry picked from commit e5fedb95761fbffbd80200440f32e99e0d8c6f90)
2016-09-28 14:00:20 -07:00
Andreas Gampe
71ea678683 Package Manager: Sort list of packages to dexopt
Sort the list by last-use-time, if available. Interleave the
dependencies with the packages.

Clean up the code a bit for better code reuse and ease of writing
filters.

This should help with prioritization under space constraints.

Bug: 31347757
Change-Id: Ia0ec62faf013a379dc4c80b18fd6b2bfbfa470c4
(cherry picked from commit d3e07d46d41e8411def67c2150a0bae064e900dc)
2016-09-28 13:59:03 -07:00
Etan Cohen
1bca5ad210 Merge "[NAN] Remove builder API using String to translate to byte[]" 2016-09-28 20:25:01 +00:00
Treehugger Robot
c1973ecbd2 Merge "Log the error when uncrypt timeouts" 2016-09-28 19:42:29 +00:00
Etan Cohen
60add8ad01 [NAN] Remove builder API using String to translate to byte[]
Per API review: String accessor was not needed (duplicate, semantics
not accurate, trivial use-case).

(cherry-pick of commit c76ccf3e7e673fb21f27ea8e7482021900b113cf)

Bug: 31470256
Test: unit tests & integration (sl4a) testing.
Change-Id: Id307702627afd8ee579b540d4c2f65359bf9a925
2016-09-28 11:47:24 -07:00
Treehugger Robot
f0aa998233 Merge "Rerun of update-api with no changes" 2016-09-28 17:41:53 +00:00
Treehugger Robot
90acbd86ac Merge "Adds static methods HwBlob.WrapArray(<scalar-type>[] scalarArray)" 2016-09-28 17:16:52 +00:00
Treehugger Robot
faf945a773 Merge "hwui: Fix the length of partial updates system property" 2016-09-28 16:47:03 +00:00
Treehugger Robot
ae302cef52 Merge "fix persistent process is killed and restart again and again" 2016-09-28 16:20:56 +00:00
Neil Fuller
4c1d37b2a0 Unhide constants related to type annotations
Type annotations are supported in the compiler, but not the
Android runtime. Unhiding these is therefore still
reasonable.

Bug: 30391692
Test: make droid
Change-Id: I39db1099918fe3bd6321f2d755a988cb73f657c6
2016-09-28 16:57:59 +01:00
Neil Fuller
0543f71b82 Fix AnnotatedElement.getDeclaredAnnotation() generic signature
To match upstream OpenJDK 8.

Bug: 31108290
Test: make droid
Change-Id: Icdf54eb65b8d89ee474ec51eab552ceb3fc6d8ec
2016-09-28 16:56:49 +01:00
Neil Fuller
b36fad8a5f Rerun of update-api with no changes
Picks up a small change to Parameter.

Looks like it was caused by a mid-air collision between
commit 3ead539c0129e6dd82df301e2652f1c0524a3b82, which
introduced Parameter, and commit
b4fcc6136e25d46af460d4cb99b8f5f279bfb5db which
introduced improvements to generics in the .txt file.

Test: make droid
Change-Id: If1c11e9303d17854ab1e5559c9a412cc6de54685
2016-09-28 16:51:03 +01:00
Etan Cohen
e43c1a3e3e Merge "[NAN] Use a hidden class for peer ID opaque handle" 2016-09-28 05:04:06 +00:00
Treehugger Robot
00a19a37db Merge changes from topic 'libandroid-ndk_headers'
* changes:
  Move libjnigraphics to ndk_library.
  Migrate libandroid.so to ndk_library.
2016-09-28 03:32:56 +00:00
Etan Cohen
f085c1951a [NAN] Use a hidden class for peer ID opaque handle
Results in clearer run-time exception (relatively to using Integer).

(cherry-pick of commit 57db2b3eea5333e5ee144ea29e4a4af02fae7309)

Bug: 31689166
Test: unit-tests + integrated (sl4a).
Change-Id: I79d0e8061204834b9775b02d503cb18fd03ed8c6
2016-09-27 16:42:05 -07:00
Jordan Liu
705cbc763f Add dial_string_replace key to CarrierConfig
Add KEY_DIAL_STRING_REPLACE_STRING_ARRAY and default value (null) to
CarrierConfigManager, and remove the references to the old config in
core/res/res/values/[config.xml/symbols.xml]

This value exists to fix http://b/17202092. We specify a map from
dialstrings to replacements for roaming network service numbers which
cannot be replaced on the carrier side.

Merged-In: I852261596d3931f38d5f1c6b3d24ffe27f950458

Bug: 29873049
Change-Id: I99d97bb25ef57c178d004ae17d97a6c7672734e2
2016-09-27 15:35:27 -07:00
Jordan Liu
154c22d2d4 Merge "Add key to CarrierConfig" 2016-09-27 22:19:26 +00:00