OSDN Git Service

android-x86/frameworks-base.git
7 years agoMerge "Add Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED flag."
Treehugger Robot [Tue, 6 Dec 2016 19:11:28 +0000 (19:11 +0000)]
Merge "Add Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED flag."

7 years agoMerge "Fix Hotspot tile is shown on Guest user"
Jason Monk [Tue, 6 Dec 2016 15:11:18 +0000 (15:11 +0000)]
Merge "Fix Hotspot tile is shown on Guest user"

7 years agoMerge "Check for nullptr when casting IBinder to IBase."
Treehugger Robot [Tue, 6 Dec 2016 15:08:39 +0000 (15:08 +0000)]
Merge "Check for nullptr when casting IBinder to IBase."

7 years agoAdd Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED flag.
Stephen Chen [Wed, 16 Nov 2016 23:46:51 +0000 (15:46 -0800)]
Add Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED flag.

This flag enables the NetworkScoreService.requestRecommendations API,
defined in b/32909424.

Bug: 32913919
Bug: 32909424
Test: runtest --path
frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsProviderTest.java

Change-Id: If592e4a2ec574929aa0c829c39ad4ce9b0317805

7 years agoMerge "Initial Binder interface for installd."
Jeff Sharkey [Tue, 6 Dec 2016 00:14:53 +0000 (00:14 +0000)]
Merge "Initial Binder interface for installd."

7 years agoCheck for nullptr when casting IBinder to IBase.
Yifan Hong [Mon, 5 Dec 2016 21:10:13 +0000 (13:10 -0800)]
Check for nullptr when casting IBinder to IBase.

Test: compiles

Bug: 33307202
Change-Id: I6ef880188e2f43766e52317244366b2fdd38c728

7 years agoInitial Binder interface for installd.
Jeff Sharkey [Mon, 5 Dec 2016 18:19:28 +0000 (11:19 -0700)]
Initial Binder interface for installd.

Start using new installd Binder interface, with a quick-disable
switch if something breaks.

Test: builds, boots
Bug: 1375896030944031
Change-Id: Ia6e55d49595c96ae928aefc8a6606ee690e58764

7 years agoMerge "[AWARE] Fix javadocs for match filter update"
Etan Cohen [Mon, 5 Dec 2016 15:51:17 +0000 (15:51 +0000)]
Merge "[AWARE] Fix javadocs for match filter update"

7 years agoMerge "Introduce a new user restriction for disallowing Bluetooth."
ltrochtova [Mon, 5 Dec 2016 15:35:21 +0000 (15:35 +0000)]
Merge "Introduce a new user restriction for disallowing Bluetooth."

7 years agoIntroduce a new user restriction for disallowing Bluetooth.
Lenka Trochtova [Fri, 2 Dec 2016 11:19:39 +0000 (12:19 +0100)]
Introduce a new user restriction for disallowing Bluetooth.

Only the device owner will be able to set the restriction
and the restriction will prevent usage of Bluetooth on the
entire device - i.e. in all the users.

Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.UserRestrictionsTest
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.DeviceOwnerTest#testBluetoothRestriction

Bug: 32895300

Merged-In: I2875cf178cb16eca1965d0ba965d1cd3d8db2ad5

Change-Id: I2875cf178cb16eca1965d0ba965d1cd3d8db2ad5

7 years agoMerge "Migrate StrictJarVerifier and ShortcutPackageInfo to java.util.Base64"
Tobias Thierer [Mon, 5 Dec 2016 09:28:46 +0000 (09:28 +0000)]
Merge "Migrate StrictJarVerifier and ShortcutPackageInfo to java.util.Base64"

7 years agoMerge "ExifInterface: fix NegativeArraySizeException"
Sungsoo Lim [Mon, 5 Dec 2016 04:35:17 +0000 (04:35 +0000)]
Merge "ExifInterface: fix NegativeArraySizeException"

7 years agoMerge "Use IBase instead of IBinder for IServiceManager."
Treehugger Robot [Sat, 3 Dec 2016 23:04:24 +0000 (23:04 +0000)]
Merge "Use IBase instead of IBinder for IServiceManager."

7 years agoMerge "Update Samsung Print Recommendation Plugin (to support Mopria printers)"
Treehugger Robot [Sat, 3 Dec 2016 03:53:17 +0000 (03:53 +0000)]
Merge "Update Samsung Print Recommendation Plugin (to support Mopria printers)"

7 years agoMerge changes from topic 'fast-bss-transition'
Roshan Pius [Fri, 2 Dec 2016 23:57:39 +0000 (23:57 +0000)]
Merge changes from topic 'fast-bss-transition'

* changes:
  Add capability flag for 802.11r fast BSS transition
  Add constants for 802.11r

7 years agoMerge "Add Settings.Global.WIFI_WAKEUP_ENABLED flag."
Treehugger Robot [Fri, 2 Dec 2016 23:41:36 +0000 (23:41 +0000)]
Merge "Add Settings.Global.WIFI_WAKEUP_ENABLED flag."

