Commit Graph

12418 Commits

Author SHA1 Message Date
Mark Tabry
15fb09d1e9 Merge changes from topic "VmsWestworld"
* changes:
  Add AIDL interface and puller implementation for automotive devices.
  Define new atoms for Vehicle Maps Service.
2019-11-15 15:52:24 +00:00
Robert Horvath
993e82eec7 Merge "Add setting to go to sleep after long user inactivity" 2019-11-15 15:05:15 +00:00
Mark Tabry
9dc13578f7 Add AIDL interface and puller implementation for automotive devices.
Changes:
  - Adds hidden ICarStatsService AIDL API.
  - Adds CarStatsPuller for pulling atoms from ICarStatsService.
  - Pulls VmsClientStats via CarStatsPuller.

Bug: 141697665
Test: Manual testing on hawk using statsd_testdrive
Change-Id: I44e104d430f64b1bd3dce96e9749df79ab3d2fbf
2019-11-14 23:38:34 -08:00
Zhen Zhang
bde7b46042 Replcae ListView with RecyclerView in Share-sheet
Use RecyclerView and GridLayoutManager to replace ListView in
Share-sheet
Bug: 140502600
Test: Passed all existing unit tests in ChooserActivityTest and
ResolverActivityTest, except two known failure, setShowAtTopToTrue and
setMaxHeight in ResolverActivityTest.

Change-Id: Icca408de1c1f5a56150a0e06ed5a94f7c803de12
2019-11-14 17:32:28 -08:00
Kevin Lau Fang
9b96d06072 Merge "Revert submission" 2019-11-14 20:31:09 +00:00
Kevin Lau Fang
01e16a5234 Revert submission
Reason for revert: This causes a boot issue on Taimen (b/144480969). It wasn't caught by TreeHugger due to Taimen tests being disabled due to a different lab outage (b/144350336).

Change-Id: Idc18b3531fda53257b85b81a869c00592eee83ce
2019-11-14 20:07:11 +00:00
Zhen Zhang
1406fca43a Port GridLayoutManager from library to internal widget
GridLayoutManager is ported from oc-dr1-release branch support library:
android.support.v7.widget.GridLayoutManager.java
Changes made:
AccessibilityNodeInfoCompat replaced by AccessibilityNodeInfo
Removed onFocusSearchFailed override due to lack of helper function and
class.
It will be used for RecyclerView in Share-sheet
Bug: 140502600
Test: Built successfully with the change.

Change-Id: I33905f567b9944b975a6ea829e3409322f23e67d
2019-11-13 15:29:08 -08:00
Dianne Hackborn
da0e5cef21 Merge "Rework platform version to hide codenames." 2019-11-13 23:16:03 +00:00
TreeHugger Robot
02a118de19 Merge "Rebuild list before calling useLayoutWithDefault()." 2019-11-13 17:46:01 +00:00
arangelov
bb5723332c Rebuild list before calling useLayoutWithDefault().
Fixes: 144080004
Test: manual
Test: atest com.android.internal.app.ResolverActivityTest
Test: atest com.android.internal.app.ChooserActivityTest
Change-Id: I2ea56dd29012eb70dcc7ecb509647ddf65778f38
2019-11-13 13:23:13 +00:00
Dianne Hackborn
a2fe812ea0 Rework platform version to hide codenames.
The public platform version no longer can be a codename, it is
always the most recently released platform.  A new build property
and API provides either the offical version or the current codename
as appropriate.  This will avoid breaking apps that look at the
platform version while development is under a codename.

Bug:  143175463
Test: manual
Change-Id: I72975ec86ac07700dc9052245b54411fa77982b8
2019-11-12 15:55:59 -08:00
Jorim Jaggi
f081f06a48 Kill overscan insets and outsets
Also remove WindowManagerStressTest because that has been replaced
with proper perf test.

