Commit Graph

4433 Commits

Author SHA1 Message Date
Jeff Sharkey
08415b47b0 Merge "Only construct real Throwable objects." into oc-dev am: 0868533760
am: f0278f30da

Change-Id: Id23ee02fb7cfd4b4ab9782066a085ee000fb8a70
2017-09-28 00:23:50 +00:00
Jeff Sharkey
f0278f30da Merge "Only construct real Throwable objects." into oc-dev
am: 0868533760

Change-Id: I260dc1d1c903f1c1c2828d68049f9f202daa0869
2017-09-28 00:15:18 +00:00
Lorenzo Colitti
53eb9d359a Merge "Delete the legacy framework code for manipulating ND offload."
am: d1ae268081

Change-Id: I060bd7632b809d89224d250c697ac9d2e89d5c2d
2017-09-27 10:53:05 +00:00
Lorenzo Colitti
59da962b9f 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
2017-09-27 16:47:36 +09:00
Hans Boehm
24b9851605 Merge "Naming fix and add comments"
am: 3c03d5bd2b

Change-Id: Ib35c874f56f87757904553ceeffb4d363eff196e
2017-09-26 11:12:19 +00:00
Hans Boehm
eb6d62cd33 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
2017-09-22 15:49:48 -07:00
Jeff Sharkey
8e151bf899 Only construct real Throwable objects.
Without this test, someone could trick us into constructing other
shady classes.

Test: builds, boots
Bug: 65281159
Change-Id: If678d0681708d1b0dcf056aa1133830ad3dbce31
2017-09-20 23:39:20 +00:00
Narayan Kamath
a3d4230b92 Zygote: Fix race condition on package preloads.
Before this change, ZygoteProcess.preloadPackageForAbi returned
as soon as the command was written to the zygote socket and not
after the preload completed. This meant that there was a small
window of time before the server side of the socket polled its FDs
where a second command could be written to the zygote socket. This
would lead to only one of the commands being processed and the
other being dropped. The client side of that socket would then wait
forever for a response and bring down the system once the watchdog
timeout was hit.

Example failure case :
--------------
system_server:send command(preloadPackage)
system_server:send command(fork)
zygote:poll & process command(preloadPackage)  // the fork command is dropped.

Example of normal operation :
------------------
system_server:send command(preloadPackage)
zygote:poll & process command(preloadPackage)
system_server:send command(fork)
zygote:poll & process command(fork)

This change makes preloadPackageForAbi synchronous, which ensures
that each POLLIN event corresponds to precisely one command.

(cherry picked from commit 24a3306c32)

Bug: 62886909
Bug: 13618569
Test: Manual
Contributed-By: yuqianyu@huawei.com

Merged-In: I83faf974c9a70a6ab18323f692c1981784e4c56a
Change-Id: I83faf974c9a70a6ab18323f692c1981784e4c56a
2017-09-13 18:37:05 -07:00
Nicolas Geoffray
8dbb5e51c8 resolve merge conflicts of e017dae587 to stage-aosp-master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I7008986501028ec9bee0505d41aae3ff27872b50
2017-09-13 11:08:36 +01:00
Nicolas Geoffray
81edac4037 Rename debugFlags to runtimeFlags.
Also now pass the flags to the forked process through --runtime-flags instead
of converting to command line arguments and converting back to an integer.

bug: 30972906
bug: 63920015

Test: builds

Change-Id: I7f10c43dd916ca2d3b9b5141f17261eb7b64f49a
2017-09-12 15:54:23 +01:00
Andreas Gampe
f5dcc28b0c Merge changes I49057737,I68e3096d
am: 50cf621704

Change-Id: Id66d91bc326461dc3cae4cbae03f3d060761ea7f
2017-08-31 15:15:31 +00:00
Andreas Gampe
a90534b551 Frameworks: Clean up SystemProperties
Clean up SystemProperties.java. Add annotations.

