Commit Graph

90492 Commits

Author SHA1 Message Date
TreeHugger Robot
d14c8a2a72 Merge "RESTRICT AUTOMERGE Close TextClassifier native resources." into pi-dev 2019-02-14 16:22:18 +00:00
Ng Zhi An
8094880025 Do not load xml metadata for unchanged packages in RegisteredServicesCache
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
2019-02-11 17:03:02 +00:00
Abodunrinwa Toki
ec1b164923 RESTRICT AUTOMERGE Close TextClassifier native resources.
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
2019-02-08 13:05:38 +00:00
TreeHugger Robot
a3a280e4d8 Merge "Add closing div tag for ContentResolver javadoc" into pi-dev 2019-02-04 19:38:42 +00:00
Ng Zhi An
3ca513070b Add closing div tag for ContentResolver javadoc
Bug: 123290414
Test: m docs and manually verify
Change-Id: Ibb159678c9e3538b186fe936ab2369b6fe6fb51d
2019-01-24 21:39:24 -08:00
Vishnu Nair
47d2d1e46a [DO NOT MERGE] ViewRoot: Notify app when surface is released from setWindowStopped
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)
2019-01-24 15:55:18 -08:00
Nate Fischer
9f726cd280 WebView: clean up onReceivedSslError docs
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
2019-01-18 13:00:33 -08:00
TreeHugger Robot
3f3c8f812e Merge "Nullify the default wallpaper component if it does not exist" into pi-dev 2019-01-11 03:36:19 +00:00
Abodunrinwa Toki
a69950ce18 RESTRICT AUTOMERGE Do not linkify text with RLO/LRO characters.
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
2019-01-03 14:20:30 +00:00
Nate Fischer
e0938b86ae WebView: no bars in javadoc
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
2018-12-26 15:36:35 -08:00
SzuWei Lin
32a7e2f357 Nullify the default wallpaper component if it does not exist
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)
2018-12-21 07:59:57 +00:00
TreeHugger Robot
dfcbdef8ab Merge "Clarify WebResourceResponse parameter documentation." into pi-dev 2018-12-17 17:21:38 +00:00
Torne (Richard Coles)
c848639f08 Clarify WebResourceResponse parameter documentation.
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
2018-12-14 13:00:54 -05:00
Andrew Solovay
6eaf48ea57 docs: Fixing malformed javadoc
Several @link & @see javadoc directives were malformed, resulting in the
Javadoc code being output to the HTML.

Staged to:

http://go/dac-stage/reference/android/app/slice/Slice.Builder
http://go/dac-stage/reference/android/app/slice/SliceProvider
http://go/dac-stage/reference/android/text/style/ImageSpan
http://go/dac-stage/reference/android/content/ContentProvider

Bug: 120743732
Test: make ds-docs
Change-Id: I589644f8d266a116441409fbdaf7a0c533e0e356
Merged-In: I589644f8d266a116441409fbdaf7a0c533e0e356
Exempt-From-Owner-Approval: Doc-only change
2018-12-14 00:11:19 +00:00
Andrew Solovay
8a788f4094 docs: Fixing malformed @links
Several @link javadoc directives were malformed, resulting in the
Javadoc code being output to the HTML.

Staged to:

http://go/dac-stage/reference/android/app/Activity
http://go/dac-stage/reference/android/app/RemoteInput
http://go/dac-stage/android/os/UserManager

Bug: 120743732
Test: make ds-docs
Change-Id: I2c00c7e1e3adcff696e6d000206aeeaea61e7ecd
Exempt-From-Owner-Approval: Doc-only change
2018-12-12 16:36:14 -08:00
Jakub Pawlowski
63519217e8 Bluetooth: Check descriptors size in BluetoothHidDeviceAppSdpSettings
Bug: 119819889
Test: compilation
Change-Id: If51d0e2af74d99758f79a603d40cc2f5c84e4dde
2018-11-29 20:44:18 +01:00
Andrew Solovay
6fe332c07e docs: Removing @see link to hidden field
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
2018-11-19 23:02:47 +00:00
Lorenzo Colitti
664145dcbc Merge changes from topic "sort stats" into pi-dev
* changes:
  Change types of fields of network stats reported to framework.
  Fix negative uid stats caused by 464xlat adjust when eBPF is on.
2018-11-16 13:29:38 +00:00
TreeHugger Robot
b71d950932 Merge "DO NOT MERGE Make stop complete notification call in to ActivityManager blocking." into pi-dev 2018-11-09 20:45:57 +00:00
TreeHugger Robot
c73a034e8c Merge "Change the feature flag for Hearing Aid behavior" into pi-dev 2018-11-09 00:24:27 +00:00
Stanley Tng
b35499b873 Change the feature flag for Hearing Aid behavior
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)
2018-11-08 23:47:31 +00:00
Robert Carr
f30f59ad86 DO NOT MERGE Make stop complete notification call in to ActivityManager blocking.
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
2018-11-07 23:41:31 +00:00
junyulai
eda8aa1f46 Fix negative uid stats caused by 464xlat adjust when eBPF is on.
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)
2018-11-07 10:16:26 +08:00
Vishnu Nair
cf23504955 [DO NOT MERGE] AM: Use ActivityMetricsLogger to get app launch times
- 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)
2018-11-02 13:27:00 -07:00
TreeHugger Robot
022cf30d17 Merge "Be the current user to get A2DP proxy" into pi-dev 2018-10-30 22:22:14 +00:00
Tim Murray
59f3dc1995 ActivityThread: purge jemalloc at appropriate times
Don't let jemalloc sit around with unused pages.

