Commit Graph

6297 Commits

Author SHA1 Message Date
Chad Brubaker
39392304c5 Merge "Add location backed system clock" 2019-03-21 16:23:31 +00:00
Paul Hu
947bc9208f Merge "Fix Automated API Review issues." am: 814bb8f627 am: 69aa833953
am: a6c364d805

Change-Id: I1968eb36c2f4fafd33846ec0f91710c665d936e6
2019-03-21 07:49:37 -07:00
Paul Hu
a6c364d805 Merge "Fix Automated API Review issues." am: 814bb8f627
am: 69aa833953

Change-Id: I29f4cb581574f2542d461de6a0939e58bfc88059
2019-03-21 07:33:48 -07:00
Paul Hu
69aa833953 Merge "Fix Automated API Review issues."
am: 814bb8f627

Change-Id: I9cbe7dc166ec066b8785553f31dc32ea0572be8e
2019-03-21 07:24:16 -07:00
TreeHugger Robot
ba5cb9136c Merge changes from topic "whichless"
* changes:
  BatteryStats remove which - log warnings
  LongSamplingCounter - remove update()
  Remove which from BatteryStats
2019-03-21 14:16:28 +00:00
Paul Hu
814bb8f627 Merge "Fix Automated API Review issues." 2019-03-21 14:11:36 +00:00
paulhu
79b380cfe7 Fix Automated API Review issues.
These API's argument/return value must be marked either @NonNull
or @Nullable.

Bug: 126701148
Bug: 126699090
Bug: 126701058
Bug: 126700772
Bug: 126699941
Bug: 126701299
Bug: 126700007
Bug: 126700900
Test: atest FrameworksNetTests
Change-Id: Id030a9f1116178b96aa3d4614b10969a537b2fc4
2019-03-21 15:16:58 +08:00
Luke Huang
9490fe0a7c Merge "Cleanup NetworkManagementService for Netd commnads binder migrartion" am: 3af01e2f46 am: e374524144
am: e800f7719f

Change-Id: Ib6730d87eeebcd82964feeb96d12c09ae652d0d5
2019-03-20 23:40:30 -07:00
Luke Huang
e800f7719f Merge "Cleanup NetworkManagementService for Netd commnads binder migrartion" am: 3af01e2f46
am: e374524144

Change-Id: Idb5909a8a537ae155a985670cfaf4e993ef3d95d
2019-03-20 23:28:53 -07:00
Luke Huang
e374524144 Merge "Cleanup NetworkManagementService for Netd commnads binder migrartion"
am: 3af01e2f46

Change-Id: I86ca4cab29099b26f797ef6fce94dbb6f5183b90
2019-03-20 23:18:25 -07:00
Chad Brubaker
f113333b98 Add location backed system clock
This provides a permissionless way to use the location (e.g. GNSS)
provided time data for more accurate time keeping.

Test: atest LocationManagerTest#testGnssProvidedClock
Bug: 123530510
Change-Id: Ifbc45997868040abbb3e1399a8649911afb0af05
2019-03-20 16:10:08 -07:00
Bookatz
db6d624a19 BatteryStats remove which - log warnings
In ag/6694908, BatteryStats is changed to only support the "which" of
STATS_SINCE_CHARGED. Here, we deal with BatteryStats calls that attempt
to use a different which, logging the event, exiting, and/or just using
STATS_SINCE_CHARGED as applicable.

Test: compiles
Bug: 70892428
Change-Id: Id0e9f863d8b1a5fb7baa770683c0c4ec5880e976
2019-03-20 10:13:58 -07:00
Luke Huang
909b31aaf1 Cleanup NetworkManagementService for Netd commnads binder migrartion
remove dead code used for netd UNIX sokcet