Clean up SystemProperties.cpp. Refactor for proper C++11.
Make sure C-string key construction is properly reused. Use
android::base functionality for actual reading.

Fix the test script to refer to the right location. Add some
test coverage.

(cherry picked from commit 2e6b9cb563)

Test: m
Test: frameworks/base/core/tests/systemproperties/run_core_systemproperties_test.sh --rebuild
Merged-In: I490577370da985f600fb1117e3c818d3f68bad5f
Change-Id: I490577370da985f600fb1117e3c818d3f68bad5f
2017-08-30 18:37:48 -07:00
Andreas Gampe
33aea8d40e Frameworks: Add warning to SystemProperties.get
Add a warning that calling get() is unsafe when the system property
may not contain a valid UTF-encoded string.

(cherry picked from commit 6bf1cff1dd)

Bug: 63177684
Test: m
Merged-In: I68e3096d770a32fe204be5c130a3ada9d3db7c0b
Change-Id: I68e3096d770a32fe204be5c130a3ada9d3db7c0b
2017-08-30 18:37:48 -07:00
Lorenzo Colitti
b9fc12d1d2 Merge changes I325b13d5,I89719fe7 am: 23868e9c09 am: 9335d2d0b1
am: 4fa0187015

Change-Id: Ib980879b0e50ffe1c8209339df22da4a50d5b74e
2017-08-19 03:38:10 +00:00
Lorenzo Colitti
4fa0187015 Merge changes I325b13d5,I89719fe7 am: 23868e9c09
am: 9335d2d0b1

Change-Id: Iac0d1a08c45816f32b0f8ab81a079883a9965e21
2017-08-19 03:25:21 +00:00
Lorenzo Colitti
9335d2d0b1 Merge changes I325b13d5,I89719fe7
am: 23868e9c09

Change-Id: Iaced543ab17ea87c8f701975764d957bc1b17fc7
2017-08-19 03:15:08 +00:00
Lorenzo Colitti
f1912ca49a Add tether offload traffic to interface stats as well.
Currently, we only count add tethering traffic to per-UID
stats, but not to total data usage (i.e., dev and XT stats). This
is correct for software tethering, because all software forwarded
packets are already included in interface counters, but it is
incorrect for hardware offload, because such packets do not
increment interface counters.

To fix this:
1. Add an argument to ITetheringStatsProvider#getTetherStats to
   indicate whether per-UID stats are requested. For clarity,
   define integer constants STATS_PER_IFACE and STATS_PER_UID
   to represent these operations.
2. Make NetdTetheringStatsProvider return stats only if per-UID
   stats are requested. (Otherwise tethering traffic would be
   double-counted).
3. Make OffloadController's stats provider return the same
   stats regardless of whether per-UID stats were requested or
   not.
4. Make NetworkStatsService add non-per-UID tethering stats to
   the dev and XT snapshots. The per-UID snapshots were already
   correctly adding in per-UID stats.

(cherry picked from commit 5356a35c3b)

Bug: 29337859
Bug: 32163131
Test: runtest frameworks-net
Test: runtest frameworks-telephony
Change-Id: I325b13d50e88841dfb0db4c35e7e27f163ee72fe
Merged-In: I4e8e923d68dce1a4a68608dbd6c75a91165aa4ee
2017-08-19 10:12:05 +09:00
Lorenzo Colitti
9f0baa94ca Tell the system when tethering offload hits a limit.
Add a new tetherLimitReached method to INetworkManagementService,
and call it when the HAL notifies OffloadController because the
limit has been reached.

Bug: 29337859
Bug: 32163131
Test: builds
Test: OffloadControllerTest passes

(cherry picked from commit d66cf56ba6)

Change-Id: I89719fe7ec8bfd3c85d6cdca9c0d449aea86ef9d
Merged-In: I026e6aa9e7b371f316c0d97c3cf5e78abc1f5263
2017-08-19 00:15:31 +09:00
Christine Franks
e5bad6eb25 Merge "Allow SMS and calling for demo users" into oc-dr1-dev
am: 4387d3a523

