Commit Graph

11730 Commits

Author SHA1 Message Date
TreeHugger Robot
9352329ee1 Merge "Fix NPE in ActivityView on surface destruction" into oc-mr1-dev 2017-09-02 00:16:48 +00:00
Andrii Kulian
d93da5c6e2 Fix NPE in ActivityView on surface destruction
Instance variable mSurface in ActivityView was not updated after surface
destroy/create cycle, which lead to NPE when we were trying to release
it again after second destroy callback.

Bug: 63338670
Test: Create app with activityView, cause activity restart.
Change-Id: I96447ebe77d175050565641ba94b748d2b633d99
2017-09-01 21:31:18 +00:00
Jeff Sharkey
f31cf45e82 Merge "Augment network stats based on SubscriptionPlan." into oc-mr1-dev 2017-08-30 19:01:18 +00:00
Jeff Sharkey
f4de294297 Augment network stats based on SubscriptionPlan.
When a carrier provides an "anchor" of data usage at a specific
moment in time, augment the network statistics used by warning/limit
thresholds and Settings UI.  For example, if the OS measured 500MB
of usage, but the carrier says only 400MB has been used, we "squish"
down the OS measured usage to match that anchor.

Callers using the hidden API will have their data augmented by
default, and the public API offers a way to opt-into augmentation.

Thorough testing to verify behavior.

Test: bit FrameworksNetTests:android.net.,com.android.server.net.
Test: cts-tradefed run commandAndExit cts-dev -m CtsUsageStatsTestCases -t android.app.usage.cts.NetworkUsageStatsTest
Bug: 64534190
Change-Id: Id3d4d7625bbf04f57643e51dbf376e3fa0ea8eca
2017-08-30 10:01:10 -06:00
TreeHugger Robot
a050d6302f Merge "Note cross-user permission requirement for relevant wallpaper operations" into oc-mr1-dev 2017-08-29 23:47:50 +00:00
Felipe Leme
c24a56ae06 Hides the Save UI while handling a pending intent from CustomDescription.
When the AutofillService sets a PendingIntent to launch an activity when
clicking a chield view (for example, to lauch a web page displayign the terms
and conditions of saving something), the system must hide the Save UI and
restore it after the new activity is dismissed.

That sounds simple in the surface, but it requires a huge refactoring behind
the scenes, such as injecting a token in the activity intent and using that
token to hide / cancel the UI during some activity lifecycle events.

Test: lotta of brand-new shinning tests on CtsAutoFillServiceTestCases
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Change-Id: Ie8ec7aeb2c63cab68467046c1a9dcf85dbcc24ec
Fixes: 64309238
2017-08-28 18:04:15 -07:00
Christopher Tate
11620edf31 Note cross-user permission requirement for relevant wallpaper operations
Documentary change only.

Bug: 62343054
Test: N/A
Change-Id: Ibf6617b2c25306852478089b60a019479f8d2bcd
2017-08-28 14:19:32 -07:00
TreeHugger Robot
3ea1e3d57d Merge "Add API to disallow entering PiP when launching a new activity" into oc-mr1-dev 2017-08-26 06:22:34 +00:00
Winson Chung
f7e03e1a9e Add API to disallow entering PiP when launching a new activity
- Use this API when launching the camera from a double tap gesture where
  the user expects the camera to start for immediate use.
- Fix missing case of restoring the enter pip state.

Bug: 63916952
Test: Double tap to launch the camera, and ensure it does not trigger
      the current activity to enter PiP (if it supports it)

Change-Id: I2acf44984bcc57dff75701d0e9cbd6b798a97cd8
2017-08-25 10:33:23 -07:00
Santos Cordon
e6d7723307 Allow VR State Listeners with RESTRICTED_VR_ACCESS permission.
Extend the ability to use VrStateListeners to applications that
have RESTRICTED_VR_ACCESS permission.  Previously, it required
ACCESS_VR_MANAGER only.

Add VrStateCallback object and methods to VrManager to access the
functionality outside of frameworks.

Bug: 64360244
Test: Manual. Tested ability from VrCore.

