Commit Graph

3472 Commits

Author SHA1 Message Date
Jong Wook Kim
16c5d2c8d2 Merge "Wifi MAC Randomization: Developer option change global settings" 2018-01-23 06:40:51 +00:00
Calin Juravle
cd99c3a17a Merge "Perform a non strict matching of .dm files when computing the size" 2018-01-23 04:11:04 +00:00
Jong Wook Kim
0a20eda58d Wifi MAC Randomization: Developer option change global settings
Enabling/disabling the connected mac randomization toggle in developer options will change Settings.Global.WIFI_CONNECTED_MAC_RANDOMIZATION_ENABLE, which the wifi framework can look at to decide whether or not to randomized mac addresses. Also added descriptions for the toggle in developer options.

Bug: 67908229
Bug: 71548421
Test: manual testing of checking that the option correctly displays and
logs to check that the toggle correctly changes values.
Change-Id: I48a2dc34d772b0e4ce7637df904b274c9fe1218f
2018-01-22 18:13:40 -08:00
Calin Juravle
10b27eb2cc Perform a non strict matching of .dm files when computing the size
'adb shell pm install' creates the PackageLite structure without
validating or renaming the input files to '.apk'.

Be more permissive in DexMetadataHeler when computing the size of the
package to allow for this scenario.

Test: atest
core/tests/coretests/src/android/content/pm/dex/DexMetadataHelperTest.java
Bug: 72267410

Change-Id: Ica446b0822be71826d02d01ada015a43d8133c68
2018-01-22 14:14:39 -08:00
Ricky Wai
b7f09acde2 Merge "Use encoder id as insecure DP encoder random seed" 2018-01-22 21:47:38 +00:00
Ricky Wai
875374a494 Use encoder id as insecure DP encoder random seed
Originally all apps that use insecure DP encoder will generate
the same result in IRR encoder as IRR is purely rely on random generator,
hence all apps will return the same IRR result in encodeBoolean() for
insecure encoder.

Now we change insecure encoder to use encoder id as random generator seed,
so different app will have different deterministic insecure encoder result.

Also, this CL fixes some existing failed tests.

Bug: 63908748
Test: runtest frameworks-services -p com.android.server.net.watchlist PASS
Test: bit FrameworksPrivacyLibraryTests:android.privacy.RapporEncoderTest PASS
Test: bit FrameworksPrivacyLibraryTests:android.privacy.LongitudinalReportingEncoderTest PASS
Change-Id: Iab84a2932d8f84da1dd2f880d2c1567dcbf1e090
2018-01-22 18:55:01 +00:00
Nancy Zheng
d57c1df388 Merge "Add setting/experiment for small battery devices to have all forced app standby enabled except for when the device is charging." 2018-01-22 17:59:35 +00:00
Nancy Zheng
525aaa13dc Add setting/experiment for small battery devices to have
all forced app standby enabled except for when the device
is charging.

Reverting the revert of this CL. The only change is to use
EXTRA_PLUGGED instead of EXTRA_STATUS in detecting charging
state. Verified that this passes CTS test for battery saver.

Bug: 69259147
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/ForceAppStandbyTrackerTest.java
Test: atest CtsBatterySavingTestCases
Change-Id: I4f3ffc0c865a1a3a035b6d9d6838b5056b666eb9
2018-01-19 15:27:42 -08:00
TreeHugger Robot
20220cdb72 Merge "Add validators for all Settings.Secure settings that are backed up" 2018-01-19 21:53:29 +00:00
TreeHugger Robot
51d7925f96 Merge "Add cluster&active cost to cpu power" 2018-01-19 20:41:45 +00:00
Michal Karpinski
964943ab98 Add validators for all Settings.Secure settings that are backed up
A few no longer used settings were removed from SETTINGS_TO_BACKUP.

And extend the unit test to fail if new ones are added without
a validator. Also fail to boot in that case.

Ref: go/android-p-backed-up-settings
Test: atest frameworks/base/core/tests/coretests/src/android/provider/SettingsValidatorsTest.java
Bug: 64988620
Change-Id: I94b4039c9f54c341aec72b62579be3dd8bd84dbb
2018-01-19 19:40:46 +00:00
Makoto Onuki
bd9b0cf9b0 Merge "Make DEBUG_FPS_DIVISOR updatable via setting for possible experiments" 2018-01-19 18:11:01 +00:00
Michal Karpinski
8f0d71e3ee Merge "Add validators for all Settings.Global settings that are backed up" 2018-01-19 11:44:13 +00:00
Michal Karpinski
ebd9998326 Merge "Add SettingsValidators class and a test for validators enforcement" 2018-01-19 11:42:52 +00:00
Mike Ma
3d422c37b7 Add cluster&active cost to cpu power
Add logic to read per UID cluster and active CPU time from the kernel in
BatteryStatsImpl, store them in BatteryStats.Uid, then use these data to
calculate CPU power more accurately in CpuPowerCalculator.

