Before we just cast Object[] to String[]. This crashes. Now we are
casting the individual objects->strings.
Test: Parceled LongSparseArray
Change-Id: I24883a1dad49c0682977da1aea2370eddb001173
UsageStatsManagerInternal is also no longer an API surface for
registration of app idle state change listeners. AppStandbyInternal has
become a proper LocalService and interested clients can just use that
directly.
Bug: 140833849
Test: boot & run normally
Test: verify system package backup
Change-Id: Ie63f438f129cd8f41169778a3045d131ca7322fb
This change creates a constant in ContentSuggestionsManager, which will
be used to pass a hardware bitmap to ContentSuggestionsService.
In the presence of this key in the request extras, we skip taking a
snapshot in ContentSuggestionsPerUserService.
Bitmap is extracted from reading this value from extras in
ContentSuggestionsService.
Test: Manually tested this code in the debugger to verify that snapshot
is not taken when constant is provided in extras.
Change-Id: I4a464d5188bd3eac9afb4ac223611dccab01510f
* changes:
Do not retain UsageStats for uninstalled packages.
Catch exceptions in UsageStatsService on bad data.
Obfuscate usage stats data stored on disk.
* Add CREDENTIAL_TYPE_PIN as the fourth credential type.
* Rename existing CREDENTIAL_TYPE_PASSWORD
to CREDENTIAL_TYPE_PASSWORD_OR_PIN which is still referenced
by password data persisted on disk.
* No longer store quality for new credentials (PASSWORD_TYPE_KEY).
Credential type stored in synthetic password blob is now the single
source of truth on what credential (None/Pin/Pattern/Password) the
device currently has.
* Adapt lockscreen FRP to work on a similar fashion (no more quality
being passed around and stored)
* Adapt RecoverableKeystore to use the new PIN credential type.
* Fix existing unit tests
* Add new unit tests for lockscreen FRP.
Upgrade path:
* Existing credentials will have CREDENTIAL_TYPE_PASSWORD_OR_PIN, and when
LSS sees this, it will further consult PASSWORD_TYPE_KEY to distinguish
between PIN and Pattern. The credential will stay this way until the next
password change i.e. no automatic credential upgrade.
* Existing FRP credential will have CREDENTIAL_TYPE_PASSWORD_OR_PIN, and
when LSS sees this, it will further consult the saved quality
PersistentData.qualityForUi to make that distinction.
* Normal and FRP credential enrolled after this CL will store
CREDENTIAL_TYPE_PIN to indicate this is a numeric PIN.
Bug: 65239740
Test: atest com.android.server.locksettings
Test: atest com.android.internal.widget.LockscreenCredentialTest
Test: atest com.android.internal.util.LockPatternUtilsTest
Test: atest LockSettingsShellCommandTest
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Test: atest FrameworksCoreTests:PasswordMetricsTest
Test: atest FrameworksCoreTests:PasswordPolicyTest
Test: atest MixedManagedProfileOwnerTest#testResetPasswordWithToken
Test: atest com.android.cts.devicepolicy.PasswordComplexityTest
Test: atest com.android.cts.devicepolicy.ManagedProfilePasswordTest
Test: flash an old build, enroll password and flash to new build.
Verify everything still works.
Test: manually set an PIN/Pattern/Password; then change to
PIN/Pattern/Password; finally remove password
Test: manually create a work profile; try unify and ununify work
challenge.
Test: manually test lockscreen FRP flow (change password via Settings /
DPC)
Change-Id: I781cea4c32d567aac4af692697c4569161580102
Make TimeDetectorService more aware of a time signal's origin by making
the time signal from telephony less generic.
When TimeDetectorService was written it was assumed that the TimeSignal
could be generic and there would just be a String source identifier to
indicate origin.
With multiple SIMs / phones on a device it makes sense to keep track of
the originating phone of the signal so that the time detector service
could implement stickiness if it wanted. This would avoid a device
alternating back and forth between two signals and help with debugging.
As new signals are added, new "suggestXxxxTime()" methods will be added
to TimeDetectorService. That is the point at which the strategy for
ranking different sources can be decided. e.g. should NTP always rank
higher than NITZ?
The main change here is that TimeSignal is renamed to
PhoneTimeSuggestion to indicate it's only for use by signals from
telephony, sourceId has been removed and it has been given a phoneId
instead. Extra free-form metadata (mDebugInfo) has been added to assist
with logging / debugging.
Bug:140712361
Test: atest android.app.timedetector
Test: atest com.android.server.timedetector
Change-Id: I5305c34516e5f4e254309193183f00e054801a46
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
Fixes: 141875256
Fixes: 142224519
In ActivityTransitionState, the mEnterTransitionCoordinator
was being set to null as soon as the transition finished. In
tests, transitions were being finished immediately and the
mEnterTransitionCoordinator was being set to null immediately.
That left time for the same transition to be started again
at a later time.
This waits until the onResume() is called before potentially
clearing the mEnterTransitionCoordinator. This means that all
potential other times where a new EnterTransitionCoordinator
may have been created have already passed and it is safe to
clear the mEnterTransitionCoordinator.
Test: ran ActivityTransition tests
Change-Id: I91978a3c992b533b9074409f05c006fe700d7983
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
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
* 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
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
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
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
* <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
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