Bug: 65862741
Test: atest NetworkManagementServiceTest FrameworksNetTests
Change-Id: I5db61cb86325b71ac8a8fce7b15dbf569abc5935
2019-03-20 20:02:24 +08:00
Felipe Leme
d828f7acc8 Merge "Document that Bundle.getParcelableXXX() can throw exception when classloader is not set." 2019-03-20 00:08:44 +00:00
Felipe Leme
45d3bfc5ef Document that Bundle.getParcelableXXX() can throw exception when classloader is not set.
Fixes: 128848849
Test: mmm -j frameworks/base/:doc-comment-check-docs

Change-Id: I027176bd0b022ab0d2a45f8a757e7eb7c7665acd
2019-03-19 14:26:57 -07:00
TreeHugger Robot
38f6c84321 Merge "Add API for checking whether a user is restricted." 2019-03-19 17:54:43 +00:00
TreeHugger Robot
0b5d5d58c6 Merge "Add trace points for GraphicsEnvironment setup" 2019-03-19 12:16:19 +00:00
Yiwei Zhang
e6bdc381af Add trace points for GraphicsEnvironment setup
Bug: 126775624
Test: build, flash and boot. Take systrace to verify.
Change-Id: I190f84878fb714acb2cf25dfc5d8b546b3bbd67a
2019-03-18 22:16:42 -07:00
Hai Zhang
7c064caa13 Add API for checking whether a user is restricted.
This is used by the SMS role.

Bug: 124452117
Test: build
Change-Id: I90bb17654e63cda34b3253024836aa9f4dbc2a4f
2019-03-18 18:21:38 -07:00
Mike Ma
99e57c3c40 Remove which from BatteryStats
BatteryStats tracks three "which" states:
STATS_SINCE_CHARGED,
STATS_CURRENT,
STATS_SINCE_UNPLUGGED

However, only STATS_SINCE_CHARGED is really needed; the other two
just take up a lot of unjustifiable RAM. We therefore remove them from
the implementation here.
We also remove mLastTime and mLastCount from Timers and Counters, since
it was always zero anyway.

While the other two "whiches" are left as constants, they are ignored,
and all functions treat any which as STATS_SINCE_CHARGED. In particular,
SystemHealthManager now uses STATS_SINCE_CHARGED, rather than
STATS_SINCE_UNPLUGGED for all of its Battery statistics.

This is adapted from ag/4310406, but slimmed down to just the 'which'
removal parts.

Bug: 70892428
Test: com.android.internal.os.BatteryStatsTests
Change-Id: I86f2743ff30afc15bbaa12c68f3206ea528857a1
2019-03-18 16:17:36 -07:00
Adam Bookatz
484a77d026 Merge "UserManager.getUserName w/ GET_ACCOUNTS_PRIVILEGED" 2019-03-18 16:58:03 +00:00
Andrei-Valentin Onea
abea8411b5 Merge "Add @UnsupportedAppUsage annotations" am: 09426de69d
am: 4bd5774611

Change-Id: Ibf3acf98e452060afa8975b6f91a8921c0032e80
2019-03-18 07:59:22 -07:00
Andrei-Valentin Onea
4bd5774611 Merge "Add @UnsupportedAppUsage annotations"
am: 09426de69d

Change-Id: I8be4fa32c92a5b5ac335bfbfa0a6edffcb881b22
2019-03-18 07:49:55 -07:00
Andrei Onea
dcb67738f6 Add @UnsupportedAppUsage annotations
For packages:
  android.os

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Merged-In: I4ece0a3f37f88fc2508cb965092aed7cabc61819
Change-Id: I0d942254f06c1a355fb906640e223ad34cced6ab
2019-03-18 12:04:18 +00:00
Andrei-Valentin Onea
e3cbf906ee Merge "Add @UnsupportedAppUsage annotations" 2019-03-18 10:56:26 +00:00
Jeff Sharkey
1400382856 Wire up getStorageVolume() for synthetic paths.
When a getStorageVolume(File) call is for a synthetic path backed
by a content:// Uri, translate it and call getStorageVolume(Uri).

