Commit Graph

87063 Commits

Author SHA1 Message Date
TreeHugger Robot
639e6dd8a7 Merge "[Magnifier-64] Fix light source alpha for renderer" 2018-11-13 20:45:04 +00:00
John Reck
27600ff5dd Merge "Add force SmartDark dev setting" 2018-11-13 20:33:38 +00:00
Salvador Martinez
5980543478 Merge changes from topic "dynamic_power_saver"
* changes:
  Create APIs to interact with DynamicPowerSaver
  Create new battery saver mode
2018-11-13 20:23:03 +00:00
Risan
f8771d362c Merge "Introducing StubVolume in StorageManager" am: b499af866c am: eb871cc916
am: ee32e0d473

Change-Id: I4098132df9833b7cbac0db9bdadac297d324a822
2018-11-13 12:12:23 -08:00
Risan
ee32e0d473 Merge "Introducing StubVolume in StorageManager" am: b499af866c
am: eb871cc916

Change-Id: I69240d32659b511aec0e1e029fb6c6f1ab455c9c
2018-11-13 11:57:12 -08:00
TreeHugger Robot
1eec951795 Merge "Added moar ContentCapture APIs (and their initial implementation)." 2018-11-13 19:40:40 +00:00
Treehugger Robot
b499af866c Merge "Introducing StubVolume in StorageManager" 2018-11-13 19:20:38 +00:00
TreeHugger Robot
912963cc72 Merge "Removing mApplyTheme parameter in RemoteViews as it changes the internal state of RemoteView without parcelling the new state" 2018-11-13 18:51:56 +00:00
Hui Yu
81f977753a Merge "Add UsageStats events for foreground service start/stop." 2018-11-13 18:16:19 +00:00
Salvador Martinez
812ea7554b Create APIs to interact with DynamicPowerSaver
This creates the PowerManager APIs that allow apps with the
appropriate permissions to interact with Dynamic Power Saver.

Bug: 111450127
Test: WIP
Change-Id: I5b9483fa0fba81a4ade622b1f3dbaec580b68a67
2018-11-13 09:33:50 -08:00
Salvador Martinez
04b98338f7 Create new battery saver mode
Creates the concept of a "dynamic" battery saver mode controlled by
an external input in the framework. This mode behaves similarly to the
current automatic percentage based battery saver minus the fact that
the trigger is not static and that we might want to disable it at
a different level than when it was triggered.

Test: atest BatterySaverStateMachineTest
Bug: 111450127
Change-Id: Iac0de4f8f0336ed8870d2397574bd8885b7aa6a2
2018-11-13 09:29:36 -08:00
Mihai Popa
6dcd728607 [Magnifier-64] Fix light source alpha for renderer
I9e6f44b07a170574a905f42338282c4bb7e95f56 changed the way the light
source alphas were set for renderers - the alphas were passed as ints
between 0 and 255 before, while now they are passed as a double between
0 and 1.  This CL updates SimpleRenderer, which is only used by the
magnifier, to use the API correctly. Before this CL, the incorrect usage
was causing the value validation to fail and apps to crash when the
magnifier was trigerred.

Bug: 119423778
Test: manually tested the magnifier
Change-Id: I8978ac16aca38906ec2cf4ae30a83beddfc9e941
2018-11-13 17:29:20 +00:00
Sahin Caliskan
4c070fa443 Merge "Fix RcsManager and add empty RcsThread class" 2018-11-13 16:17:06 +00:00
Abodunrinwa Toki
97dbb7b968 Merge "Update TextClassifier javadoc." 2018-11-13 16:01:06 +00:00
David Brazdil
0215bc8af3 Merge "Simplify HIDDEN_API_ENFORCEMENT_ flags" 2018-11-13 15:50:41 +00:00
TreeHugger Robot
b513876655 Merge "Camera: Enhance support for monochrome camera" 2018-11-13 15:27:10 +00:00
Wale Ogunwale
99b5308dca Merge "Expose display ID related APIs for use by CTS" 2018-11-13 15:04:59 +00:00
Anton Hansson
4a08723c5f Merge "Make Environment.getProductDirectory() @TestApi" 2018-11-13 12:53:07 +00:00
TreeHugger Robot
504fdabba9 Merge "Move native process memory state pulling code" 2018-11-13 12:12:44 +00:00
TreeHugger Robot
1b34837e69 Merge "Add get/setExtras to TextLinks and TextSelection" 2018-11-13 12:09:42 +00:00
Tony Mak
916bb9e37e Add get/setExtras to TextLinks and TextSelection
Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/TextSelectionTest.java
Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/TextLinksTest.java
Test: atest cts/tests/tests/view/src/android/view/textclassifier/cts/TextClassifierValueObjectsTest.java

