Commit Graph

81736 Commits

Author SHA1 Message Date
TreeHugger Robot
8bb58a145c Merge "Add internal implementation for notifyPackageUse" into oc-mr1-dev 2017-09-05 16:28:13 +00:00
Abodunrinwa Toki
fadd4288df Delete old TEXT_SELECTION_MENU_ITEM_ASSIST logs.
This field is now being used for new smart selection logging.
See: Icc9d5b542140bdb01b2ad4211048bd83eae2ce83

Bug: 64914512
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsAccessibilityServiceTestCases:android.accessibilityservice.cts.AccessibilityTextTraversalTest
Change-Id: If1ce8ca038b089500cd7adb9a146330abe909407
2017-09-05 14:19:52 +01:00
Abodunrinwa Toki
5ddd3ed855 TextView text selection interaction logging.
TODO: Log typing over selection

Bug: 64914512
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsAccessibilityServiceTestCases:android.accessibilityservice.cts.AccessibilityTextTraversalTest

Merged-In: Icc9d5b542140bdb01b2ad4211048bd83eae2ce83
Change-Id: Icc9d5b542140bdb01b2ad4211048bd83eae2ce83
2017-09-04 20:47:40 +01:00
TreeHugger Robot
9352329ee1 Merge "Fix NPE in ActivityView on surface destruction" into oc-mr1-dev 2017-09-02 00:16:48 +00:00
Andrii Kulian
d93da5c6e2 Fix NPE in ActivityView on surface destruction
Instance variable mSurface in ActivityView was not updated after surface
destroy/create cycle, which lead to NPE when we were trying to release
it again after second destroy callback.

Bug: 63338670
Test: Create app with activityView, cause activity restart.
Change-Id: I96447ebe77d175050565641ba94b748d2b633d99
2017-09-01 21:31:18 +00:00
Fyodor Kupolov
6f8afdc501 Merge "Do not close idle connections by default" into oc-mr1-dev 2017-09-01 17:34:41 +00:00
Lei Yu
67594c6f54 Merge "Hook up AOD knobs to Settings.Global" into oc-mr1-dev 2017-09-01 00:54:01 +00:00
Todd Kennedy
df113c36a7 Add internal implementation for notifyPackageUse
We have checks that prevent applications from modifying the usage
times of instant apps [and vice versa]. However, it's critical for
internal components such as the ActivityManager to be able to upate
this for all packages. Add an internal implementation of this
method that skips the checks.

Change-Id: Ib890296065024104cdaf7c8d64a5a7583d9062c1
Fixes: 65228752
Test: Manual. Run an application installed as an "instant app" and notice the usage time goes up
2017-08-31 16:10:29 -07:00
TreeHugger Robot
b60141b23c Merge "Don't always fallback to clockTick for EFFECT_TICK." into oc-mr1-dev 2017-08-31 21:44:01 +00:00
Tarandeep Singh
01b6ff0178 Merge "Add multi-display support to FloatingToolbar." into oc-mr1-dev 2017-08-31 20:45:48 +00:00
Julian Mancini
30175b958e Remove PDF Thumbnail functionality
Bug: 64225798
Test: Removing Functionality
Change-Id: Id02f1b50d161c6f2779c9f65c579383c18028b65
2017-08-31 14:26:10 -06:00
jackqdyulei
8443dd0e76 Hook up AOD knobs to Settings.Global
This cl creates AlwaysOnDisplayPolicy, which get values for the
following knobs(go/aod-experiments) from Settings.Global:
1. screen_brightness_array
2. dimming_scrim_array
3. prox_screen_off_delay
4. prox_cooldown_trigger
5. prox_cooldown_period

Also update code to make sure AlwaysOnDisplayPolicy is used
everywhere.

Bug: 64899561
Test: runtest -x AlwaysOnDisplayPolicyTest

Change-Id: I2e83ff980771e67177e4964bd83aa68b2bdca65f
2017-08-31 13:20:04 -07:00
TreeHugger Robot
c1235a1ff2 Merge "Do not call setAlwaysButtonEnabled if the activity doesn't support defaults." into oc-mr1-dev 2017-08-31 19:47:42 +00:00
TreeHugger Robot
ac2a765a18 Merge "Fixed FillResponse.toString() to display list of datasets." into oc-mr1-dev 2017-08-31 19:43:01 +00:00
Tarandeep Singh
c9c83a9ccb Add multi-display support to FloatingToolbar.
DecorView has no support for multi-display (bug 65172902).
Until that is done, the easy fix for displaying cut, copy, paste
on non-default display is to modify FloatingToolbar.
FloatingToolbar uses context of Default display. Changed it
to use context of the window (which makes it multi-display
compatible).