Change-Id: I01f1c75b1ccd44a09364df84218168cf6caab322
2017-08-24 21:45:24 +00:00
Winson Chung
298f95b1ad Move PiP state check exception to the client side
- When calling enterPictureInPictureMode(), the state of the activity in
  the client may be out of sync with the state of the activity in the
  system, causing an exception to be thrown erroneously. Instead, fail
  silently in the system if this occurs, and throw the exception in the
  client when it attempts to enter PiP from an invalid state.

Bug: 63753007
Test: android.server.cts.ActivityManagerPinnedStackTests

Change-Id: Ia99cc086805edc31f997d4325f7a5ccd7c85a77e
2017-08-23 15:06:32 -07:00
George Mount
230e025841 Merge "Use hardware bitmap for shared element snapshots." into oc-mr1-dev 2017-08-23 20:52:34 +00:00
George Mount
3f81c33a35 Use hardware bitmap for shared element snapshots.
Bug: 64851247

Drawing to software bitmaps does not support many
features, most especially hardware bitmaps. This
changes the implementation to using hardware bitmaps
for View snapshots.

Also fixed broken TransitionTest discovered while
testing.

Test: I4ede02db67e578ea4a25069b683f1989c611e06c
Change-Id: I185bbfe1f789055c9efdba5297a74e481607afaf
2017-08-23 20:51:13 +00:00
Selim Cinek
87c3153dcd Transforming all texts of decorated media custom views
Since otherwise they would be illegible with the color
tranformation.

Change-Id: I5c1fa085fc3d6f682012c267d489a95fc7073f32
Fixes: 64810767
Test: manual, add decoratedMediaCustomView
2017-08-23 02:30:14 +00:00
Selim Cinek
48f66b7b77 Fixed a bug with app provided media spans
Since notifications are colorized now,
We need to clear color spans from media
notifications, otherwise the contrast won't
be ensured.

Test: use media notification with color span, observe no span
Fixes: 64445955
Change-Id: Ib4f5b14196c604468c8c00ba48f294b1b2d102e3
2017-08-22 23:24:38 +00:00
TreeHugger Robot
e391175330 Merge "Allow clearing instant app meta-data" into oc-mr1-dev 2017-08-22 22:49:03 +00:00
TreeHugger Robot
9d41e8cd47 Merge "Fixed a bug with decorated custom views" into oc-mr1-dev 2017-08-22 22:48:14 +00:00
Selim Cinek
fc8073c4b6 Fixed a bug with decorated custom views
Even if their layout still maches, the content was unrecoverably
destroyed, so we can't just reapply it anymore.

Fixes: 62911941
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationInflaterTest.java

Change-Id: I3a50c96484686958570ac5e4949df3ad4b8a421a
2017-08-22 14:58:59 -07:00
Svet Ganov
f935a70398 Allow clearing instant app meta-data
The package manager has an API to clear the data of an app
which does not work for uninstalled instant apps for which
we store some meta-data (icon, title, cookie). This change
allows clearing the data of an uninstalled instant app.

Test: Instant cookie CTS tests use this API

bug:64517837

Change-Id: Ia929fead71b5ae786e88ddd0fa8e8a490d970dd0
2017-08-22 12:22:38 -07:00
Phil Weaver
c6c9e089db Merge "Place focus on window when a11y performs an action" into oc-mr1-dev 2017-08-22 16:42:13 +00:00
TreeHugger Robot
56af51d67e Merge "Log reportFullyDrawn into TRON" into oc-mr1-dev 2017-08-21 16:47:21 +00:00
Jorim Jaggi
4d27b84d95 Log reportFullyDrawn into TRON
Test: AppStartTests
Change-Id: I17c511c9c4305c4cb327d52c81d97ad6d6a8c9d3
Fixes: 36093481
2017-08-21 15:35:49 +02:00
Phil Weaver
5dc3ebcec6 Place focus on window when a11y performs an action
Bug: 62344706
Test: Now able to bring up keyboard in split-screen mode.
Also a11y CTS and unit tests pass.