Bug: 124700423
Test: manual
Change-Id: I0f0dc4d5c2205e9d602e4ec2b036fb7822ba1e33
2019-03-17 13:12:30 -06:00
Josh Gao
2cc8c8a492 Merge "ParcelFileDescriptor: improve javadoc." am: c4e2b24d87 am: bc7222d46d
am: b578ef38ed

Change-Id: I031c3238d57583bf0d041f00fa33e586d5984316
2019-03-15 20:12:09 -07:00
Josh Gao
b578ef38ed Merge "ParcelFileDescriptor: improve javadoc." am: c4e2b24d87
am: bc7222d46d

Change-Id: I4a6d999b503985a84f44ad487bb36a505d80de6a
2019-03-15 20:02:34 -07:00
Josh Gao
bc7222d46d Merge "ParcelFileDescriptor: improve javadoc."
am: c4e2b24d87

Change-Id: Ic01db5d3f9c7527f2458aa4cf10bd2c43d685bed
2019-03-15 19:52:34 -07:00
Treehugger Robot
c4e2b24d87 Merge "ParcelFileDescriptor: improve javadoc." 2019-03-16 02:36:30 +00:00
Andrei Onea
24ec321bf3 Add @UnsupportedAppUsage annotations
For packages:
  android.os

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I4ece0a3f37f88fc2508cb965092aed7cabc61819
2019-03-15 18:44:27 +00:00
TreeHugger Robot
d84ddb0c4f Merge "Rename setPowerSaverMode to setPowerSaverModeEnabled" 2019-03-15 16:15:41 +00:00
Nandana Dutt
2fe07f808a Merge changes I39e84219,I8d0e12cb am: cae221acac am: 20324711c0
am: 8ea4083e36

Change-Id: I4521a62ce5cd461efd9c936bd5f630f653e48809
2019-03-15 03:56:27 -07:00
Nandana Dutt
8ea4083e36 Merge changes I39e84219,I8d0e12cb am: cae221acac
am: 20324711c0

Change-Id: I6d345de879380cd2797008efa79e3befa978f136
2019-03-15 03:47:20 -07:00
Nandana Dutt
20324711c0 Merge changes I39e84219,I8d0e12cb
am: cae221acac

Change-Id: I5fe14b5b25a1b22e184aa02e658c81d9d0238541
2019-03-15 03:39:51 -07:00
Treehugger Robot
cae221acac Merge changes I39e84219,I8d0e12cb
* changes:
  Bugreporting API: Take ownership of fds.
  Don't manage dumpstate lifecycle from system server
2019-03-15 10:28:06 +00:00
Matt Pape
e9b680a3ae Remove interfaces for runtime and runtime_native namespaces.
Per API council feedback, we are making changes to include only the
namespace in the system API defined in DeviceConfig.java. Strings which
define property names should be defined in code local to the feature
instead.

Bug: 126411407
Test: atest FrameworksCoreTests:DeviceConfigTest

Change-Id: I73157c127a246719afb37eca65cabf2e3d24b38a
2019-03-14 10:07:41 -07:00
Nandana Dutt
9d6ff2968e Bugreporting API: Take ownership of fds.
BUG: 126434607
FIXES: 127649051
Test: manual
Change-Id: I39e8421925c53061b6bc2954dffe3bccb7b3314d
2019-03-14 16:16:33 +00:00
Martijn Coenen
b8d244425e Merge "Add StorageManager checkpoint APIs." 2019-03-14 07:25:18 +00:00
Chris Wailes
fe3a348e7b Addressed deferred CL feedback comments.
This CL addresses several bits of feedback from previous CLs:
* ZygoteState.mABIList => ZygoteState.mAbiList
* Adding appropriate whitespace
* Finalizing variables where appropriate
* TEMP_RETRY_FAILURE around write
* Zygote.getSystemProperty => Zygote.getConfigurationProperty