Fixes: 64837794
Test: Manual using AAe's KitchenSink test app
bit FrameworksCoreTests:android.widget.TextViewActivityTest
bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I513f1aac1c0d22355c996247e3bf56c6d812348f
2017-08-31 17:51:50 +00:00
Yohei Yukawa
8f272178a0 Fix wrong dump output of *Info#flags
This CL follows up to a previous CL [1] that introduced an ability to
control filtering level of
 - ActivityInfo#dump()
 - ApplicationInfo#dump()
 - ComponentInfo#dump()
 - ProviderInfo#dump()
 - ResolveInfo#dump()
 - ServiceInfo#dump()
but also masked following outputs as an unexpected side effect.
 - ActivityInfo#flags
 - ApplicationInfo#flags
 - ProviderInfo#flags
 - ServiceInfo#flags

With this CL, above *Info#flags are correctly dumped again.

 [1]: I0d01565babb87e68b840c9756a2ea730d699efc7
      6ac42aeed9

Test: Manually tested as follows.
 1. make -j SoftKeyboard
 2. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
 3. adb shell dumpsys input_method
    -> Check 'com.example.android.softkeyboard' section
      -> make sure ServiceInfo#flags=0x0
      -> make sure ApplicationInfo#flags=0x38a8be44
           FLAG_HAS_CODE (1<<2)
           FLAG_ALLOW_CLEAR_USER_DATA (1<<6)
           FLAG_SUPPORTS_SMALL_SCREENS (1<<9)
           FLAG_SUPPORTS_NORMAL_SCREENS (1<<10)
           FLAG_SUPPORTS_LARGE_SCREENS (1<<11)
           FLAG_RESIZEABLE_FOR_SCREENS (1<<12)
           FLAG_SUPPORTS_SCREEN_DENSITIES (1<<13)
           FLAG_ALLOW_BACKUP (1<<15)
           FLAG_SUPPORTS_XLARGE_SCREENS (1<<19)
           FLAG_STOPPED (1<<21)
           FLAG_SUPPORTS_RTL (1<<22)
           FLAG_INSTALLED (1<<23)
           FLAG_FULL_BACKUP_ONLY (1<<26)
           FLAG_EXTRACT_NATIVE_LIBS (1<<28)
           FLAG_HARDWARE_ACCELERATED (1<<29)
Fixes: 65057767
Change-Id: Icd1e18237e873844791ccdea7f424b6fe76137c0
2017-08-31 15:24:48 +00:00
TreeHugger Robot
0899236129 Merge "WebView: fix setSafeBrowsingWhitelist table in docs" into oc-mr1-dev 2017-08-31 02:28:11 +00:00
Fyodor Kupolov
5356729953 Do not close idle connections by default
Otherwise it can cause issues in apps depending on transient state.

Test: manual
Bug: 63398887
Bug: 65220630
Change-Id: I0806693e05e2e61035aee0b108e31f8bcc8b1a0b
2017-08-30 18:16:31 -07:00
TreeHugger Robot
f10b0d000e Merge "Fixes NPE thrown in sort if new targets are added." into oc-mr1-dev 2017-08-31 00:34:57 +00:00
Michael Wright
dc2b3be240 Don't always fallback to clockTick for EFFECT_TICK.
Some things really need to be tuned in order to not annoy users, and
should otherwise be turned off. Let an effect state whether it should
fallback to a generic effect or should just be silent if there's no
hardware specific version of it.

Fixes: 65219268
Test: manual
Change-Id: I38fcbd6d80803cdf8f4ec04e8e1ac363b8d6361b
2017-08-30 16:36:21 -07:00
TreeHugger Robot
dcadf1934a Merge "Add static lock in PowerProfile" into oc-mr1-dev 2017-08-30 23:35:07 +00:00
TreeHugger Robot
16da1f545c Merge "Introduce SmartSelectionEventTracker." into oc-mr1-dev 2017-08-30 22:13:58 +00:00
Kang Li
0935f152c7 Fixes NPE thrown in sort if new targets are added.
Test: manually tested it to verify that it works as expected.

Bug: 65035399
Change-Id: Ie99b05c5324f47cbac66687d7301ef62a7c83e55
2017-08-30 21:32:08 +00:00
Nate Fischer
fbebfa9d53 WebView: fix setSafeBrowsingWhitelist table in docs
No change to logic, only docs changes.

The documentation for setSafeBrowsingWhitelist uses a table to describe
whitelist rules. However, this table was previously formatted
incorrectly (it uses <th> elements for each cell, when normal data cells
should use <td> according to Android API guidelines).

This fixes the table to conform to the guidelines, adjusts white space
for consistency, and removes an unnecessary <p> element.