Change-Id: Ic4340425680c89e8fc5e586aa1d363b01fd69763
2017-08-17 16:48:48 -07:00
TreeHugger Robot
54ff7e7582 Merge changes I36636687,I4c45f787 into oc-mr1-dev
* changes:
  Doc updates
  Translate default channel on locale change
2017-08-17 15:54:52 +00:00
Daniel Sandler
d33fe05c66 Merge changes from topic "revert-injectors" into oc-mr1-dev
* changes:
  Revert "Add API to allow apps more control over instantiation"
  Revert "Add plugin to swap out recents"
2017-08-17 14:32:40 +00:00
Charles He
8b2513e439 Merge "Opt-out for always-on VPN: rename API." into oc-mr1-dev 2017-08-17 07:54:05 +00:00
TreeHugger Robot
10d176009d Merge "Revert "Dismiss Autofill Save UI when a new Activity is launched."" into oc-mr1-dev 2017-08-17 03:07:02 +00:00
TreeHugger Robot
c4ed76f527 Merge "Reducing the image sizes further for low-ram devices" into oc-mr1-dev 2017-08-17 01:27:06 +00:00
Felipe Leme
cf1ff6ca3d Revert "Dismiss Autofill Save UI when a new Activity is launched."
This reverts commit 05ea98a3f9.

Bug: 64693551

Change-Id: I8e7a7b2c5f575cee28f977ae7f3c10752a15d49c
2017-08-16 23:34:06 +00:00
David Stevens
341cd735cb Merge "DO NOT MERGE Let external activities run when the primary display is off" into oc-mr1-dev 2017-08-16 23:15:05 +00:00
TreeHugger Robot
07c83d00c9 Merge "API Council feedback" into oc-mr1-dev 2017-08-16 22:55:52 +00:00
TreeHugger Robot
a9774680f8 Merge "Do not filter out some colors" into oc-mr1-dev 2017-08-16 19:38:45 +00:00
Bryce Lee
92a84efba1 Merge "Update references to O MR1 to proper codename." into oc-mr1-dev 2017-08-16 17:30:43 +00:00
TreeHugger Robot
947528607f Merge "Docs: Javadoc comment fixups for secure passcode reset methods." into oc-mr1-dev 2017-08-16 10:13:09 +00:00
Selim Cinek
a8cb126d86 Reducing the image sizes further for low-ram devices
We're reducing the image sizes by a factor of 2, which is
a good compromise between image quality and memory reduction.

Test: add notifications on a low ram device, observe normal notifications
Change-Id: I344494bdcda950ad7461c43d9a08bf63c0bae266
Fixes: 62253442
2017-08-15 17:00:58 -07:00
Dan Sandler
07fe63e5de Revert "Add API to allow apps more control over instantiation"
This reverts commit 6945710e12.

Bug: 64345190
Test: n/a
Change-Id: Id0aa0f3c9fca64476d163ea8b42a74182050b3ae
2017-08-15 16:48:42 -04:00
David Stevens
f62360cafa DO NOT MERGE Let external activities run when the primary display is off
- Make activity sleep state independent of power manager wakefulness
  state. The state is now entirely dependent on sleep tokens (and the
  voice interactor).
- Make sleep tokens operate on a per-display basis (and convert the
  keyguard to a sleep token).
- Make ActivityStackSupervisor acquire/release sleep tokens for
  non-default displays when the displays are turned on/off.
- Make WindowManagerService.okToDisplay operate on a per-display basis.

Bug: 34280365
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testExternalDisplayActivityTurnPrimaryOff
Test: #testLaunchExternalDisplayActivityWhilePrimaryOff
Test: #testExternalDisplayToggleState
Change-Id: I92086d7006a67b4b4f320c9bb3aa606954f85012
(cherry picked from commit 9440dc87a6)
2017-08-15 18:57:48 +00:00
Julia Reynolds
399d9bfa21 Doc updates
Bug: 64445247
Change-Id: I366366870dae0ab5f3bc9f22d6388234083a758a
Fixes: 63712730
Test: make
2017-08-15 14:57:09 -04:00
Lucas Dupin
e2efebc8a2 Do not filter out some colors
Colors specified manually using the public WallpaperColors
constructor should not be blacklisted.