7 years agoMerge "Convert libandroidfw to Android.bp"
Treehugger Robot [Fri, 2 Dec 2016 23:16:48 +0000 (23:16 +0000)]
Merge "Convert libandroidfw to Android.bp"

7 years agoMerge "Fix the deadlock problem"
Chris Tate [Fri, 2 Dec 2016 22:39:57 +0000 (22:39 +0000)]
Merge "Fix the deadlock problem"

7 years agoConvert libandroidfw to Android.bp
Colin Cross [Thu, 1 Dec 2016 23:55:00 +0000 (15:55 -0800)]
Convert libandroidfw to Android.bp

See build/soong/README.md for more information.

Test: libandroidfw_tests
Merged-In: I4e575d62f724d5ffe43f12ff5642fb6799f7819e
Change-Id: I4e575d62f724d5ffe43f12ff5642fb6799f7819e
(cherry picked from commit 4f8d9e69eb63878a99abedfdc7b92c6284f30605)

7 years agoMerge "Remove static link in Android framework under /frameworks/base."
Treehugger Robot [Fri, 2 Dec 2016 19:21:46 +0000 (19:21 +0000)]
Merge "Remove static link in Android framework under /frameworks/base."

7 years agoMerge "Add new hostingType for startProcessLocked() that selects using the WebViewZyg...
Treehugger Robot [Fri, 2 Dec 2016 17:02:31 +0000 (17:02 +0000)]
Merge "Add new hostingType for startProcessLocked() that selects using the WebViewZygote."

7 years agoMigrate StrictJarVerifier and ShortcutPackageInfo to java.util.Base64
Tobias Thierer [Thu, 1 Dec 2016 23:04:36 +0000 (23:04 +0000)]
Migrate StrictJarVerifier and ShortcutPackageInfo to java.util.Base64

Previously, they weres using libcore.io.Base64, which is @deprecated.

The two implementations' encoders produce the exact same result.

The two implementations' decoders' behavior differs for malformed
input:
 - In case of error, libcore.io.Base64.decode() returns null while
   java.util.Base64.getDecoder().decode() throws.
 - java.util.Base64 tends to be stricter about rejecting malformed
   input; specifically, it allows neither whitespace nor unexpected
   '=' characters (should only occur in the padding) whereas
   libcore.io.Base64.decode() leniently allows them throughout the
   input.
 - if the input terminates prematurely, libcore.io.Base64 tends to
   return fewer bytes (stops at a four byte boundary).

The behavior differences for malformed Base64 encoded data should
not affect ShortcutPackageInfo because it should only need to deal
with XML attribute values written by itself, which are well-formed.
Note that this CL does not lead to any known changes of the encoding
step, so values written by earlier versions should not cause problems
when read by later versions of ShortcutPackageInfo.

StrictJarVerifier may now reject or behave differently for .jar /
.zip files with malformed attribute values but this seems okay since,
per its name, it is meant to be strict. For example, after this CL,
StrictJarVerifier will no longer accept algorithm + "-Digest"
attribute values with extra whitespace or padding characters as valid.

Test: Confirmed that the two implementations' encoders produce the
      same result by running the following code just before this CL:
      assertEquals(
          libcore.io.Base64.encode(allBytes()),
          Base64.getEncoder().encodeToString(allBytes()));
      where allBytes() returns a byte[] with values (byte) 0 .. (byte) 255
Test: Test that phone still boots after flashing code that includes
      this CL.
Test: CtsLibcoreTestCases

Bug: 31292683

Change-Id: I775d32f329f693514a8f14d87e1ef0d7a757e6c3

7 years agoExifInterface: fix NegativeArraySizeException
NIEJuhu [Fri, 4 Nov 2016 09:13:13 +0000 (17:13 +0800)]
ExifInterface: fix NegativeArraySizeException

The IFD entry has a 4-byte field COUNT. It is read as int type
and is used as array size by ExifInterface. If a crafted JPEG
file contains a negative value, a NegativeArraySizeException
occurs.

Change-Id: Ief29936400f04636928df09e7f357cbf25345383
Signed-off-by: NIEJuhu <niejuhu@xiaomi.com>
7 years agoMerge "Protect broadcast emitted by Bluetooth mapmce and pbap profile"
Treehugger Robot [Fri, 2 Dec 2016 04:37:47 +0000 (04:37 +0000)]
Merge "Protect broadcast emitted by Bluetooth mapmce and pbap profile"

7 years agoProtect broadcast emitted by Bluetooth mapmce and pbap profile
Jack He [Thu, 1 Dec 2016 00:28:53 +0000 (16:28 -0800)]
Protect broadcast emitted by Bluetooth mapmce and pbap profile

Bug: 33281228
Test: mm -j 40
Change-Id: I273e9e3c02f431ba7006bcf5d230a6c30eb67843

7 years ago[AWARE] Fix javadocs for match filter update
Etan Cohen [Fri, 2 Dec 2016 00:59:41 +0000 (16:59 -0800)]
[AWARE] Fix javadocs for match filter update

Javadocs update. Specifically, cannot contain generics (since
under-the-hood generics are just the undecorated class).