Change-Id: I78128f2a9acdbbd2ccd10f2ee12cbe100000fb1a
2017-08-09 20:15:28 +00:00
Christine Franks
97a5480a1d Allow SMS and calling for demo users
Bug: 62712426
Test: manual - restrictions are unset in demo mode
Change-Id: I151fbfb8222e768403a7e5ba1fcf868ba35a1f22
2017-08-09 10:24:38 -07:00
Sundong Ahn
30538850f2 Merge "Add hwbinder library" am: 49e2a9a612 am: 811027ede7
am: 2785be7572

Change-Id: Ia545b163166465cafa3d4ecbb0a5d0d911224b22
2017-08-02 17:14:55 +00:00
Sundong Ahn
2785be7572 Merge "Add hwbinder library" am: 49e2a9a612
am: 811027ede7

Change-Id: Idec0d080a65d96ff866969f47e9902e40e800fdf
2017-08-02 17:05:56 +00:00
Sundong Ahn
811027ede7 Merge "Add hwbinder library"
am: 49e2a9a612

Change-Id: I3c7528dcf98bf3b92843594172531fd30a5f29d4
2017-08-02 16:57:50 +00:00
Sundong Ahn
28cc6e88fd Add hwbinder library
HAL impls will depend hwbinder.jar instead of framework.jar on
build-time, but on runtime framework.jar will be used.

This is to cut the circular dependency when using configstore from
Android framework. Also added JNI call to HwBinder.java to cut
configstore's dependency on systemproperty in framework.jar.

Note that hwbinder.jar is LOCAL_UNINSTALLABLE_MODULE and so it won't be
installed in an actual image.

Bug: 35771640
Test: build & run
Change-Id: I2420298cf9df5d6bbcead3e4451b703ce9bc3e29
2017-08-01 11:26:18 +09:00
Benjamin Miller
2c2d19504c Merge "Docs: Note that DISALLOW_CONFIG_VPN stops VPNs from starting" into oc-dev am: 91f16ace4f
am: c058675b80

Change-Id: Ib052cafb46a2e7830a7573c8a112147bc821cf0c
2017-07-28 17:39:42 +00:00
Benjamin Miller
5934ae605a Merge "Docs: Note that DISALLOW_CONFIG_VPN stops VPNs from starting" into oc-dev
am: 91f16ace4f

Change-Id: Id7d2c62577e0b534a7dd6605f722e7c5639e46b7
2017-07-28 17:30:18 +00:00
Benjamin Miller
c058675b80 Merge "Docs: Note that DISALLOW_CONFIG_VPN stops VPNs from starting" into oc-dev
am: 91f16ace4f

Change-Id: I9dd5d6641307589250d781dce11c4f2186b3c8fb
2017-07-28 17:30:16 +00:00
Benjamin Miller
05fef7ed69 Docs: Note that DISALLOW_CONFIG_VPN stops VPNs from starting
VPNs don't start except a DPC's configured always-on VPN. Clarified version behaviors.
Staged at: go/dac-stage/reference/android/os/UserManager.html#DISALLOW_CONFIG_VPN

Test: make ds-docs and output staged UserManager page
Bug: 63582789
Change-Id: I83c0c6cc580b9d1d224a94e073f559f23cf4d672
(cherry picked from commit 1f83e4d498)
2017-07-28 09:56:24 +00:00
Bookatz
9de5dc9ba8 Merge "Batterystats: fix inappropriate bg timebase reset" into oc-dr1-dev
am: 2337b3ba84

