Commit Graph

12289 Commits

Author SHA1 Message Date
TreeHugger Robot
19e6a8c5c1 Merge "remove framework_base_subdirs" 2019-11-16 08:08:52 +00:00
Jayachandran C
82e53b725a Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs" am: 337df70e17 am: 0a86ee3b3e
am: 78f84d5abe

Change-Id: I24e2c0c353f9e74a65c2e3d24a43338022b3efc4
2019-11-15 22:25:23 -08:00
Jayachandran C
78f84d5abe Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs" am: 337df70e17
am: 0a86ee3b3e

Change-Id: I2b1be68cd2eea8a4795a882933ed91dbf6ed83ee
2019-11-15 22:11:01 -08:00
Jayachandran C
0a86ee3b3e Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs"
am: 337df70e17

Change-Id: Iba519e0e11af591d93f9bca5e09aab6191240b39
2019-11-15 19:11:44 -08:00
Jayachandran C
16dce22bf5 Remove usage of Telephonymanager getDefault() and from() hidden APIs
This CL changes to use getSystemService(TelephonyManager.class)

Bug: 140768340
Test: Build
Change-Id: I1fcf2c17456f126584df359547f64c07c168aa65
2019-11-15 15:46:43 -08:00
James O'Leary
fe08abee19 [DO NOT MERGE] Convert TakeScreenshot finishers Runnables to Consumer<Uri>
am: 712eb51dc9

Change-Id: I1a5cc3ceef3f95e02abcbe86fcafd56e19aedc65
2019-11-15 14:05:59 -08:00
Adam Bookatz
b9a57da94c Merge "Introduce user types" 2019-11-15 19:15:37 +00:00
TreeHugger Robot
28c7e9c2ea Merge "Pipe through featureId from caller to permission checks in telephony code" 2019-11-15 18:18:02 +00:00
James O'Leary
712eb51dc9 [DO NOT MERGE] Convert TakeScreenshot finishers Runnables to Consumer<Uri>
Test: n/a
Bug: b/131082115
Change-Id: Ia84d034d08ff4d004fc9852dc5156d46059e8b00
2019-11-15 16:41:21 +00:00
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
Martijn Coenen
c272f94077 Merge "Re-land: Reconcile Zygote process name code with Q release." into stage-aosp-master
am: 0b5937472e

Change-Id: I4edfa7f78dc60bef5d681b0ae268f1d1f1d15b03
2019-11-15 00:16:45 -08: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
Martijn Coenen
0807f15eba Re-land: Reconcile Zygote process name code with Q release.
Re-landing due to merge from staging branch reverting fix.

Some Zygote code that was pushed to AOSP master is different from the
pushed Q release. In particular, a call to set the process name for a
Zygote child was missing, causing an app zygote test to fail.

Bug: 139535125
Test: atest android.app.cts.ServiceTest#testAppZygoteServices
Change-Id: I9cb47cea2295dd6c7df16722d3bb474185b7dc6b
Merged-In: Ice3eb966a88e6de5bc8834b60b54bcac31bf31db
2019-11-14 23:48:14 +00:00
Philip P. Moltmann
33692f734f Pipe through featureId from caller to permission checks in telephony
code

A featureId is only used by runtime permissions.

Test: atest FrameworksTelephonyTests CtsAppOpsTestCases
Bug: 136595429
Change-Id: I7ef41e8961e48d40e5685c4a521e83cb20953e48
2019-11-14 13:40:55 -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
Bookatz
029832a951 Introduce user types
Introduces the notion of 'user types' to UserManager.
Previously, users only had properties, set by UserInfo flags. We now
solidify some of these as formal user types. Each user must be of
precisely one user type. The configuration of each type is defined
in a UserTypeDetails object.

Prior 'types' - namely Guest, Restricted, ManagedProfiles, Demo, and
'normal' - that were set via UserInfo flags are now controlled via
UserType. Previous UserInfo flag methods for categorizing these are
still supported as long as no user of of more than one type.