Bug: 32840891
Test: generated docs (no functional change)
Change-Id: I4bc2967a60ad27d137fd5a4dd3db18625343c910

7 years agoMerge "jni: EventLog replace open coding with android_log_event_list"
Treehugger Robot [Fri, 2 Dec 2016 00:39:55 +0000 (00:39 +0000)]
Merge "jni: EventLog replace open coding with android_log_event_list"

7 years agoMerge "Get the correct operator name"
Robert Greenwalt [Thu, 1 Dec 2016 23:29:28 +0000 (23:29 +0000)]
Merge "Get the correct operator name"

7 years agoGet the correct operator name
Zoran Jovanovic [Wed, 2 Nov 2016 08:56:38 +0000 (09:56 +0100)]
Get the correct operator name

If the long operator name is not given by RIL,
try to get the short operator name.

Bug: 32791744
Merged-In: I4983ad708c57a650ce4a806e1f53837825bad2db
Depends-On: commit in frameworks/opt/telephony with the same Change-Id
Change-Id: I4983ad708c57a650ce4a806e1f53837825bad2db

7 years agoMerge "Revert "Introduce a new user restriction for disallowing Bluetooth.""
ltrochtova [Thu, 1 Dec 2016 21:20:42 +0000 (21:20 +0000)]
Merge "Revert "Introduce a new user restriction for disallowing Bluetooth.""

7 years agoRevert "Introduce a new user restriction for disallowing Bluetooth."
ltrochtova [Thu, 1 Dec 2016 20:50:53 +0000 (20:50 +0000)]
Revert "Introduce a new user restriction for disallowing Bluetooth."

This reverts commit 69f9d321ac19e7137e07b411779339f9973eba1b.

Change-Id: I5859b262a741d1fe8e8b61e142eecf7d742d8d41

7 years agoUse IBase instead of IBinder for IServiceManager.
Yifan Hong [Thu, 1 Dec 2016 18:25:05 +0000 (10:25 -0800)]
Use IBase instead of IBinder for IServiceManager.

Test: compiles with mma
Change-Id: I5805df48aa358dcef555125f6467d659f095b0c2

7 years agoMerge "Add command line action sequencing."
Treehugger Robot [Thu, 1 Dec 2016 17:23:37 +0000 (17:23 +0000)]
Merge "Add command line action sequencing."

7 years agoMerge "AWARE: Abstract structure of match filters"
Etan Cohen [Thu, 1 Dec 2016 15:42:34 +0000 (15:42 +0000)]
Merge "AWARE: Abstract structure of match filters"

7 years agoMerge "Introduce a new user restriction for disallowing Bluetooth."
ltrochtova [Thu, 1 Dec 2016 13:40:28 +0000 (13:40 +0000)]
Merge "Introduce a new user restriction for disallowing Bluetooth."

7 years agoIntroduce a new user restriction for disallowing Bluetooth.
Lenka Trochtova [Thu, 24 Nov 2016 15:48:37 +0000 (16:48 +0100)]
Introduce a new user restriction for disallowing Bluetooth.

Only the device owner will be able to set the restriction
and the restriction will prevent usage of Bluetooth on
the  entire device - i.e. in all the users.

Test: cts-tradefed run cts -m  CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.UserRestrictionsTest
Test: cts-tradefed run cts -m  CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.DeviceOwnerTest#testBluetoothRestriction

Bug: 32895300

Change-Id: Iae77647b1e48be6b8efbeccdff6a3d468a0e174d

7 years agoMerge "Add meteredOverride field to WifiConfiguration."
Treehugger Robot [Thu, 1 Dec 2016 03:08:44 +0000 (03:08 +0000)]
Merge "Add meteredOverride field to WifiConfiguration."

7 years agoMerge "App_process: Merge app_process and app_process__asan"
Treehugger Robot [Thu, 1 Dec 2016 02:38:29 +0000 (02:38 +0000)]
Merge "App_process: Merge app_process and app_process__asan"

7 years agoAdd Settings.Global.WIFI_WAKEUP_ENABLED flag.
Stephen Chen [Wed, 16 Nov 2016 23:46:51 +0000 (15:46 -0800)]
Add Settings.Global.WIFI_WAKEUP_ENABLED flag.

Set the flag default to false. This addition is for the
Android Wi-Fi Snooze project:
https://docs.google.com/document/d/1zewDZ6Ne-qH7zKFDtcSx55f9jPauZwT5VvOs1uVNXf8/edit#

Bug: 32920000
Bug: 32913119
Test: runtest --path
frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsProviderTest.java

Change-Id: I597d5dd643e8044315cc6d7553ae5740485a0552

7 years agoFix the deadlock problem
pengzhicai [Tue, 29 Nov 2016 11:01:44 +0000 (19:01 +0800)]
Fix the deadlock problem

https://code.google.com/p/android/issues/detail?id=229020

Change-Id: Ib08f62dd916d09e666e58fb583555170d1e51da6
Signed-off-by: pengzhicai <pengzhicai@xiaomi.com>
7 years agoMerge "Refactor NetworkScoreAppManager for testing."
Treehugger Robot [Thu, 1 Dec 2016 01:59:13 +0000 (01:59 +0000)]
Merge "Refactor NetworkScoreAppManager for testing."

