Commit Graph

4594 Commits

Author SHA1 Message Date
Jimmy Chen
53f58bc1c7 Merge "p2p: support factory reset for P2P group" 2018-11-09 02:47:08 +00:00
Michael Groover
6a8af2abef Merge "Enable device identifier check for 3P apps" 2018-11-07 19:32:34 +00:00
Michal Karpinski
d9412bf201 Merge "Add feature flag for "show hidden launcher icon apps" and "install app notification"" 2018-11-07 18:42:31 +00:00
Jorim Jaggi
05ac00c630 Merge changes from topic "windowinsets-api"
* changes:
  WindowInsets: Annotate nullability
  WindowInsets: Add Builder
  WindowInsets: reimplement WindowInsets on top of Insets
  WindowInsets: make WindowInsets.inset() public
2018-11-07 16:35:06 +00:00
Ricky Wai
13b0abe1bc Add feature flag for "show hidden launcher icon apps"
and "install app notification"

Bug: 111214100
Test: CTS test will be submitted with flag enabling commit
Change-Id: I604d75dc48e09039619f571d418a700106cbdd5d
2018-11-07 11:28:49 +00:00
Jimmy Chen
c4240a7ce8 p2p: support factory reset for P2P group
provide system API for Settings

Bug: 109866998
Test: Manual tests
      * manual trigger network reset in below conditions:
        * trigger network reset with P2P on
        * trigger network reset with WiFi on, P2P off
        * trigger network reset with WiFi off
        * trigger network reset with WiFi off then do reboot
      * check groups shown in WiFi Direct page
      * use wpa_cli -i p2p0 list_network
Test: CtsVerifier - WiFi Direct category
Test: Unit tests - atest frameworks/opt/net/wifi/tests/wifitests
Test: Permission check
      * call factoryReset as Guest
      * call factoryReset from 3rd-party application

Change-Id: Id487ebf4564b78b613b550c0f0266effb0ae793e
2018-11-07 09:57:23 +08:00
Michael Groover
3f0267151c Enable device identifier check for 3P apps
Bug: 117781266
Test: cts-tradefed run cts -m CtsTelephony3TestCases
Test: cts-tradefed run cts -m CtsPermissionTestCases -t android.permission.cts.TelephonyManagerPermissionTest
Test: cts-tradefed run cts -m CtsTelephonyTestCases -t android.telephony.cts.TelephonyManagerTest
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases -t \
      com.android.cts.devicepolicy.DeviceOwnerTest#testDeviceOwnerCanGetDeviceIdentifiers
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases -t \
      com.android.cts.devicepolicy.ManagedProfileTest#testProfileOwnerCanGetDeviceIdentifiers
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases -t \
      com.android.cts.devicepolicy.ManagedProfileTest#testProfileOwnerCannotGetDeviceIdentifiersWithoutPermission
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases -t \
      com.android.cts.devicepolicy.DeviceOwnerTest#testDeviceOwnerCannotGetDeviceIdentifiersWithoutPermission

Change-Id: Ia511d6d566ab1ceacfedcd45f45500a846fcb983
2018-11-06 15:01:46 -08:00
Oscar Shu
28de999efe Merge changes from topic "PnoPipeline"
* changes:
  Pno frequency culling: Settings.Global flag
  Pno frequency culling: add frequencies field
2018-11-06 01:45:19 +00:00
Cody Northrop
e4ae7ea03e Merge "Add GLES specific setting for layers" 2018-11-04 17:00:46 +00:00
TreeHugger Robot
1b2a677360 Merge "Refactor model listing / selection code to support other types of model" 2018-11-02 16:08:41 +00:00
Tony Mak
ba22842144 Refactor model listing / selection code to support other types of model
Currently, listModelFiles and findBestModelFile methods only support annotator model.
But we want to extend them to support other models as well, like langID and actions.

Thus, introducing ModelFileManager, which provides listModelFiles and
findBestModelFile. ModelFileManager takes a Supplier<List<ModelFile>> to list model files.
For different types of model, we just need to provide a different supplier to the ModelFileManager.

There should be no behavior change.

Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/ModelFileManagerTest.java
Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/TextClassificationManagerTest.java

Change-Id: I4fc3fd1c9246383ee5d906792bb14b96dbf0a79f
2018-11-02 11:19:44 +00:00
Cody Northrop
0fa1d220dc Add GLES specific setting for layers
This allows loading layers for GLES and Vulkan at the
same time by adding a GLES specific setting:

  GPU_DEBUG_LAYERS_GLES

which mirrors the existing setting:

  GPU_DEBUG_LAYERS

The Vulkan and GLES loaders now scan distinct layer
lists, correcting an issue that would prevent Vulkan
from loading when it failed to find GLES layers.

