Commit Graph

2633 Commits

Author SHA1 Message Date
Andrew Sapperstein
43643aeed1 Ignore first crash dialog.
By default, no longer show the crash dialog the first time an app
crashes. Instead, only multiple crashes will show by default.

Add Settings.Global and Settings.Secure flags to toggle this behavior.
Settings.Secure value is controlled via a setting in developer options.

Ensure Settings.Secure is backed up but Global value is not.

Bug: 63703353, 70640329
Test: SettingsBackupTest, manual crashing with a test app

Change-Id: Ib0a66cabdf60aad5e60eded9bfb96e3126bf032f
2018-01-17 15:44:33 -08:00
TreeHugger Robot
13ca805084 Merge "Create Settings.Global.ENABLE_SMART_REPLIES_IN_NOTIFICATIONS setting" 2018-01-17 22:15:52 +00:00
Nancy Zheng
2baa9ab4be Merge "Add setting/experiment for small battery devices to have all forced app standby enabled except for when the device is charging." 2018-01-17 19:00:10 +00:00
Petr Cermak
9669e90c8d Create Settings.Global.ENABLE_SMART_REPLIES_IN_NOTIFICATIONS setting
This will allow us to toggle and experiment with the feature.

Bug: 67765414
Test: atest SettingsBackupTest
Change-Id: I28d0a817561cb6811966d229e8367adb4eb6d40b
2018-01-17 18:04:04 +00:00
Nancy Zheng
9a60382be1 Add setting/experiment for small battery devices to have
all forced app standby enabled except for when the device
is charging.

Bug: 69259147
Test: Manual test
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/ForceAppStandbyTrackerTest.java
Change-Id: Ica3fe6835958f186269413519ee82bc19fb83275
2018-01-16 14:30:23 -08:00
Seigo Nonaka
b01e18c3ee Merge "Rename PremeasuredText to MeasuredText" 2018-01-16 00:47:52 +00:00
TreeHugger Robot
1f31d9a8dd Merge "Making TextClassifier helper objects parcelable" 2018-01-15 11:26:06 +00:00
Shikhar Srivastav
82e3a31f81 Merge "Add VDSO global setting and mapping to sys property." 2018-01-12 23:39:32 +00:00
TreeHugger Robot
bc569cb25c Merge "Fix object pool for lifecycler" 2018-01-12 23:27:55 +00:00
Kodlee Yin
d6ae867fb2 Merge "Create Notification.Action.SemanticAction intdef." 2018-01-12 21:20:54 +00:00
Andrii Kulian
0447068f27 Fix object pool for lifecycler
The original implementation of object pool for lifecycle
transactions tried to always recycle objects after a
transaction was scheduled. In case when a client was running
in the same process this lead to objects being emptied before
it could actually perform the transaction.
Also when checking if object was already in the pool we should
use "==" instead of equality check.

Bug: 70554032
Bug: 71346774
Test: com.android.server.am.ClientLifecycleManagerTests
Test: android.app.servertransaction.ObjectPoolTests
Change-Id: I85fb3dae4589c2390e00a37144da0d285d16d151
2018-01-12 13:08:25 -08:00
Shikhar Srivastav
9a896a6c6d Add VDSO global setting and mapping to sys property.
This will help us run P/H experiments by controlling the VDSO
system property through P/H.

Bug: 70518189
Test: Will manually test it later through opt-in P/H experiment.
Change-Id: I95fd51085aed229358e2cefd472da1116c6073b3
2018-01-12 13:02:40 -08:00
Kodlee Yin
c72c44d90d Create Notification.Action.SemanticAction intdef.
Currently, Notification.Action has no indication of what it will do
when the associated PendingIntent is triggered. SemanticAction will
allow app developers to specify what the Action will do. This is
useful, for example, in the case where a user wants to answer an
incoming message in a hands-free manor. As, potentially, the
Notification may contain multiple actions like Reply, Mark as Read,
etc, this hands-free application would need to differentiate the
reply Action from the Mark as Read action. SemanticAction would
provide a means to do so.