Change-Id: I9d0a3c1ac05f9583fe98b169037e008cc36315b3
2017-07-22 00:41:54 +00:00
Bookatz
993a0be676 Batterystats: fix inappropriate bg timebase reset
Previously, the background timebases (of a Uid) were reset when the Uid
resets in the wrong place. This caused StopwatchTimer.reset() to have the timesbase's old value to keep
track of its mUpdateTime. The solution is to call TimeBase.init at the
start of Uid.reset(), instead of calling TimeBase.reset() at the end of
Uid.reset().

Bug: 62352334
Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Change-Id: I23c886544e18f154fc226cc81c22c3ea70fb4c7e
2017-07-21 15:26:13 -07:00
Benjamin Miller
97c8fea260 Merge "Docs-change: how UserManager.ENSURE_VERIFY_APPS affects profiles." into oc-dev am: baa85250d4
am: aeb503f7ca

Change-Id: Id8a0ef9ecb0c4464da69a34f1d8a1fc2a1d41448
2017-07-20 14:09:05 +00:00
Benjamin Miller
9051bbf2cb Merge "Docs-change: how UserManager.ENSURE_VERIFY_APPS affects profiles." into oc-dev
am: baa85250d4

Change-Id: I9406e059aab1991209a234b6c4aa8767c25cda95
2017-07-20 14:05:31 +00:00
Benjamin Miller
aeb503f7ca Merge "Docs-change: how UserManager.ENSURE_VERIFY_APPS affects profiles." into oc-dev
am: baa85250d4

Change-Id: I553b5b775cbdb42020405dfcc1b18032d4777597
2017-07-20 14:05:31 +00:00
Jeff Davidson
10238e562a Merge "Revert disabling of eSIM wipes/retains." into oc-dr1-dev
am: acdcf37e4b

Change-Id: I10cc2501e38837f816c564716a6d157bc8f57ed6
2017-07-20 04:32:21 +00:00
TreeHugger Robot
acdcf37e4b Merge "Revert disabling of eSIM wipes/retains." into oc-dr1-dev 2017-07-20 04:24:50 +00:00
Ahmed ElArabawy
fe4ec9e946 Merge "Fix format of subsystem power stats" into oc-dr1-dev
am: 5512504bba

Change-Id: I3f6b818d34a2a54f73a7192d10d462b68d6e6ed0
2017-07-20 02:43:54 +00:00
Jeff Davidson
e05f37e0a6 Revert disabling of eSIM wipes/retains.
This is a revert of change I414a16cde11e76ccc390e7a63a6803f5b402fe78.
As an additional safety latch, we bypass all logic (either wipe or
retain) if the eSIM has never been provisioned. An unprovisioned eSIM
cannot possibly have profiles - indeed, we don't show the "Wipe eSIM"
checkbox in this case - so there's no reason to tell the LPA to retain
them.

Bug: 63693573
Test: TreeHugger + factory reset local test
Change-Id: I1fea50db317388e81823bf1bd0977ffe787a05e0
2017-07-20 00:01:33 +00:00
Ahmed ElArabawy
307edcd9c2 Fix format of subsystem power stats
The Subsystem power stats string in batteryStats dumpsys has an extra
newline that is causing PowerBug to skip the line when parsing the
history information.
Also, the string for subsystem power stats is missing a heading title
and has some redundant text

This commit fixes these format errors so powerbug can read and parse that
line successfully

Bug: 63447034
Test: Manual testing + Read the bugreport by historian and verify output

Change-Id: Idf971823dd5f769e653b4788b00fc025593d0d3d
Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
2017-07-19 16:25:46 -07:00
Lorenzo Colitti
8228eb3446 resolve merge conflicts of a1d67fb38e to stage-aosp-master
Test: make -j64 services
Change-Id: I3955b01189993f3051c608bc5d07a87e4e3b5f0b
Merged-In: Ic1e799c17b4bb0272cf85e03d5ad14981a55defa
2017-07-19 07:35:31 +09:00
Lorenzo Colitti
a1d67fb38e Merge changes from topic 'tether-offload-cherrypick'
* changes:
  Add code to dump OffloadController state.
  Fetch tethering offload stats.
  Allow more than one source of tethering statistics.
