Commit Graph

16380 Commits

Author SHA1 Message Date
Eran Messeri
111dfdfdae Merge "Documentation: Indicate DPM method does I/O" 2019-10-18 13:10:51 +00:00
TreeHugger Robot
1ea7ca442d Merge "Fix grammatical error in DPM" 2019-10-18 12:45:48 +00:00
Eran Messeri
128703b70d Documentation: Indicate DPM method does I/O
Document that the addPersistentPreferredActivity method does Disk I/O
and so should not be called on the main thread.

Bug: 142648455
Test: m docs
Change-Id: Iadf2ab82f4f573e53ff68cad0b981494acf6f9b6
2019-10-18 12:24:43 +01:00
Philip P. Moltmann
c9bb90c0e0 Merge "Add feature context" 2019-10-18 02:26:08 +00:00
Louis Chang
95a5e431d2 Merge "Add public API for converting activity translucency" 2019-10-18 01:07:50 +00:00
TreeHugger Robot
7780ab30db Merge "Merge AppWindowToken into ActivityRecord" 2019-10-17 22:54:07 +00:00
Philip P. Moltmann
59076d8957 Add feature context
Currently only used by app-ops, but can be used by other modules too.

AppOps will collect app-ops based on feature. Only the most basic
parts of app-ops are supporting features yet. The rest will be added
later.

Test: atest CtsAppOpsTestCases
      atest RunSettingsLibRoboTests
      atest com.android.server.wm.ActivityStarterTests
      m -j doc-comment-check-docs
Bug: 136595429
Change-Id: Ia664f4ff1c1c2ceea721d76dc491ec50c237e9ce
2019-10-17 14:15:07 -07:00
TreeHugger Robot
6993d89fca Merge "Remove legacy bugreport flow code" 2019-10-17 18:46:41 +00:00
Chen Xu
3321171cc7 Merge "non-mainline telephony related AIDL refactor/decoupling" 2019-10-17 18:27:13 +00:00
Garfield Tan
e8d84ab020 Merge AppWindowToken into ActivityRecord
This change kept AppWindowTokenTests as it's originally based on top of
WindowTestBase, and merging that into ActivityRecordTests needs to
change the base class to ActivityTestBase, which requires additional
work and may change test behaviors. Therefore delay that to
follow-up CL.

Bug: 80414790
Test: Existing tests pass.
Change-Id: I6d73975ee77be9817c41b297f067de2d92a68499
2019-10-17 11:10:02 -07:00
Abhijeet Kaur
8cd863bf7e Remove legacy bugreport flow code
* Remove USE_BUGREPORT_API check that enabled us to switch between
  legacy bugreport flow and API workflow.
* Undeprecate requestBugReport flavors as these will not be deprecated.
  Initially it was aimed to remove these methods and use the API
  directly. But now these methods have all been migrated to
  use bugreport API.
* Add @BugreportParams annotation for requestBugReport function.
* Title and Description are communicated via the broadcast instead of
  setting system properties.
* Description is not a system property anymore, so add a check on its
  length by defining MAX_BUGREPORT_DESCRIPTION_SIZE.

Bug: 137825297
Test: Takes interactive and full bugreport as expected
Change-Id: Ib96ad774f5e21491c0dad82cb2292960aa45d6d0
2019-10-17 17:35:36 +01:00
Jay Aliomer
790ac66e94 Merge "Typo in javadoc of NotificationManager#addAutomaticZenRule" 2019-10-17 16:15:34 +00:00
Eran Messeri
a6b775842a Fix grammatical error in DPM
The documentation for the setPermittedAccessibilityServices method
attempted to explain that system accessibility services cannot be
disabled but the sentence did not make sense.

