Commit Graph

11589 Commits

Author SHA1 Message Date
atrost
e36b1a142f Implement stats logging for Compatibility API.
Add a new atom and log from both the app process API and the system server API
Bug: 136794938
Bug: 138378110
Test: statsd_testdrive 228

Change-Id: I80f07d0beb30c779c4bce70bebf2bb4ab22f6bfe
Merged-In: I80f07d0beb30c779c4bce70bebf2bb4ab22f6bfe
2019-09-16 14:55:53 +01:00
Treehugger Robot
3a49014ca0 Merge "Add uhid group to system_server" 2019-09-11 09:31:23 +00:00
Treehugger Robot
980681e525 Merge "Reconcile Zygote process name code with Q release." 2019-09-10 18:48:31 +00:00
Mathieu Chartier
3b05e4d74c Rename profileSystemServer to shouldProfileSystemServer
Makes it clearer and addresses previous CR comment.

Bug: 139883463
Test: make
Change-Id: I7c1a1d99cf307b89ee8f2c5c906168d196b35d0e
2019-09-09 13:05:31 -07:00
Mathieu Chartier
77aca50b6f Add phenotype property for profiling system server
Added the property profilesystemserver in the RUNTIME_NATIVE_BOOT
namespace. This property is overrides the system one if it is
present.

Bug: 139883463
Test: set the property manually and verify that system server is started
Test: with profiling

(cherry picked from commit 7b31c74ddb)

Merged-In: Ifd69530e52a717a381b3f91b15a74329614906f2
Change-Id: I00594949b845a75152c7ab3c94aa84a55b072776
2019-09-09 16:25:35 +00:00
Martijn Coenen
3b8ca2e7ac Reconcile Zygote process name code with Q release.
Some Zygote code that was pushed to AOSP master is different from the
pushed Q release. In particular, a call to set the process name for a
Zygote child was missing, causing an app zygote test to fail.

Bug: 139535125
Test: atest android.app.cts.ServiceTest#testAppZygoteServices
Change-Id: I53b0bc0116f1573cb1e52a998e10346bd5601f67
Merged-In: I2bce277ff8f2de4614e19d5385fe6712b076f9c9
2019-09-09 02:39:26 +00:00
Jiyong Park
70fb81076e Merge changes from topic "drop_circular_dep" into stage-aosp-master
* changes:
  Cut the dependency to framework from droiddoc modules
  Remove -without-aidls filegroups for the media apex.