7 years agoRemove static link in Android framework under /frameworks/base.
Jaekyun Seok [Wed, 23 Nov 2016 07:28:34 +0000 (16:28 +0900)]
Remove static link in Android framework under /frameworks/base.

The dependencies to static libraries in frameworks should be removed
as many as possible to reduce a size of the system partition.
And that will improve coverage of the VNDK libraries because this
effort might find new necessary shared libs which were linked
statically before.

Size diffs of libs in /system/lib on angler-userdebug build are as
following.

libandroidfw.so      : 243748 -> 205196 (-38552)
libhwui.so           : 562028 -> 562580 (+552)
libmedia_jni.so      : 293652 -> 293656 (+4)
(All the others have the same size.)

total: (-37996)

Test: building succeeded, and the image was tested on angler.
Bug: 33056637
Change-Id: I3021fb438778eaea2be935b990ec85c4aec6c008
(cherry picked from commit 2b14c5eaf61635d1c3a69a2e59faa23cb6b7f7cb)

7 years agoAWARE: Abstract structure of match filters
Etan Cohen [Wed, 23 Nov 2016 19:11:23 +0000 (11:11 -0800)]
AWARE: Abstract structure of match filters

Replace byte[] representation with a List<byte[]> representation
which abstracts the LV (TLV without a type field) structure of
the match filters.

Tlv utilities: remove tag indicating that will be made public API.
That is no longer expected (will be an internal utility) since the
match filter structure is now parsed when exposed to API.

Lv utilities: removed. Was a simple wrapper around Tlv utilities -
no longer needed since will not be exposed as API.

(cherry-pick of commit c9870d0d431471bf1362e46fc4f2f1bc6722896a)

Bug: 32840891
Test: unit-tests and integration (sl4a) tests passing
Change-Id: I6d792c4d7584ce002f6c11692e83e7654ef3e764

7 years agoApp_process: Merge app_process and app_process__asan
Andreas Gampe [Thu, 1 Dec 2016 00:35:32 +0000 (16:35 -0800)]
App_process: Merge app_process and app_process__asan

Two birds with one stone: simplify the setup (including the modules
required in PRODUCT_PACKAGES) and work around a build system issue
wrt/ sanitized static libraries.

Bug: 33224213
Test: mmma frameworks/base/cmds/app_process && \
      mmma SANITIZE_TARGET=address SANITIZE_LITE=true \
      frameworks/base/cmds/app_process && \
      ls $OUT/system/bin/asanwrapper && \
      readelf -s $OUT/system/bin/app_process32 | grep asan && \
      readelf -s $OUT/system/bin/asan/app_process32 | grep asan && \

Change-Id: Ieff0ea9a2209cf74cf06f813087b55cb0bcc3896

7 years agoRefactor NetworkScoreAppManager for testing.
Amin Shaikh [Tue, 22 Nov 2016 01:27:53 +0000 (17:27 -0800)]
Refactor NetworkScoreAppManager for testing.

Test: runtest frameworks-services && runtest frameworks-core
Change-Id: Ie2172009e9ba0438050488fe0aea6408f852c2c2

7 years agoMerge "App_process: Clean up sanitized binaries"
Treehugger Robot [Wed, 30 Nov 2016 21:00:55 +0000 (21:00 +0000)]
Merge "App_process: Clean up sanitized binaries"

7 years agoMerge "LOCAL_CLANG := true is now the default"
Treehugger Robot [Wed, 30 Nov 2016 20:35:37 +0000 (20:35 +0000)]
Merge "LOCAL_CLANG := true is now the default"

7 years agoMerge "Add ACTION_WIFI_SAVED_NETWORK_SETTINGS to Settings."
Treehugger Robot [Wed, 30 Nov 2016 20:25:12 +0000 (20:25 +0000)]
Merge "Add ACTION_WIFI_SAVED_NETWORK_SETTINGS to Settings."

7 years agoMerge "Fix MSIM issue of broadcast intent overwritten unintentionally"
Robert Greenwalt [Wed, 30 Nov 2016 19:47:22 +0000 (19:47 +0000)]
Merge "Fix MSIM issue of broadcast intent overwritten unintentionally"

7 years agoAdd command line action sequencing.
Michael Rosenfeld [Tue, 29 Nov 2016 02:08:00 +0000 (18:08 -0800)]
Add command line action sequencing.

Supported actions:
* .. scan <process> ..
* .. scan-all ..
* .. import <infile> ..
* .. export <infile> ..
* .. comp <thresh> <outfile> ..
Test: manual
Bug: 31961946

Change-Id: I08753f31294ac5f30f6bcddeabef12d138e7e8e6

7 years agoAdd meteredOverride field to WifiConfiguration.
Stephen Chen [Mon, 28 Nov 2016 19:40:58 +0000 (11:40 -0800)]
Add meteredOverride field to WifiConfiguration.

This stores a user's metered selection. This will be set by
Settings -> Data Usage -> Network restrictions and used in conjunction
with WifiConfiguration.meteredHint to properly track a Wifi network's
metered state.