Test: runtest -x
core/tests/coretests/src/android/app/NotificationTest.java
Bug: 67717177
Bug: 70859253
Change-Id: I8179afdd5da77be0037a8c03e125d8178cecc568
2018-01-12 10:23:27 -08:00
Jan Althaus
0d9fbb9bd1 Making TextClassifier helper objects parcelable
- EntityConfidence is no longer generic because it doesn't mix well with
  being Parcelable.
- Deprecated OnClick listeners in TextClassification as they can't be
  parceled. (Outright removed the secondary listeners that were not part
  of any release)
- Classes that were present in previous releases have their parceling
  factored out into ParcelableWrapper helper classes for backwards
  compatibility.

Bug: 67609167
Test: Added
Change-Id: I820ca4abc6b80f90007ab4424bc5df2a14f797b0
2018-01-12 17:53:07 +01:00
Richard Ledley
b30669861f Merge "Make Linkify links clickable in nonselectable text." 2018-01-12 10:40:20 +00:00
Mike Digman
8688335d08 Merge "Send rotation suggestions to System UI when rotation locked" 2018-01-11 22:44:08 +00:00
Seigo Nonaka
9d3bd08eba Rename PremeasuredText to MeasuredText
There is already MeasuredText, so renamed existing MeasuredText to
MeasuredParagraph, then renamed PremeasuredText to MeasuredText.

Bug: 67504091
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsTextTestCases:*
Change-Id: Ie20bea9501b18fabb36f64d388a7851c4643d4c3
2018-01-11 11:33:32 -08:00
TreeHugger Robot
422a67987f Merge "Allow forcing target SDK to current dev" 2018-01-11 19:14:10 +00:00
Daniel Colascione
6d3444ec3c Merge "Wire up zram setting, system property" 2018-01-11 19:03:46 +00:00
Mike Digman
e14e66351a Send rotation suggestions to System UI when rotation locked
Test: manual
Change-Id: I6dd05c5367e4e2ea3a2d3a631709a5aed34a256e
2018-01-11 10:43:44 -08:00
Richard Ledley
724eff9a3d Make Linkify links clickable in nonselectable text.
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest\#testToolbarAppearsAfterLinkClickedNonselectable
Bug: b/67629726

Change-Id: I94452116453fff1a36f5d567b3a686e92e97a34f
2018-01-11 14:16:14 +00:00
Daniel Colascione
766b632ebc Wire up zram setting, system property
The experiment framework toggles the system setting, which manipulates
the system property that init reads during boot to determine whether
we should enable zram.

Test: manual
Change-Id: I4b4f1b1673a5aa5e7f721c7dec7ebe3ea7908af2
2018-01-11 05:37:24 -08:00
TreeHugger Robot
285b393cef Merge "Added runtime flag for forced-app-standby" 2018-01-11 04:24:28 +00:00
Lorenzo Colitti
4bc8984ec8 Merge "Move more core networking tests to framework/base/tests/net." am: d6c3813c08 am: 8f852c341f
am: 56dba0323a

Change-Id: I1eb98a82426d7b7e085316f8a67cdd1e81912538
2018-01-11 04:17:51 +00:00
Lorenzo Colitti
56dba0323a Merge "Move more core networking tests to framework/base/tests/net." am: d6c3813c08
am: 8f852c341f

Change-Id: Iab87e7ce5b62a1ff21c7aee5d0f25597713f6c65
2018-01-11 04:10:01 +00:00
Lorenzo Colitti
d6c3813c08 Merge "Move more core networking tests to framework/base/tests/net." 2018-01-11 03:09:40 +00:00
Suprabh Shukla
4deb852d2d Added runtime flag for forced-app-standby
Added a global setting which can be configured to get metrics on the
battery savings from this feature.