BUG: 118690735

Change-Id: I5786db40b24b38020514f96b1d642835c9a9db51
2018-11-13 12:09:22 +00:00
TreeHugger Robot
9005dafb74 Merge "Implements TextClassifierImpl.suggestConversationActions" 2018-11-13 11:14:08 +00:00
Tony Mak
adbebcc634 Implements TextClassifierImpl.suggestConversationActions
TODO: Construct RemoteAction for contextual actions.
TODO: Map Person object to user id.
TODO: Consider to use LangID to infer the locale. And get a new model when locale is changed.

BUG: 111437455
BUG: 111406942

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

Change-Id: Id35066455918b3321fcd30df0ff215e30586a4b3
2018-11-13 11:12:40 +00:00
Felipe Leme
88eae3bc69 Added moar ContentCapture APIs (and their initial implementation).
There are 4 new APIs on View:
  - boolean setImportantForContentCapture()
  - boolean getImportantForContentCapture()
  - boolean isImportantForContentCapture()
  - boolean onProvideContentCaptureStructure()

And 4 on IntelligenceManager:
  - void notifyViewAppeared()
  - void notifyViewDisappeared()
  - void notifyViewTextChanged()
  - ViewStructure newVirtualViewStructure()

These methods are similar to the equivalent methods that are used for Autofill
and/or Assist, except for the following differences:

- The view hierarchy nodes are reported as they are rendered, rather than at
  once in a tree, recursively. Hence, the ViewStructure implementation does
  not implement the methods that add children to it, and views that provide
  virtual hierarchies must manually call IntelligenceManager to create the
  ViewStructure to their children and notify when their children are added and
  removed.
- It does not support methods added for Autofill to handle HTML pages (such
  as setHtmlInfo() and setWewbDomain()), as they're not important in the
  Content Capture context.
- Similarly, it also does not support setDataIsSensitive(), because the
  Intelligence service does not have the same restrictions as the Autofill
  service.

The CL also provides the initial implementation of these APIs, although still
full of TODOs (for example, we're not holding the events to send as a batch
yet).

Test: m -j update-api doc-comment-check-docs
Bug: 117944706

Change-Id: I43f06ce82bfe3b14d8d13fb3b2ebee223db83284
2018-11-12 22:29:26 -08:00
Tiger Huang
fc2184596e Expose display ID related APIs for use by CTS
For CtsWindowManagerDeviceTestCases:WindowFocusTests

Bug: 111361570
Test: atest WindowFocusTests android.view.cts.KeyEventTest
Change-Id: I273120f71f42d2eaa52786b4a350f3c099d11989
2018-11-13 13:38:23 +08:00
Daichi Hirono
320a0124e8 Merge "Update API doc of View.DragShadowBuilder" am: 29f0f9a910 am: 0539710f6f
am: 1fa1b991f0

Change-Id: I647a5644db8dbcee6ceff59eba798e7b0e1d4f52
2018-11-12 19:57:43 -08:00
Sudheer Shanka
52b976d8be Merge "Update storage sandbox path translation methods." 2018-11-13 03:51:48 +00:00
Daichi Hirono
1fa1b991f0 Merge "Update API doc of View.DragShadowBuilder" am: 29f0f9a910
am: 0539710f6f