Bug: 33106464
Bug: 26545374
Test: runtest --path
frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java
runtest --path
frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java

Change-Id: I1a378ef2946c1b5b6091bba379f2ab48a15d29d8

7 years agoMerge "Expose GSM Timing Advance, Update LTE TA docstring"
nharold [Wed, 30 Nov 2016 18:00:34 +0000 (18:00 +0000)]
Merge "Expose GSM Timing Advance, Update LTE TA docstring"

7 years agoApp_process: Clean up sanitized binaries
Andreas Gampe [Wed, 30 Nov 2016 03:28:13 +0000 (19:28 -0800)]
App_process: Clean up sanitized binaries

Clean up the definition of sanitized binaries. Clean up the
Android.mk to share values.

Bug: 33224213
Test: mmma SANITIZE_TARGET=address SANITIZE_LITE=true frameworks/base/cmds/app_process && ls $OUT/system/bin/asan
Change-Id: I70f8d95ff2ec6366fc0a7d252b91dce268186910

7 years agoMerge "Add KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY"
Jordan Liu [Wed, 30 Nov 2016 17:42:30 +0000 (17:42 +0000)]
Merge "Add KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY"

7 years agoLOCAL_CLANG := true is now the default
Glenn Kasten [Mon, 15 Aug 2016 23:10:24 +0000 (16:10 -0700)]
LOCAL_CLANG := true is now the default

Change-Id: I2f6a8c7f32cbf682c968a43d590d773ffb21e909
(cherry picked from commit 3a7510bcf6089d3ef768de7cf805ca783f0aac17)

7 years agoMerge "[AWARE] Data-path creation roles hard-coded for discovery sessions"
Etan Cohen [Wed, 30 Nov 2016 16:58:07 +0000 (16:58 +0000)]
Merge "[AWARE] Data-path creation roles hard-coded for discovery sessions"

7 years ago[AWARE] Data-path creation roles hard-coded for discovery sessions
Etan Cohen [Wed, 16 Nov 2016 15:07:11 +0000 (07:07 -0800)]
[AWARE] Data-path creation roles hard-coded for discovery sessions

Data-path roles (initiator & responder) are hard-coded for discovery
session participants by the spec: subscriber <-> initiator and
publisher <-> responder. Remove API parameter which allowed caller
to specify role.

(cherry-pick of commit 9c7483fec41db681a2d6de93a9061fb8764ecba5)

Bug: 32883026
Test: unit-tests and integration (sl4a) tests passing.
Change-Id: I889eacda9416d9ecd04caa0c72413f984611d40c

7 years agoMerge "Add legacy-test as replacement for core-junit"
Paul Duffin [Wed, 30 Nov 2016 12:04:23 +0000 (12:04 +0000)]
Merge "Add legacy-test as replacement for core-junit"

7 years agoMerge "Fix batterySendBroadcast not synchronized issue."
Treehugger Robot [Wed, 30 Nov 2016 07:59:54 +0000 (07:59 +0000)]
Merge "Fix batterySendBroadcast not synchronized issue."

7 years agoMerge "Preload2: Add sequence UI"
Treehugger Robot [Wed, 30 Nov 2016 00:39:18 +0000 (00:39 +0000)]
Merge "Preload2: Add sequence UI"

7 years agoPreload2: Add sequence UI
Andreas Gampe [Mon, 28 Nov 2016 23:07:39 +0000 (15:07 -0800)]
Preload2: Add sequence UI

Add a fake UI that can run a sequence of actions (and replies).

Bug: 31961946
Test: manual
Change-Id: Iee0fac5ddf75a97eff7b401c9c932634489349de

7 years agoAdd new hostingType for startProcessLocked() that selects using the WebViewZygote.
Robert Sesek [Fri, 4 Nov 2016 14:20:38 +0000 (10:20 -0400)]
Add new hostingType for startProcessLocked() that selects using the WebViewZygote.

Test: m
Test: angler boots
Test: Turn on Multiprocess WebView in Developer Options and launch the WebView
      Shell. The sandboxed_service parent process is the webview_zygote.

Bug: 21643067
Change-Id: I9dab548853372fd91f6bbe204cc8686ef2e94448

7 years agoAdd legacy-test as replacement for core-junit
Paul Duffin [Mon, 28 Nov 2016 15:51:09 +0000 (15:51 +0000)]
Add legacy-test as replacement for core-junit

Statically includes core-junit-static into legacy-test target so
that legacy-test can be used in place of core-test. Once that
switch over has been done then android.test classes that are
being removed from the public API can be safely moved into here.

Bug: 30188076
Test: make legacy-test and check contents of generated legacy-test artifacts

Change-Id: I75488303067c4ac34c46279bfce9a51273adcc34

7 years agoMerge "Use junit-host instead of junit"
Paul Duffin [Tue, 29 Nov 2016 15:01:31 +0000 (15:01 +0000)]
Merge "Use junit-host instead of junit"