Test: atest \
FrameworksServicesTests:\
com.android.server.job.BackgroundRestrictionsTest

Fixes: 70579515
Change-Id: I541f2aac39847f9bf372240cafc4e0f0e5ebdc86
2018-01-10 18:22:37 -08:00
Lorenzo Colitti
6fbb21a8dc Move more core networking tests to framework/base/tests/net.
Test: "runtest frameworks-net" passes except for already-failing IpConnectivityMetricsTest
Change-Id: I2a20d546089699ac67bc819f10a8fcd50c637ac4
2018-01-10 23:35:16 +09:00
TreeHugger Robot
536bce1de8 Merge "WorkSource: Fix corner-case in equals method." 2018-01-10 13:01:38 +00:00
Holly Jiuyu Sun
6a85d75fbc Merge "Merge EuiccProfile into EuiccProfileInfo." am: b01bd54b11 am: 6a5dc32ac3
am: 20f35f962e

Change-Id: I8f7cc7e81fc163119ffa15666f054b298d47fff1
2018-01-10 05:58:24 +00:00
Holly Jiuyu Sun
20f35f962e Merge "Merge EuiccProfile into EuiccProfileInfo." am: b01bd54b11
am: 6a5dc32ac3

Change-Id: I3d6df6f2bce5b6e19ce0ef2c13adc39fa1b9a862
2018-01-10 05:49:06 +00:00
TreeHugger Robot
a13c47694f Merge "Fix small but crashy edge case in Icon.scaleDown" 2018-01-10 00:09:16 +00:00
Holly Jiuyu Sun
e6153b9bff Merge EuiccProfile into EuiccProfileInfo.
After EuiccCard is moved to the platform, it can depend on
EuiccProfileInfo directly.

Bug: 70292228
Test: unit test
Change-Id: Ibe2c61ce9c4d2c99bac1cd9df8bb62414c46feee
2018-01-09 15:08:26 -08:00
Kodlee Yin
245a749dd6 Merge "Fix compatibility in MessagingStyle." 2018-01-09 18:22:07 +00:00
Narayan Kamath
eb27946173 WorkSource: Fix corner-case in equals method.
We should treat WorkSource objects that have a null mChains List
as being equal to one that has an empty non-null mChains List.

This bug was uncovered by the tests added to WifiController in
commit 0068bf953ad25e in frameworks/opt/net/wifi.

Bug: 62390666
Test: WorkSourceTest
Change-Id: Icd1f86aa5178a7beb436621362cfe771a3440398
2018-01-09 16:58:45 +00:00
Ricky Wai
3eb9f7accb Merge "Change Network Watchlist feature flag" 2018-01-09 16:02:18 +00:00
TreeHugger Robot
7ede382ce3 Merge "WorkSource: Fix WorkSource#remove for chained worksources." 2018-01-09 08:46:22 +00:00
Sudheer Shanka
710971a286 Merge "Add a global setting to turn on/off the proc state cpu times tracking." 2018-01-09 02:28:51 +00:00
Christine Franks
6198ec6303 Merge "Remove DEMO_USER_SETUP_COMPLETE" 2018-01-09 00:56:08 +00:00
Sudheer Shanka
5c19b897dd Add a global setting to turn on/off the proc state cpu times tracking.
Bug: 66953194
Test: atest core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Test: atest hostsidetests/incident/src/com/android/server/cts/BatteryStatsValidationTest.java
Test: atest core/tests/coretests/src/com/android/internal/os/BstatsCpuTimesValidationTest.java
Change-Id: Id26476ad77c95994f358d8bd59b6c2e6513c4c54
2018-01-08 16:25:16 -08:00
Sudheer Shanka
65e919ae8c Merge "Attribute procstate cpu times to correct battery/screen on/off buckets." 2018-01-08 23:51:40 +00:00
Christine Franks
7b76e93bf1 Remove DEMO_USER_SETUP_COMPLETE
This @hide setting is no longer used.

