Commit Graph

11602 Commits

Author SHA1 Message Date
Tobias Thierer
eb2a053326 Merge "Tweak RuntimeInit docs around MimeMap registration." am: bc6371727c am: 41438c3730 am: b0c5a7af5a
am: bc59f857aa

Change-Id: I09976c187805459c01101e2c8dd1b056fc2067a5
2019-08-23 22:04:24 -07:00
Tobias Thierer
011723e214 Merge "Move default MimeMap implementation to frameworks." am: 19c3bdc88a am: 3f1d5d92fc am: 1b6d718387
am: 4999ce080d

Change-Id: Id03e7205f9f89ed34e53a4db7ff42f47138f1b48
2019-08-23 21:54:32 -07:00
Tobias Thierer
bc59f857aa Merge "Tweak RuntimeInit docs around MimeMap registration." am: bc6371727c am: 41438c3730
am: b0c5a7af5a

Change-Id: Iaa0664ec6cf5f5f993d6cc5719120d7a9461037b
2019-08-23 03:15:04 -07:00
Tobias Thierer
b0c5a7af5a Merge "Tweak RuntimeInit docs around MimeMap registration." am: bc6371727c
am: 41438c3730

Change-Id: Id2c69ea4d9e0c75c871ab4ff3f7e609e4e2746cb
2019-08-23 02:53:18 -07:00
Tobias Thierer
4999ce080d Merge "Move default MimeMap implementation to frameworks." am: 19c3bdc88a am: 3f1d5d92fc
am: 1b6d718387

Change-Id: I0deb1fa3af8baf73841322477b914f60abe7641f
2019-08-23 02:50:36 -07:00
Tobias Thierer
1b6d718387 Merge "Move default MimeMap implementation to frameworks." am: 19c3bdc88a
am: 3f1d5d92fc

Change-Id: Ie30ff146804d651ddf922ea790150fbd57a9281d
2019-08-23 02:33:50 -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
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
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
cc437bf66f Merge "Modify start/stop condition for mScreenDozeTimer." am: 83ed488383 am: 8d8d85b93e am: 6ccd3310db
am: 2fc30b6e6e

Change-Id: Ibc88f31f1cee5c78f4b7ed8f6a3b03df9dc56ad8
2019-08-20 19:10:45 -07:00
zhuguangqing
2fc30b6e6e Merge "Modify start/stop condition for mScreenDozeTimer." am: 83ed488383 am: 8d8d85b93e
am: 6ccd3310db

Change-Id: Iba10dc657081b184f14e21f8a2a0e86fb9146faa
2019-08-20 19:00:40 -07:00
zhuguangqing
6ccd3310db Merge "Modify start/stop condition for mScreenDozeTimer." am: 83ed488383
am: 8d8d85b93e

Change-Id: Iec45a370c282d9622408a825cb11530e755a210f
2019-08-20 18:45:34 -07: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
Mehdi Alizadeh
f4c7bf02e4 Skip using the AppPredictionService if the component is not available
am: a1c18a81af

Change-Id: I8ca1aaf0b36ee04b7b63a5d04b3fae460e7c554b
2019-08-16 18:50:22 -07:00
Mehdi Alizadeh
a1c18a81af Skip using the AppPredictionService if the component is not available
This CL adds a safeguard in ShareSheet to avoid calls to
AppPredictionService when the service is defined but is not available,
for example in the case of a wrong AiAi apk pushed from GooglePlay.

Bug: 138595943
Test: Manual test by removing the AiAi package from device

Change-Id: I4109c5122faa753d5111ee45698301cb6ccdd7b5
2019-08-16 23:57:46 +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
a9ba0f30ca Merge "Stop showing disclosure UI when isDisclosureEnabled is false." am: 6452cc3cc1 am: f9e3e40676 am: 2123aad7ab
am: df003a7ba1

Change-Id: I463fa34afc551e61b7367525acc1a180d0d7376b
2019-08-08 09:56:34 -07:00
Rajeev Kumar
df003a7ba1 Merge "Stop showing disclosure UI when isDisclosureEnabled is false." am: 6452cc3cc1 am: f9e3e40676
am: 2123aad7ab

Change-Id: I286356883be0a88252a4ca7468f2413c73df97c7
2019-08-08 09:46:18 -07:00
Rajeev Kumar
2123aad7ab Merge "Stop showing disclosure UI when isDisclosureEnabled is false." am: 6452cc3cc1
am: f9e3e40676

Change-Id: I6a7f6b2783441465bdc0a1331b4183b742d9523c
2019-08-08 09:24:14 -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
6e16874401 Merge "Notify the ART runtime when boot is complete." am: f83748ae28 am: 6b9ab57b2d am: ed22d5f05c
am: 8f93d19459

Change-Id: Iddebb915552b39cfb4cbe59bb67eb1c2aae0c8ea
2019-08-08 05:53:00 -07:00
Nicolas Geoffray
8f93d19459 Merge "Notify the ART runtime when boot is complete." am: f83748ae28 am: 6b9ab57b2d
am: ed22d5f05c

Change-Id: I88c5ab8807446464854d59f95ffc2877fa6aa963
2019-08-08 05:43:38 -07:00
Nicolas Geoffray
ed22d5f05c Merge "Notify the ART runtime when boot is complete." am: f83748ae28
am: 6b9ab57b2d