Test: m
Test: Treehugger
Change-Id: I5ae4c8dfc336c7511bee375a80966abb1ead275e
2019-03-13 16:50:54 -07:00
Bookatz
cde3d92f9d UserManager.getUserName w/ GET_ACCOUNTS_PRIVILEGED
Previously, UserManager.getUserName() and getUserIcon()
required the MANAGE_USERS permission; this has been relaxed
so that the GET_ACCOUNTS_PRIVILEGED permission is also sufficient.

Test: atest UserManagerServiceUserInfoTest
Fixes: 127826840

Change-Id: If90b82313ecf23ea56dca3d24f23a4ca9caa939a
2019-03-13 12:21:00 -07:00
Nandana Dutt
be80e309ea Don't manage dumpstate lifecycle from system server
Dumpstate now exits correctly when it's finished. So we don't have to
manage its lifecycle from system server.

BUG: 123571915
Test: manually verified dumpstate service dies
Change-Id: I8d0e12cb607cda74b5cc36e26306ea106da67ba3
2019-03-13 15:19:55 +00:00
Abhijeet Kaur
ec0a01ec78 Merge "Clean up bugreport API." am: 2e44838064
am: 8deb2ecb31

Change-Id: I9054327b5f9b072986dd2d7ef5b38716138132c9
2019-03-13 07:30:03 -07:00
Abhijeet Kaur
8deb2ecb31 Merge "Clean up bugreport API."
am: 2e44838064

Change-Id: Ib21ecea8a3dc63808784aba20f018ddd012c03c8
2019-03-13 07:20:42 -07:00
Abhijeet Kaur
0bbb9f6882 Clean up bugreport API.
Make BugreportManager class final.

Add FloatRange annotation for BugreportManager.onProgress() function's
parameter.

Make @IntDef in BugreportMode hidden.

Bug: 126434607
Test: builds
Change-Id: I95f004106ba97bc9e99859a8b23b96a86b6a43f4
Merged-In: I95f004106ba97bc9e99859a8b23b96a86b6a43f4
2019-03-13 11:49:42 +00:00
Martijn Coenen
f04aca4fc4 Add StorageManager checkpoint APIs.
To allow the framework to check for filesystem checkpointing support,
and to allow it to request a checkpoint for the next boot.

Bug: 126740531
Test: builds
Change-Id: I640d319397d850cb2dc64deca80bdb70838cc9e8
2019-03-13 09:24:33 +01:00
Salvador Martinez
c8c4c5d33d Rename setPowerSaverMode to setPowerSaverModeEnabled
This will make it consistent with the boolean input

Test: phone boots, tests pass
Bug: 117154042
Change-Id: I30356413eafb90a93f10092ef4b0eeebe7ff7575
2019-03-12 15:58:04 -07:00
Christian Wailes
cbee8d1b23 Merge changes I29d91abd,Ie13d2c1a
* changes:
  Fixes initialization bug in USAP pool properties.
  Fixed a nullptr exception in ZygoteProcess.java.
2019-03-12 21:07:31 +00:00
Chris Wailes
84efefd666 Fixes initialization bug in USAP pool properties.
This patch fixes an initialization order bug in the USAP pool policy
management code.  Previously, bad values were used when initializing the
USAP pool when it was enabled on device boot.  This patch ensures that
the policy system properties have been checked before the pool is
initialized.

Test: Boot with USAP pool enabled
Change-Id: I29d91abd511bc35c7a70a3a56668c7ee2290864b
2019-03-12 11:19:42 -07:00
Chris Wailes
b203ac2fe8 Fixed a nullptr exception in ZygoteProcess.java.
This patch fixes a nullptr exception in ZygoteProcess caused by
ChildZygoteProcess not providing the ZygoteState with a secondary zygote
socket address.

Test: Launch Chrome with the USAP pool enabled
Change-Id: Ie13d2c1a84a79fbc45b4913aeb1d78b442201479
2019-03-12 11:19:39 -07:00