Bug: 110883880
Test: Load a GLES layer when running ANGLE with Vulkan backend
Test: cts-tradefed run singleCommand cts -m CtsGpuToolsHostTestCases
Change-Id: I370be4ce6fdde9e95989eb1f274add8b5790263e
2018-11-01 14:15:44 -06:00
xshu
d4b607ce76 Pno frequency culling: Settings.Global flag
Add a flag to enable/disable this feature.

Bug: 64312268
Test: compile
Test: First use "adb shell settings put global wifi_pno_frequency_culling_enabled 1" to test turning on the feature.
Test: Then test "adb shell settings put global
wifi_pno_frequency_culling_enabled garbage" does not turn the feature
off.
Change-Id: Ia6cd0d3c9888d7b2e0513b51fc4ad92c3eb171de
2018-11-01 11:03:41 -07:00
Sunny Goyal
2daf457f4b Merge "Adding shared element transitions support in AppWidgets" 2018-11-01 16:19:12 +00:00
TreeHugger Robot
1b11fcc9c9 Merge "Extract IMM internal flags into StartInputFlags" 2018-11-01 09:09:15 +00:00
Yohei Yukawa
35fa6d581e Extract IMM internal flags into StartInputFlags
This is a mechanical refactoring like we did to split
InputMethodClient for Bug 118040692.

So-called "controlFlags" in InputMethodManager (IMM) was originally
introduced for IMM#startInput()/windowGainedFocus() [1] to carry
additional client information then reused when we unify startInput()
and windowGainedFocus() into startInputOrWindowGainedFocus() [2].

This CL mechanically moves the location where those flags are defined,
from InputMethodManager.java to a newly created file
StartInputFlags.java.

This is still just a mechanical refacotring / renaming.  There should
be no user-visible behavior change.

 [1]: Icb58bef75ef4bf9979f3e2ba88cea20db2e2c3fb
      7663d80f6b
 [2]: I56934f18e30d90fcdf77bcbb0c35a92a5feb1b82
      05c25f8a3a

Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: atest FrameworksCoreTests:com.android.internal.inputmethod.InputMethodDebugTest
Change-Id: If5a4810dece852edcff0d1119463711249bb7ef2
2018-10-31 22:56:41 -07:00
TreeHugger Robot
dd7ea7069d Merge "Use StringJoiner in InputMethodDebug" 2018-11-01 05:48:05 +00:00
Yohei Yukawa
5e46a66c6d Use StringJoiner in InputMethodDebug
This is a follow up CL to my previous CL [1], which added
InputMethodDebug#softInputModeToString().

It turns out that there is already a nice utility class
java.util.StringJoiner that can deal with delimiter when joining
multiple string tokens.

This CL also adds some simple unit tests for InputMethodDebug.

 [1]: I83f4795e95bc2e8ae325ad6e28d3a42317414e8d
      a468d70e5f

Bug: 118040692
Test: atest FrameworksCoreTests:com.android.internal.inputmethod.InputMethodDebugTest
Change-Id: I55fcdecee108b3e56bf7fd480d6f71de580dcbf6
2018-10-31 14:45:52 -07:00
Misha Wagner
7b1bb62f25 Merge "Add unit tests for ProcStatsUtil and ProcTimeInStateReader" 2018-10-31 16:20:23 +00:00
TreeHugger Robot
316902da9b Merge "Add get/setExtras to TextClassification" 2018-10-31 12:24:30 +00:00
Tony Mak
d6f3fb46c6 Add get/setExtras to TextClassification
Test: TextClassificationTest / TextClassifierValueObjectsTest

BUG: 118690735

Change-Id: I19dba3a3f6c1b14a871b33b9ffb94e0f4de58ac2
2018-10-30 18:38:50 +00:00
Adrian Roos
60f59298c7 WindowInsets: reimplement WindowInsets on top of Insets
Bug: 111829774
Test: atest WindowInsetsTest
Change-Id: Ic01c6cd46981af2e457c740c35b17c8cc9c8d25a
2018-10-30 19:09:03 +01:00
Misha Wagner
f268f1bda3 Add unit tests for ProcStatsUtil and ProcTimeInStateReader
Test: This is a test

Change-Id: I5d3b7150414572c7ffcdc891a13234ed2cf3e0e7
2018-10-30 15:34:07 +00:00
Misha Wagner
0c6b2afbf1 Merge "Add class to read per-thread CPU usage from proc filesystem" 2018-10-30 15:25:09 +00:00
Victor Chang
cd6edbde1c Fix FormatterTest#testFormatShortElapsedTime due to CLDR 34 change am: 8ac807e010 am: 857933bd2d
am: 2ef788b6cf