7 years agoUse junit-host instead of junit
Paul Duffin [Tue, 29 Nov 2016 13:00:19 +0000 (13:00 +0000)]
Use junit-host instead of junit

Bug: 30188076
Test: make checkbuild
Change-Id: I3496b9d7e40abf7712a56ba633a2becd0aa17c06

7 years agoMerge "[AM] Fix system server may killed when monkey crash."
Treehugger Robot [Tue, 29 Nov 2016 14:23:03 +0000 (14:23 +0000)]
Merge "[AM] Fix system server may killed when monkey crash."

7 years agoMerge "Use junit-host instead of junit"
Paul Duffin [Tue, 29 Nov 2016 10:12:51 +0000 (10:12 +0000)]
Merge "Use junit-host instead of junit"

7 years ago[AM] Fix system server may killed when monkey crash.
Mark Lu [Mon, 21 Nov 2016 07:38:13 +0000 (15:38 +0800)]
[AM] Fix system server may killed when monkey crash.

 Symptom: monkey crash caused system server killed.
 Root Cause: when monkey crash or app crash before process bound,
        calling AppErrors.crashApplication will first
        clear binder identities, that will caused calling pid / uid
        will become with current process (i.e. system server),
        so in handleAppCrashInActivityController, when monkey registered
        activityController would like to kill crash process,
        but not found in AMS (monkey created by app_process)
        then using calling pid / uid will become to kill system server.
 Solution: add calling pid / uid parameters for
         handleAppCrashInActivityController to prevent binder identities
         cleared case.

 Test: To simulate monkey or app crash before process bound may not easy
     by using simple command, but we can write a sample program to
     simulate RuntimeInit to call handleApplicationCrash when met
     uncauchtException,

    Below is test steps in Android 7.1.1 emulator.

1. start emulator
2. after emulater started, use "adb shell am monitor" to set
   activityController & monitor process by console.
3. write a .jar program as monkey by below sample code to simulate null
   application binder to call handleApplicationCrash() as RuntimeInit:

package com.android.test;

import com.android.internal.os.BaseCommand;
public class SimulateMonkeyCrash extends BaseCommand {

