Commit Graph

4480 Commits

Author SHA1 Message Date
Jeff Sharkey
67f9d5070a Fix broken javadocs.
Bug: 64337634
Test: make -j32 doc-comment-check-docs
Change-Id: I20fdd3dcddef09111d35946c41c596c7689effa6
2017-08-06 07:37:08 -06:00
Yi Jin
1533ffdc3e There must not have newline character in wakelock name
Bug: 64272195
Test: N/A
Change-Id: I07a7d9b9dfbf69acba0123bf4ec6e309c2a5a359
(cherry picked from commit dd214c2d36)
2017-08-03 22:56:15 +00:00
TreeHugger Robot
dd5afab0d4 Merge "Address API review comments" into oc-mr1-dev 2017-08-03 02:10:16 +00:00
John Reck
f995f9a87a Address API review comments
Also make it less error-prone to use unmap() incorrectly.
Bug: 64264008
Test: CTS tests pass

Change-Id: I21559676e7a850b76db4b61a31e43833396c6087
2017-08-02 10:24:18 -07:00
Dianne Hackborn
18482aef9e Improve docs about exceptions through Binder.
Test: built

Change-Id: I5b6af61daa373c92f7d7b3b341a20fbd9e691da9
2017-08-01 17:46:23 -07:00
Dianne Hackborn
47e6cc34bb Merge "Fix issue #64224738: Document return value of IBinder.transact()" into oc-mr1-dev 2017-08-01 20:01:32 +00:00
Makoto Onuki
f6764fb7f7 Merge "Revert "Reduce duplicate strings due to the package cache."" into oc-mr1-dev 2017-08-01 16:11:27 +00:00
TreeHugger Robot
0b8f281637 Merge "Add documentation on oneway transaction ordering." into oc-mr1-dev 2017-08-01 02:21:21 +00:00
Makoto Onuki
63e624a61e Revert "Reduce duplicate strings due to the package cache."
The pool is just broken.... I need to fix it and re-evaluate.

This reverts commit e86a29c6e6.

Change-Id: I296df71e76ffff1d1d0fc8a50e3493e20c124a7b
2017-08-01 00:42:33 +00:00
Dianne Hackborn
4cd650c008 Fix issue #64224738: Document return value of IBinder.transact()
Also add appropriate @NonNull and @Nullable annotations.

Test: built

Change-Id: I22de48105ef685baf594cfc004dd3e27e2ba09e9
2017-07-31 17:39:17 -07:00
Dianne Hackborn
6f12f2233e Add documentation on oneway transaction ordering.
Test: built
Change-Id: I4d2e336327a4ce9c8f76d49037c894e981bdf571
2017-07-31 17:02:51 -07:00
TreeHugger Robot
bb77e6c689 Merge "Reduce duplicate strings due to the package cache." into oc-mr1-dev 2017-07-31 17:52:41 +00:00
Jeff Sharkey
b7479988d2 Migrate plans to @SystemApi, evolve permissions.
We're not yet ready to commit to SubscriptionPlan as public API, so
relax to be @SystemApi instead.  Add a new MANAGE_SUBSCRIPTION_PLANS
permission that we require apps to hold, unless they've been
delegated access via a trusted CarrierService.

Since several apps have the ability to provide plans for a single
subId, we now remember the "owner" who set the current plan
information, and we refuse to leak plan information beyond the app
that originally set it.

Relax permissions check to not require READ_PHONE_STATE, since we're
only returning data that an app provided to us earlier.  Also fix
NPE when SubscriptionInfo is missing.

Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Bug: 63997177, 63928277, 64156138, 63903381
Change-Id: If503378ef406dcaec438c9b41e837e0a821a3ef4
2017-07-28 16:59:14 -06:00
Makoto Onuki
e86a29c6e6 Reduce duplicate strings due to the package cache.
The following charts are the actual measurement with and without the fix,
using "dumpsys system".
- The red bar is "total private dirty".
- The X axsis is time since boot.

Without fix:
- First boot:
https://docs.google.com/spreadsheets/d/1R6lL0AnAp93HnrqWujJFNgOjj6wvGicgDlbDAevbc3g/edit#gid=0
Private dirty stabilizes at ~16.8M.

- Second boot:
https://docs.google.com/spreadsheets/d/1R6lL0AnAp93HnrqWujJFNgOjj6wvGicgDlbDAevbc3g/edit#gid=1918404197
Private dirty stabilizes at ~17.8M.

With fix:
- First boot:
https://docs.google.com/spreadsheets/d/1R6lL0AnAp93HnrqWujJFNgOjj6wvGicgDlbDAevbc3g/edit#gid=791764875
Private dirty stabilizes at ~17.0M.

- Second boot:
https://docs.google.com/spreadsheets/d/1R6lL0AnAp93HnrqWujJFNgOjj6wvGicgDlbDAevbc3g/edit#gid=1820894299
Private dirty stabilizes at ~17.0M.

Test: build, boot, reboot, adb-install, reboot
bit FrameworksCoreTests:android.content.pm.PackageParserTest

Bug: 64112468
Change-Id: I5ae9c1b2d021fe62526d4e0dd1a52a962b48206e
2017-07-28 15:09:13 -07:00
Benjamin Miller
ae4b64ab41 Merge "Docs: Note that DISALLOW_CONFIG_VPN stops VPNs from starting" into oc-dev am: 91f16ace4f
am: 5934ae605a