Change-Id: Ie7a66e3ccdb50e1092d8c3c7c724de9ed4956f36
2018-10-30 06:14:24 -07:00
Victor Chang
2ef788b6cf Fix FormatterTest#testFormatShortElapsedTime due to CLDR 34 change am: 8ac807e010
am: 857933bd2d

Change-Id: I39219b9c358bbc6a4aa80cfb68a2415c81bf31a6
2018-10-30 05:47:11 -07:00
Victor Chang
857933bd2d Fix FormatterTest#testFormatShortElapsedTime due to CLDR 34 change
am: 8ac807e010

Change-Id: Id817a7c14047a1a4c6069791caab94c6e64f880e
2018-10-30 05:19:15 -07:00
Misha Wagner
566903ab47 Add class to read per-thread CPU usage from proc filesystem
Reads all thread CPU usage for the current process. This traverses
"/proc/self/task/*/time_in_state" to gather the thread ID and CPU usage
of each child thread. Process name, thread name, and UID are also read from
"/proc" for interpretable data.

Bug: 111534779
Test: Unit test in CpuThreadProcReaderTest

Change-Id: I6c71dde1dfcc9bbb87d95baf0886f9da7a782299
2018-10-30 10:48:27 +00:00
Olivier Gaillard
78ecd34d29 Merge changes I02e88c93,Id0a2f52c
* changes:
  Use the BinderProxy#TransactListener to propagate the UID.
  Adds a mechanism to listen to proxy transact method calls.
2018-10-30 10:27:23 +00:00
Tony Zhu
a51294bc9e Merge "[Call Screening]Default call screening app setting storage." am: 371786f6b0 am: 56b75cb498
am: 5b3b0ea44b

Change-Id: I32d514581e8fa9403d8412d2cd23fef41860d075
2018-10-29 20:54:24 -07:00
Tony Zhu
5b3b0ea44b Merge "[Call Screening]Default call screening app setting storage." am: 371786f6b0
am: 56b75cb498

Change-Id: I98ac08b917aef63202b006b7440bee4c75ff665f
2018-10-29 20:45:18 -07:00
Tony Zhu
371786f6b0 Merge "[Call Screening]Default call screening app setting storage." 2018-10-30 02:43:52 +00:00
Sunny Goyal
43c970436d Adding shared element transitions support in AppWidgets
Bug: 113071278
Test: atest frameworks/base/core/tests/coretests/src/android/widget/RemoteViewsTest.java
Change-Id: I0d7698faa8d9e61913b55d34de8b7cfbb32863b1
2018-10-29 17:04:33 -07:00
Olivier Gaillard
510cdfc32c Adds a mechanism to listen to proxy transact method calls.
There are multiple use cases for it:

1) Make it easy for another process to set the worksource. The
worksource can be propagated in a thread local - this is how gmscore and soon
system server works -  the worksource can then be set for all binder
calls using

Object transactStarted() {
    Binder.setWorkSource(ThreadLocalWorkSourceUid.get());
    return null;  // No token needed.
}

void transactEnded() {
    Binder.setWorkSource(null);
}

This will be used by system process and gmscore.

2) SystemUI team was interested in detecting binder calls done from the
main thread in dogfood/tests. This listener will make it easy to figure
out which thread is used.

Performance impact of transact method:
    - With current code: 45ns per call
    - With this code: 57ns per call
This is not significant compared to the total binder call time which is
10-100s of microseconds.

Test: unit test
Change-Id: Id0a2f52cba33b390ff83f703284b79471cc80b1c
2018-10-29 17:19:31 +00:00
Jeff Sharkey
bc2ae00878 Magic to keep "_data" paths working.
As part of the storage changes in Q, we're removing the ability for
apps to directly access storage devices like /sdcard/.  (Instead,
they'll need to go through ContentResolver.openFileDescriptor() to
gain access.)  However, in several places we're returning raw
filesystem paths in the "_data" column.  An initial attempt to simply
redact these with "/dev/null" shows that many popular apps are
depending on these paths, and become non-functional.

So we need to somehow return "_data" paths that apps can manually
open.  We explored tricks like /proc/self/fd/ and FUSE, but neither
of those are feasible.  Instead, we've created a cursor that returns
paths of this form:

/mnt/content/media/audio/12

And we then hook Libcore.os to intercept open() syscalls made by
Java code and redirect these to CR.openFileDescriptor() with Uris
like this:

content://media/audio/12

This appears to be enough to keep most popular apps working!  Note
that it doesn't support apps that try opening the returned paths
from native code, which we'll hopefully be solving via direct
developer outreach.

Since this feature is a bit risky, it's guarded with a feature flag
that's disabled by default; a future CL will actually enable it,
offering a simple CL to revert in the case of trouble.