2019-08-30 05:14:21 +00:00
Jiyong Park
5366ea2089 Cut the dependency to framework from droiddoc modules
droiddoc modules for the SDK API documentation and stubs library
generations have depended on the 'framework' (which was recently changed
to framework-minus-apex' module to get the list of Java source files to
be processed.

This however caused a circular dependency when we tried to modularize
some classes in the framework library as a separate library. The
separate java library depended on the stubs library (because it should
only use SDK APIs) and the stubs library depended on the framework
library. The framework library itself depended on the separated library
(or its stub) to use APIs from the separated library, thus forming a
circular dependency.

This change fixes the problem by directly giving the framework source
files via a filegroup `framework-sources-to-document` where all Java
and AIDL files that are to be documented are included in.

This change also put the generated R.java and Manifest.java files from
framework-res into the filegroup for framework sources.

Bug: 70046217
Bug: 135922046
Test: m

Exempt-From-Owner-Approval: Approved internally
Merged-In: I09ad88da47540d31ad089aad5e1151a4b6877ec2
(cherry picked from commit 20426538f8)
Change-Id: I09ad88da47540d31ad089aad5e1151a4b6877ec2
2019-08-30 05:14:08 +00:00
Mathieu Chartier
5b2da73fa3 Merge "Clean up class preloading"
am: 4082bc010b

Change-Id: I719d2a223a1ab17aed832b618e26091cb3e368e8
2019-08-29 15:23:26 -07:00
Mathieu Chartier
83bea97333 Clean up class preloading
Remove logic to set heap target utilization to 0.8. The default is
0.75 and this should not have any fragmentation benefit since the
GC is compacting.

Removed some unused logging and a variable.

Test: TH

Change-Id: Ife7219e94fa0aa7f489569e16248cdd23d09089a
2019-08-29 12:03:09 -07:00
Tobias Thierer
2d7cc3acf3 Merge changes from topic "bug136256059_revert"
am: aff95e5e7c

Change-Id: I7b1caa27badbe5f77a0c12704d0050a6c15eb178
2019-08-29 03:25:10 -07:00
Tobias Thierer
f4cbf933b7 Revert "Tweak RuntimeInit docs around MimeMap registration."
am: 89bcfa5a21

Change-Id: I0ded17aa79749bd189f9149563787d9f56f7bf20
2019-08-29 03:24:59 -07:00
Tobias Thierer
aff95e5e7c Merge changes from topic "bug136256059_revert"
* changes:
  Revert "Move default MimeMap implementation to frameworks."
  Revert "Tweak RuntimeInit docs around MimeMap registration."
2019-08-29 10:05:20 +00:00
Tobias Thierer
f83bd777f3 Revert "Move default MimeMap implementation to frameworks."
This reverts commit 53f15f39f8.

Reason for revert: Caused slower app startup (I don't know why).

Change-Id: Id9e3811078bc435073f42996767589a711172400
2019-08-28 22:43:33 +00:00
Tobias Thierer
89bcfa5a21 Revert "Tweak RuntimeInit docs around MimeMap registration."
This reverts commit 098a533e78.

Reason for revert: Base CL caused slower app startup (I don't know why).

Change-Id: Ib67852b900ff2baeb34f5d553fb0d233f5475888
2019-08-28 22:43:06 +00:00
Sehee Park
b849d1fe35 Merge "Define TAG_SYSTEM_DNS"
am: fdc37666cb

Change-Id: I8509280254eb207fe0e97ac5fb74abe599f692e6
2019-08-25 20:07:04 -07:00
Treehugger Robot
fdc37666cb Merge "Define TAG_SYSTEM_DNS" 2019-08-26 02:57:06 +00:00
Xin Li
a770df1d2e DO NOT MERGE - Merge build QP1A.190711.019 into stage-aosp-master
Bug: 139893257
Change-Id: I94fce9c5c0b35cbb88ee27fa4cd037927964d2cd
2019-08-24 05:22:23 +00:00
Siarhei Vishniakou
c0216a1107 Add uhid group to system_server
Ensure that uhid group (AID_UHID) is added to system_server, which would
allow it to read/write /dev/uhid and /dev/uinput nodes. This will allow
ATV devices to inject events.

Bug: 138311400
Test: none
Change-Id: Ie20fef5b5facff109bc4e068e648f335dd3a1e2c
2019-08-23 13:24:15 +01:00
Anna Trostanetski
81af0fc8bb Merge "Rename android.compat.IPlatformCompat"
am: ee716a23a2

Change-Id: I88fd93b46bcaa5ed782c407f2a9e9469fb0f5f0e
2019-08-23 02:26:15 -07:00
Tobias Thierer
41438c3730 Merge "Tweak RuntimeInit docs around MimeMap registration."
am: bc6371727c

Change-Id: I4c3cee161fec5f8065e4ea77f1bf5aa694909874
2019-08-23 02:25:10 -07:00
Tobias Thierer
3f1d5d92fc Merge "Move default MimeMap implementation to frameworks."
am: 19c3bdc88a

Change-Id: I4bb456d64ad27dabb7db920d6e40dd32c92af900
2019-08-23 02:13:28 -07:00
Anna Trostanetski
ee716a23a2 Merge "Rename android.compat.IPlatformCompat" 2019-08-21 19:46:39 +00:00
Treehugger Robot
bc6371727c Merge "Tweak RuntimeInit docs around MimeMap registration." 2019-08-21 18:38:41 +00:00
Treehugger Robot
19c3bdc88a Merge "Move default MimeMap implementation to frameworks." 2019-08-21 16:39:33 +00:00
atrost
a6a4d60ae0 Rename android.compat.IPlatformCompat
To com.android.internal.compat.IPlatformCompat. This solves a java9
issue because libcore exported api has the same package android.compat.

Test: EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true make framework
Change-Id: I0918344f670669cecb04f1e9e54dbcb471b587d5
2019-08-21 17:07:11 +01:00
Tobias Thierer
098a533e78 Tweak RuntimeInit docs around MimeMap registration.
Bug: 136256059
Test: Treehugger

Change-Id: I3f82a1684f47d96630badef4c13b3f507f30eaa5
2019-08-21 16:55:48 +01:00
Tobias Thierer
53f15f39f8 Move default MimeMap implementation to frameworks.
This CL topic moves the default MimeMap implementation to frameworks.
Libcore starts with a minimal implementation sufficient to pass
CtsLibcoreTestCases,  but frameworks can inject the real implementation.
Before this CL topic, the data files and logic (MimeMapImpl) were part of
core-*.jar on device; after this CL, they instead live in framework.jar.

Tests from MimeMapTest that check behavior of that default
implementation also move to a non-libcore CTS test.

Specifically, the logic and android.mime.types now live in
frameworks/base/mime. The default implementation is injected
into libcore from RuntimeInit. I chose to use a separate directory
(frameworks/base/mime/) and build java_library target ("mimemap")
in order to keep this as separate as possible from the rest of
frameworks code, to make it as easy as possible to factor this
out into a separate APEX module if we ever choose to do so.

Planned work for follow-up CL:
 1. Make CTS more opinionated, with a plan to assert that all of
    the default mappings are present. How exactly the expectated
    mapping will be bundled in CTS is still TBD.
 2. Add a vendor.mime.types file (defaults to empty) where vendors
    can add additional mappings; I plan to make it such that mappings
    in that file are parsed last but never override any earlier
    mappings, as if each mime type / file extension was prefixed
    with '?'.
 3. Perhaps enforce that public APIs android.webkit.MimeTypeMap
    and java.net.URLConnection.getFileNameMap() behave consistently
    with MimeMap.getDefault().

Test: atest CtsLibcoreTestCases
Test: atest CtsMimeMapTestCases
Bug: 136256059
Change-Id: Ib955699694d24a25c33ef2445443afb7c35ed9e7
2019-08-21 14:46:50 +01:00
zhuguangqing
8d8d85b93e Merge "Modify start/stop condition for mScreenDozeTimer."
am: 83ed488383

Change-Id: I12ff8f6860a60519a9b029010fa1078d47ccfc25
2019-08-20 18:22:19 -07:00
Treehugger Robot
83ed488383 Merge "Modify start/stop condition for mScreenDozeTimer." 2019-08-21 00:44:40 +00:00
Xin Li
80860803a4 DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5713463) into stage-aosp-master
Bug: 134405016
Change-Id: I303c0268e8e454b0f0f460eb286812a50c9add88
2019-08-14 12:04:06 -07:00
Rajeev Kumar
f9e3e40676 Merge "Stop showing disclosure UI when isDisclosureEnabled is false."
am: 6452cc3cc1

Change-Id: Ie616ed1e05c45a30b5ab20873fa07f963f0d3e49
2019-08-08 09:13:56 -07:00
Rajeev Kumar
6452cc3cc1 Merge "Stop showing disclosure UI when isDisclosureEnabled is false." 2019-08-08 15:42:51 +00:00
Nicolas Geoffray
6b9ab57b2d Merge "Notify the ART runtime when boot is complete."
am: f83748ae28

Change-Id: Iea67d64570657173832ee0d61288dc97af11496b
2019-08-08 05:11:55 -07:00
David Srbecky
6d0d7066cf Notify the ART runtime when boot is complete.
Needed for jit-zygote performance improvements.

Test: device boots
Bug: 119800099
Change-Id: I1e46f49d94440384473430d8afebe29fbee9c68e
2019-08-08 07:57:35 +00:00
Rajeev Kumar
cd497ef6f3 Stop showing disclosure UI when isDisclosureEnabled is false.
Bug: 137395050
Change-Id: Ic7768f7d3306f5d9d5c5c988afda4e8710c4ccd0
Test: Manual tests
2019-08-08 03:09:38 +00:00
zhuguangqing
f052e8e334 Modify start/stop condition for mScreenDozeTimer.
Both Display.STATE_DOZE and Display.STATE_DOZE_SUSPEND returns true in
func isScreenDoze(int state),so if state change from STATE_DOZE to
STATE_DOZE_SUSPEND or the other way round, mScreenDozeTimer.startRunningLocked
may execute many times, then StopwatchTimer.mNesting++ executes
many times, mScreenDozeTimer.stopRunningLocked runs less than
 mScreenDozeTimer.startRunningLocked. The bad result is even we
close ambient.display or stopRunningLocked, the return value from
StopwatchTimer.computeRunTimeLocked() always rises, then Estimated power
for ambient.display in batterystats always rises, it's obviously wrong.
After modifying, startRunningLocked and stopRunningLocked could be
one-to-one correspondence, and the return value from
StopwatchTimer.computeRunTimeLocked() is right.

Problem background: When we turn on AOD(Alway On Display), the display state
may change from STATE_DOZE to STATE_DOZE_SUSPEND or the other way round, then
we find that in BatteryStatsHelper.addAmbientDisplayUsage(), ambientDisplayMs
always rises even after we turn off AOD. ambientDisplayMs equals
mScreenDozeTimer.getTotalLocked(elapsedRealtimeUs, which). At last, we find
that because of the mismatching startRunningLocked and stopRunningLocked,
mNesting is greater than zero even we turn off AOD, then the return value
from computeRunTimeLocked(long curBatteryRealtime) always rises. The appearance
is the ambient.display value in BatteryStats always rises even we turn off AOD.

Test: manual- use modifying version for daily use two days,
the Estimated power for ambient.display is right now.

Change-Id: I7731a60c3bc8be331eebfcd923bb70ecbc661a77
Signed-off-by: zhuguangqing <zhuguangqing@xiaomi.com>
2019-08-01 09:27:52 +08:00
Beth Thibodeau
6ec7dd25a2 Revert "Stop timer when notification isn't visible"
This reverts commit 3c4a8e48d4.

Reason for revert: NPE errors
Fixes: b/138697134

Change-Id: Ic89eb58cd68485dcc5e7c5a3ef48d7ed79c303ca
(cherry picked from commit 4c9726e041)
2019-08-01 00:18:57 +00:00
Kalesh Singh
8ad549cdf2 Merge "Get native wakelock stats from SystemSuspend if /sys/class/wakeup not available."
am: dec3796249

Change-Id: I994a051e37e53417ab8df6df13318adcf071945b
2019-07-30 11:36:12 -07:00
Beth Thibodeau
6597f16fcb Stop timer when notification isn't visible
Fixes: 138261464
Test: manual, atest com.android.systemui.statusbar.notification.row.wrapper.NotificationMediaTemplateViewWrapperTest
Change-Id: Id7b1b586f3ab258fad8670070240ef951080c969
(cherry picked from commit 3c4a8e48d4)
2019-07-30 00:38:27 +00:00
Kalesh Singh
eedacc3221 Get native wakelock stats from SystemSuspend if /sys/class/wakeup not available.
If /sys/class/wakeup is available, get both kernel and native wakelock
stats from SystemSuspend, else we get native wakelock stats from
SystemSuspend and fallback to /d/wakeup_sources for kernel wakelock
stats.

Bug: 128923994
Test: atest FrameworksCoreTests:KernelWakelockReaderTest
Test: Compare dumpsys suspend_control against
      dumpsys batterystats --checkin | grep kwl
      to verify BatteryStats is getting wakelock stats
      from SystemSuspend.

Change-Id: I08e56c984b903285bb965dd853dae4a63fdeb824
2019-07-26 17:07:30 -07:00
Kalesh Singh
7c7c466e1b Merge "Get wakelock stats from SystemSuspend"
am: dff4801d6b

Change-Id: I96bda190d2935e3a21391e831d23f50526c8fc93
2019-07-25 00:21:12 -07:00
Treehugger Robot
dff4801d6b Merge "Get wakelock stats from SystemSuspend" 2019-07-25 07:02:25 +00:00
Vadim Caen
64aa6e1ba1 DO NOT MERGE Do not call drawableChanged pre Q
Some apps rely on not updating the window format when changing the
background of the DecorView. To keep the compatibilty with these app we
add only call DecoreView.drawableChanged() when the window background is
changed on app targetting Q and above.

Test: Manually test by lunching Instagram TV and pressing return twice.
The window should aninate with no flickering.
Bug: 136987724

Change-Id: I3593d30dc6f10519008151974e475f0dad86fc64
(cherry picked from commit 843f9dee8b)
2019-07-25 04:11:38 +00:00
Dave Mankoff
8756e456e6 Allow BrightLineFalsingManager settings to be experimented with via Phenotype.
This is a CP of http://ag/8687829

Bug: 138308096
Test: atest SystemUITests
Change-Id: I9e2b22b157c45da1606466acdfff3c5de7f182e1
Merged-In: I9fa4d1344bb184dea00f92f8d265667f0be11466
(cherry picked from commit e38da07841)
2019-07-25 04:11:31 +00:00
Kalesh Singh
f166d19ebe Get wakelock stats from SystemSuspend
Read wakelock stats from SystemSuspend if possible else fallback to
/d/wakeup_source, /proc/wakelocks.

Bug: 128923994
Test: KernelWakelockReaderTest

Change-Id: I859092d53d7697a4940f9369480e203181f0c370
2019-07-23 09:40:31 -07:00
randy.jeong
2526b492a4 [FRAMEWORK] Ignore signal registration for debugging
It's difficult to identify native crash/error of 3rd party app.
Because they can control their app with own signal handling.
Therefore I would like to support the way to ignore signal
registration in 3rd party app with the specific property.

To enable this, do just setprop "debug.ignoreappsignalhandler 1".

Test: test app to hook signal, then setprop debug.ignoreappsignalhandler 1

Change-Id: I2af98a0f58e5ac039eab0ebe9c3780357aca7820
Merged-In: I2af98a0f58e5ac039eab0ebe9c3780357aca7820
Signed-off-by: randy.jeong <randy.jeong@samsung.com>
2019-07-15 23:16:49 +00:00
randy.jeong
3ea9580a29 Ignore signal registration for debugging
It's difficult to identify native crash/error of 3rd party app.
Because they can control their app with own signal handling.
Therefore I would like to support the way to ignore signal
registration in 3rd party app with the specific property.

To enable this, do just setprop "debug.ignoreappsignalhandler 1".

Test: test app to hook signal, then setprop debug.ignoreappsignalhandler 1

Merged-In: I2af98a0f58e5ac039eab0ebe9c3780357aca7820
Exempt-From-Owner-Approval: Cherry-pick
Change-Id: I2af98a0f58e5ac039eab0ebe9c3780357aca7820
Signed-off-by: randy.jeong <randy.jeong@samsung.com>
2019-07-15 21:45:40 +00:00
Dan Sandler
b9be1e51e2 Q card.
(Goodbye, hypno-P and your '90s tech magazine color palette.)

Bug: 123903304
Test: adb shell am start -n android/com.android.internal.app.PlatLogoActivity
Test: adb shell am start -c com.android.internal.category.PLATLOGO -a android.intent.action.MAIN
Test: adb shell am start -n com.android.egg/.paint.PaintActivity # still works
Change-Id: I4865024a14b6a78e7a043c56d2330b5f9dd214c6
Merged-In: I4865024a14b6a78e7a043c56d2330b5f9dd214c6
(cherry picked from commit 8c7b8cbd39)
2019-07-11 19:49:34 +00:00
Sehee Park
22a0bce713 Define TAG_SYSTEM_DNS
Define a traffic tag for dns so that apps know that the traffic
is not sent by them but is sent by the system on their behalf.

Test: Build
Bug: 132125333
Change-Id: I273112c5384999f3155a47f9e7e7cecdd33baa1a
2019-07-04 13:38:42 +09:00