Test: Boots
Bug: 143255833
Change-Id: I1d293cda7c82d0aa1c3a6cc694c74bf7d10cc974
2019-11-12 17:49:51 +01:00
Jorim Jaggi
5fdaa0c9af Merge "Remove FEATURE_SWIPE_TO_DISMISS functionality" 2019-11-11 13:10:30 +00:00
Robert Horvath
5560f38654 Add setting to go to sleep after long user inactivity
The European Commision prescribes an auto-standby feature for TV panels:
After some hours of inactivity, the device has to go from on-mode to
standby-mode or off-mode, or another condition not exceeding the
applicable requirements for standby-mode or for off-mode.

After a long time of no user activity the device should go to sleep,
even if wakelocks are held (eg. during video playback).

Test: 1. Set attentive timeout low, to 35s:
         `adb shell settings put secure attentive_timeout 35000`
      2. Play a YouTube video
      3. Observe warning dialog appearing after 5s
      4. Verify: Clicking a remote button or changing the setting higher hides
         the warning. Remote button press is consumed.
      5. Verify: After 35s of not pressing a button the device goes to sleep
      6. Verify: If "Stay awake" developer option is enabled, then
         warning is not displayed and device does not go to sleep after 35s
      7. Verify: No warning or sleep if setting is set to -1
Test: `atest frameworks/base/services/tests/servicestests/src/com/android/server/power/PowerManagerServiceTest.java`
Bug: 137633812
Change-Id: I551b6cffc336437fb1c5a00b4102f68ae0e003e9
2019-11-08 15:18:28 +01:00
Yunfan Chen
a232661f36 Merge "Hook up TaskDescription into set bar color calls (6/N)" 2019-11-08 02:22:05 +00:00
Eugene Susla
ed7d2af0de Merge "Add CDM system api to check for association presence" 2019-11-07 02:28:57 +00:00
Zhen Zhang
11cb2643c6 Merge "Fix bug: Some targets will have wrong sub-label" 2019-11-07 01:17:53 +00:00
Yunfan Chen
91b3a1bd14 Hook up TaskDescription into set bar color calls (6/N)
This patch will update the task description when the app calls
setStatusBarColor or setNavigationBarColor. The status bar is updated
but the information is not reflected in the task description without
this patch.

Bug: 132756841
Bug: 113253712
Test: Test with the test app in b/132756841. The task description is
      updated as expected.
Test: go/wm-smoke
Change-Id: I4ba1e5e7dd0f096cba40221450a8861e3d578e3c
2019-11-06 16:57:05 -08:00
Philip P. Moltmann
f1d098404c Merge "Allow null-featureIds in AppOpsService binder calls" 2019-11-06 23:38:57 +00:00
Satakshi
d2010f2628 Screenshot Notification Smart Action: AiAi and - Sys UI integration
This change creates ScreenshotNotificationSmartActionsProvider, which is overridden
in GoogleSystemUI.
Calling AiAi is guarded by a device config flag created in cl/277143225.

Test: Manually tested the code in this CL and corresponding change in SystemUIGoogle.
Took a screenshot and verified that AiAi gets invoked and the screenshot notification
shows smart actions.
Ran new tests added in this CL 'atest ScreenshotNotificationSmartActionsTest'
Bug: 143556894

Change-Id: I439a4be9aac53fb02b566ae4d438afe3edf2b37a
2019-11-06 13:46:08 -08:00
satayev
98e9bbdb06 Merge "Plumb @TestApi enforcement policy to runtime." am: eb6be3bd48 am: d24444e5ee
am: 698c84738e

Change-Id: Ib451e70ecb98e2e1af635139f23248261385694c
2019-11-06 07:19:20 -08:00
satayev
698c84738e Merge "Plumb @TestApi enforcement policy to runtime." am: eb6be3bd48
am: d24444e5ee

Change-Id: If7541ac35b6535a6d5535f777e840aa3da90fa69
2019-11-06 07:13:47 -08:00
satayev
d24444e5ee Merge "Plumb @TestApi enforcement policy to runtime."
am: eb6be3bd48