Change-Id: Ia4c07afe64fd3a0a743790f1e1284bdc1db0f4c5
2017-07-28 21:15:41 +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
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
Makoto Onuki
4fdefef7a1 Merge "Don't keep parceled extras for history broadcasts." into oc-mr1-dev 2017-07-24 17:42:31 +00:00
Bookatz
63959bae98 Merge "Batterystats: fix inappropriate bg timebase reset" into oc-dr1-dev
am: 2337b3ba84

Change-Id: Ie29e6ddb7ab37977130adbf566fac18c4dc5c26b
2017-07-22 00:41:57 +00:00
Makoto Onuki
97f82f28da Don't keep parceled extras for history broadcasts.
On dumpsys we do show history broadcast intents with extras, but
if an intent's extras are still parceled, we can't show anything
(but the length) anyway, so let's just remove them, because sometimes
they contain heavy objects such as bitmaps.

Bug: 62144301
Test: manual tests: Boot, add account start apps, insert SIM
Change-Id: Ia64dd46d66fba3098e32c435509f4940ae978710
2017-07-21 16:51:16 -07: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
ca4f0f98a2 Merge "Docs-change: how UserManager.ENSURE_VERIFY_APPS affects profiles." into oc-dev am: baa85250d4
am: aeb503f7ca

Change-Id: Iff0d3dbea379e2e90a2cf7fc82675eac2c088e11
2017-07-20 14:09:07 +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
de7e5a5595 Merge "Revert disabling of eSIM wipes/retains." into oc-dr1-dev am: acdcf37e4b
am: 10238e562a

Change-Id: If5106972654149f5cb53aedae45964397dcfb69d
2017-07-20 04:38:28 +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
Jeff Sharkey
6d626c24e3 Merge "Let's get a constant for O_MR1." 2017-07-20 03:20:22 +00:00
Jeff Sharkey
7beabc264b Let's get a constant for O_MR1.
Test: none
Exempt-From-Owner-Approval: HULK SMASH!
Change-Id: I440ebae4d0891d9044bbbfb5beaaaa98639aea98
2017-07-20 03:19:33 +00:00
Ahmed ElArabawy
609f89bd63 Merge "Fix format of subsystem power stats" into oc-dr1-dev am: 5512504bba
am: fe4ec9e946

Change-Id: I7dba5de4a5de74fd654ae5d1fe03abc625510f16
2017-07-20 02:49:54 +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
Tao Bao
445c304f5a UpdateEngine: Expose unbind as system API.
Add android.os.UpdateEngine.unbind() that unbinds the last bound
callback function. update_engine will no longer send status update
after unbinding.

Bug: 62293007
Test: Check api/system-current.txt.
Change-Id: Ide9704986caa7aeb233ba064bb8145972e3b5749
2017-07-18 15:45:12 -07:00
Michael Wachenschwanz
892a361372 Merge "Add Foreground Service Timer" 2017-07-17 22:59:48 +00: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
TreeHugger Robot
080838c0a4 Merge "Test if allocation supported; @removed clean up." 2017-07-16 05:18:36 +00:00
Jeff Sharkey
4233f032fd Test if allocation supported; @removed clean up.
SM.allocateBytes() doesn't offer a clear way to detect if a failed
request could ever succeed.  (For example, we can never work with
pipes, or files on an unsupported storage device.)  So give
developers a first-class API to test if allocation is supported.

If the underlying filesystem doesn't support fallocate(), fall back
to ftruncate() instead of failing completely.

Clean up @removed APIs that were refactoring during API 26 review
process.

Remove support for storing downloads on the /cache partition, which
doesn't exist on many devices.

Bug: 63057877
Test: bit DownloadProviderTests:*
Test: bit DocumentsUITests:com.android.documentsui.services.CopyJobTest
Test: bit DocumentsUITests:com.android.documentsui.services.MoveJobTest
Change-Id: I85d42a1a7240034b4f2a6f359011ac182bdce36e
2017-07-15 21:08:56 -06: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
Mathieu Chartier
1b45fcd14e Merge "Add more details to dumpsys meminfo -d" 2017-07-14 20:58:13 +00:00
Jeff Davidson
59eeffcb09 Merge "Temporarily disable eUICC factory reset handling." into oc-dr1-dev am: c0ce489df7
am: 7183acc20e

Change-Id: I63232bdcde7bf4050140c20e41afc9e91bfb3b5f
2017-07-14 20:13:31 +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
Mathieu Chartier
95550dd394 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

Change-Id: Ib46aac6c6cd23f8594d4d06d8651d83f04c0b4d7
2017-07-14 10:00:38 -07:00
Lorenzo Colitti
f7a008ff69 Merge changes Icc5aa605,If744f2e0,Ie1b5a5e4 into oc-dr1-dev am: 3756636ad6
am: 041111ff7e

Change-Id: I538f7faef85bbb13499dec2125e0f82b3175396f
2017-07-14 01:06:56 +00: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
Christopher Ferris
f003ae0f25 Merge "Implement dumpheap -m." 2017-07-13 20:10:47 +00:00
Timur Iskhakov
221024bead Merge "Add configureRpcThreadpool to java interface" am: d8dab11547 am: 791a698a6a am: 9cdec3943c
am: 1cdcaa8cf3

Change-Id: Iea02cb61c0a77eb3d94b9ebe63687457b6a5032c
2017-07-13 19:39:36 +00:00