Commit Graph

92535 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
7d4a9b5b26 Merge "Move attach*Filter() and addArpEntry() methods to NetworkStack" into qt-dev 2019-04-08 08:27:19 +00:00
TreeHugger Robot
aaae9b2426 Merge "Revert "Depecrate flags, and try to match them to actions"" into qt-dev 2019-04-08 08:15:12 +00:00
Remi NGUYEN VAN
995aada788 Move attach*Filter() and addArpEntry() methods to NetworkStack
The SocketUtils.attach*Filter and SocketUtils.addArpEntry methods
were added there because they could not be added as JNI inside
the NetworkStack. This was not possible because on Go devices,
the NetworkStack was a jar library. But now, Go also uses an APK.
Hence, move these methods to the NetworkStack.

Fixes: 129433183
Merged-In: I66d7b3e4fbfa32bb0bc853e8cf9399031daff8a9
(cherry picked from commit fe71be2b04)

Change-Id: Ice433a41469e784385f19498c154345d7b9c69b5
2019-04-08 01:41:39 +00:00
TreeHugger Robot
986f1f4e5f Merge "Add provisioning extra definition to skip education screens" into qt-dev 2019-04-07 10:33:28 +00:00
Mathieu Chartier
5d6c852211 Merge "Enabled the USAP Pool by default." into qt-dev 2019-04-06 19:21:30 +00:00
TreeHugger Robot
b24094f373 Merge "Do not start jit profile in app zygote" into qt-dev 2019-04-06 11:55:48 +00:00
Christine Franks
2b67a2b31d Merge "Add display white balance enabled methods to CDS" into qt-dev 2019-04-06 01:25:41 +00:00
TreeHugger Robot
1ccf640d56 Merge "Remove mainline settings feature flag." into qt-dev 2019-04-05 23:33:16 +00:00
TreeHugger Robot
6e14a0326e Merge "Add cooling device into thermal service" into qt-dev 2019-04-05 23:24:01 +00:00
Chris Wailes
d0c3664b00 Enabled the USAP Pool by default.
Set the default value for the USAP Pool to true for devices that don't
receive DeviceConfig profiles.

Bug: 128851983
Test: m & boot & check log for USAP creation
Change-Id: Id171336671a4fb8b8ad59c5b0e2e725657361107
(cherry picked from commit 0f7bce31a8)
2019-04-05 22:59:49 +00:00
Christine Franks
66783a8440 Add display white balance enabled methods to CDS
There needs to be a single source of truth about whether DWB is
enabled or disabled.

Bug: 123930917
Test: atest FrameworksServicesTests:DisplayWhiteBalanceTintControllerTest

Change-Id: If634b46c2d0da123901bd5833e2114d958957540
(cherry picked from commit ff6770d669)
2019-04-05 21:36:56 +00:00
Wei Wang
38e5bd7bf3 Add cooling device into thermal service
This is for statsd to log new metrics, as statsd has moved to use
thermal service in framework instead of connecting to HAL directly.

Bug: 119688911
Test: Build and dumpsys thermalservice
Test: atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/power/ThermalManagerServiceTest.java
Change-Id: Ib334c448c3615bf9d1cb0f1b6c2dd8a83d44f371
2019-04-05 14:34:31 -07:00
Fan Zhang
9d9369543b Remove mainline settings feature flag.
Fixes: 123648279
Test: rebuild
Change-Id: Iec229482cc249b9fcf1b3e7ec4a3d3c6f7fa8e2c
2019-04-05 14:30:31 -07:00
Makoto Onuki
cf457b2459 Merge "Add DeviceConfig namespace for contacts provider" into qt-dev 2019-04-05 20:49:54 +00:00
Qasid Ahmad Sadiq
7bcdd702c9 Revert "Depecrate flags, and try to match them to actions"
This reverts commit 063eefa78a.
The problem with this fix is that services expect to be able to
determine if a node has certain capabilities, even if it is disabled,
and doesn't have the action associated with them.