Change-Id: If061e7da58ffc566cd054e90ad26bdfa0d8f6e30
2019-11-06 07:06:56 -08:00
Tiger Huang
0f3fc6d2e0 Merge "Window Manager Flag Migration (5/n)" 2019-11-06 03:33:30 +00:00
SongFerng Wang
f1d3e7a815 Merge "[MainLine] CellularBatteryStats expose @System Api" 2019-11-06 01:18:15 +00:00
Philip P. Moltmann
02cd91b466 Allow null-featureIds in AppOpsService binder calls
Test: atest CtsAppOpsTestCases
Bug: 136595429
Change-Id: Ib47b8dd0c665314c4b3547895bda29de98a2258a
2019-11-05 14:44:14 -08:00
Jorim Jaggi
e06b1fd0f5 Remove FEATURE_SWIPE_TO_DISMISS functionality
Not used anymore by any product.

Bug: 143346248
Test: Boots
Change-Id: I21286e62f73ec34f7d5ca040cd614838c9cd4276
2019-11-05 19:14:54 +01:00
Artur Satayev
19305b4f0e Plumb @TestApi enforcement policy to runtime.
By default access to test APIs would be allowed for instrumented processes only.

Bug: 133832325
Test: manual
Change-Id: Iaaa54a3fe04624a7b5b9f4304d39fc37580568c8
2019-11-05 18:08:44 +00:00
SongFerngWang
8a5307c197 [MainLine] CellularBatteryStats expose @System Api
1. add getCellularBatteryStats() at BatteryStatsManager.java
2. CellularBatteryStats API transform to @System Api

Bug: 138806762
Test: build pass and device boots up
      atest TelephonyMetricsTest

Change-Id: Iec67f45f18ea26c96198bd732eadf14f878bdaa0
2019-11-06 01:19:35 +08:00
Makoto Onuki
4c7073b017 Bidner shell command API proposal
Bug: 142751512
Test: "adb shell cmd jobschduler help"
Test: "adb shell cmd activity help"

Change-Id: I9174040cae72172e82d260d0ceb9ca5a69b72940
2019-11-05 09:13:07 -08:00
Tiger Huang
0dbd5376ea Window Manager Flag Migration (5/n)
Completely remove the system UI visibility from the SystemUI side.

Bug: 118118435
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
            InsetsPolicyTest WindowStateTests CommandQueueTest
            RegisterStatusBarResultTest InsetsFlagsTest
            LightBarControllerTest RegisterStatusBarResultTest
Test: build on specific target
Change-Id: Ibc866c5fbb35582dad8fd1a90376ce47dc501377
2019-11-06 01:07:31 +08:00
Felipe Leme
42a1773abe Merge "Improved UserSystemPackageInstaller.dump()" 2019-11-05 15:18:53 +00:00
Zhen Zhang
6a549b568f Fix bug: Some targets will have wrong sub-label
When bind sub-label to view, we shouldn't check empty. Otherwise the
view cannot be clean up when recycled.

Bug: 143719968
Test: ResolverActivityTest, ChooserActivityTest
Change-Id: Ic22af8369246f73039c4add4c4168949410f0517
2019-11-04 15:16:31 -08:00
Paul Mclean
be78503554 Merge "Adding USB Recording warning message to UsbResolverActivity." 2019-11-04 21:06:41 +00:00
Aran Ink
2b041061e3 Merge "Track and destroy inline URI grants separately from Notification URIs." 2019-11-04 20:31:06 +00:00
Paul McLean
07425c8c00 Adding USB Recording warning message to UsbResolverActivity.
Bug:136080195
Test: install UsbAccess and UsbPersistentPermissionsTestApp
(both want to handle USB connection events). Notice the
new warning message for the app(s) that haven't been
granted record permission.

Change-Id: I651ae5e6314a2d59ed4537aa7d7785e27e3b1a52
2019-11-04 12:25:07 -07:00
Miranda Kephart
82bfe7d6f7 Merge "Add corner flow for screenshots" 2019-11-04 19:06:45 +00:00
Aran Ink
979c9766df Track and destroy inline URI grants separately from Notification URIs.
Bug: 142492493
Bug: 137398133

Test: Unit tests pass. Manual testing with an app configured to receive images via RemoteInput can access and display image URIs after the notification has been canceled, but before the notification entry has been removed from the shade.

