Commit Graph

4797 Commits

Author SHA1 Message Date
Shubang Lu
9af8f281d0 Merge changes I7bfdcbaf,I260b354b,I42ca55eb,If38d5443,I3fbc3368, ...
* changes:
  Atom: initPortInfo when receive hotplug from tx for audiosystem device[1/3]
  handle manual port switching
  Claim Active Source during System Audio Mode init by AVR when the device also has playback type and can't get Active Source.
  Switch away from ARC input when ARC is terminated.
  Request Active Source when ARC is enabled in ArcInitiationActionFromAvr.
  Refactor the Active Source updating logic in CEC devices.
  Fix tests failure on com.android.server.hdmi
  Making functions visible for testing com.android.server.hdmi
  Back out unneeded ag/4808863. Standby has been handled in ag/4881453.
2019-01-12 07:55:38 +00:00
TreeHugger Robot
7cd26acf40 Merge "Migrate frameworks/base/core/tests/hosttests/test-apps/MultiDexLegacyAndException to androidx.test" 2019-01-12 02:40:03 +00:00
Amy
066db152a4 Atom: initPortInfo when receive hotplug from tx for audiosystem device[1/3]
ag/5190487

BUG=115782816, 113608041
PD# 174288

Test: local tested
Change-Id: I7bfdcbaf28dbe7cf9538c0eadbf751b376fb8404
(cherry picked from https://partner-android-review.git.corp.google.com/c/platform/frameworks/base/+/1152062)
2019-01-11 13:36:08 -08:00
Svetoslav Ganov
9a788837ef Merge "Historical app ops." 2019-01-11 18:48:55 +00:00
Garfield Tan
0c81667a08 Merge "Drop stale activity configuration updates." 2019-01-11 17:06:39 +00:00
Svet Ganov
8455ba2341 Historical app ops.
This change is the main check in for the historical app op feature.
The idea is to store a historical data about past app op rejections,
accesses, and durations per op for any UID state indefinitely.

Keeping all operations on record is not practical as app ops are
very frequently performed. To address this we are storing aggregated
data as snapshots where we store for every UID and its packages
how many times each op was accessed, rejected, lasted as an aggregate.

To allow history scaling indefinitely we are taking a logarithmic
approach with only the most recent state stored in memory and all
preceding state stored on disk. State on disk is stored in separate
files where each preceding file, i.e. for an older period, would
cover X times longer period with X number of snapshots covering
X times longer period. Initially X is ten but can be tweaked. For
example, the first file could contain data for ten days with daily
snapshots, while the file for older period would have data
for a hundred days with snapshots every ten days, etc.

The implementation is optimized for fast history update and no impact
on system runtime performance and minimizing memory footprint. We
are lazily persisting state to disk on a dedicated thread as this is
slow. We are also reading the relevant historical files on a query
as this is very rare as opposed to state updates.

The base snapshot interval, i.e. snapshot time span, in the initial
iteration and the logarithmic step are configurable. These can be
changed dynamically and the history would be rewriten to take this
into account.

Test: atest CtsAppOpsTestCases

bug:111061782

Change-Id: I55c32c79911ba12b2ace58d2a782b8df1e6bff60
2019-01-10 19:31:31 -08:00
TreeHugger Robot
c6536e4de6 Merge changes from topic "cc_virtual_id"
* changes:
  New, minor ContentCapture APIs for virtual views management.
  Implemented missing methods on android.view.contentcapture.ViewNode
2019-01-11 02:09:45 +00:00
Felipe Leme
2057c38a17 New, minor ContentCapture APIs for virtual views management.
Test: atest CtsContentCaptureServiceTestCases:android.contentcaptureservice.cts.CustomViewActivityTest
Test: atest CtsContentCaptureServiceTestCases # sanity check
Test: atest FrameworksCoreTests:android.view.contentcapture.ContentCaptureSessionTest
Test: m update-api
Bug: 117944706

Change-Id: I08bed441c6cc15673296f392e333c78018b14f65
2019-01-11 02:09:37 +00:00
TreeHugger Robot
4e536b855e Merge "Migrate frameworks/base/core/tests/hosttests/test-apps/MultiDexLegacyTestAppTests2 to androidx.test" 2019-01-11 01:21:48 +00:00
Garfield Tan
0443b37c71 Drop stale activity configuration updates.
This CL introduces sequence number to activity configurations and use
that to compare their staleness. Always use the last reported activity
configs for Activity#onConfigurationChanged() and drop all requests
that are older than the processed one.

Fixes: 120189873
Test: Manually verify that number of configuration changes drops during
drag-resizing with a crafted app that needs 250ms to perform one
configuration change. go/wm-smoke too.
atest FrameworksCoreTests:ActivityThreadTest
atest WmTests:ActivityRecordTests

Change-Id: Ie0fd15458517470542a689b51283f4d1ed2ad4cc
2019-01-10 15:33:07 -08:00
Felipe Leme
93ffb98e8e Implemented missing methods on android.view.contentcapture.ViewNode
Also fixed AssistStructure.ViewNodeBuilder.setVisibility() so it doesn't mess
up with the flags when it receives an invalid value.

Test: atest FrameworksCoreTests:android.view.contentcapture.ViewNodeTest
Test: atest CtsContentCaptureServiceTestCases

Fixes: 121135096

Change-Id: I2280c6922ca5a02aa4ed16ba3e8b39b9cb2f4b55
2019-01-09 17:36:43 -08:00
Yiwei Zhang
0c9ccbe456 Merge "GUP: Update global property for the new dev opt" 2019-01-10 00:33:39 +00:00
Nikita Ioffe
0800858b02 Merge "Add Binder.getCallingUidOrThrow method" 2019-01-09 16:07:56 +00:00
Jorim Jaggi
64e9cd30b3 Merge changes from topic "inset_dispatch"
* changes:
  A brave new world for window insets (10/n)
  A brave new world for window insets (9/n)
  A brave new world for window insets (8/n)
2019-01-09 14:17:35 +00:00
Nikita Ioffe
a929cf01cf Add Binder.getCallingUidOrThrow method
Binder.getCallingUidOrThrow is a pure java method which uses
Binder.isHandlingTransaction @CriticalNative method.

Binder.isHandlingTransaction itself is not exposed a public API.

Bug: 62253865
Fix: 62253865
Test: Added a testcase to BinderTest.java to verify ISE is thrown
Change-Id: I93a1b6c24a4747b8b70c32d291b4706b6159a3d0
2019-01-09 13:15:56 +00:00
Haoyu Zhang
bd69298160 Merge "Fix that TextLine overwrites wordSpcing on paint" 2019-01-09 03:55:15 +00:00
TreeHugger Robot
8c4d24f07e Merge changes I16a302b5,I33f2ce58
* changes:
  Migrate frameworks/base/apct-tests/perftests/core to androidx.test
  Introduce TextClassifierEventTronLogger
2019-01-09 01:24:18 +00:00
Yiwen Chen
cf3728a302 Merge "Create a new setting in System Settings.Secure class to control whether ramping ringer is used." 2019-01-09 00:55:41 +00:00
Haoyu Zhang
eccdc6b698 Fix that TextLine overwrites wordSpcing on paint
TextLine is using wordSpcing for justification. And previously,
TextLine will overwrite wordSpcing even justification is not on.
This CL make sure that TextLine only changes wordSpcing when
justification is on.

Bug: 122471618
Test: atest TextLineTest
Change-Id: I6f1e2f6c17b65f92d7a5bb064fdafbf5df9ef8f7
2019-01-08 15:22:27 -08:00
TreeHugger Robot
ea7f539f39 Merge "Migrate frameworks/base/core/tests/hdmitests to androidx.test" 2019-01-08 22:18:30 +00:00
Yiwen Chen
36e40ff22c Create a new setting in System Settings.Secure class to control whether ramping ringer is used.
Bug: 120789399
Test: When finish the whole change, flash into a dev phone to test first.
Change-Id: I16956f1115dcf5a1657739ad8aa3ab9295b21474
2019-01-08 18:22:32 +00:00
Jorim Jaggi
bcf99fff73 A brave new world for window insets (9/n)
Implement WindowInsets.get(Max)Insets(int typeMask) to allow the
developer to query the inset by inset type.

Also rework InsetsState.calculateInsets to actually construct the
WindowInsets instance that contains this information.

Test: InsetStateTests
Bug: 118118435
Change-Id: Ie316e074c020bdb9808c11608812dea572c8de5d
2019-01-08 17:24:16 +01:00
Jorim Jaggi
297985ab9d A brave new world for window insets (8/n)
WindowInsets now keeps track of all insets per type. Insets are
non-additive, i.e. every inset starts out relative to the window
edge, so the IME inset would include the navigation bar inset, but
not vice-versa.

We remove decorWindowInsets because it wasn't used at all.

For compatibility, we map the constructor where we pass in a Rect
to TOP_BAR. This is fine as every query to systemWindowInsets
stableInsets will include this type, so we don't need the
information where it came from.

Test: WindowInsetTest
Bug: 118118435
Change-Id: I1cb37d328060293f9a876e61d4a09e6675fa7197
2019-01-08 17:24:08 +01:00
TreeHugger Robot
66d1c2d6e8 Merge "Disables testSuggestConversationActions_textReplyOnly_maxThree test." 2019-01-08 13:09:19 +00:00
Tony Mak
5a5f0d52c3 Introduce TextClassifierEventTronLogger
1. SelectionEvent will be still logged via SelectionSessionLogger
   to make sure we don't break existing logs.

2. New features including language detection and conversation actions
   are logged via TextClassifierEventTronLogger.

3. Added TYPE_ACTIONS_GENERATED to log when actions are generated.
   This is used to calcuate the recall, i.e. among all the requests,
   how many of them TextClassifier returns something.

Test: atest TextClassifierEventTronLoggerTest
Test: Turn on the DEBUG flag and observe the logging.

BUG: 120803809
BUG: 120828422

Change-Id: I33f2ce58885d90bc35316f54abcd42b137b42a13
2019-01-08 11:07:23 +00:00
Amy
93a97b9ba9 cec: support standby features for tx/rx [1/1]
cherrypick ag/4808863

Bug: 112553298

When press power key on soundbar, CEC type is 5(audio system),
it will send command to tx and rx devices to let them go to standby mode

Test: Tested with a TV
Change-Id: I242fb1028b5ae003e6054fe9b54e10d1f433374c
2019-01-07 16:53:09 -08:00
Lukas Zilka
fa2beb2350 Disables testSuggestConversationActions_textReplyOnly_maxThree test.
Change-Id: I36dfcf1c700c47a698a883ce1e65e34d0549d62c
Bugs: 122467291
Test: Builds.
2019-01-07 20:51:49 +01:00
Yiwei Zhang
51015a756b GUP: Update global property for the new dev opt
We updated the development opt in mechanism for GUP. Now we have
GUP_DEV_OPT_IN_APPS for applications selected to use GUP and
GUP_DEV_OPT_OUT_APPS for applications selected not to use GUP.

Bug: 119221883
Test: Build, flash and boot, verify with prototype
Change-Id: I52869ecf9e411a8dbdc1146f00c82023ba41bebf
2019-01-04 11:01:19 +08:00
TreeHugger Robot
6d82c5374a Merge "Migrate frameworks/base/core/tests/featureflagtests to androidx.test" 2019-01-03 23:42:27 +00:00
Peiyong Lin
b33ffca825 Rename updatable graphics driver to Game Update Package.
We have rebranded this project to Game Update Package, and GUP for short.

BUG: 119221883
Test: Build, flash and boot. Verify by going to developer options.
Change-Id: If284bd3e0b29cb025833be29fa33179011c151d7
2019-01-02 17:00:00 -08:00
Jorim Jaggi
e35c05982b A brave new world for window insets (6/n)
Mirror state back to server

In case the client does some local visibility modification to the
leash, the server needs to be informed for a couple of reasons:

- Dispatching state to other apps
- Updating accessibility services
- Updating SystemUI/IME system

For that we send the state back whenever we modified it and send
it via IWindowSession.insetsModified. The server ensures that
visibility state is only updated if we have a match for the
controlling app, and then updates the visibility state and
dispatches it to other apps.

We also invert mHidden to mVisible in InsetsSourceConsumer as it
was really really confusing.

Bug: 118118435
Change-Id: I92f187bf892a5f26b8b007ed7e6fbf4d2c7b13e6
2018-12-27 18:10:57 +00:00
Jorim Jaggi
5bb571dc40 A brave new world for window insets (5/n)
Implement controlWindowInsetsAnimation

Based on the leashes we have on the client, and the insets the
client has requested, we are able to move the surfaces around
such that the resulting insets will match what the client
requested.

Bug: 118118435
Change-Id: I0616e53455a6544aaf374c1b0eb10e258aced21d
2018-12-21 13:05:30 +01:00
Michael Groover
71654bbda4 Merge "Enable device identifier check for non-priv apps" 2018-12-20 15:27:55 +00:00
TreeHugger Robot
6567a94a66 Merge "Migrate frameworks/base/core/tests/overlaytests/host/test-apps/UpdateOverlay to androidx.test" 2018-12-19 14:53:17 +00:00
TreeHugger Robot
86d7c4d4da Merge "Migrate frameworks/base/core/tests/utiltests to androidx.test" 2018-12-19 08:10:24 +00:00
TreeHugger Robot
1ed7dae754 Merge "Migrate frameworks/base/core/tests/privacytests to androidx.test" 2018-12-19 07:58:49 +00:00
TreeHugger Robot
1c53b01058 Merge "Migrate frameworks/base/core/tests/packagemanagertests to androidx.test" 2018-12-19 07:50:42 +00:00
Michael Groover
445d1e71f2 Enable device identifier check for non-priv apps
Bug: 117781266
Test: atest CtsTelephony3TestCases
Test: atest android.telephony.cts.TelephonyManagerTest
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testDeviceOwnerCanGetDeviceIdentifiers
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testDeviceOwnerCannotGetDeviceIdentifiersWithoutPermission
Test: atest com.android.cts.devicepolicy.ManagedProfileTest#testProfileOwnerCanGetDeviceIdentifiers
Test: atest com.android.cts.devicepolicy.ManagedProfileTest#testProfileOwnerCannotGetDeviceIdentifiersWithoutPermission
Change-Id: Ie87b31e22de248249b206e866fb38a494923d51f
2018-12-18 16:39:28 -08:00
Todd Kennedy
a49a73356a Merge "OMS: fix checkstyle warnings" 2018-12-18 14:38:46 +00:00
KOUSHIK PANUGANTI
4bb5f3a58e Migrate frameworks/base/core/tests/utiltests to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: I9582eb2f46761a34a12a90a0d27124afc19b312b
2018-12-18 02:32:56 +00:00
KOUSHIK PANUGANTI
a6a9d0f90c Migrate frameworks/base/core/tests/privacytests to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: I286d611dfbc025061fe999e0238775ddd85456de
2018-12-17 18:14:55 -08:00
KOUSHIK PANUGANTI
9322512074 Migrate frameworks/base/core/tests/packagemanagertests to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: I77ed585671ba19f2d0f6c862cd17b24db954c615
2018-12-17 18:04:30 -08:00
KOUSHIK PANUGANTI
b45dc90315 Migrate frameworks/base/core/tests/overlaytests/host/test-apps/UpdateOverlay to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: I9a72ba3163f62aea50959516f4b18a9c6f2799c5
2018-12-17 17:51:33 -08:00
KOUSHIK PANUGANTI
e33bbce92b Migrate frameworks/base/core/tests/hosttests/test-apps/MultiDexLegacyTestAppTests2 to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: I35273e3d63a8a62460772009219393e7e9580e53
2018-12-17 17:05:22 -08:00
KOUSHIK PANUGANTI
c3e6e067a5 Migrate frameworks/base/core/tests/hosttests/test-apps/MultiDexLegacyAndException to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: I19ea72a754573b3c2f80968c21ff62164894dfaa
2018-12-17 16:57:17 -08:00
KOUSHIK PANUGANTI
7b8827a0a8 Migrate frameworks/base/core/tests/hdmitests to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: I9c3e91b160fa9105e77126dbf6027d03a86078d5
2018-12-17 16:47:38 -08:00
KOUSHIK PANUGANTI
d0d2bbfacd Migrate frameworks/base/core/tests/featureflagtests to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: I75a79083fa9a8de8967b7c92dd1419069bd39127
2018-12-17 16:27:10 -08:00
Mårten Kongstad
3898834574 OMS: fix checkstyle warnings
Fix checkstyle warnings related to the overlay manager, i.e. in the Java
files under

  - core/java/android/content/om
  - core/tests/overlaytests
  - services/core/java/com/android/server/om

Test: prebuilts/checkstyle/checkstyle.py -f $path
Change-Id: I5078629240da2ceb1fd710d2e79e3114bafdd5bb
2018-12-17 15:24:48 -08:00
Nick Kralevich
52671a787b FileUtils.java: Don't treat open access modes as flags
O_RDONLY, O_WRONLY, and O_RDWR are not flags. Rather, they are the
integer values 0, 1, and 2, respectively.

  #define O_RDONLY 00000000
  #define O_WRONLY 00000001
  #define O_RDWR 00000002

Quoting "man 2 open"

  * File access mode *

  Unlike  the  other  values  that  can  be  specified in flags,
  the access mode values O_RDONLY, O_WRONLY, and O_RDWR do not
  specify individual bits.  Rather, they define the low order
  two bits of flags, and are defined respectively as 0, 1, and
  2. In other words, the combination O_RDONLY | O_WRONLY is a
  logical error, and certainly does not have the same meaning
  as O_RDWR.

  Linux reserves the special, nonstandard access mode 3
  (binary 11) in flags to mean: check for read and write
  permission on the file and return a file descriptor that
  can't be used for reading or writing. This nonstandard access
  mode is used by some Linux drivers to return a file
  descriptor that is to be used only for device-specific
  ioctl(2) operations.

Rather than treat these values like flags, use O_ACCMODE to extract the
values and then perform the comparisons.

Introduced in 63280e06fc.

Test: android compiles and boots.
Change-Id: I4d3185e835615ffba3a7854d3d58351e124599d0
2018-12-17 13:24:46 -08:00
Matt Pape
101fe17781 Merge "Add the API surface for DeviceConfig." 2018-12-17 15:15:05 +00:00