Change-Id: I211e1b255fbdc4a49533409d7879f953780800a8
2018-11-12 19:47:19 -08:00
TreeHugger Robot
998b52ba83 Merge "Introduce multi-client IME for special form factors" 2018-11-13 03:43:48 +00:00
Treehugger Robot
29f0f9a910 Merge "Update API doc of View.DragShadowBuilder" 2018-11-13 03:15:51 +00:00
Hui Yu
e361a23bba Add UsageStats events for foreground service start/stop.
1. Send FOREGROUND_SERVICE_START event when foreground service starts.
Send FOREGROUND_SERVICE_STOP event when foreground service stops.
2. One app can multiple foreground services and multiple services can be
started. Because this, in UsageStats, change mLastForegroundEvent to
className to event map, do this for both activity and foreground
service. Change UsageStatsProto and UsageStatsXmlV1 to support this
change.
3. Add more test cases in UsageStatsTest.java.

Test: start music player which is foreground service, observce these
two events when start play and pause play.

Change-Id: I3dc14f5b73cc114a53b8c51f90d3011d9ace35ac
Bug: 112002260
Test: atest UsageStatsTest#testForegroundService
atest frameworks/base/services/tests/servicestests/src/com/android/server/usage/UsageStatsDatabaseTest.java
atest frameworks/base/core/tests/coretests/src/android/app/usage/UsageStatsTest.java
2018-11-12 17:41:03 -08:00
TreeHugger Robot
3ab40f1866 Merge "Add sm set-isolated-storage [true|false]" 2018-11-13 01:19:24 +00:00
Sunny Goyal
40f589c685 Removing mApplyTheme parameter in RemoteViews as it changes the internal state
of RemoteView without parcelling the new state

Bug: 119437911
Test: atest CtsAutofillTest
Change-Id: I561ce28ca754d3d27f3eb9fedc1e0f702b557159
2018-11-13 00:57:37 +00:00
Shuzhen Wang
a8d36036f2 Camera: Enhance support for monochrome camera
- Add new Color Filter Array enum.
- Clarify doc for Bayer pattern related metadata.
- Add DngCreator support for monochrome camera raw.

Test: Camera CTS
Test: Capture a monochrome DNG image and inspect with LightRoom
Bug: 70216652
Change-Id: I329f224e3763dd5c777815a3cbb9dd7bd198c038
2018-11-12 16:31:39 -08:00
Sahin Caliskan
9458ebccfc Fix RcsManager and add empty RcsThread class
This change fixes the RcsManager setup and adds an empty RcsThread class. Please see go/rcs-in-telephony-doc for details.

Test: Builds fine
Bug: 109759350
Change-Id: Ie3fe476ab11d515ffab6dcc6ccf5ec801a4c9057
2018-11-12 15:52:54 -08:00
Yohei Yukawa
bae5bea23c Introduce multi-client IME for special form factors
An advanced multi-display support is requested for certain Android
form-factors so that user(s) can type text on each display at the same
time without losing software keyboard focus in other displays. This is
not possible in existing Android IMEs that are built on top of
InputMethodService class, because the assumption that a single IME
client can be focused at the same time was made before Android IME
APIs were introduced in Android 1.5 and many public APIs in
InputMethodService have already relied heavily on that
assumption. Updating InputMethodService class to support multi-client
scenario is, however, quite challenging because:

 1. doing so would introduce an unacceptable amount of complexity into
    InputMethodService, which is already hard to maintain,

 2. IME developers still need to update their implementation to be
    able to support parallel requests from multiple focused IME
    client, which may require non-trivial redesign in their side
    (e.g. input decoder, typing history database, ...), and

 3. actual use cases for multi IME clients are expected to be evolved
    rapidly hence the new protocol is not yet stable and not yet ready
    to be exposed as public APIs.

This is why a new type of IME needs to be designed and developed
specifically for such special multi-display environments, rather than
reusing existing InputMethodService public class.

Note that there must be no behavior change unless multi-client IME is
explicitly enabled with 'adb shell setprop', which requires root
permission.

See multi-client-ime.md for details.

