RegisteredServicesCache caches services in an xml, so the system doesn't
have to scan all the apks. Whenever a package is changed
(add/remove/replaced), the broadcast receiver in RegisteredServicesCache
will refresh this cache by quering all matching services and reading
their
xml metadata. There is extra work done here, because only the changed
package
will have services added/removed.
The edge case is after a cache is invalidated, we want to query package
manager for everything, regardless of what changedUids is (we could
have arrived here if invalidateCache is called, and then a package
change event fires, before a getAllServices is called to rescan
everything).
Add a new test to verify that the optimization takes care of the case
when the cache is invalidated.
Bug: 117755076
Bug: 122912184
Test: atest RegisteredServicesCache
Test: dumpsys content # check sync adapters
Merged-In: I5c1f57108c4b67d24b198000d57216c63d35290a
Change-Id: I5c1f57108c4b67d24b198000d57216c63d35290a
Bug: 122904322
Test: atest android.view.textclassifier.TextClassificationManagerTest
Test: (MANUAL)
1. Start an app with a TextView
2. Select the text to trigger the text selection toolbar and TextClassifier
3. Close the app's activity by repeatedly clicking back on the nav bar
4. Start a Profiler for the app and observe for memory growth
5. Repeat 1 - 3 several times and observe.
If the bug still exists, memory should grow at about 4 - 5MB.
If the bug is fixed, Memory should remain about the same across activity restarts.
Change-Id: Id9a60dea85cf3949de030042537287ddb29842a2
NativeActivities do not receive onNativeWindowDestroyed callback when the activity is stopped. If
the app still uses the window object after the window is destroyed, the app can crash.
Test: run native-plasma from Android NDK. Launch activity & press home. Verify from the logs app
receives onNativeWindowDestroyed callback when its stopped.
Test: go/wm-smoke
Bug: b/111948775, b/120100553
Change-Id: I1de76feb7f4974b77b42b56e592ff6444713c699
(cherry picked from commit e626d58c1b)
No change to logic, only docs.
This adds {@link}'s for references to SslErrorHandler methods, improving
readability. This also clarifies this API is only called for recoverable
errors.
Fixes: 123042566
Test: m offline-sdk-docs
Change-Id: I0e94c9903e638e2fce59f35ec76eb5566e7ad875
Also don't show smart actions for selections in text with unsupported
characters.
Bug: 116321860
Test: atest android.view.textclassifier.TextClassificationManagerTest \
android.text.util.cts.LinkifyTest \
android.text.util.LinkifyTest \
android.widget.TextViewActivityTest
Change-Id: I01b5e936aa4dfc937a98f50e9fc8171666861a61
No change to logic, only docs change.
The bar/pipe symbols have no meaning in javadoc. We should mark this
with {@code} instead.
Bug: 122046530
Test: None
Change-Id: I594480ea3bf4fec9c87a48275364c7c616a0e3ea
The default wallpaper component cannot be found after GSI is flashed.
The home screen background will have no wallpaper and be black.
It will also cause the following CTS tests to fail:
- KeyguardTests#testDialogShowWhenLockedActivity
- KeyguardTests#testTranslucentShowWhenLockedActivity
The patch will check if the package of the default component exists.
If not, it will fall back to null, which is the AOSP default value, and
display the wallpaper in framework resource.
Bug: 119895131
Bug: 111909699
Test: flash GSI aosp_arm64-userdebug on a crosshatch, got AOSP wallpaper
Test: flash full crosshatch-userdebug on a crosshatch, got crosshatch wallpaper
Change-Id: I9d618d05458a03a675324cb2f861decf31c5bf18
Merged-In: I9d618d05458a03a675324cb2f861decf31c5bf18
(cherry picked from commit 1c7ae31e97)
Developers commonly misuse the mimeType and encoding parameters in the
WebResourceResponse constructor as the meaning is different to the
similarly named HTTP headers. Explain more carefully what valid/invalid
inputs look like and mention that this is different to HTTP.
Change-Id: I14d159bc50c89c2215f7de5f4732569e5e246930
Fixes: 64765685
Test: m offline-sdk-docs
Docs had contained a @see link to #FIRST_SDK_INT , but that field
had a @hide directive, so the @see link resulted in an error message
in the output.
Doc staged to:
http://go/dac-stage/reference/android/os/Build.VERSION#SDK_INT
Bug: 80445154
Test: make ds-docs
Change-Id: Id8d461c517bd4d8b3c49b61da37ec0a16768a63d
Exempt-From-Owner-Approval: Doc-only change
Previously, this feature flag for Hearing Aid Profile is to disable the
profile on supported phone . This CL will reverse the logic and is
to enable the Hearing Aid profile on unsupported phone. This is to allow
testing of this profile on unsupported phone.
Test: Manual tests on different types of phones
Bug: 116861680
Bug: 116317072
Change-Id: Ic8db4445a58942c5f75598dce0503f6670ff9c7b
Merged-In: Ic8db4445a58942c5f75598dce0503f6670ff9c7b
(cherry picked from commit afa1f9c5c5)
This call can lead directly to Surface destruction, so it's only safe
to execute while the app renderer is paused. If the call is oneway and is
deferred we can end up in a scenario where the call is processed (destroying
the surface) after the client renderer has been unpaused for a different reason.
Bug: 80423392
Bug: 62536731
Test: Manual. go/wm-smoke.
Change-Id: Ic73d55f0783f89eed03806bb3dc3d0309b7bcb90
When using xt_qtaguid to count per uid stats,
NetworkStatsService needs to adjust the 464xlat traffic since
iptables module would double count for ipv4 and ipv6 packet.
But for eBPF, the per uid stats is collected in a different
hook, so the adjustment on root uid would only be needed in tx
direction.
Bug: 112226716
Test: 1. Make ipv4 traffic in ipv6-only network and check data
usage.
2. Make ipv4 traffic in a client which connect to
ipv6-only hotspot.
3. runtest frameworks-net
4. cts-tradefed run cts -m CtsNetTestCases -t \
android.net.cts.TrafficStatsTest
5. cts-tradefed run cts -m CtsUsageStatsTestCases
Change-Id: Ic9a84f5446eddc943c255d5f3b89dad171f53cac
Merged-In: Ic9a84f5446eddc943c255d5f3b89dad171f53cac
(cherry picked from commit c33ac0d43b)
- Make ActivityMetricsLogger the single source of truth for activity metrics and
use it to provide data for Tron, logcat, event logs and {@link android.app.WaitResult}
- Remove LaunchTimeTracker
- Remove workaround added for b/80084651
- Remove thisTime from WaitResult and logs
- Remove am_activity_fully_drawn_time EventLog Tag
- Update WaitResult parsing logic in AppLaunch
- Discard metrics if a launching activity is already visible.
- original bug: 67683350
Compatibility Changes:
- thisTime removed from logcat and eventlog. Only totalTime will be displayed.
- Change in activity visiblity during launch will invalidate totalTime. am start -w
will only report WaitTime in this case.
- am_activity_fully_drawn_time is removed from event log.
Bug: 117235762
Test: atest google/perf/app-startup/third-party-apps/cold-dropcache-stable-test -v
Test: manual tests
Test: check applaunch.txt matches test run
Change-Id: Ib033594b961be9227256eba2a519dd6c2e3db573
(cherry picked from commit 132ee83808)
(cherry picked from commit 017cddcbcb)
(cherry picked from commit f8accc5b30)
(cherry picked from commit af0ea31549)
By requiring an explicit default setting, it eliminates all ambiguous
states where a disambiguation would normally be shown. With this
change in place, at no point should a disambiguation be shown.
(Note: this is a fix to Change-Id: Ib32daf that clarifies
the logic if R.string.config_defaultAssistantComponentName
has not been set in a given build.)
Test: manual
Bug: 111603898
Change-Id: Id39fdf700ed4ef08ebbc333b5452223430ac2e48
Merged-In: Ib32dafbd3c6fcbe11186dc8ecab6b09c9b734067
By requiring an explicit default setting, it eliminates all ambiguous
states where a disambiguation would normally be shown. With this
change in place, at no point should a disambiguation be shown.
Test: manual
Bug: 111603898
Change-Id: Ib32dafbd3c6fcbe11186dc8ecab6b09c9b734067
This covers directories through /app.
removed unused import in KeyguardManager.java
Test: make ds-docs
Bug: 117494359
Change-Id: Ie2536676ae8d3ab9349aa43dc3e3248b618dd143
Exempt-From-Owner-Approval: Docs-only change
Also added callouts for fields that no longer sort results based on
contacts frequency.
Bug: 116422556
Test: make ds-docs -j32
Change-Id: I738e08bd4686e30b875fa37123ecebb4a5e179d3
Merged-In: Iddcd0b41b6ad991423a5ced78522a9ab2ad831a1
Several java files had the typo {#link (for cross-references to other
Javadocs) instead of the proper {@link format. This was confusing the
new doc publish tool (Mivi) since that's the format used for {# Django
comments #}.
Fixed a couple of links that had other errors (which prevented building
once the {# -> {@ was done) and other typos.
Replaced throughout the frameworks/base project; I'll need a separate CL
for the AndroidX fixes.
Staged to:
go/dac-stage/reference/android/app/Instrumentation.html
go/dac-stage/reference/android/bluetooth/BluetoothAdapter.html
go/dac-stage/reference/android/bluetooth/BluetoothDevice.html
go/dac-stage/reference/android/bluetooth/BluetoothServerSocket.html
go/dac-stage/reference/android/inputmethodservice/InputMethodService.html
go/dac-stage/reference/android/view/KeyCharacterMap.html
go/dac-stage/reference/android/view/KeyEvent.html
go/dac-stage/reference/android/media/AudioManager.html
go/dac-stage/reference/android/net/wifi/WifiConfiguration.html
(Other files were not in the public Javadocs.)
Bug: 111925950
Test: make ds-docs
Exempt-From-Owner-Approval: Docs-only change
Change-Id: Ia06e1fffd814671289a1caebd5962aedc18a28d7
Merged-In: Ia06e1fffd814671289a1caebd5962aedc18a28d7
* changes:
Add extra data when starting emergency dialer intent
Add new telecom metrics for emergency dialer
Add new metrics constants for emergency dialer
Separated emergency option final UI
Fix Power menu background vanish
Add separated emergency option on power menu
Add emergency dialer option on power menu
Removes feature flag and enables faster emergency call features by
default.
Test: Manually
Bug: 112168722
Bug: 117128459
Change-Id: I81e64a229598b8c11a721a0dee7033f6ae3e4fdd
fixing order of import statements to clear repo hooks
Test: make ds-docs
Bug: 37126744
Change-Id: I0ebb3d1d2599a411afd9b8ffd6f2497d821deb2b
Exempt-From-Owner-Approval: Docs-only change
also fixing import order to get past repo hooks
Test: make ds-docs
Bug: 37077993
Change-Id: I0a0d6338f714108eb632caacc6dda4b422dc697b
Exempt-From-Owner-Approval: Docs-only change
The path-permission element offers prefix or regex style matching of
paths, but most providers internally use UriMatcher to decide what
to do with an incoming Uri.
This causes trouble because UriMatcher uses Uri.getPathSegments(),
which quietly ignores "empty" paths. Consider this example:
<path-permission android:pathPrefix="/private" ... />
uriMatcher.addURI("com.example", "/private", CODE_PRIVATE);
content://com.example//private
The Uri above will pass the security check, since it's not
technically a prefix match. But the UriMatcher will then match it
as CODE_PRIVATE, since it ignores the "//" zero-length path.
Since we can't safely change the behavior of either path-permission
or UriMatcher, we're left with recovering these shady paths by
trimming away zero-length paths.
Bug: 112555574
Test: atest android.appsecurity.cts.AppSecurityTests
Test: atest FrameworksCoreTests:android.content.ContentProviderTest
Merged-In: Ibadbfa4fc904ec54780c8102958735b03293fb9a
Change-Id: Ibadbfa4fc904ec54780c8102958735b03293fb9a
User can enable/disable faster emergency phone call feature by switching
this flag from Settings, and the old flag switched by adb command was
replaced by this feature flag.
Test: Manually
Bug: 112168722
Bug: 113539598
Change-Id: Ie38f4657bfd76d8386ce2a075f4ec5d0038f5c3d
Merged-In: Ie38f4657bfd76d8386ce2a075f4ec5d0038f5c3d