Increase timeout to 45 days based on feedback.
Bug: 183103253
Test: atest AppStandbyControllerTests
Change-Id: I7a36c720dbf16c16940308576a3965384889e527
The "java" directory in appsearch contains both a package structure and
subdirectories that include a package structure. Update the build
structure to match that.
This is part of a chunk of work necessary to avoidi unintentional
classes being included in the public documentation.
Bug: 187386774
Test: diff docs with/without package filter applied
Change-Id: I312d5cef014557b02d5c015899944ffdea8ca168
Bug: 187206399
Test: atest AlarmManagerServiceTest
Test: Manual test with a test app.
- Grant the permission to test app and make sure it can start FGS.
Log:
```
05-07 10:12:08.671 1000 1579 9475 I ActivityManager: Background started FGS: Allowed [callingPackage: com.google.omakoto.testapp; callingUid: 10294; uidState: RCVR; intent: Intent { act=fgs cmp=com.google.omakoto.testapp/.MyFgs }; code:(unknown:207); tempAllowListReason:<broadcast:1000:android.app.action.SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED,reason:,reasonCode:(unknown:207),duration:10000,callingUid:1000>; targetSdkVersion:30; callerTargetSdkVersion:30; startForegroundCount:0]
```
- Grant the permission to a different app and make sure the test app
won't receive the broadcast.
Test: CTS -- Incoming
Change-Id: Iefe3e12dcf51318d8433532ba3048caa69b1edcd
This behavior could be turned OFF via the flag kill_fas_cached_idle
in device_config.
Bug: 152573287
Test: atest FrameworksServicesTests:ActivityManagerTest
Test: atest FrameworksMockingServicesTests:AppStateTrackerTest
Change-Id: Ifa6950582fbf6a24595b36163810f3c7e9345394
In ag/13985751 [e62a4eb007fc0266be6955c837d188a204c11cc2], we added calls to persist LITE after each mutation api
call. However, VisibilityStore also creates a mutation in Icing lib - it
indexes a single VisibilityDoc. We should also call persist LITE after
this so that we can be sure not to lose the VisibilityDoc.
Bug: 180127220
Test: None
Change-Id: Ib8465a3b2f4adb8f4dc4308c3845fcc501f36c0b
Addresses API council feedback.
Bug: 184890428
Test: atest FrameworksNetTests CtsNetTestCases
Test: atest CtsNetTestCasesLatestSdk:NetworkCapabilitiesTest on R device
Change-Id: Id7c68fbf56ee08fcad8e8e3aacf037fa1885936b
Remove old EJ timing sessions before we schedule the next cleanup alarm.
If we don't remove them, then we will continue to use stale sessions as
the basis for the next cleanup alarm, which would eventually result in
scheduling alarms in the past.
Bug: 187351354
Test: atest FrameworksMockingServicesTest:QuotaControllerTest
Change-Id: I1b968e0461efe9aad3e785760a3cd2f5d8d4de8b
Remove getService from the constructor, delay
getting the service until it's used.
bug: 187425268
test: CTS MediaTranscodeManagerTest
Change-Id: I502bb428fcde96874a1af431af07413feea64d7a
This ensures only one JNI strong reference for the death recipient when
the same binder is used for multiple linkToDeath calls.
Test: atest CtsAlarmManagerTestCases
atest FrameworksCoreTests:BinderDeathDispatcherTest
atest FrameworksMockingServicesTests:com.android.server.alarm
Fixes: 162961981
Bug: 182971683
Change-Id: Ieea2d8f4e495a4c4687378db9d0b8c6949a0406a
Make sure that quota is counted properly for RESTRICTED jobs when the
device is charging but not idle.
Also add some GuardedBy annotations and update some method names. It's
not exhaustive, but a start.
Bug: 141645789
Bug: 187189316
Test: atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/job
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/job
Test: atest CtsJobSchedulerTestCases
Change-Id: I75fae5e3ae71435367db7dd9fa2c14f5d1029a67
- Removing fuzz in the absence of an alarm clock alarm.
- Adding a minimum duration that the alarm should be fuzzed before an
alarm clock - currently 2 minutes.
- The maximum fuzz is now a linear function of futurity of the alarm
with the maximum capped at 15 minutes.
- If the futurity is less than the minimum fuzz, the alarm goes off
immediately, bringing the device out of idle.
Also, fixing a bug with re-evaluating alarm deliverability in doze and
battery saver.
Test: atest FrameworksMockingServicesTests:com.android.server.alarm
Bug: 170279979
Bug: 166693547
Change-Id: Ia8c656a0336cc0b72f0b3901de96d4aa440186d4
If the screen is off, but the CPU is awake and epoll_wait returns for a
non-wakeup alarm, sending any wakeup alarm within its eligibility window
would cause all the held non-wakeup alarms to also fire, which could:
1. Elongate the length of the time the CPU is awake.
2. Cause apps to wake up and perform work.
This change defers sending any wakeup alarm as long as it is possible to
defer all such eligible alarms to later.
Also, fixed a bug in sorting after adding multiple alarms to the store.
Test: atest CtsAlarmManagerTestCases
atest FrameworksMockingServicesTests:com.android.server.alarm
Bug: 161497385
Change-Id: I01f98255091baddf4e7529f88733776e27d090d7
1. Remove extra space before "EJ" in the timer dump.
2. Actually print out the list of system installers. SparseSetArray
doesn't have toString() implemented.
Bug: 141645789
Bug: 141495777
Test: adb shell dumpsys jobscheduler
Change-Id: Ia6e88b0b1177dc585fcca4a29d658b5a9370b60b
1. Only downgrade an EJ that doesn't have the IGNORE_BACKOFF extra when
we are actually attempting to back off the job.
2. Allow EJs to have the FLAG_EXEMPT_FROM_APP_STANDBY flag since that
can only be set by the system and won't cause issues.
Also propagate the scheduleEjAsRegularJob bit through the job extras to
help with debugging.
Bug: 178852366
Test: atest ContentResolverTest (all)
Test: atest CtsJobSchedulerTestCases:JobInfoTest
Test: atest CtsSyncManagerTest
Test: atest SyncOperationTest
Test: atest SyncManagerTest
Test: atest SyncRequestTest
Change-Id: I133d089a4d770a3cc37df72f8b38d234b24077df
Mainline modules seem to be metalava'd differently, causing the CREATOR,
describeContents(), and other parcelling methods to become part of the
public API.
Additionally, AppSearchResult and AppSearchBatchResult were forked from
Jetpack with parcelling added, and manually maintained.
Additionally, the parcelling wouldn't work properly if the keys and
values are not themselves parcelable, but this was not clearly
documented or called out.
This CL fixes these problems by creating parcelable wrappers around the
upstream Jetpack AppSearchResult and AppSearchBatchResult, usable only
when they contain parcelable keys and values.
Bug: 146218515
Test: Presubmit
Change-Id: I828a22dc6dae3e46f5d167f1a9d12627ba15d9fd
The methods and classes are hidden and marked with @UnsupportedAppUsage.
This fixes broken dogfooders while the new SDK is being propagated.
Bug: 181887768
Test: Jetpack unit tests against old SDK
Change-Id: Ibc8aaed6ffa751b75bf5b23e04547eba2a4cda86
Included changes:
* 4c1b251: Sync AppSearch with google3 update ag/14342999 (8f8b43)
* cdf1913: Add a GenericDocument#toBuilder API.
* 64f80f3: Improve snippeting and matching per API feedback.
* 23dd35c: Move AppSearchEmail out of the prod tree into the test utils.
Bug: 171882200
Bug: 186520196
Bug: 186717514
Test: Presubmit
Change-Id: I9d8e1fb87e6e74c57a38f3a27cdd04a1a3ccf90b
If temp allowlist reasonCode is REASON_PUSH_MESSAGING_OVER_QUOTA, check
DeviceConfig key "push_messaging_over_quota_behavior" to decide if
temp allowlist and FGS start are allowed. Three options:
1. -1, temp allowlist not allowed, FGS start not allowed.
2. 0, temp allowlist allowed, FGS start allowed.
3. 1, temp allowlist allowed, FGS start not allowed. This is default.
The device config command to change the behavior:
adb shell device_config set activity_manager push_messaging_over_quota_behavior <-1|0|1>
If temp allowlist reasonCode is REASON_DENIED, do not allow temp allowlist
at all.
Also, in DeviceIdleController.addPowerSaveTempAllowlistAppInternal(),
there used to be a check if the callingUid is on the mPowerSaveWhitelistSystemAppIds list,
this is unnecessary because upstream callers already checked if callingUid has
permission CHANGE_DEVICE_IDLE_TEMP_WHITELIST, and this permission is a privileged permission,
so removing the check of mPowerSaveWhitelistSystemAppIds should be safe.
Bug: 182796372
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testPushMessagingOverQuota
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testTempAllowListReasonCode
Change-Id: Id34b1c26c819dc4fe07838eb2e3a8f0138cbcf8f
1. Make it clear that "minimum latency" != "run ASAP after latency"
2. Note that deadline constraints are dropped from rescheduled jobs
3. Clarify that jobFinished does not need to be called if onStopJob is called
Bug: 19536175
Test: Run `m offline-sdk-docs` and check site at out/target/common/docs/offline-sdk/reference/android/app/job/JobInfo.html
Change-Id: I051feb0ebfcb0a24c452a38b91a751bbeef581f8
The alarm store implementation might change, leaving the pointer passed
to MetricsHelper with an empty instance.
Also reordered some code to reduce unnecessary locking.
Test: Manually, run:
adb shell device_config put alarm_manager lazy_batching false
Then:
./out/host/linux-x86/bin/statsd_testdrive 10106
should show non-zero values.
Bug: 177556103
Change-Id: I55b4318d14632f227adfd79f7a08bb50af98f03a
If an alarm is removed from the service for some reason, the bugreport
contains no useful information about it. Recording the last 10 removes
with their reason. For now, the set of reasons includes:
- Data cleared on the calling app.
- App requested to cancel it.
- Exact alarm permission revoked.
- PendingIntent used to set the alarm was cancelled.
More reasons can be added as seen useful in the future.
Test: adb shell dumpsys alarm
atest FrameworksMockingServicesTests:com.android.server.alarm
atest CtsAlarmManagerTestCases
Fixes: 184677899
Change-Id: I9d67b90572b5d731ad5d224ae7d537ae176508d5
This CL cleans up how MediaCommunicationService
manages Session2Record instances.
It removes unnecessary codes and refactor locks.
It also adds/clean up tests for MCM.SessionCallback.
Bug: 183289655
Bug: 182907935
Test: atest MediaCommunicationManagerTest 10 times
Change-Id: Iff4643c7dc207ea14c752bdfb815598dc34f2368
Make sure developers are aware that user interaction will replenish EJ
quota so they are less concerned about running out of quota for valid
use cases.
Bug: 171305774
Test: N/A
Change-Id: Iec231522dbc7fe83c65956b59ca3e4fbda072b97