Fix: 114662040
Test: Manually verified as follows:
  1. make -j MultiClientInputMethod
  2. adb install -r $OUT/system/priv-app/MultiClientInputMethod/MultiClientInputMethod.apk
  3. adb root
  4. adb shell setprop persist.debug.multi_client_ime \
       com.example.android.multiclientinputmethod/.MultiClientInputMethod
  5. adb reboot
  6. Try multiple text input scenario
Change-Id: I41dfe854557b178d8af740bc2869c936fc88608b
2018-11-12 15:20:20 -08:00
TreeHugger Robot
8d6acdec61 Merge "Starting the default activity when an app widget's default/fallback view is clicked" 2018-11-12 23:18:30 +00:00
Sudheer Shanka
87915d66c3 Update storage sandbox path translation methods.
Update these methods to consider if the app is sandboxed or not.
Earlier, only apps with WRITE_MEDIA_STORAGE have access to full
external storage. So, clients had to check this before calling
these translate methods. Now, apps under instrumention might also
have full storage access and DownloadProvider will also start
using these translate methods. So, instead of having the clients
deal with it, move the logic of checking if an app is sandboxed or
not into these translate methods.

Bug: 117229024
Bug: 119265456
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Test: atest services/tests/servicestests/src/com/android/server/StorageManagerServiceTest.java

Change-Id: If679e71a906bb2106752721409b4410557fb3e28
2018-11-12 14:56:58 -08:00
TreeHugger Robot
581cccdde9 Merge "Implement launch bounds logic in Android (3/3)" 2018-11-12 22:01:31 +00:00
TreeHugger Robot
a79fac052f Merge "Add ACTION_PAGE_UP/DOWN/NEXT/PREVIOUS" 2018-11-12 21:52:20 +00:00
Qasid Ahmad Sadiq
9570561a4f Add ACTION_PAGE_UP/DOWN/NEXT/PREVIOUS
This not only indicates if something is paged, it also indicates what
direction a page can be scrolled towards.

Test: The API Builds, there is no executable code here, that is for
another CL
Bug: 119425427

Change-Id: I0a40079f4e31e48bc53445a247e301c0d09d2497
2018-11-12 21:52:09 +00:00
TreeHugger Robot
f5525d4529 Merge "Includes foreground services in top notification section." 2018-11-12 21:42:27 +00:00
TreeHugger Robot
79dc57f06c Merge "Fix off-by-one error in historical app ops." 2018-11-12 21:40:18 +00:00
Josh Gao
bd1db80249 Merge "Close PFD.AutoClose{In,Out}putStream before the PFD itself." am: 8fe23dfeff am: dcf129f380
am: a355924be3

Change-Id: I9db1facad1b464715a1d8d64d9caa1ebd5d3ba43
2018-11-12 13:28:18 -08:00
Josh Gao
a355924be3 Merge "Close PFD.AutoClose{In,Out}putStream before the PFD itself." am: 8fe23dfeff
am: dcf129f380

Change-Id: I6926ff23f7360ba2acf2b87dff1b20c548d7d0d4
2018-11-12 13:12:13 -08:00
Oleg Kibirev
7502c41e8a Merge "Add key code for thumbs up, thumbs down and profile switch keys" 2018-11-12 20:57:31 +00:00
Josh Gao
8fe23dfeff Merge "Close PFD.AutoClose{In,Out}putStream before the PFD itself." 2018-11-12 20:34:21 +00:00
Michael Dooley
4d75ccd328 Merge "Converting sound trigger v2.2 getModelState to be asynchronous" 2018-11-12 19:27:39 +00:00
Joel Galenson
d829b16b0b Fix off-by-one error in historical app ops.
Both the comment and the usage suggest that this index should be
exclusive, not inclusive.

Bug: 111061782
Test: Call getBackgroundAccessCount without crashing
Change-Id: Ie4eb5a59874afd27bed0706cd177757155351b49
2018-11-12 10:43:55 -08:00
Winson Chung
d27f6b3fc6 Merge "Expose task id and activity component in task snapshot and assist structure" 2018-11-12 17:56:22 +00:00