Change-Id: Ia17ed6ed5f92737226cfe704dc71957f2ae5541b
Fix: 120247282
Test: it builds.
2019-04-05 19:47:41 +00:00
Zimuzo Ezeozue
dc269b5a4a Merge "Add supported PackageInfo to ExplicitHealthCheckService API" into qt-dev 2019-04-05 19:06:47 +00:00
Bo Liu
6c504aebe8 Do not start jit profile in app zygote
Bug: 130031692
Test: Scenario in bug works.
Change-Id: Ia28e8fc60cdf4afd2215b9f2239ca215694fc76c
2019-04-05 14:58:03 -04:00
Rob Carr
f6bd0bc297 Merge "SurfaceFlinger: Add exclusion list for captureLayers." into qt-dev 2019-04-05 18:47:40 +00:00
TreeHugger Robot
96aaa9f237 Merge "Fix metadata surfacecontrol api/jni" into qt-dev 2019-04-05 18:33:24 +00:00
TreeHugger Robot
4ef3e8a309 Merge "Don't set sehash when calling restoreconRecursive" into qt-dev 2019-04-05 18:13:30 +00:00
Philip P. Moltmann
ddb9bb211c Merge "Remove Gallery and Music role" into qt-dev 2019-04-05 18:13:14 +00:00
TreeHugger Robot
08f5841707 Merge "Add getTextClassifier perf test" into qt-dev 2019-04-05 18:04:23 +00:00
Nick Kralevich
d88acc95ab Don't set sehash when calling restoreconRecursive
restorecon_recursive updates the SELinux label of the files in the
filesystem, and then attempts to write the xattr "security.sehash" as an
optimization for future restorecons. Writing security.* extended
attributes requires CAP_SYS_ADMIN, which system_server doesn't have (and
shouldn't have).

Suppress the computation and writing of the hash value. It's not
needed.

This bug has been around for a long time, but due to the fix for
bug 62302954, the error message is being generated more frequently
now.

TODO: It would be better if the default for restorecon was to suppress
the hash computation, since otherwise it encourages programs to be
overprivileged with CAP_SYS_ADMIN. I'll plan on doing that in a followup
commit.

Bugs where this error message has been called out:
Bug: 129766333
Bug: 129271240
Bug: 128700692
Bug: 129925723

Test: install an APK and ensure that no "SELinux:  setxattr failed"
    error messages are generated.

(cherry picked from commit cb1dddad27)

Change-Id: Ifc5be24d14029cb616d5564366fc10a0b93c9939
2019-04-05 09:50:58 -07:00
Evan Rosky
b51e246143 Fix metadata surfacecontrol api/jni
This was wrong

Bug: 122925737
Test: Using setMetadata doesn't crash anymore
Change-Id: I75216ca9778e356b3f2a76555367e2563d9a29e0
2019-04-05 16:22:56 +00:00
Zimuzo
cd6b11575f Add supported PackageInfo to ExplicitHealthCheckService API
With the change in I4f13638598037acaeb30d61c8d5178f45882fcba
to separate the PackageWatchdog package expiry deadline from the explicit
health check deadline. It would be cleaner for ExtServices to supply
this deadline per-package. We now do that as a field in
PackageInfo.

Bug: 120598832
Test: Builds

Change-Id: I29e2d619a5296716c29893ab3aa2f35f69bfb4d7
2019-04-05 16:05:45 +00:00
TreeHugger Robot
3b74731f4e Merge "Flag to configure model parameters" into qt-dev 2019-04-05 15:52:17 +00:00
Jeff Sharkey
10a222bf3c Merge "Fix isExternalStorageSandboxed() bug." into qt-dev 2019-04-05 15:18:23 +00:00
Todd Kennedy
6cf751cda5 Merge "fix nullability" into qt-dev 2019-04-05 14:16:37 +00:00
Tony Mak
20fe187bdf Flag to configure model parameters
The objective is to allow us to push model parameters by using a settings flag,
without the need of pushing a new model file.

Settings.Global#TEXT_CLASSIFIER_ACTION_MODEL_PARAMS stores a comma
separated string that contains these three fields:
1. required_model_version
2. required_locales
3. serialized_preconditions