Test: boots, works
bug 117795621

Change-Id: I1fc3fcf5aa2798c67ea8cada6eeec852b2bebee7
2018-10-26 21:37:50 +00:00
Dan Sandler
ad1908c428 Add configurable default setting for assistant componentname
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
2018-10-19 18:12:40 -04:00
Steve Elliott
730d1d5cd3 DO NOT MERGE: Add configurable default setting for assistant componentname
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
2018-10-17 17:46:28 +00:00
TreeHugger Robot
7402d7611c Merge "Recover shady content:// paths." into pi-dev 2018-10-12 03:59:38 +00:00
kopriva
219f7dcb66 docs: fixing errors found with lint checker
through /bluetooth directory

amending through /content directory

Test: make ds-docs

Bug: 117494359

Change-Id: I751e15d60f0b9cc441998b27560050bf62994fef
Exempt-From-Owner-Approval: Docs-only change
2018-10-09 16:01:04 -07:00
TreeHugger Robot
8c7d2142f6 Merge "docs: fixing errors found with lint check" into pi-dev 2018-10-09 20:04:29 +00:00
kopriva
a1a7848f83 docs: fixing errors found with lint check
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
2018-10-09 10:27:35 -07:00
TreeHugger Robot
415e35525f Merge "docs: bug 37128155, broken link" into pi-dev 2018-10-09 05:47:20 +00:00
kopriva
82c591b78b docs: fixing 'mange' instead of 'manage'
Test: make ds-docs

Bug: 117449040

Change-Id: I282a2e960bbf722bf3a72dd932e3bf685abb74e5
Exempt-From-Owner-Approval: Docs-only change
2018-10-08 15:57:00 -07:00
Kevin Hufnagle
568b5df03c Merge "docs: Added callouts related to obsolete contacts data fields." into pi-dev 2018-10-08 20:20:18 +00:00
Kevin Hufnagle
18b799e475 docs: Added callouts related to obsolete contacts data fields.
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
2018-10-08 09:40:51 -07:00
Leo Hsu
77c2e6736a Merge changes from topics "remove_feature_flag_emergency", "faster_emergency_feature_flag" into pi-dev
* changes:
  RESTRICT AUTOMERGE: Removes feature flag for faster emergency call.
  Add new metrics in power menu
  Add feature flag in Settings.
2018-10-05 01:06:42 +00:00
kopriva
ee2eda11e6 docs: bug 37128155, broken link
Test: make ds-docs

Bug: 37128155

Change-Id: I39e432b6000b9c32ef62bc10f2d8ad343b9305f9
Exempt-From-Owner-Approval: Docs-only change
2018-10-04 14:47:12 -07:00
Andrew Solovay
a3e34fe9fe Merge "docs: Replacing {#link with {@link" into pi-dev 2018-10-04 20:06:59 +00:00
Andrew Solovay
a44f2c075b docs: Replacing {#link with {@link
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
2018-10-04 18:20:51 +00:00
Leo Hsu
42bae1bf5d Merge changes from topics "emergency-dialer-metrics", "telecom-metrics-for-emergency-dialer", "add_faster_emergency_dialer_flag" into pi-dev
* 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
2018-10-04 04:32:35 +00:00
Leo Hsu
82e5908df0 RESTRICT AUTOMERGE: Removes feature flag for faster emergency call.
Removes feature flag and enables faster emergency call features by
default.

Test: Manually

Bug: 112168722
Bug: 117128459
Change-Id: I81e64a229598b8c11a721a0dee7033f6ae3e4fdd
2018-10-04 01:02:12 +00:00
TreeHugger Robot
58c7bcf12e Merge "docs: bug 37126744, typos" into pi-dev 2018-10-04 00:51:46 +00:00
TreeHugger Robot
7640a41654 Merge "docs: fixing several typos, bug 36941887" into pi-dev 2018-10-03 23:34:29 +00:00
kopriva
762a08fe90 docs: bug 37126744, typos
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
2018-10-03 16:13:19 -07:00
kopriva
2cb96ab8a1 docs: bug 37077993, object instead of array
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
2018-10-03 14:14:13 -07:00
kopriva
c5fea19846 docs: fixing several typos, bug 36941887
Test: make ds-docs

Bug: 36941887

Change-Id: Id65c5a6b1cbb214ea46b13a6a68d667c819a2f60
Exempt-From-Owner-Approval: Docs-only change
2018-10-03 13:29:15 -07:00
Jeff Sharkey
c084ddbf82 Recover shady content:// paths.
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
2018-10-03 14:26:17 -06:00
Phil Weaver
3fbe56647c Merge "Fix a11y cache correctness bug" into pi-dev 2018-10-03 18:23:47 +00:00
yuanjiahsu
a80fbaa9f0 Add feature flag in Settings.
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
2018-10-03 11:14:09 +08:00