Change-Id: I06a84d2bba8b97445466b310f15092614ff3477f
Bug: 67752294
Test: PowerProfileTest
Test: KernelUidCpuActiveTimeReaderTest
Test: KernelUidCpuClusterTimeReaderTest
Test: BatteryStatsCpuTimesTest
2018-01-19 01:24:13 -08:00
TreeHugger Robot
244c6a65e9 Merge "Treat missing font in fallback chain" 2018-01-19 01:03:55 +00:00
Makoto Onuki
5cc9f721ce Merge "Revert "Add setting/experiment for small battery devices to have"" 2018-01-18 23:10:54 +00:00
Makoto Onuki
12391f22df Revert "Add setting/experiment for small battery devices to have"
This reverts commit 9a60382be1.

Reason for revert: Broke battery saver

Bug: 72168928
Bug: 69259147

Change-Id: I09664653686a51c297224c863c4fc6d1ff7e5caf
Test: Manual test
Test: atest CtsBatterySavingTestCases
2018-01-18 22:05:40 +00:00
TreeHugger Robot
940ba0c8fe Merge "Rename CrossProfileApps API as per API council feedback" 2018-01-18 21:10:18 +00:00
Tony Mak
b0d22627e9 Rename CrossProfileApps API as per API council feedback
Three changes:
1. android.content.pm.crossprofile - > android.content.pm
2. getProfileSwitchingIcon -> getProfileSwitchingIconDrawable
3. startMainActivity “user” parameter should be named “targetUser”

Test: atest FrameworksServicesTests:com.android.server.pm.CrossProfileAppsServiceImplTest
Test: atest frameworks/base/core/tests/coretests/src/android/content/pm/CrossProfileAppsTest.java
Test: atest cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/CrossProfileAppsHostSideTest.java

FIXES: 71818128

Change-Id: Icf9a6d1f8b6808935ffd79b43185c7b12235f349
2018-01-18 21:07:50 +00:00
Michal Karpinski
5db1e430f9 Add validators for all Settings.Global settings that are backed up
And extend the unit test to fail if new ones are added without
a validator. Also fail to boot in that case.

Ref: go/android-p-backed-up-settings
Test: atest frameworks/base/core/tests/coretests/src/android/provider/SettingsValidatorsTest.java
Bug: 64988620
Change-Id: Ibd4a2bad0c6a1f2a9e1beec1a4ec8e6972fd86a4
2018-01-18 20:36:39 +00:00
TreeHugger Robot
881a432d08 Merge "Compute hyphenated word pieces in MeasuredText" 2018-01-18 20:32:54 +00:00
Michal Karpinski
2c37b08510 Add SettingsValidators class and a test for validators enforcement
Common validators have been moved out to SettingsValidators class,
as they'll be now shared between Settings.System, Settings.Secure
and Settings.Global.

All validators of Settings.System settings have been verified to be
correct and the missing ones were added.

A unit test that verifies that all settings on SETTINGS_TO_BACKUP
list in Settings.System have validators on VALIDATORS list has been
added. This test will also cover Settings.Secure and Settings.Global
once validators are added for those settings. Also, fail to boot
in that case.

Ref: go/android-p-backed-up-settings
Test: atest frameworks/base/core/tests/coretests/src/android/provider/SettingsValidatorsTest.java
Bug: 64988620
Change-Id: I1fe951604010ab0c3f68a66296885a9766690d69
2018-01-18 20:23:17 +00:00
Calin Juravle
d5d154efcd Merge "Support installation of DexMetadata files (.dm)" 2018-01-18 19:53:54 +00:00
Seigo Nonaka
545faa4c4c Treat missing font in fallback chain
Bug: 72159040
Test: bit FrameworksCoreTests:android.graphics.TypefaceSystemFallbackTest
Change-Id: I481a51811d228b87c9eb07b536a95cb699f1669c
2018-01-18 11:06:34 -08:00
Seigo Nonaka
87b1547c92 Compute hyphenated word pieces in MeasuredText
Bug: 67504091
Test: bit CtsTextTestCases:*
Change-Id: Id1ff5abbf6d433a2d8baad364133fca98d1fe450
2018-01-18 18:30:02 +00:00
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
Calin Juravle
3fc56c3000 Support installation of DexMetadata files (.dm)
Add support in the package installer to install dex metadata files
alongside the application apks (base or splits).

During installation or update the dex metadata files will need to have a
matching apk file. The matching is done by checking the file extension
(e.g. base.apk -> base.dm, split_a.apk -> split.dm).

On disk, the metadata files are placed next to the apks.

The .dm files will be used during install-time optimizations and passed
verbatim to dex2oat.

Test: adb shell am instrument -w \
1) adb shell am instrument -w \
  -e class android.content.pm.DexMetadataHelperTest

com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

2) adb install-multiple CtsClassloaderSplitApp.apk
CtsClassloaderSplitApp.dm CtsClassloaderSplitAppFeatureA.apk
CtsClassloaderSplitAppFeatureA.dm CtsClassloaderSplitAppFeatureB.apk

3) gts-tradefed -m GtsAndroidRuntimeManagerHostTestCases

Bug: 30934496

Change-Id: I86f0a8307705ff3d6a5a85c2fcaae085dd62d4af
2018-01-17 12:15:48 -08: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
Makoto Onuki
3c9c998ffc Make DEBUG_FPS_DIVISOR updatable via setting for possible experiments
Bug: 70982379
Test: Manual test with "settings put global fps_divisor 4" and reboot

Change-Id: I61437ede907fc387257bf9c07dab46f0032d4e1b
2018-01-17 10:55:16 -08: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