Test: runtest -x tests/Internal/src/android/app/WallpaperColorsTest.java
Test: runtest -x tests/Internal/src/com/android/internal/colorextraction/types/TonalTest.java
Change-Id: I96faf413e3629c247220d825bb7c3480ed2f1003
Fixes: 64361146
2017-08-15 11:30:19 -07:00
Benjamin Miller
1aed7889c0 Docs: Javadoc comment fixups for secure passcode reset methods.
Exceptions corrected for methods and cross references linked up.
Clarification about resetPassword() and work profiles.
Staged at: go/dac-stage/reference/android/app/admin/DevicePolicyManager.html

Test: make ds-docs with output staged and visually checked in DevicePolicyManager page
Bug: 38026339
Change-Id: I3346144193061fad7988c92e0d4be4b341ef7410
2017-08-15 18:34:06 +02:00
Charles He
c57a01c166 Opt-out for always-on VPN: rename API.
Rename the opt-out flag in AndroidManifest to
SERVICE_META_DATA_SUPPORTS_ALWAYS_ON
as directed by the API Council.

Bug: 64331776
Bug: 36650087
Test: runtest --path java/com/android/server/connectivity/VpnTest.java
Change-Id: I24326fad7a89083a2409134640bda81ee0359d08
2017-08-15 15:52:39 +01:00
Felipe Leme
05ea98a3f9 Dismiss Autofill Save UI when a new Activity is launched.
Test: manual verification using Settings
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -tandroid.autofillservice.cts.SimpleSaveActivityTest#testDismissSave_byLaunchingNewActivity
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -tandroid.autofillservice.cts.LoginActivityTest#testSaveGoesAwayWhenLaunchingNewActivity
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 64693551

Change-Id: I323031c7285a4b49f9f0ca06618425a0ab7833da
2017-08-14 17:56:30 -07:00
Jeff Sharkey
c2e09129e0 Merge "Remove a bunch of deprecated @SystemApi." into oc-mr1-dev 2017-08-12 03:21:01 +00:00
Jeff Sharkey
8478911f5e Remove a bunch of deprecated @SystemApi.
Verified that nobody should be using these APIs, and they've been
deprecated long enough that we can remove them.

Bug: 62341924, 62263907, 62264550
Test: make -j32 update-api && make
Change-Id: I9a2333ca13e4984b71374aa7ffed081e5106c67e
2017-08-11 14:45:47 -06:00
Bryce Lee
0e7b7c96be Update references to O MR1 to proper codename.
Bug: 38225467
Test: manual
Change-Id: I5ae29e5763967f6a752f720e043ccb1ceb57e311
2017-08-10 15:01:53 -07:00
Michal Karpinski
6aa05b82d8 Add "Threading" section to BackupAgent's class level javadoc
Test: make -j40 docs
Bug: 34326112
Change-Id: I3038de3f7159b92c72fa714f9ed55159fe3bb66b
2017-08-09 17:25:03 +01:00
Calin Juravle
284b584499 Merge "Change the location of current profiles for secondary dex files" into oc-mr1-dev 2017-08-08 00:17:44 +00:00
Jeff Sharkey
67f9d5070a Fix broken javadocs.
Bug: 64337634
Test: make -j32 doc-comment-check-docs
Change-Id: I20fdd3dcddef09111d35946c41c596c7689effa6
2017-08-06 07:37:08 -06:00
Calin Juravle
eec18f41e2 Change the location of current profiles for secondary dex files
Move the secondary dex profiles inside the oat folder. This makes it
easier to clean them up and "protects" them against apps which may delete
unknown files from their directories (e.g. search).

Bug: 62336157
Test: Manual: boot the device, use the app, check the profiles are
collected in the new location.

Change-Id: I2fbce7591589d162775e4652b12e4698083adcff
2017-08-04 17:14:22 -07:00
Lucas Dupin
eeb36bee98 API Council feedback
Change-Id: I35b1d2a8a32d2fdf1b698640030dc42c1e595904
Fixes: 64330915
Fixes: 64331343
Test: read the docs
2017-08-04 10:45:12 -07:00