Bug: 111268862, 111960973
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ied15e62b46852aef73725f63d7648da390c4e03e
2018-10-26 09:32:29 -06:00
tonyzhu
70526c3e95 [Call Screening]Default call screening app setting storage.
Add new string in Settings. To indicate which app is default
call screening, similar to default dialer application setting,
store this in the system settings provider.

Bug: 118416082
Test: atest SettingsBackupTest pass.
Change-Id: I39f81b31a68ee2dbb056ff935f8dea0f51720017
2018-10-26 13:40:45 +00:00
Olivier Gaillard
88de48f78e Update BinderCallsStats to use the worksource.
We update UidEntry to use the worksource when it is set.

Test: unit test
Change-Id: I7ddfcfcd87de21e6e0ded94a943ae71f1980a5ce
2018-10-26 08:08:28 +00:00
Seigo Nonaka
b1e1182809 Merge "Update test cases for HarfBuzz 2.0.2" am: 866a9678d2
am: 2e738cf4ce

Change-Id: I56bc4faa8548f7476309aba13636672124d4cbd1
2018-10-25 22:47:27 -07:00
Steven Moreland
748f697207 Merge "pm: Disallow HIDL libs from boot jars >= Q." am: 06182b0764 am: 7430f3e6fd
am: 71ac2676b6

Change-Id: I4daf19b65d9b3e24c196e6ede697935b5c5460a3
2018-10-25 16:51:48 -07:00
Seigo Nonaka
3e140b2403 Update test cases for HarfBuzz 2.0.2
Now HarfBuzz combines chars with ZWJ into single cluster

This is 2nd attempt of Ic642c469aab90a2ecd3874cf0dec82625ea21c1b

Bug: 117953171
Test: TreeHugger
Change-Id: I7e731500e71c1973c254ede0f316fc36e3c22576
Merged-In: I531b7a5f5727540d6d11db619eeba6eb23fb113d
2018-10-25 22:15:33 +00:00
Seigo Nonaka
52a4c07f7c Revert "Update test cases for HarfBuzz 2.0.2 DO NOT MERGE"
This reverts commit 155951f2f6.

Reason for revert: broke test in pi-dev/stage-aosp-master

Change-Id: I917e170b570b89ba2e8a26cec0bf0a8adf577b80
2018-10-25 18:23:32 +00:00
TreeHugger Robot
bd70ed4cfa Merge "Implement TextClassifierImpl.detectLanguage()" 2018-10-25 13:19:24 +00:00
TreeHugger Robot
0d51e3fcef Merge "Update test case for HarfBuzz 2.0.2" 2018-10-24 23:30:16 +00:00
Steven Moreland
71ac2676b6 Merge "pm: Disallow HIDL libs from boot jars >= Q." am: 06182b0764
am: 7430f3e6fd

Change-Id: I0f2fa1c1571283d247fb6ac344b0dc5b6085d3aa
2018-10-24 14:44:14 -07:00
Seigo Nonaka
dfd38fcbae Update test case for HarfBuzz 2.0.2
Now HarfBuzz combines chars with ZWJ into single cluster

Bug: 117953171
Test: TreeHugger
Change-Id: I531b7a5f5727540d6d11db619eeba6eb23fb113d
2018-10-24 09:42:54 -07:00
Abodunrinwa Toki
ee3a48eec0 Implement TextClassifierImpl.detectLanguage()
- Includes some fixes to handle null ParcelFileDescriptors.
- Closes fds immediately after the model has been loaded.

Bug: 116020587
Test: atest android.view.textclassifier.TextClassificationManagerTest
Change-Id: Ieb05d081847ac218d2a5b46db95cd512838f67ab
2018-10-24 15:55:12 +01:00
Seigo Nonaka
155951f2f6 Update test cases for HarfBuzz 2.0.2 DO NOT MERGE
Now HarfBuzz combines chars with ZWJ into single cluster

Bug: 117953171
Test: TreeHugger
Change-Id: Ic642c469aab90a2ecd3874cf0dec82625ea21c1b
Merged-In: I531b7a5f5727540d6d11db619eeba6eb23fb113d
2018-10-24 05:57:57 +00:00
Olivier Gaillard
e4ff397f08 Add WorkSource support to Binder.java.
Test: unit test
Change-Id: I6f3507b51a89c35943cc34299d7e364aab337e98
2018-10-23 14:27:34 +01:00
Sudheer Shanka
e5ec6b1077 Merge "Push sharedUserIds info to config/sdcardfs." 2018-10-22 21:46:58 +00:00
Treehugger Robot
06182b0764 Merge "pm: Disallow HIDL libs from boot jars >= Q." 2018-10-22 07:08:10 +00:00