Bug: 71594447
Test: make -j100
Change-Id: Ib412f4c16eabb5bedb9e4538db294bfdfb2a4478
2018-01-08 13:40:19 -08:00
Patrick Baumann
ccb20b8eb6 Allow forcing target SDK to current dev
This change overrides the existing --force-sdk install flag to also
force the installing target SDK to the current dev version if the
app targets a different dev version.

Test: Manual, installed an O-built app on P dev build.
Change-Id: I71070e99649aa6faad979f2fa712617a7b325a10
Fixes: 27880828
2018-01-08 13:22:46 -08:00
Paul Duffin
035820cbda Insert org.apache.http.legacy at the start of the shared library list
Ensure consistent behaviour depending on whether OAHL is on the
bootclasspath or not.

When OAHL is on the bootclasspath the search order is (where ... is the
other libraries on the bootclasspath):
   OAHL
   ...
   shared libraries
   optional shared libraries
   APK

Prior to this change the OAHL was added to the end of the shared
library list which meant the search order (when OAHL is not on the
bootclasspath) would be:
   ...
   shared libraries
   OAHL
   optional shared libraries
   APK

After this change the order will be:
   ...
   OAHL
   shared libraries
   optional shared libraries
   APK

The slight difference at the beginning is not an issue because there are
no conflicting resources or class files between OAHL and the other boot
libraries.

Bug: 65552462
Bug: 18027885
Test: build, flash, check systrace when starting GoogleDialer
Change-Id: Ifcb4d50c13e35eebac4d18f8f0f10dd0734e8896
2018-01-08 16:57:35 +00:00
Narayan Kamath
ee07f627c9 WorkSource: Fix WorkSource#remove for chained worksources.
- It doesn't make sense to clear the list of WorkChains if we're
  remove is called with a WorkSource that has no chains.
- The early return for mNum <= 0 is faulty because it incorrectly
  returns early for WorkSources that have workChains but no flat
  UIDs.

Test: WorkSourceTest
Bug: 62390666
Change-Id: I4c0e69bdd7c114b41329aa329d1c1d08a8cb9b59
2018-01-08 12:43:29 +00:00
Jeff Sharkey
6fb6774c9f Merge "Add DataUnit to clarify SI-vs-IEC units." 2018-01-08 02:08:17 +00:00
Jeff Sharkey
9f2dc0527e Add DataUnit to clarify SI-vs-IEC units.
Mirrors the design of TimeUnit and ChronoUnit which many developers
are already familiar with, making it easy to pick up and use.

Yes, this is an enum.

Bug: 70915728
Test: bit FrameworksCoreTests:android.util.DataUnitTest
Change-Id: Id0cfdac5c81ed89c3c9ece23c964acba4a4f8471
2018-01-07 19:06:01 -07:00
Siyamed Sinir
fac7e4591f Merge "Enable/disable fallback line spacing in TextView" 2018-01-05 22:02:07 +00:00
Kodlee Yin
14656423a6 Fix compatibility in MessagingStyle.
The changes introduced to add MessagingStyle#isGroupConversation had
an implementation bug wherein an application that targets SDK < P
can set a non-null MessagingStyle#setConversationTitle which, in that
SDK version, would also denote it being a group conversation. A
listener targetting SDK >= P would be able able to capture this
notification, but incorrectly be given false when calling
MessagingStyle#isGroupConversation. This CL adds back legacy
functionality to #isGroupConversation by checking the
application's SDK version when they call #setConversationTitle
and interally set #isGroupConversation to true.

Test: runtest -x
core/tests/coretests/src/android/app/NotificationTest.java
Bug: 67717177

Change-Id: I2233e3d0b6d4fcf9823e50cd7aa31b76bbaddaed
2018-01-05 10:37:29 -08:00
Narayan Kamath
e6c4fdc6fb Merge "BatteryStatsImpl: Support chained attribution for BT events." 2018-01-05 09:16:21 +00:00