2017-07-18 18:45:29 +00:00
Lorenzo Colitti
07f1304cfe Allow more than one source of tethering statistics.
Currently, netd is the only source of tethering statistics.
In order to support multiple sources, define a new
ITetheringStatsProvider interface that can be registered with
NetworkManagmentService. Convert the existing code into the
first ITetheringStatsProvider.

(cherry picked from commit ef7b2a13ce)

Bug: 29337859
Bug: 32163131
Test: builds, boots
Test: tethering stats continue to be collected
Change-Id: Ie1b5a5e47ae4bf5af922365b09fa241e834236e4
Merged-In: Ie1b5a5e47ae4bf5af922365b09fa241e834236e4
2017-07-19 00:54:54 +09:00
Benjamin Miller
d41a9fc60b Docs-change: how UserManager.ENSURE_VERIFY_APPS affects profiles.
Noted affected users for versions prior to Android O.
Staged at: go/dac-stage/reference/android/os/UserManager.html#ENSURE_VERIFY_APPS

Test: make ds-docs and output staged
Bug: 38024373
Change-Id: Ida80c2134bdd4013c7adabee778e8296039747a2
2017-07-17 18:33:01 +02:00
Mathieu Chartier
151807c109 Merge "Add more details to dumpsys meminfo -d" am: 4ccf8b83a1 am: 41718e2413
am: 811fa6d001

Change-Id: I309ff9dc070716cc250a7c06821775c185ea6ebc
2017-07-14 21:54:07 +00:00
Mathieu Chartier
41718e2413 Merge "Add more details to dumpsys meminfo -d"
am: 4ccf8b83a1

Change-Id: I54fadc1bd30cc508faccabe1553c2db4cc040904
2017-07-14 21:37:43 +00:00
Jeff Davidson
7183acc20e Merge "Temporarily disable eUICC factory reset handling." into oc-dr1-dev
am: c0ce489df7

Change-Id: Iea42444468b78c604f32ffd4a47eb8a1c762d2ab
2017-07-14 20:07:26 +00:00
Mathieu Chartier
cb86245b99 Add more details to dumpsys meminfo -d
Added new subitems for
.dex:
boot vdex
app vdex
app odex

.art
app art
boot art

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

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

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

Bug: 32331673

(cherry picked from commit 95550dd394)

Change-Id: I7557ee09510651c7b5ddee646c92adbcdd3472db
2017-07-14 12:14:59 -07:00
Jeff Davidson
7615d11dd4 Temporarily disable eUICC factory reset handling.
This seems to be causing users who elect not to wipe their eUICC on a
factory reset to end up on the eSIM slot after the reset instead of
the pSIM slot.

Bug: 63693573
Test: TreeHugger + factory reset local test
Change-Id: I414a16cde11e76ccc390e7a63a6803f5b402fe78
2017-07-14 10:21:32 -07:00
Lorenzo Colitti
041111ff7e Merge changes Icc5aa605,If744f2e0,Ie1b5a5e4 into oc-dr1-dev
am: 3756636ad6

Change-Id: Ic1e799c17b4bb0272cf85e03d5ad14981a55defa
2017-07-14 01:01:29 +00:00
Lorenzo Colitti
3756636ad6 Merge changes Icc5aa605,If744f2e0,Ie1b5a5e4 into oc-dr1-dev
* changes:
  Add code to dump OffloadController state.
  Fetch tethering offload stats.
  Allow more than one source of tethering statistics.
2017-07-14 00:51:56 +00:00
Timur Iskhakov
1cdcaa8cf3 Merge "Add configureRpcThreadpool to java interface" am: d8dab11547 am: 791a698a6a
am: 9cdec3943c

Change-Id: Id3e2523a755e8ce207ac6bd85dbf6d5a69070207
2017-07-13 19:33:29 +00:00