Change-Id: I5466b6f73087c6dea67c9b7cfaa3bf55bacb8a23
2019-08-08 05:32:55 -07: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
Beth Thibodeau
d8c9f1a833 Merge "Stop timer when notification is not visible" into qt-r1-dev am: f7ad427d8b
am: 84b999ccb1

Change-Id: I2ae849e3b8a5a449d380fc391841689a0438ddd7
2019-08-06 13:38:28 -07:00
Beth Thibodeau
84b999ccb1 Merge "Stop timer when notification is not visible" into qt-r1-dev
am: f7ad427d8b

Change-Id: I49db80e1342ed8e82a21246c2f3a5f195e249b1c
2019-08-06 13:28:53 -07:00
Beth Thibodeau
3ea5a1fcbe Merge "Stop timer when notification is not visible" into qt-r1-dev
am: f7ad427d8b

Change-Id: I601b736974dffc1a4f5b8ced66d1d97127a42541
2019-08-06 13:28:50 -07:00
Beth Thibodeau
f7ad427d8b Merge "Stop timer when notification is not visible" into qt-r1-dev 2019-08-06 20:11:27 +00:00
Beth Thibodeau
4e4c86e1b5 Stop timer when notification is not visible
This combines ag/8888937 and ag/9019277 into one CL, plus fixes another issue
where the timer could restart if the user had removed a notification and then
restarted the stream

Fixes: 138261464
Test: manual, atest NotificationMediaTemplateViewWrapperTest

Also checked the changes on the master branch since that had very
obvious issues when locking / unlocking the phone before

Change-Id: I6a0bbc675d33a5c7d4ce7f0884aec19606bff4fa
2019-08-06 13:21:20 -04:00
Roshan Pius
2e463f4b42 Merge "XmlUtils: Fix hex parsing in readThisByteArrayXml" into qt-qpr1-dev
am: 2883327fba

Change-Id: I98cc9d175a028e760d072bd3af4d56e7857ca5d6
2019-08-06 02:32:52 -07:00
Roshan Pius
2883327fba Merge "XmlUtils: Fix hex parsing in readThisByteArrayXml" into qt-qpr1-dev 2019-08-05 23:51:37 +00:00
Adrian Roos
fde134f106 GestureNav: Log exclusion rect heights
am: 5f2c9a14f5

Change-Id: I6b72f4b68773a21575296601f5545746d012524e
2019-08-05 14:17:15 -07:00
Adrian Roos
5f2c9a14f5 GestureNav: Log exclusion rect heights
Logs the rejected and requested exclusion rect heights.

Test: adb shell device_config put android:window_manager key_system_gesture_exclusion_log_debounce_millis 1000
Bug: 135152789
Change-Id: Ie12640f4bf0a8b40b666e604188a0bedd85e8981
Exempt-From-Owner-Approval: DeviceConfig.java: Adding constant to WindowManager namespace.
2019-08-05 21:19:40 +02:00
Roshan Pius
08a61aa733 XmlUtils: Fix hex parsing in readThisByteArrayXml
hex 'a' is not correctly deserialized in readThisByteArrayXml.

Change readThisByteArrayXml & writeByteArrayXml to use HexEncoding for
hex conversions.

Bug: 138482990
Test: Was seeing parsing errors with ag/9135251.
Validated the fix with ag/9135251.

Change-Id: If9f86b5ed85a9f883130e4110f85cd2faa995439
2019-08-05 11:18:10 -07: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
e515b48544 Merge "Revert "Stop timer when notification isn't visible"" into qt-dev am: 628f975c22
am: 51185d56d2

Change-Id: Ied28534111d438cf0475b563514368cb885c61e4
2019-07-31 14:34:22 -07:00
Beth Thibodeau
eba1a93c8a Merge "Revert "Stop timer when notification isn't visible"" into qt-dev
am: 628f975c22

Change-Id: I3cc399589f6459687c25923f32f3671ee3bda013
2019-07-31 14:16:57 -07:00
Beth Thibodeau
51185d56d2 Merge "Revert "Stop timer when notification isn't visible"" into qt-dev
am: 628f975c22

Change-Id: If351a368f5a1132e61dab1e7a1b1d5e290b092f7
2019-07-31 14:14:40 -07:00
Beth Thibodeau
4c9726e041 Revert "Stop timer when notification isn't visible"
This reverts commit 3c4a8e48d4.

Reason for revert: NPE errors
Fixes: b/138697134

Change-Id: Ic89eb58cd68485dcc5e7c5a3ef48d7ed79c303ca
2019-07-31 20:26:19 +00:00
Kalesh Singh
5f669a5009 Merge "Get native wakelock stats from SystemSuspend if /sys/class/wakeup not available." am: dec3796249 am: 8ad549cdf2
am: 9c1224cfa3

Change-Id: I31802f57dcf2e6fc4fd509ea95864259ab90565a
2019-07-30 12:15:24 -07:00
Kalesh Singh
9c1224cfa3 Merge "Get native wakelock stats from SystemSuspend if /sys/class/wakeup not available." am: dec3796249
am: 8ad549cdf2

Change-Id: I8a3b3915759ba06ec673d21e609ed4d82078eaa1
2019-07-30 12:00:39 -07: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
d06c69e951 Merge "Stop timer when notification isn't visible" into qt-dev am: 7256c379df
am: 8594033be0

Change-Id: I45e044aa055ac945377a578f325850e00772d4e3
2019-07-29 14:45:41 -07:00