To ensure serialized_preconditions is applied to the target model file,
TextClassifierImpl only applies the serialized_preconditions when
required_model_version and required_locales are both met.

Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/
Test: adb shell settings put global text_classifier_action_model_params 'required_model_version=0,required_locales=en,serialized_preconditions=FAAAAAAADgAIAAAAAAAAAAAABAAOAAAAAAAAAA=='
      Observe that the flag is actually applied in the model.
Test: Ensure that finalize is called when the activity is dead.

BUG: 123616497

Change-Id: Ie42dcfeee705c83bbb693a5c1a0fedd0821df5e7
2019-04-05 14:35:13 +01:00
TreeHugger Robot
f8aeee04c3 Merge "Stores serialized entity data to the extras" into qt-dev 2019-04-05 13:26:20 +00:00
Narayan Kamath
fb1a20e4fb Merge "Fix rollbacks in multi-user case." into qt-dev 2019-04-05 12:39:42 +00:00
Richard Uhler
82913b7123 Fix rollbacks in multi-user case.
There are a few assumptions in the rollback manager that fail in the
multi-user case that need to be fixed:
* getAllSessions only returns sessions for the specific user.
* Session callbacks are only called on sessions associated with the
  registered user.
* getPackageInfo only returns info for the specific user.

Fix these issues so that rollbacks will work properly, in particular
when the initial install session is owned by a non-system user.

Bug: 129809507
Bug: 129397974

Test: On single user device: atest RollbackTest StagedRollbackTest
Test: On primary user of multi-user device: atest RollbackTest StagedRollbackTest
Test: On multi user device manually:
    adb install RollbackTestAppAv1.apk
    adb install --user 10 --enable-rollback RollbackTestAppAv2.apk
    -- verify the install succeeded --
    adb shell pm rollback-app com.android.tests.rollback.testapp.A
    -- verify the rollback succeeded --

Test: On multi user device manually:
    adb install RollbackTestAppAv1.apk
    adb install --staged --user 10 --enable-rollback RollbackTestAppAv2.apk
    adb reboot
    -- verify the install succeeded --
    adb shell pm rollback-app com.android.tests.rollback.testapp.A
    adb reboot
    -- verify the rollback succeeded --

(cherry picked from commit d81ff97866)

Merged-In: I1a7cf101b3bc3575421629c4bf0ff63418eb8731
Change-Id: I1a7cf101b3bc3575421629c4bf0ff63418eb8731
2019-04-05 11:54:44 +00:00
Susi Kharraz-Post
884e901cf4 Merge "Fast follow-on unit tests for HashedStringCache" into qt-dev 2019-04-05 11:35:38 +00:00
Kevin Chyn
12852fdc7d Merge "Add secure setting to cache attention" into qt-dev 2019-04-05 06:33:37 +00:00
TreeHugger Robot
410d783f5b Merge "Add draw props back to greylist" into qt-dev 2019-04-05 03:30:48 +00:00
Kevin Chyn
b6d2d91f2d Add secure setting to cache attention
Fixes: 129912479

Test: Builds
Change-Id: I48979c65fc33bb5d70198f549a0ea863257e0247
2019-04-04 17:31:25 -07:00
TreeHugger Robot
cbf999bd4f Merge "Camera: Clarify camera1 API behavior for getNumberOfCameras" into qt-dev 2019-04-05 00:13:29 +00:00
Makoto Onuki
87d3964203 Add DeviceConfig namespace for contacts provider
Bug: 129980402
Test: dumpsys-activity provider com.android.providers.contacts/.ContactsProvider2
Before and after:
$ adb shell device_config put contacts_provider use_strict_phone_number_comparison true

Change-Id: I3b1d8c9ca0c17eb11c6db4c3f2a46660b3cb0819
2019-04-04 14:42:23 -07:00
Makoto Onuki
58d5470580 Change ISE to AssertException, which is more suitable.
Bug: 129139241
Bug: 129721058
Test: Treehugger
Change-Id: I12e97f37a58e1d88731a9bddd933abeb8c1169c1
2019-04-04 13:42:47 -07:00
Susi Kharraz-Post
a7f614519e Fast follow-on unit tests for HashedStringCache
Unit tests for HashedStringCache that was commited in earlier CL
ag/6867725 . This is testing the various inputs and expected outputs.
Testing also revealed some vulnerability for invalid input so added
validation in the code under test.