Bug: 65173825
Test: make docs (and manually verify the table looks correct)
Change-Id: I5d7390a44613aaa3acb147a69f8e0ce741e817ed
2017-08-30 21:03:19 +00:00
Jeff Sharkey
f31cf45e82 Merge "Augment network stats based on SubscriptionPlan." into oc-mr1-dev 2017-08-30 19:01:18 +00:00
TreeHugger Robot
fb8e9b9096 Merge "Add a constant to allow system-provided fingerprint dialogs" into oc-mr1-dev 2017-08-30 17:47:46 +00:00
Jeff Sharkey
f4de294297 Augment network stats based on SubscriptionPlan.
When a carrier provides an "anchor" of data usage at a specific
moment in time, augment the network statistics used by warning/limit
thresholds and Settings UI.  For example, if the OS measured 500MB
of usage, but the carrier says only 400MB has been used, we "squish"
down the OS measured usage to match that anchor.

Callers using the hidden API will have their data augmented by
default, and the public API offers a way to opt-into augmentation.

Thorough testing to verify behavior.

Test: bit FrameworksNetTests:android.net.,com.android.server.net.
Test: cts-tradefed run commandAndExit cts-dev -m CtsUsageStatsTestCases -t android.app.usage.cts.NetworkUsageStatsTest
Bug: 64534190
Change-Id: Id3d4d7625bbf04f57643e51dbf376e3fa0ea8eca
2017-08-30 10:01:10 -06:00
Abodunrinwa Toki
692b196cc1 Introduce SmartSelectionEventTracker.
This will be used for logging text selection interaction.

Bug: 64914512
Test: No test. Everything builds fine.
Change-Id: Idb28864e0fc969be05d81855b2e7cd8389bd835e
2017-08-30 13:38:51 +01:00
TreeHugger Robot
a050d6302f Merge "Note cross-user permission requirement for relevant wallpaper operations" into oc-mr1-dev 2017-08-29 23:47:50 +00:00
jackqdyulei
0e3504c0fa Add static lock in PowerProfile
Before this cl, there exists nullpointer crash in PowerProfile in
following part:

"sPowerMap.containsKey(key) && (Double) sPowerMap.get(key) > 0"

To my best knowledge, it is because in
PowerUsageSummary.SummaryProvider, we may create batterystats in
meantime:
1. setListening is invoked in worker thread, in which we will force
update the batterystats.
2. In setListening we will register receiver, which may update
batterystats through onReceive in UI thread.

This cl adds static lock in PowerProfile, making the init part can
only be accessed by an thread at a time.

Bug: 64209576
Test: Manual
Change-Id: I00bc094f44416669b4f0e11e647b0fae2ff61013
2017-08-29 15:30:42 -07:00
Ruchi Kandoi
65d76c1213 Do not call setAlwaysButtonEnabled if the activity doesn't support defaults.
13405c5529 introduced a bug where
activities using ResolverActivity without dafaults/always option get selected,
the ResolverActivity tries to set a default causing a crash.

Test: Test Application using TECH_DISCOVERED intent filter
Bug: 38358120
Change-Id: Id36635d84963bcf1dc7e55938e2370542ed291ab
2017-08-29 15:19:21 -07:00
TreeHugger Robot
102520f88e Merge "Clear focused-in-cluster on focusability changes" into oc-mr1-dev 2017-08-29 21:01:05 +00:00
Felipe Leme
88cfa80901 Fixed FillResponse.toString() to display list of datasets.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Bug: 63392631

Change-Id: I893f468ee20d069b16f00d38f5fa18ed60826d03
2017-08-29 13:49:50 -07:00
TreeHugger Robot
10477217f5 Merge "Fix ListView can not be moved after rotation." into oc-mr1-dev 2017-08-29 20:09:56 +00:00
TreeHugger Robot
cc4f60fe4b Merge "Add shadow to adaptive icons to the shared sheet Test: manual Bug: 65015602" into oc-mr1-dev 2017-08-29 19:54:26 +00:00
TreeHugger Robot
6a1dad9194 Merge "Fix tooltips for views in a popup window" into oc-mr1-dev 2017-08-29 19:08:30 +00:00
Sudheer Shanka
903dc2fdd2 Merge "KernelUidCpuFreqTimeReader: Put logs under debug flag." into oc-mr1-dev 2017-08-29 17:40:33 +00:00
Jiongxuan Gao
3365b16821 Fix ListView can not be moved after rotation.
Symptom:
"Share with" popup displayed incompletely, and cannot be slid after
rotated the screen twice.

