252684 Commits

Author SHA1 Message Date
Chris Tate
fa228e06f6 Merge "Fix the deadlock problem" 2016-12-02 22:39:57 +00:00
Treehugger Robot
c60963e451 Merge "Remove static link in Android framework under /frameworks/base." 2016-12-02 19:21:47 +00:00
Treehugger Robot
eda1af611f Merge "Add new hostingType for startProcessLocked() that selects using the WebViewZygote." 2016-12-02 17:02:31 +00:00
Treehugger Robot
7dd909684f Merge "Protect broadcast emitted by Bluetooth mapmce and pbap profile" 2016-12-02 04:37:52 +00:00
Jack He
1ac34e3657 Protect broadcast emitted by Bluetooth mapmce and pbap profile
Bug: 33281228
Test: mm -j 40
Change-Id: I273e9e3c02f431ba7006bcf5d230a6c30eb67843
2016-12-01 18:55:31 -08:00
Treehugger Robot
1981812450 Merge "jni: EventLog replace open coding with android_log_event_list" 2016-12-02 00:39:55 +00:00
Robert Greenwalt
297e9f9a32 Merge "Get the correct operator name" 2016-12-01 23:29:28 +00:00
Zoran Jovanovic
47495ebad0 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
2016-12-01 21:50:14 +00:00
ltrochtova
4eb075e89f Merge "Revert "Introduce a new user restriction for disallowing Bluetooth."" 2016-12-01 21:20:43 +00:00
ltrochtova
8874fcf97f Revert "Introduce a new user restriction for disallowing Bluetooth."
This reverts commit 69f9d321ac19e7137e07b411779339f9973eba1b.

Change-Id: I5859b262a741d1fe8e8b61e142eecf7d742d8d41
2016-12-01 20:50:53 +00:00
Treehugger Robot
880c9acf4a Merge "Add command line action sequencing." 2016-12-01 17:23:37 +00:00
Etan Cohen
f358a69cba Merge "AWARE: Abstract structure of match filters" 2016-12-01 15:42:35 +00:00
ltrochtova
1e9a5eac92 Merge "Introduce a new user restriction for disallowing Bluetooth." 2016-12-01 13:40:29 +00:00
Lenka Trochtova
69f9d321ac 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
2016-12-01 10:56:51 +01:00
Treehugger Robot
f9479fe639 Merge "Add meteredOverride field to WifiConfiguration." 2016-12-01 03:08:44 +00:00
Treehugger Robot
de32925ccd Merge "App_process: Merge app_process and app_process__asan" 2016-12-01 02:38:29 +00:00
pengzhicai
acaed3d29e Fix the deadlock problem
https://code.google.com/p/android/issues/detail?id=229020