Bug: b/129870147
Test: This is the test file
Change-Id: I7387f808df87a869f81339cd4aea99b23dfc06bd
2019-04-04 15:15:33 -04:00
Todd Kennedy
7ea2e485fe fix nullability
Bug: 126701951
Test: It builds, it runs
Merged-In: I43e02551ced8a6aa51b84dd8df7e57e75e1d58a9
Change-Id: I43e02551ced8a6aa51b84dd8df7e57e75e1d58a9
2019-04-04 18:11:01 +00:00
John Reck
0c7027d86b Add draw props back to greylist
Bug: 129957634
Test: none
Change-Id: Iaf2d7f8dc0f5d6f1b0dc12025210820bf8255f67
2019-04-04 18:05:10 +00:00
Jeff Sharkey
e9fcabcaa1 Fix isExternalStorageSandboxed() bug.
It needs to use the same STOPSHIP logic for consistency with the
two other enforcement sites across the OS.

Bug: 129487770
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Change-Id: I7a3fa836e0795912c264aae58a55472ffae3d8c3
2019-04-04 11:19:24 -06:00
Philip P. Moltmann
206445526b Remove Gallery and Music role
Test: atest CtsRoleTestCases
Bug: 129789528
Change-Id: I10b43f5186e27f2087bbb37d731c557cc1b57cf6
2019-04-04 10:00:05 -07:00
Robert Carr
ffcdc51319 SurfaceFlinger: Add exclusion list for captureLayers.
Among other use cases, WM needs to be able to omit the IME from Task Snapshots, even while it
is on-screen.

Bug: 126614127
Test: Transaction_test.cpp#CaptureLayerExclude
Change-Id: I055d99106c9ce2ed90d64eca06961d88cbd5e2d4
2019-04-04 09:23:47 -07:00
Tony Mak
751afc9821 Add getTextClassifier perf test
This helps us to evaluate the fix.

BUG: 129695635

Test: frameworks/base/apct-tests/perftests/textclassifier/run.sh

Change-Id: I7d2d019faecb3721c044a43e24d86d98a08be64b
2019-04-04 17:09:58 +01:00
Shuzhen Wang
64ed101290 Camera: Clarify camera1 API behavior for getNumberOfCameras
Expose at most 1 camera ID per facing for all logical-physical camera ID
groups.

Test: Build and read docs
Bug: 113705942
Change-Id: I86a06562eafd600d351d8db2582a613b3323404c
2019-04-04 15:55:37 +00:00
arangelov
373a0eb1a7 Add provisioning extra definition to skip education screens
Bug: 129750998
Test: none
Change-Id: I874c80d36d2d3e7f2a602c2e231a73dab3baef21
2019-04-04 15:33:36 +00:00
Tony Mak
fdb3554e5e Stores serialized entity data to the extras
libtextclassifier (native side) will serialize the extra entity information
(like parsed datetime) into a byte array and passed it to framework.
Framework puts it to the extras Bundle of result object, i.e. TextClassification
and ConversationActions.

In the future, we will provide a library (maybe AndroidX) to deserialize the
string and return structured objects.

BUG: 129119759

Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/

Change-Id: I8091a1038691419825f5d6da3562b8ba81787dc7
2019-04-04 10:24:34 +00:00
Jorim Jaggi
a6aabacbb5 Force app to draw navigation bar background
For gestural navigation, having a small bar drawn by SystemUI
looks really really weird. Since we force the status bar
background to be drawn in the client, we can also force the
navigation bar background without expecting any compat issues.

Bug: 129751541
Test: Open legacy app, ensure black is drawn in the client
Change-Id: I9cd4c5dd799324ff10bf9d28750e8f238ab1e459
(cherry picked from commit 461bb11371)
2019-04-04 07:27:10 +00:00