    public static void main(String[] args) {
        IActivityManager am = ActivityManagerNative.getDefault();
        try {
            am.handleApplicationCrash(null,
                 new ApplicationErrorReport.CrashInfo(new Throwable()));
        } catch (RemoteException e) {
            e.printStackTrace();
    }
}

4. write a .sh file named SimulateMonkeyCrash.sh as below:
  #
  base=/system
  export CLASSPATH=$base/framework/SimulateMonkeyCrash.jar
  exec app_process $base/bin com.android.test.SimulateMonkeyCrash "$@"

5. let .sh file is executable by "chomod 755".
6. push .jar file into /system/framework & .sh file into /system/bin
7 execute .sh file.
8. activityController will detected program crash in console as below,
press k:
Waiting after crash...  available commands:
(c)ontinue: show crash dialog
(k)ill: immediately kill app
(q)uit: finish monitoring

9 you can see system server is crash.

Change-Id: Ibac4d88872f24af109d8e8522ecf5ac72fac0ce0

7 years agoMerge changes I37c8daa6,I5a05b65d,If56347fd
Treehugger Robot [Tue, 29 Nov 2016 03:08:20 +0000 (03:08 +0000)]
Merge changes I37c8daa6,I5a05b65d,If56347fd

* changes:
  Preload2: Add isSingleThreaded
  Preload2: Fix action inheritance
  Preload2: Abstract out UI

7 years agoAdd ACTION_WIFI_SAVED_NETWORK_SETTINGS to Settings.
Stephen Chen [Mon, 14 Nov 2016 23:59:33 +0000 (15:59 -0800)]
Add ACTION_WIFI_SAVED_NETWORK_SETTINGS to Settings.

Exposes an activity that deep links into saved network Settings.

Bug: 32738882
Test: gts test
Change-Id: Ic639b7543439bbe52941fa58a74a767a4a0f8a76

7 years agoPreload2: Add isSingleThreaded
Andreas Gampe [Mon, 28 Nov 2016 23:06:35 +0000 (15:06 -0800)]
Preload2: Add isSingleThreaded

Expose whether a UI is single-threaded to avoid spawning threads
in actions.

Bug: 31961946
Test: manual
Change-Id: I37c8daa6a00784e833bad53b8e83ab4417955df7

7 years agoPreload2: Fix action inheritance
Andreas Gampe [Mon, 28 Nov 2016 23:04:25 +0000 (15:04 -0800)]
Preload2: Fix action inheritance

Use AbstractThreadedAction as a base.

Bug: 31961946
Test: manual
Change-Id: I5a05b65d753be775c8b8382bb1a81e869c388f8d

7 years agoPreload2: Abstract out UI
Andreas Gampe [Mon, 28 Nov 2016 21:15:10 +0000 (13:15 -0800)]
Preload2: Abstract out UI

Create IUI interface and move UI to SwingUI.

Bug: 31961946
Test: manual
Change-Id: If56347fdde8b441c0c01337a3f5eac002ea5b4f3

7 years agoMerge "Add removeState method to StateMachine"
Hall Liu [Mon, 28 Nov 2016 20:52:01 +0000 (20:52 +0000)]
Merge "Add removeState method to StateMachine"

7 years agoUse junit-host instead of junit
Paul Duffin [Mon, 28 Nov 2016 16:44:44 +0000 (16:44 +0000)]
Use junit-host instead of junit

Bug: 30188076
Test: make checkbuild
Change-Id: I5d3efbfbe3245a631113674bff1b0aabdc9fe8be

7 years agoMerge "Use the new refined DexOptNeeded codes."
Nicolas Geoffray [Mon, 28 Nov 2016 13:15:55 +0000 (13:15 +0000)]
Merge "Use the new refined DexOptNeeded codes."

7 years agoUse the new refined DexOptNeeded codes.
Nicolas Geoffray [Fri, 25 Nov 2016 09:50:29 +0000 (09:50 +0000)]
Use the new refined DexOptNeeded codes.

bug: 30937355
Test: device boots, messages are printed correctly
Change-Id: Ia5274e3659471c2a52244d5838d207d407e79023

7 years agoMerge "Move JUnit classes from here into external/junit"
Paul Duffin [Thu, 24 Nov 2016 11:44:01 +0000 (11:44 +0000)]
Merge "Move JUnit classes from here into external/junit"

7 years agoMerge "[AWARE] Move manager tests from service to manager directory"
Etan Cohen [Wed, 23 Nov 2016 23:42:29 +0000 (23:42 +0000)]
Merge "[AWARE] Move manager tests from service to manager directory"

7 years agoAdd removeState method to StateMachine
Hall Liu [Tue, 22 Nov 2016 01:29:02 +0000 (17:29 -0800)]
Add removeState method to StateMachine

Method to be used by BluetoothRouteManager in Telecom.

Test: unit tests in Telecom
Change-Id: Icdd1a3d42224246a5f26100fabb26313ce83b14c

7 years ago[AWARE] Move manager tests from service to manager directory
Etan Cohen [Thu, 17 Nov 2016 01:59:41 +0000 (17:59 -0800)]
[AWARE] Move manager tests from service to manager directory

Move operation - no functional tests. Only editorial changes:
- Remove (no longer) necessary import statements
- Removed reference to a constant sitting on the service side.
  Replaced with locally defined constant.

(cherry pick of commit 7ba5ad3c53dac62e56cd12dbe2054ce8374b6b92)

Bug: 32954930
Test: unit-tests pass
Change-Id: Ibe463fa73c27fc67996460eb91ea0222437927a6

7 years agoUpdate Samsung Print Recommendation Plugin (to support Mopria printers)
Sergey Yakovlev [Fri, 18 Nov 2016 15:59:47 +0000 (18:59 +0300)]
Update Samsung Print Recommendation Plugin (to support Mopria printers)

- Extract common part of MDNSFilterPlugin to common utils, MDNSFilteredDiscovery.java (other vendors can use it too)
- Refactor Samsung Print Recomendation Plugin to use MDNSFilteredDiscovery.java
- Add Mopria devices detection to Samsung Print Recomendation Plugin

*Samsung Print Service Plugin supports Mopria printers since v3.00.161011.

Test: Tested manually. Test app was developed to make sure that Samsung Print Recommendation plugin can find both Samsung and Mopria devices. Additionally MDNSFilterPlugin was tested on HP printers.
Change-Id: Idc0d311171495f879564336370a86f7a8890378b

7 years agoMerge "Expose TelephonyManager#{set,get}DataEnabled."
Jeff Davidson [Wed, 23 Nov 2016 03:55:26 +0000 (03:55 +0000)]
Merge "Expose TelephonyManager#{set,get}DataEnabled."

7 years agoMerge "Fix static analyzer warnings."
Treehugger Robot [Wed, 23 Nov 2016 02:45:54 +0000 (02:45 +0000)]
Merge "Fix static analyzer warnings."

7 years agoMerge "Bluetooth: report proper advertiser status on error"
Treehugger Robot [Wed, 23 Nov 2016 01:51:51 +0000 (01:51 +0000)]
Merge "Bluetooth: report proper advertiser status on error"

7 years agoExpose TelephonyManager#{set,get}DataEnabled.
Jeff Davidson [Fri, 18 Nov 2016 23:48:15 +0000 (15:48 -0800)]
Expose TelephonyManager#{set,get}DataEnabled.

setDataEnabled requires MODIFY_PHONE_STATE or carrier privileges.
getDataEnabled will work with any of the above or
ACCESS_NETWORK_STATE.

Merged-In: I2d5a9df2e55f3f7be1729abefe137c00ae1d6c4e
Test: Exercised APIs from test app, updated and executed CTS tests
Change-Id: I2d5a9df2e55f3f7be1729abefe137c00ae1d6c4e
Fixes: 32644451

7 years agoBluetooth: report proper advertiser status on error
Jakub Pawlowski [Tue, 22 Nov 2016 20:44:22 +0000 (12:44 -0800)]
Bluetooth: report proper advertiser status on error

When advertiser is not started because too many advertisers are
registered, return proper error code.

Bug: 30622771
Test: sl4a ConcurrentBleAdvertisingTest
Change-Id: I57384ff30132e9a7ee17dcf191ff89baa7abf1ef

7 years agojni: EventLog replace open coding with android_log_event_list
Mark Salyzyn [Tue, 8 Nov 2016 17:28:51 +0000 (09:28 -0800)]
jni: EventLog replace open coding with android_log_event_list

Test: manual confirm event log messages from services continue
Bug: 31992412
Bug: 31456426
Change-Id: I20a4228120c454d3e736dae8a927f1e0f9a62e37

7 years agoMove JUnit classes from here into external/junit
Paul Duffin [Mon, 21 Nov 2016 15:26:00 +0000 (15:26 +0000)]
Move JUnit classes from here into external/junit

Checked that android.test.runner had the same classes in as
before the change.

These classes are legacy 3.8.1 classes, they are not in 4.10 at
all. They appear to have been left here by accident. Looking at
the history it appears that at one time there were copies of
JUnit 3.8.1 junit.runner classes in frameworks and
external/junit. The classes here were upgraded to 4.10 but even
though these classes had been deleted immediately after 3.8.2
was released they were not removed, instead they appear to have
been reformatted as part of the upgrade. The external/junit
source was upgraded to 4.10 about two weeks later which seems to
have been done correctly. About three months after that the
classes here that were duplicates of those in external/junit
were removed from here leaving the legacy classes from 3.8.1.

I could not find any usages of these classes and they are not in
the public API so they can probably be removed altogether.
However, for now I will simply move them into external/junit as
described and remove them when upgrading JUnit there to 4.12.

Bug: 30188076
Test: Built android.test.runner and checkapi
Change-Id: I88687889315c041d999fe7e61b9652ac8406165c

7 years agoMerge "Add SystemProperties.reportSyspropChanged()."
Treehugger Robot [Tue, 22 Nov 2016 09:43:23 +0000 (09:43 +0000)]
Merge "Add SystemProperties.reportSyspropChanged()."

7 years agoMerge "wifi: hotspot2: add copy constructor for PasspointConfiguration"
Treehugger Robot [Tue, 22 Nov 2016 00:03:43 +0000 (00:03 +0000)]
Merge "wifi: hotspot2: add copy constructor for PasspointConfiguration"

7 years agoMerge "Make voicemail notification broadcast public"
Treehugger Robot [Mon, 21 Nov 2016 22:23:12 +0000 (22:23 +0000)]
Merge "Make voicemail notification broadcast public"

7 years agoMerge "[AWARE] Update API per review"
Etan Cohen [Mon, 21 Nov 2016 21:43:39 +0000 (21:43 +0000)]
Merge "[AWARE] Update API per review"

7 years agoMerge "StrictMode to detect untagged network traffic."
Treehugger Robot [Mon, 21 Nov 2016 21:33:15 +0000 (21:33 +0000)]
Merge "StrictMode to detect untagged network traffic."

7 years agoMerge "Stub Binder API."
Jeff Sharkey [Mon, 21 Nov 2016 20:10:28 +0000 (20:10 +0000)]
Merge "Stub Binder API."

7 years agoStrictMode to detect untagged network traffic.
Jeff Sharkey [Mon, 21 Nov 2016 19:14:50 +0000 (12:14 -0700)]
StrictMode to detect untagged network traffic.

Define some constants for early use in AOSP code.

Test: builds, boots, all common traffic tagged
Bug: 30943431
Change-Id: Ia58a8933bccfddbc027afb78c63ae65bd71ce562

7 years ago[AWARE] Update API per review
Etan Cohen [Wed, 16 Nov 2016 21:40:55 +0000 (13:40 -0800)]
[AWARE] Update API per review

- Move Handler to last position
- Peer ID changed from 'Object' -> opaque class
- Rename onMessageSent -> onMessageSendSucceeded

(cherry pick of commit 1fef08507aeb49bb2e4e7be4804a378ba2cf7770)

Bug: 31470256
Test: unit tests & integration (sl4a) tests pass
Change-Id: I5530d310e982ea16a63a5af1f704625fd24e436c

7 years agoStub Binder API.
Jeff Sharkey [Mon, 21 Nov 2016 16:13:52 +0000 (09:13 -0700)]
Stub Binder API.

Provide a stub API for AOSP code to call.

Test: builds
Bug: 32715088
Change-Id: Iab74d269e795a722e82fd3fa304200d57d152f57

7 years agoAdd SystemProperties.reportSyspropChanged().
Martijn Coenen [Thu, 17 Nov 2016 13:06:38 +0000 (14:06 +0100)]
Add SystemProperties.reportSyspropChanged().

To support notifying libutils of system property
changes.

Bug: 31262344
Test: builds
Change-Id: Iea77532eaa84d00f7d640edd1e3a1da66afdadc5

7 years agoMerge "Precreate the classloader for the WebView."
Treehugger Robot [Mon, 21 Nov 2016 16:54:52 +0000 (16:54 +0000)]
Merge "Precreate the classloader for the WebView."