Bug:
Test: m update-api && m javadoc
Change-Id: I84d27a8c281551bbd8a82621234cd49e205956a7
2019-10-17 13:19:45 +01:00
TreeHugger Robot
4446634572 Merge "Add @NonNull to some generated methods' args" 2019-10-17 00:15:05 +00:00
Chen Xu
1f6cfa5399 non-mainline telephony related AIDL refactor/decoupling
1. decouple IOnSubscriptionChangedListener AIDL from telephonyMainline
2. other refactor. moving APIs which will not be included in
telephony mainline to frameworks/base/core/java/android/telephony.
Moving internal classes like AIDL which will not be included in
telephony mainline to
framework/base/core/java/com/android/internal/telephony

Bug: 140908357
Test: Build & unit test
Change-Id: I9413ef758cceadd251d03f3b5ea1054cc48ef044
2019-10-16 15:30:24 -07:00
Eugene Susla
1bfb5e7097 Add @NonNull to some generated methods' args
Test: . frameworks/base/tests/Codegen/runTest.sh
Fixes: 142783758
Change-Id: I7303d420efd59389c324b3e399fcb3532b5d6c37
2019-10-16 14:29:58 -07:00
Kweku Adams
df33ae1b0b Removing periodic parole window.
The periodic parole window is the 10 minute window that occurs every
24 hours to let RARE apps run. Now that we have the quota system in
place, there's no need to have the periodic parole window. Alarms and
jobs will still be allowed to run when charging. Network will continue
to be restricted for RARE apps even when charging. JobScheduler requests
an exception for RARE jobs in quota, so they will still be able to run.