Root cause:
Since ChooserActivity's configChanges attribute contains
"screenSize|orientation" , when user rotates device, Android will
not recreate ChooserActivity, its content view ResolverDrawerLayout
is also not recreated. In ResolverDrawerLayout's onMeasure, it will
call getHeightUsed to calculate the ListView's height. getHeightUsed
will check against the lowest child view plus padding and margin
instead of the actual measured height of the ListView. This lets the
ListView hang off the edge when all of the content would fit on-screen
. Because of ResolverDrawerLayout has not been drawn yet, we can not
get the actual showing items' count of ListView before it's drawn, the
result of getChildCount for ListView will return the value in landscape
mode. The heightUsed of ListView might be smaller. mCollapsibleHeight
will be 0. When received a move action, the mCollapseOffset and new
position might both be 0.

Solution:
When configuration changed, we should rebuild the list and refresh
adapter's data set. Just like onRestart does.

Bug: 34365764

Change-Id: I4be0f9afc68588fbb0d8d152c41509650d04c754
2017-08-29 10:26:39 -07:00
Jakub Pawlowski
f507490404 Fix GATT client leakage when scan is throttled (1/2)
Currently, scan throttling happens after client is registered, but
before the scan is started. This might lead to scan client being leaked.
This patch fixed that by moving check before client registration.

Bug: 64887233
Test: manual
Change-Id: I22ae624a0c51110cb69679f796926e3b2b36d0ac
Merged-In: I22ae624a0c51110cb69679f796926e3b2b36d0ac
(cherry picked from commit ee02e1ce77)
2017-08-29 17:26:23 +00:00
Sudheer Shanka
6b1396e8fe KernelUidCpuFreqTimeReader: Put logs under debug flag.
Bug: 63041570
Test: N/A
Change-Id: Ifdeacb227bb936de82af9c9505621b327de3a9d2
2017-08-28 23:06:38 -07:00
TreeHugger Robot
55309e79cf Merge "Hides the Save UI while handling a pending intent from CustomDescription." into oc-mr1-dev 2017-08-29 03:13:57 +00:00
Felipe Leme
c24a56ae06 Hides the Save UI while handling a pending intent from CustomDescription.
When the AutofillService sets a PendingIntent to launch an activity when
clicking a chield view (for example, to lauch a web page displayign the terms
and conditions of saving something), the system must hide the Save UI and
restore it after the new activity is dismissed.

That sounds simple in the surface, but it requires a huge refactoring behind
the scenes, such as injecting a token in the activity intent and using that
token to hide / cancel the UI during some activity lifecycle events.

Test: lotta of brand-new shinning tests on CtsAutoFillServiceTestCases
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Change-Id: Ie8ec7aeb2c63cab68467046c1a9dcf85dbcc24ec
Fixes: 64309238
2017-08-28 18:04:15 -07:00
Svetoslav Ganov
25e5a3446e Merge "Grant location to default launcher" into oc-mr1-dev 2017-08-29 00:47:25 +00:00
Svet Ganov
5bb6bc6e52 Grant location to default launcher
Test: updated DefaultPermissionGrantPolicy test which passes

bug:62959599

Change-Id: Ifaac04758348049dd170a7e7b7ac234dced5f759
2017-08-28 15:12:05 -07:00
Christopher Tate
11620edf31 Note cross-user permission requirement for relevant wallpaper operations
Documentary change only.

Bug: 62343054
Test: N/A
Change-Id: Ibf6617b2c25306852478089b60a019479f8d2bcd
2017-08-28 14:19:32 -07:00
Nate Fischer
c233f44a26 Merge "WebView: require APKs to target OMR1" into oc-mr1-dev 2017-08-28 19:36:29 +00:00
Hyunyoung Song
dadb9e1728 Add shadow to adaptive icons to the shared sheet
Test: manual
Bug: 65015602

Change-Id: I01de79edc0a13817680106b1ef46e3212487b62f
2017-08-28 12:22:42 -07:00
Nate Fischer
220d86d142 WebView: require APKs to target OMR1
This disallows WebView/Monochrome APKs targeting O or below to be chosen
as WebView providers.

Bug: 65080651
Test: Open WebView shell with webview from system image, no crash
Test: Install Monochrome compiled for O, it's not in the webview provider list
Change-Id: I79162cedaa801ce227ad4c2eb3cbea9c08704da8
2017-08-28 12:15:56 -07:00
Fyodor Kupolov
30c565d399 Merge "Added tron metrics for shutdown time" into oc-mr1-dev 2017-08-28 18:41:52 +00:00
TreeHugger Robot
3ea1e3d57d Merge "Add API to disallow entering PiP when launching a new activity" into oc-mr1-dev 2017-08-26 06:22:34 +00:00