If a user was (e.g.) previously both Guest and Demo, it is now
invalid and will be prevented from upgrading. This should not be a
problem in AOSP, where these 'types' were assumed mutually exclusive.

UserTypeDetails is sufficiently general to support future non-managed
profiles. To this end, the logic for specifying badges and their
colors/labels is contained by UserTypeDetails, and therefore
UserManager is responsible for delivering the corresponding badge
information.

Bug: 142151520

Test: added new test class UserManagerServiceUserTypeTest
Test: added additional tests in UserManagerServiceUserInfoTest
Test: added additional tests in UserManagerTest
Test: added additional tests in UserManagerServiceCreateProfileTest
Test: created UserTests to run the various pm.User*Test's

Test: atest \
  com.android.server.pm.UserTests \
  UserLifecycleTests \
  ManagedUserContentResolverTest \
  CtsDevicePolicyManagerTestCases \
  CtsMultiUserHostTestCases \
  com.android.server.devicepolicy.DevicePolicyManagerTest \
  com.android.server.am.UserControllerTest \
  CreateManagedProfileTaskTest

Test: atest com.android.server.pm.UserManagerServiceCreateProfileTest
   using adb shell getprop persist.sys.max_profiles # for 5 and -1

Change-Id: Id1183a76055e9a7610965cf40b256d1392afe6f8
2019-11-14 10:00:50 -08: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
Jiyong Park
e53786e864 remove framework_base_subdirs
Metalava no longer requires it at least for droidstubs in this
directory. Even when local_sourcepath is not set, the -sourcepath option
is set to the module directory (frameworks/base in this case), and
metalava tries to find package.html files under the directory to know if
a package is hidden or not.

Bug: 144264106
Test: m

Change-Id: Idfa2aa392ae1da9582e7691a8c06c986baad5088
2019-11-12 14:58:36 +09:00
Artur Satayev
756d3b447a Merge "Add @UnsupportedAppUsage annotations for greylist." am: 423c3a32d6
am: 7a565c45b1

Change-Id: I48075ef4296e0b55c0055f7364c5129bbd60e9ed
2019-11-11 09:33:13 -08:00
Artur Satayev
7a565c45b1 Merge "Add @UnsupportedAppUsage annotations for greylist."
am: 423c3a32d6

Change-Id: I5387b4742fdaf67ad3189356f2361f73969b53a8
2019-11-11 09:13:24 -08:00
Jorim Jaggi
5fdaa0c9af Merge "Remove FEATURE_SWIPE_TO_DISMISS functionality" 2019-11-11 13:10:30 +00:00
Artur Satayev
3be4d59369 Merge "Add @UnsupportedAppUsage annotations for max-p." am: 8893f158c6
am: da4d6567c2

Change-Id: Iff80c388dec2c6f8184b739be6fb38b8ec8a1a49
2019-11-08 09:49:03 -08:00
Artur Satayev
da4d6567c2 Merge "Add @UnsupportedAppUsage annotations for max-p."
am: 8893f158c6

Change-Id: I2f249063c274b54a58a24cda23f1d5a60fa14540
2019-11-08 09:38:12 -08:00
Artur Satayev
fc46be7dbd Add @UnsupportedAppUsage annotations for greylist.
go/cleanup-greylist-txt

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

Bug: 137350495
Test: m

Change-Id: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
Merged-In: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
2019-11-08 16:17:13 +00:00
Artur Satayev
ee9c6e7571 Add @UnsupportedAppUsage annotations for max-p.
See go/UnsupportedAppUsage for more details.

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

Bug: 137350495
Test: m
Change-Id: I5aa29a49b193db47aaee4d3a756c17f48cc9f0b1
Merged-In: I5aa29a49b193db47aaee4d3a756c17f48cc9f0b1
2019-11-08 16:17:13 +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