Bug: 136184981
Test: atest AppStandbyControllerTests
Test: atest CtsAlarmManagerTestCases
Test: atest NetworkPolicyManagerServiceTest
Test: atest com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Test: atest com.android.server.AlarmManagerServiceTest
Test: atest com.android.server.AppStateTrackerTest
Test: atest com.android.server.job.controllers.QuotaControllerTest
Test: atest com.android.server.net.ConnOnActivityStartTest
Change-Id: Ide382ad7fb9c7441f0a5232833ad39bf8c3a1e94
2019-10-16 13:04:06 -07:00
Jay Aliomer
8e3aac52ee Typo in javadoc of NotificationManager#addAutomaticZenRule
* <p>
     * Throws a SecurityException if policy access is granted to this package.
     * See {@link #isNotificationPolicyAccessGranted}.

The security exception should be thrown when policy access is NOT granted
Test: no test required. documentation change only
Fix: 138459179
Change-Id: I980392104cb38e921b6eafd1a8897b374e73b83c
2019-10-16 17:55:19 +00:00
Pavel Grafov
76621cf279 Merge "Password constraints cleanup." 2019-10-16 17:49:12 +00:00
Pavel Grafov
6f334843a8 Password constraints cleanup.
1. PasswordMetrics now doesn't have 'quality', it is only used inside DPMS.
   This allows easier and unambiguous comparisons.
2. Password complexity code reworked.

Future work: factor validation code into a android.app.PasswordPolicy class
to make PasswordMetrics just represent metrics. It is still used in two ways:
specifying an actual metrics and specifying a minimum metrics for comparison,
this will be addressed later.

Test: atest com.android.cts.devicepolicy.PasswordComplexityTest
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testResetPasswordWithToken
Test: atest FrameworksCoreTests:PasswordMetricsTest
Test: atest FrameworksCoreTests:PasswordPolicyTest
Test: atest com.android.cts.devicepolicy.ManagedProfilePasswordTest
Bug: 138375712
Change-Id: I8ad55f373712ac1dc8343f8cbae23ebb1efe78b9
2019-10-16 16:10:36 +01:00
TreeHugger Robot
d9294a0a43 Merge "unhide getConsolidatedNotificationPolicy" 2019-10-16 05:10:10 +00:00
TreeHugger Robot
6b905bca2f Merge "Explicitly take flags in createContextAsUser()" 2019-10-15 04:11:04 +00:00
TreeHugger Robot
dead70a0a0 Merge "Lock on ResourcesManager when cleaning references" 2019-10-14 23:01:58 +00:00
TreeHugger Robot
9011d90f6b Merge "fix the issue slice cannot be triggered from uri" 2019-10-14 22:18:27 +00:00
Neil Fuller
2505d7580c Merge "Make TimestampedValue Parcelable" am: 81a705690b am: 209c74f8b6 am: 4055cdd965
am: bfe51f8b64

Change-Id: Ied15954c16a1661db7b0d379e1ca71fa7e2c5694
2019-10-14 12:03:18 -07:00
Neil Fuller
bfe51f8b64 Merge "Make TimestampedValue Parcelable" am: 81a705690b am: 209c74f8b6
am: 4055cdd965

Change-Id: I2e507f9cef730c1032767500d36dc0397499c310
2019-10-14 11:56:20 -07:00
Neil Fuller
4055cdd965 Merge "Make TimestampedValue Parcelable" am: 81a705690b
am: 209c74f8b6

Change-Id: I4d9afe91fdea9c5819e4d3d744ac784304abcd19
2019-10-14 11:49:47 -07:00
Neil Fuller
209c74f8b6 Merge "Make TimestampedValue Parcelable"
am: 81a705690b

Change-Id: I68edcf15ec9bef69a26267d9bf0c036e38ce93d4
2019-10-14 11:43:18 -07:00
Treehugger Robot
81a705690b Merge "Make TimestampedValue Parcelable" 2019-10-14 18:33:43 +00:00
Winson
02c7c4c32f Lock on ResourcesManager when cleaning references
Bug: 142634294

Test: atest FrameworksResourceLoaderTests

Change-Id: Ic31925685f362a30370377843b7899ae72cbf5f5
2019-10-14 11:27:36 -07:00
Makoto Onuki
e5449f0b34 Explicitly take flags in createContextAsUser()
Bug: 142472686
Test: atest android.content.cts.ContextTest#testCreateContextAsUser
Change-Id: Id2e3d5ffe5887a4916e0872a7e85d62cbb439744
2019-10-14 11:09:00 -07:00
Beverly
d994e2e3c3 unhide getConsolidatedNotificationPolicy
Test: atest android.app.cts.NotificationManagerTest#testConsolidatedNotificationPolicy
Test: atest android.app.cts.NotificationManagerTest#testConsolidatedNotificationPolicyMultiRules
Bug: 141767508
Change-Id: Ie13223760d1434d8a277ffe99e7e8e07718ae639
2019-10-14 11:26:43 -04:00
Rubin Xu
9af061c608 Merge "Introduce LockscreenCredential" 2019-10-14 13:45:14 +00:00
Chen Xu
176dd6b7aa Merge "add a new telephony protection level" 2019-10-12 05:58:56 +00:00
Pinyao Ting
09b91e6027 fix the issue slice cannot be triggered from uri
Bug: 122879432
Change-Id: Id36a45bbbdb858b5b8d9fd6f1b3f5f97eb84e9fd
Test: Manual
2019-10-11 17:04:08 -07:00
Chen Xu
45c183d201 add a new telephony protection level
for oems which take telephony mainline module, all telephony related
apks will be signed with non-platform certificate. that said apks won't
be able to grant platform signature permission. Solution is to add a new
telephony protection level.

Bug: 141479803
Test: cts & manual
Change-Id: Ib3be016080d42fd76e7c131f4e44d815ce431e6e
2019-10-11 13:46:01 -07:00
Winson Chiu
8e4f087cc1 Merge "Add ResourceLoader API with .apk and .arsc support" 2019-10-11 18:05:00 +00:00
Issei Suzuki
b4b372550e Merge "Removed dead code around TRANSIT_TASK_IN_PLACE" 2019-10-11 12:16:41 +00:00
Mady Mellor
11bab7ba60 Merge "Remove embedded & document launch always restrictions from a bubble" 2019-10-10 23:10:36 +00:00
Winson
9947f1e4fa Add ResourceLoader API with .apk and .arsc support
ResourceLoaders allow inserting another .apk/.arsc into AssetManager's
resource resolution search. The effect is similar to overlays,
where a entry of >= config later in the path list will return that
ApkAsset's resource value instead.

Because loading from an .arsc is supported, which doesn't contain
any actual files, ResourceLoader exposes loadDrawable and
loadXmlResourceParser to allow an application load those files from
anywhere or create them in code.

The data being loaded is either pushed into an .apk or .arsc that
mocks itself as the package being "overlaid" and is passed in
through ResourcesProvider, an interface with static methods that
supports loading from a readable path on disk or a FileDescriptor.

The APIs are accessed through a Context's getResources(), which
has been changed to be unique per "Context-scope", which is usually
the lifetime of the Java object. The exception is that Activities
who get their Resources object persisted across recreations
maintain that logic for persisting ResourceLoaders.

Bug: 135270223

Test: atest FrameworksResourceLoaderTests

Change-Id: I6929f0828629ad39a21fa155e7fec73bd75eec7d
2019-10-10 15:41:03 -07:00
Makoto Onuki
701edd6c0c Merge "Add Context.createContextAsUser()" 2019-10-10 18:52:49 +00:00
Makoto Onuki
b844001d6a Add Context.createContextAsUser()
Without it, apps (mainline modules) will need to use createPackageContext...,
which is a bit painful.

Bug: 142472686
Test: atest android.content.cts.ContextTest#testCreateContextAsUser
Change-Id: Id640e03862462724df1a4a3101f0b08faafba22f
2019-10-10 15:58:20 +00:00
Issei Suzuki
d196637f9f Removed dead code around TRANSIT_TASK_IN_PLACE
Test: All existing tests still pass.
Change-Id: I881677c3a1737e4d0eca0a651216679819584179
2019-10-10 15:13:33 +02:00
Neil Fuller
def77b5cd5 Make TimestampedValue Parcelable
Make TimestampedValue Parcelable for simplicity.

TimetampedValue objects are not generally parcelable, depending on the
type of the value held. Previously, TimestampedValue did not implement
Parcelable to avoid committing to a general contract. Developers
parceling TimestampedValue objects were expected to call
TimestampedValue.writeToParcel() / TimestampedValue.readFromParcel()
explicitly when they knew it was safe to do so. This also meant that
TimestampedValues couldn't be used directly via AIDL.

This change makes TimestampedValue parcelable because it's more
familiar / convenient. Attempts to marshall a TimestampedValue that
contains a non-parcelable value will still throw a RuntimeException.

Bug: 140712361
Test: atest android.util.TimestampedValueTest
Change-Id: I8ca9c72f0433b380ce720cd813f650e743b3ddae
2019-10-10 10:16:41 +01:00
Alex Light
cfdc4f7686 Merge "Perform agent startup-attach before bind" am: 7ae1299cdd am: d3337c9051 am: b49226d0be
am: a10ebfaa56

Change-Id: I3bc2422269baebdfe9a9a8aa2894b12c4dfe5586
2019-10-09 15:26:37 -07:00
Alex Light
a10ebfaa56 Merge "Perform agent startup-attach before bind" am: 7ae1299cdd am: d3337c9051
am: b49226d0be

Change-Id: I7ef1a8d56ebe123e19f2913c13324bd52ac08de2
2019-10-09 15:14:51 -07:00
Alex Light
b49226d0be Merge "Perform agent startup-attach before bind" am: 7ae1299cdd
am: d3337c9051

Change-Id: I1a23e449d95ddc61aafcb3746bc79f6b734ddbef
2019-10-09 14:58:09 -07:00
Alex Light
d3337c9051 Merge "Perform agent startup-attach before bind"
am: 7ae1299cdd

Change-Id: I9fc9f0daa019ce8110154d8ede8f269b7d3bfea9
2019-10-09 14:42:15 -07:00
Alex Light
7ae1299cdd Merge "Perform agent startup-attach before bind" 2019-10-09 21:25:48 +00:00
Chris Tate
9d23418063 Merge "Move PackageManagerInternal to services.jar" 2019-10-09 17:51:10 +00:00