Change-Id: If64ae7eff7293df3317a1f629977aaaccd866b32
2019-11-04 12:56:41 -05:00
TreeHugger Robot
90edec903a Merge "Do not enforce partition restrictions on component-override" 2019-11-04 17:31:43 +00:00
Miranda Kephart
ea2e67a5a0 Add corner flow for screenshots
Instead of showing a notification, the screenshot animates into the
bottom left corner of the phone. Tapping on it leads to the same
intent as tapping "Edit" on the notification would. The screenshot
disappears after 8 seconds.

Bug: 137153302
Test: adds feature behind flag, tested that behavior remains the same
if flag is false

Change-Id: I4f48ba7de36f298bd6a66439ea6885fc92a8cb9c
2019-11-04 12:13:19 -05:00
Mike Ma
9688474172 Downgrade error level when proc file is empty
Use Slog.w instead of Slog.wtf for a few empty cases when reading
proc files.

There have been quite a few issues around reporting error at Slog
.wtf level in the past. Although Slog.wtf should not crash itself,
it has indirectly caused a few crashes due to improper handling of
wtf errors e.g. arose from incorrectly mocking BatteryStatsImpl.

Test: Manual
Change-Id: Idce018c928a1bb0f3d4c139382d090be009c291d
2019-11-01 02:26:09 -07:00
Hui Yu
a86a36b184 Merge "Add process capability as a new dimension." 2019-10-31 23:11:21 +00:00
Kweku Adams
f8ab0aa52b Merge "Move heap dump sharing to SHELL." 2019-10-31 19:23:30 +00:00
TreeHugger Robot
abc015499a Merge "DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master" into stage-aosp-master 2019-10-31 18:38:40 +00:00
Andrei-Valentin Onea
dd663ea38e Merge "Add apis for listing all compat changes" am: 2c3b1a1010 am: 4b8947bd56
am: 97ad6f5c48

Change-Id: I6478b10141e6a051e7e1d04b3108f0266f74a173
2019-10-31 06:59:18 -07:00
Andrei-Valentin Onea
97ad6f5c48 Merge "Add apis for listing all compat changes" am: 2c3b1a1010
am: 4b8947bd56

Change-Id: I924c55f20755d33c6a748326bf07083592fd77e6
2019-10-31 06:52:54 -07:00
Andrei Onea
18041f787d Add apis for listing all compat changes
These apis are required for adding UI in the Developer options for
modifying compatibility change overrides.

Bug: 138280620
Test: atest CompatConfigTest
Change-Id: If55aa68f9bdd6bed0765324e972de3683bacb553
2019-10-31 11:54:13 +00:00
Hui Yu
2696932100 Add process capability as a new dimension.
Add new attribute capability to ProcessRecord, it represents what this
process is allowed to do. Capability is a separate dimension for
process state (ProcState).

In OomAdjuster.java, capabilities can be passed from client to service.

Add PROCESS_CAPABILITY_FOREGROUND_LOCATION to represent the capability
that can access location while-in-use.

For permission such as foreground location access, AppOpsService
checks for FOREGROUND_LOCATION capability, also checks if the process
is in one of the foreground process states, if both conditions meet,
the locaton operation is allowed.

Remove PROCESS_STATE_FOREGROUND_SERVICE_LOCATION.

Bug: 136274596
Test: atest CtsAppTestCases:ActivityManagerProcessStateTest
atest CtsAppTestCases:ActivityManagerApi29Test
atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/appop/AppOpsServiceTest.java
Change-Id: Ie1c8e670fb0789208b753eb49b7e2fce6a2f211f
2019-10-30 18:23:24 -07:00
Xin Li
6f48900f50 DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master
Bug: 142003500
Change-Id: If5056a73ede668b0048ca107b686413695e5b3b6
2019-10-30 14:33:01 -07:00
Eugene Susla
e62958cb98 Add CDM system api to check for association presence
Per agreement with wifi team, wifi stack will call into CDM when wifi
connection is requested, treating CDM record similarly to the previously
approved networks records, i.e. skipping UI when association exists.

Test: atest android.os.cts.CompanionDeviceManagerTest
Fixes: 143572863
Change-Id: I28b44076e594fb9357b5a543176d285414ef06f8
2019-10-30 18:08:00 +00:00