Change-Id: Ib08f62dd916d09e666e58fb583555170d1e51da6
Signed-off-by: pengzhicai <pengzhicai@xiaomi.com>
2016-12-01 02:01:49 +00:00
Treehugger Robot
3af97482f1 Merge "Refactor NetworkScoreAppManager for testing." 2016-12-01 01:59:14 +00:00
Jaekyun Seok
377878b4d4 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)
2016-12-01 10:31:12 +09:00
Etan Cohen
1857b982c3 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
2016-11-30 17:01:52 -08:00
Andreas Gampe
2200e09736 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
2016-11-30 16:35:32 -08:00
Amin Shaikh
aa09aa0210 Refactor NetworkScoreAppManager for testing.
Test: runtest frameworks-services && runtest frameworks-core
Change-Id: Ie2172009e9ba0438050488fe0aea6408f852c2c2
2016-11-30 13:52:43 -08:00
Treehugger Robot
273adb5257 Merge "App_process: Clean up sanitized binaries" 2016-11-30 21:00:56 +00:00
Treehugger Robot
1204e3806f Merge "LOCAL_CLANG := true is now the default" 2016-11-30 20:35:41 +00:00
Treehugger Robot
6e54c31f0a Merge "Add ACTION_WIFI_SAVED_NETWORK_SETTINGS to Settings." 2016-11-30 20:25:13 +00:00
Robert Greenwalt
fbb48bcecd Merge "Fix MSIM issue of broadcast intent overwritten unintentionally" 2016-11-30 19:47:23 +00:00
Michael Rosenfeld
c37b0a40e7 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
2016-11-30 11:26:33 -08:00
Stephen Chen
c76fda7269 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
2016-11-30 11:15:13 -08:00
nharold
4134ccb214 Merge "Expose GSM Timing Advance, Update LTE TA docstring" 2016-11-30 18:00:35 +00:00
Andreas Gampe
622f511f2f 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
2016-11-30 09:46:09 -08:00
Jordan Liu
a578ae2aa1 Merge "Add KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY" 2016-11-30 17:42:31 +00:00
Glenn Kasten
827d0d76fb LOCAL_CLANG := true is now the default
Change-Id: I2f6a8c7f32cbf682c968a43d590d773ffb21e909
(cherry picked from commit 3a7510bcf6089d3ef768de7cf805ca783f0aac17)
2016-11-30 09:42:23 -08:00
Etan Cohen
47502919ad Merge "[AWARE] Data-path creation roles hard-coded for discovery sessions" 2016-11-30 16:58:08 +00:00
Etan Cohen
1ddf6a6d3a [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
2016-11-30 07:10:42 -08:00
Paul Duffin
e75a82a92f Merge "Add legacy-test as replacement for core-junit" 2016-11-30 12:04:23 +00:00
Treehugger Robot
32e756a4bc Merge "Fix batterySendBroadcast not synchronized issue." 2016-11-30 07:59:55 +00:00
Treehugger Robot
56ddac7fd7 Merge "Preload2: Add sequence UI" 2016-11-30 00:39:19 +00:00
Andreas Gampe
437474990d Preload2: Add sequence UI
Add a fake UI that can run a sequence of actions (and replies).

Bug: 31961946
Test: manual
Change-Id: Iee0fac5ddf75a97eff7b401c9c932634489349de
2016-11-29 15:22:02 -08:00
Robert Sesek
c5f86647b1 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
2016-11-29 11:08:49 -05:00
Paul Duffin
e20f193a8c 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
2016-11-29 15:04:00 +00:00
Paul Duffin
6063357ae6 Merge "Use junit-host instead of junit" 2016-11-29 15:01:32 +00:00
Paul Duffin
4a064d2010 Use junit-host instead of junit
Bug: 30188076
Test: make checkbuild
Change-Id: I3496b9d7e40abf7712a56ba633a2becd0aa17c06
2016-11-29 14:52:42 +00:00
Treehugger Robot
21ed56daac Merge "[AM] Fix system server may killed when monkey crash." 2016-11-29 14:23:03 +00:00
Paul Duffin
7dda7e1e81 Merge "Use junit-host instead of junit" 2016-11-29 10:12:52 +00:00
Mark Lu
b5e2499631 [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
2016-11-29 06:21:24 +00:00
Treehugger Robot
9309f1cbf3 Merge changes I37c8daa6,I5a05b65d,If56347fd
* changes:
  Preload2: Add isSingleThreaded
  Preload2: Fix action inheritance
  Preload2: Abstract out UI
2016-11-29 03:08:20 +00:00
Stephen Chen
767e453cdf 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
2016-11-28 16:26:16 -08:00
Andreas Gampe
3bf65c916c Preload2: Add isSingleThreaded
Expose whether a UI is single-threaded to avoid spawning threads
in actions.

Bug: 31961946
Test: manual
Change-Id: I37c8daa6a00784e833bad53b8e83ab4417955df7
2016-11-28 15:06:35 -08:00
Andreas Gampe
1c809a3d32 Preload2: Fix action inheritance
Use AbstractThreadedAction as a base.

Bug: 31961946
Test: manual
Change-Id: I5a05b65d753be775c8b8382bb1a81e869c388f8d
2016-11-28 15:04:25 -08:00
Andreas Gampe
5cb8998363 Preload2: Abstract out UI
Create IUI interface and move UI to SwingUI.

Bug: 31961946
Test: manual
Change-Id: If56347fdde8b441c0c01337a3f5eac002ea5b4f3
2016-11-28 13:15:10 -08:00