OSDN Git Service

android-x86/frameworks-base.git
6 years agoMerge "Fix privacy tags based on go/irpf." into pi-dev
TreeHugger Robot [Tue, 27 Mar 2018 05:35:25 +0000 (05:35 +0000)]
Merge "Fix privacy tags based on go/irpf." into pi-dev

6 years agoMerge "Ignore mkdirs requests while storage is locked." into pi-dev
TreeHugger Robot [Tue, 27 Mar 2018 05:18:47 +0000 (05:18 +0000)]
Merge "Ignore mkdirs requests while storage is locked." into pi-dev

6 years agoMerge "Integrate autofill session lifecycle with URL bar changes when on compat mode...
TreeHugger Robot [Tue, 27 Mar 2018 05:15:20 +0000 (05:15 +0000)]
Merge "Integrate autofill session lifecycle with URL bar changes when on compat mode." into pi-dev

6 years agoMerge "Don't allow acccess to uninstalled system providers" into pi-dev
TreeHugger Robot [Tue, 27 Mar 2018 03:16:25 +0000 (03:16 +0000)]
Merge "Don't allow acccess to uninstalled system providers" into pi-dev

6 years agoMerge "Give DPM callers unsafe labels." into pi-dev
TreeHugger Robot [Tue, 27 Mar 2018 03:06:37 +0000 (03:06 +0000)]
Merge "Give DPM callers unsafe labels." into pi-dev

6 years agoMerge "API council requested tweaks to TrafficStats." into pi-dev
TreeHugger Robot [Tue, 27 Mar 2018 02:56:24 +0000 (02:56 +0000)]
Merge "API council requested tweaks to TrafficStats." into pi-dev

6 years agoMerge "Report final progress when finished copying." into pi-dev
TreeHugger Robot [Tue, 27 Mar 2018 02:52:26 +0000 (02:52 +0000)]
Merge "Report final progress when finished copying." into pi-dev

6 years agoMerge "Revert "Add additional context to MtpDatabase"" into pi-dev
Jerry Zhang [Tue, 27 Mar 2018 02:49:30 +0000 (02:49 +0000)]
Merge "Revert "Add additional context to MtpDatabase"" into pi-dev

6 years agoMerge "Write descriptors for Mtp in UsbService" into pi-dev
Jerry Zhang [Tue, 27 Mar 2018 02:49:02 +0000 (02:49 +0000)]
Merge "Write descriptors for Mtp in UsbService" into pi-dev

6 years agoMerge "Fix NPE when UID doesn't exist." into pi-dev
TreeHugger Robot [Tue, 27 Mar 2018 02:44:02 +0000 (02:44 +0000)]
Merge "Fix NPE when UID doesn't exist." into pi-dev

6 years agoMerge "API council requested tweaks to SystemClock." into pi-dev
TreeHugger Robot [Tue, 27 Mar 2018 02:40:24 +0000 (02:40 +0000)]
Merge "API council requested tweaks to SystemClock." into pi-dev

6 years agoMerge "Fix issue where bouncer would go away" into pi-dev
TreeHugger Robot [Tue, 27 Mar 2018 02:37:35 +0000 (02:37 +0000)]
Merge "Fix issue where bouncer would go away" into pi-dev

6 years agoMerge "Add metrics for new settings conditional cards." into pi-dev
TreeHugger Robot [Tue, 27 Mar 2018 02:36:14 +0000 (02:36 +0000)]
Merge "Add metrics for new settings conditional cards." into pi-dev

6 years agoMerge "API council requested tweaks to DataUnit." into pi-dev
TreeHugger Robot [Tue, 27 Mar 2018 02:30:25 +0000 (02:30 +0000)]
Merge "API council requested tweaks to DataUnit." into pi-dev

6 years agoMerge "Hide Media*2 APIs" into pi-dev
Christofer Ã…kersten [Tue, 27 Mar 2018 01:46:42 +0000 (01:46 +0000)]
Merge "Hide Media*2 APIs" into pi-dev

6 years agoMerge "Move FIRST_SDK_INT to @TestApi." into pi-dev
TreeHugger Robot [Tue, 27 Mar 2018 01:40:23 +0000 (01:40 +0000)]
Merge "Move FIRST_SDK_INT to @TestApi." into pi-dev

6 years agoDon't allow acccess to uninstalled system providers
Svet Ganov [Sat, 24 Mar 2018 08:05:33 +0000 (01:05 -0700)]
Don't allow acccess to uninstalled system providers

If system providers are not installed yet we aggressively crash to avoid
creating multiple instance of these providers and then bad things happen!

Test: manual

Bug: 72457712

Change-Id: I5d7da8c05c08f719a8996b48bffa2317193c1275

6 years agoGive DPM callers unsafe labels.
Jeff Sharkey [Tue, 27 Mar 2018 01:19:23 +0000 (19:19 -0600)]
Give DPM callers unsafe labels.

Tests want the full label, so give it to them.

Test: none
Bug: 74254785
Change-Id: Ia358ee54396ee0a0684fd352c7133f54d9f8c4a7

6 years agoMerge "Fix flickering when switching display power modes" into pi-dev
Lucas Dupin [Tue, 27 Mar 2018 00:48:17 +0000 (00:48 +0000)]
Merge "Fix flickering when switching display power modes" into pi-dev

6 years agoMerge "Fixes the inability to start quickscrub because hit target is none" into pi-dev
TreeHugger Robot [Tue, 27 Mar 2018 00:43:55 +0000 (00:43 +0000)]
Merge "Fixes the inability to start quickscrub because hit target is none" into pi-dev

6 years agoMerge "Stop using DynamicLayout in case of non selectable PrecomputedText" into pi-dev
TreeHugger Robot [Tue, 27 Mar 2018 00:10:11 +0000 (00:10 +0000)]
Merge "Stop using DynamicLayout in case of non selectable PrecomputedText" into pi-dev

6 years agoMerge "Add linter for strings.xml." into pi-dev
Jeff Sharkey [Mon, 26 Mar 2018 23:57:34 +0000 (23:57 +0000)]
Merge "Add linter for strings.xml." into pi-dev

6 years agoMerge "Add the AVRCP Target Service (2/2)" into pi-dev
TreeHugger Robot [Mon, 26 Mar 2018 23:54:39 +0000 (23:54 +0000)]
Merge "Add the AVRCP Target Service (2/2)" into pi-dev

6 years agoAdd metrics for new settings conditional cards.
Fan Zhang [Mon, 26 Mar 2018 23:52:53 +0000 (16:52 -0700)]
Add metrics for new settings conditional cards.

Bug: 76022431
Test: rebuild
Change-Id: I12541a43d742c17e22db701050bb7b72bd423522

6 years agoMerge "Fix issue with multiple recent tasks showing after restarting the device"...
Winson Chung [Mon, 26 Mar 2018 23:45:22 +0000 (23:45 +0000)]
Merge "Fix issue with multiple recent tasks showing after restarting the device" into pi-dev

6 years agoMerge "throw runtimeException for applicable TM APIs" into pi-dev
Chen Xu [Mon, 26 Mar 2018 23:39:56 +0000 (23:39 +0000)]
Merge "throw runtimeException for applicable TM APIs" into pi-dev

6 years agoMerge "Run instant app pruning in background thread" into pi-dev
TreeHugger Robot [Mon, 26 Mar 2018 23:34:50 +0000 (23:34 +0000)]
Merge "Run instant app pruning in background thread" into pi-dev

6 years agoMerge "Up the dimension key limit for CpuTimePerUidFreq" into pi-dev
TreeHugger Robot [Mon, 26 Mar 2018 23:28:30 +0000 (23:28 +0000)]
Merge "Up the dimension key limit for CpuTimePerUidFreq" into pi-dev

6 years agoMerge "Fix random SmartLinkify-related TextView bugs." into pi-dev
TreeHugger Robot [Mon, 26 Mar 2018 23:21:37 +0000 (23:21 +0000)]
Merge "Fix random SmartLinkify-related TextView bugs." into pi-dev

6 years agoMerge "Fixes drawing quickscrub track in correct location with cutout" into pi-dev
TreeHugger Robot [Mon, 26 Mar 2018 23:17:25 +0000 (23:17 +0000)]
Merge "Fixes drawing quickscrub track in correct location with cutout" into pi-dev

6 years agoAdd the AVRCP Target Service (2/2)
Ajay Panicker [Fri, 16 Mar 2018 11:00:27 +0000 (04:00 -0700)]
Add the AVRCP Target Service (2/2)

Add the AVRCP Target constant to Bluetooth Profile. Also remove redundant
public static final modifier on the constants.

Bug: 68854188
Test: Compiles and local test with service enabled
Change-Id: If2ec607fc704c225f8903d438fe970dfafac25f1
(cherry picked from commit 38c3073ba2532db7b5adf5f7f96cef847771c41b)
Merged-In: If2ec607fc704c225f8903d438fe970dfafac25f1

6 years agoMerge "Use Builder instead for KeyChainProtectionParams." into pi-dev
Dmitry Dementyev [Mon, 26 Mar 2018 23:07:23 +0000 (23:07 +0000)]
Merge "Use Builder instead for KeyChainProtectionParams." into pi-dev

6 years agoReport final progress when finished copying.
Jeff Sharkey [Mon, 26 Mar 2018 22:54:36 +0000 (16:54 -0600)]
Report final progress when finished copying.

Test: none
Bug: 74120182
Change-Id: I984d38505545b5f18dd3dd9a3c6f714a9ea86edd

6 years agoFix NPE when UID doesn't exist.
Jeff Sharkey [Mon, 26 Mar 2018 22:50:59 +0000 (16:50 -0600)]
Fix NPE when UID doesn't exist.

This can happen when the usage was performed by a synthetic UID,
such as TrafficStats.UID_TETHERING or UID_REMOVED.

Test: none
Bug: 74195808
Change-Id: I2859a8f5f4a1611c48bb56386ad4b2335a87f611

6 years agoMerge "Disallow copy & paste from personal to profile under policy" into pi-dev
TreeHugger Robot [Mon, 26 Mar 2018 22:47:45 +0000 (22:47 +0000)]
Merge "Disallow copy & paste from personal to profile under policy" into pi-dev

6 years agoMerge changes I72688f65,I2dd8d439 into pi-dev
TreeHugger Robot [Mon, 26 Mar 2018 22:45:28 +0000 (22:45 +0000)]
Merge changes I72688f65,I2dd8d439 into pi-dev

* changes:
  UsbHostManager: Restore inserted device logging
  UsbDescriptorParser: always parse in constructor

6 years agoMerge "Fix uidmap in statsd." into pi-dev
TreeHugger Robot [Mon, 26 Mar 2018 22:38:25 +0000 (22:38 +0000)]
Merge "Fix uidmap in statsd." into pi-dev

6 years agoMerge "Make PackageManager#getNamesForUids testable." into pi-dev
TreeHugger Robot [Mon, 26 Mar 2018 22:36:45 +0000 (22:36 +0000)]
Merge "Make PackageManager#getNamesForUids testable." into pi-dev

6 years agoMerge "Fix string description" into pi-dev
TreeHugger Robot [Mon, 26 Mar 2018 22:24:26 +0000 (22:24 +0000)]
Merge "Fix string description" into pi-dev

6 years agoIgnore mkdirs requests while storage is locked.
Jeff Sharkey [Mon, 26 Mar 2018 21:56:50 +0000 (15:56 -0600)]
Ignore mkdirs requests while storage is locked.

Test: none
Bug: 76222913
Change-Id: Ia62479a7d3cfc0b308d1e2b19a775286d512fecf

6 years agoMerge "Security fixup for Slices" into pi-dev
Jason Monk [Mon, 26 Mar 2018 21:44:38 +0000 (21:44 +0000)]
Merge "Security fixup for Slices" into pi-dev

6 years agoMerge "Sticky battery saver" into pi-dev
TreeHugger Robot [Mon, 26 Mar 2018 21:41:09 +0000 (21:41 +0000)]
Merge "Sticky battery saver" into pi-dev

6 years agoAPI council requested tweaks to SystemClock.
Jeff Sharkey [Mon, 26 Mar 2018 21:26:00 +0000 (15:26 -0600)]
API council requested tweaks to SystemClock.

Test: none
Bug: 73952114
Change-Id: Idd7aae5161a2326920860a6a9c7137369a4d8b3d

6 years agoFixes drawing quickscrub track in correct location with cutout
Matthew Ng [Thu, 22 Mar 2018 18:33:16 +0000 (11:33 -0700)]
Fixes drawing quickscrub track in correct location with cutout

Cutout changes navigation bar padding, correct track rect with the
padding.

Test: do quickscrub
Change-Id: I762be276cc95af7290219cec1cc6afd27ddc8fd0
Fixes: 74904602

6 years agoStop using DynamicLayout in case of non selectable PrecomputedText
Seigo Nonaka [Fri, 23 Mar 2018 22:41:52 +0000 (15:41 -0700)]
Stop using DynamicLayout in case of non selectable PrecomputedText

DynamicLayout is required when
- The text is Editable.
- The selection is enabled on TextView.

This CL stops using DynamicLayout when the TextView is not selectable
TextView and the input text is PrecomputedText.

Bug: 72998298
Test: atest CtsWidgetTestCases:EditTextTest
    CtsWidgetTestCases:TextViewFadingEdgeTest
    FrameworksCoreTests:TextViewFallbackLineSpacingTest
    FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
    CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
    CtsTextTestCases FrameworksCoreTests:android.text
    CtsWidgetTestCases:TextViewPrecomputedTextTest

Change-Id: Ic4a66ad3ed8868570735e3199879b74132a8c4aa

6 years agoMerge "Modify LocationAccessPolicy to use LocationManager" into pi-dev
Hall Liu [Mon, 26 Mar 2018 20:59:58 +0000 (20:59 +0000)]
Merge "Modify LocationAccessPolicy to use LocationManager" into pi-dev

6 years agoUsbHostManager: Restore inserted device logging
Andrew Chant [Fri, 2 Mar 2018 21:45:09 +0000 (13:45 -0800)]
UsbHostManager: Restore inserted device logging

Restore logcat logging of newly-added USB devices.
Eliminate blacklist log lines.

Test: Connected USB Storage and USB audio devices.
Updated UsbDescriptorParserTests for device descriptor
version.

example output:
UsbHostManager: USB device attached: vidpid 03eb:2433 mfg/product/ver/serial Libratone/Libratone_INEAR/1.00/Inear_mcu_app_0.2.1_20160304 hasAudio/HID/Storage: true/true/false
UsbHostManager: USB device attached: vidpid 05dc:a82b mfg/product/ver/serial Lexar/ARA Storage /2.08/0024070163400215 hasAudio/HID/Storage: false/false/true
UsbHostManager: USB device attached: vidpid 18d1:5029 mfg/product/ver/serial Google/USB-C to 3.5mm-Headphone Adapter/22.80/201405280001 hasAudio/HID/Storage: false/true/false
UsbHostManager: USB device attached: vidpid 18d1:5025 mfg/product/ver/serial Google/USB-C to 3.5mm-Headphone Adapter/22.80/201405280001 hasAudio/HID/Storage: true/true/false

Bug: 74119682
Change-Id: I72688f651c819d4bdc48f6d6316570ca5fc54d1e

6 years agoUsbDescriptorParser: always parse in constructor
Andrew Chant [Fri, 2 Mar 2018 21:18:18 +0000 (13:18 -0800)]
UsbDescriptorParser: always parse in constructor

UsbDescriptorParser::parseDescriptors always returned true.
Remove the return value, and remove the one constructor that
doesn't parse descriptors so the device is always in a parsed state.

Bug: 74119682
Test: Built
Change-Id: I2dd8d439405867d78102a9591dd1db36fe3959dc

6 years agoFix issue where bouncer would go away
Lucas Dupin [Sat, 24 Mar 2018 00:26:06 +0000 (17:26 -0700)]
Fix issue where bouncer would go away

Activities with the flag FLAG_DISMISS_KEYGUARD_ACTIVITY will try to
dismiss the keyguard. In this case we should show the occluded bouncer.

Ideally we should not show the lock screen, but at this point,
ActivityManager still doesn't know if the keyguard should be dismissed
or not.

Test: manual, edit emergency information on EmercencyDialer
Test: runtest -x cts/tests/framework/base/activitymanager/src/android/server/am/ActivityManagerDisplayLockedKeyguardTests.java
Test: atest packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java
Test: atest packages/SystemUI/tests/src/com/android/keyguard/KeyguardHostViewTest.java
Change-Id: I65b40ae47319c522c13ed3dc9420bc15cb472430
Fixes: 74726131
Fixes: 74779270

6 years agoFix flickering when switching display power modes
Lucas Dupin [Mon, 26 Mar 2018 20:32:16 +0000 (13:32 -0700)]
Fix flickering when switching display power modes

So far we've been Waiting for the next frame but it doesn't
mean that it will be visible on the screen.

We're usually rendering with 2 buffers and it's possible that
we'll switch the display power mode before anything has hit
the display.

Increased the timeout for now until we have a better alternative.

Change-Id: I63afc8a9139a4ccbba4f16f5569717e22217da9a
Fixes: 72527083
Test: manual
Test: packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java

6 years agoRun instant app pruning in background thread
Philip P. Moltmann [Mon, 26 Mar 2018 20:26:05 +0000 (13:26 -0700)]
Run instant app pruning in background thread

Test: Installed realtor instant app and waited for pruning to remove it
Change-Id: I72e68930cd5d59ff2ca0943fb1670c409c51e617
Fixes: 76098629

6 years agoMerge "Remove incorrect @NonNull annotations on getDrawable() and variants." into...
Chris Craik [Mon, 26 Mar 2018 20:21:04 +0000 (20:21 +0000)]
Merge "Remove incorrect @NonNull annotations on getDrawable() and variants." into pi-dev

6 years agoMerge "Add missing null check" into pi-dev
Svetoslav Ganov [Mon, 26 Mar 2018 20:18:45 +0000 (20:18 +0000)]
Merge "Add missing null check" into pi-dev

6 years agoMerge "Refactoring GlobalSettingsProto to avoid method limit." into pi-dev
TreeHugger Robot [Mon, 26 Mar 2018 20:11:09 +0000 (20:11 +0000)]
Merge "Refactoring GlobalSettingsProto to avoid method limit." into pi-dev

6 years agoAPI council requested tweaks to DataUnit.
Jeff Sharkey [Mon, 26 Mar 2018 19:35:50 +0000 (13:35 -0600)]
API council requested tweaks to DataUnit.

Test: none
Bug: 71584606
Change-Id: Ic516dd7645e150586d7dd2e389e7663a32924ecc

6 years agoMerge "Fix setServerParams to not always set snapshot pending" into pi-dev
Robert Berry [Mon, 26 Mar 2018 19:18:52 +0000 (19:18 +0000)]
Merge "Fix setServerParams to not always set snapshot pending" into pi-dev

6 years agoMerge "Translating the icon in the shelf with the notification" into pi-dev
TreeHugger Robot [Mon, 26 Mar 2018 19:14:36 +0000 (19:14 +0000)]
Merge "Translating the icon in the shelf with the notification" into pi-dev

6 years agoAPI council requested tweaks to TrafficStats.
Jeff Sharkey [Mon, 26 Mar 2018 19:11:33 +0000 (13:11 -0600)]
API council requested tweaks to TrafficStats.

Test: atest android.appsecurity.cts.AppSecurityTests#testAppFailAccessPrivateData
Bug: 71584606
Change-Id: I4be8a47d54a04f17cbaac735d543ff7d6370376d

6 years agoUse Builder instead for KeyChainProtectionParams.
Dmitry Dementyev [Mon, 26 Mar 2018 18:31:46 +0000 (11:31 -0700)]
Use Builder instead for KeyChainProtectionParams.

Use Builder to create KeyChainSnapshot it tests.
Bug: 75952916
Test: apct
Change-Id: I5ab8c864a7ccc55dafa40867ec4364a705738d86

6 years agoIntegrate autofill session lifecycle with URL bar changes when on compat mode.
Felipe Leme [Fri, 23 Mar 2018 20:54:22 +0000 (13:54 -0700)]
Integrate autofill session lifecycle with URL bar changes when on compat mode.

The contents of a browser URL bar is typically changed for 2 reasons:

1.User entered a new URL.
2.Form was submitted and the URL changed.

On scenario #1, the current session should be canceled, while on #2 it should be
committed. Scenario #2 is already handled when the service sets a SaveInfo, so
this CL handles the other cases:

1.Focus on URL bar is ignored so it does not trigger a new partition.
2.If URL bar changed and service didn't set a SaveInfo, the session is canceled.

Fixes: 76027553

Test: manual test with Chrome
Test: new tests on VirtualContainerActivityCompatModeTest:
      testFocusOnUrlBarIsIgnored()
      testUrlBarChangeIgnoredWhenServiceCanSave()
      testUrlBarChangeCancelsSessionWhenServiceCannotSave
      testUrlBarChangeCancelsSessionWhenServiceReturnsNullResponse
Test: atest CtsAutoFillServiceTestCases

Change-Id: I19d2aa4c8b25def0d5eca1c59cfdc2ffe33dd388

6 years agoMove FIRST_SDK_INT to @TestApi.
Jeff Sharkey [Mon, 26 Mar 2018 18:50:54 +0000 (12:50 -0600)]
Move FIRST_SDK_INT to @TestApi.

Test: atest android.os.cts.BuildTest
Bug: 71555186
Change-Id: I92732b930834d9c1e4150417bb3ee8b6839e2b3e

6 years agoFixes the inability to start quickscrub because hit target is none
Matthew Ng [Thu, 22 Mar 2018 23:06:09 +0000 (16:06 -0700)]
Fixes the inability to start quickscrub because hit target is none

This can be caused by going home and quick scrubbing. onLayout in
NavigationBarView will record the incorrect location of the home button
if the home button has been dragged. The location is used to determined
which button was touched. Fixed by only recording the location if the
button has not moved.

Test: manual - press home, quickly scrub far and try scrub again
Change-Id: I24f1ac44531a030fdd4ba23410d803908462d564
Fixes: 75975208

6 years agoUp the dimension key limit for CpuTimePerUidFreq
Chenjie Yu [Fri, 9 Mar 2018 18:13:11 +0000 (10:13 -0800)]
Up the dimension key limit for CpuTimePerUidFreq

This atom logs time spent on cpu per frequency per uid.
On marlin, there are 27 frequency steps per uid (should be 50+ if
flatten to both cores)
On walleye, there are 52 frequency steps per uid.
So it easily goes to 6k data.

Soft limit set to 6k now.
Hard limit set to 10k to accommodate future processors

Memory impact: on marlin, start memory no config is 2,346K
after using this atom in one guage metric, it is 3,067K

Bug: 72505991
Test: cts test
Change-Id: I067a32e54e4a457fdf9a25911aa16030e893ef4d

6 years agoSticky battery saver
Makoto Onuki [Mon, 19 Mar 2018 21:47:05 +0000 (14:47 -0700)]
Sticky battery saver

- When battery saver is enabled manually (i.e. via PM.setPowerSaveMode()),
it'll stick, and we'll re-enable battery saver even after a reboot
or a charge.

- Extracted all battery saver state transition logic into a separate
class.

Fix: 75033216
Bug: 74120126
Test: Manual test with "dumpsys battery set ...."
Test: atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySaverStateMachineTest.java
Change-Id: If020cd48f341b339783fe09dd35bc7199e737a52
Test: dumpsys power
Test: incident_report power
Test: atest CtsBatterySavingTestCases

6 years agoMerge "Logging: Bluetooth Enabled" into pi-dev
Tej Singh [Mon, 26 Mar 2018 17:27:52 +0000 (17:27 +0000)]
Merge "Logging: Bluetooth Enabled" into pi-dev

6 years agoMake PackageManager#getNamesForUids testable.
Philip P. Moltmann [Mon, 26 Mar 2018 17:15:23 +0000 (10:15 -0700)]
Make PackageManager#getNamesForUids testable.

Fixes: 76161011
Test: atest android.content.pm.cts.PackageManagerTest
Change-Id: I857d489ec9981839d63a5b934b4aaa0d2709be85

6 years agoFix random SmartLinkify-related TextView bugs.
Abodunrinwa Toki [Wed, 21 Mar 2018 23:14:42 +0000 (23:14 +0000)]
Fix random SmartLinkify-related TextView bugs.

1. Preserve selection when the TC times out. (See: SelectionActionModeHelper)

2. Fix highlight/toolbar flicker when tapping on a smart link.
   - Highlight flicker happening because we reset the selection while in
     the process of starting a link action mode.
     i.e. onLinkDown: show highlight
          onLinkUp: start the link action mode asynchronously
  onLinkUp: reset the selection to an insertion cursor*
  onLinkActionModeStarted: reset the highlight
  *Fix: Don't reset selection while starting a link action mode.
   - Toolbar flicker happening because the toolbar positions itself over
     the current selection. The way link highlights have traditionally
     been done is to set the selection to the links bounds*
     *Fix: Hide the toolbar for a few milliseconds when changing
     selection for smoother transition.

3. Fix Paste menu overriding link action mode toolbar after a recent
   "Copy" action. The Paste menu appearing is a feature. Whenever the
   user inserts a cursor after just copying some text, we show the Paste
   menu as a way to make it easy for the user to select the text.
   Because of the problem described in (2) above, changing the selection
   to an insertion triggers the Paste menu feature. Fixing (2) fixes
   this.

4. Fix IME popping up on non-selectable + focusable TextViews.
   See: imm.showSoftInput(...) in Editor. And see comment in the code
   around that. We should only pop up the IME for editable text.

Fixes: 73872461
Fixes: 75985239
Fixes: 76011461

Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Change-Id: If9ddb7f4e6d4db480ba4a495a22f7f2924ab937e

6 years agoAdd linter for strings.xml.
Jeff Sharkey [Mon, 26 Mar 2018 15:38:01 +0000 (09:38 -0600)]
Add linter for strings.xml.

Strings are tedious to get right, so write a lint script that catches
common errors to warn developers before they're uploaded.

Test: builds, boots
Bug: 76097999
Change-Id: I9826ca796c17cd93a100951d56214653de63a379

6 years agoMerge "Get application info in the correct user id" into pi-dev
Tony Mak [Mon, 26 Mar 2018 17:04:47 +0000 (17:04 +0000)]
Merge "Get application info in the correct user id" into pi-dev

6 years agoDisallow copy & paste from personal to profile under policy
Rubin Xu [Mon, 26 Mar 2018 15:02:08 +0000 (16:02 +0100)]
Disallow copy & paste from personal to profile under policy

If DISALLOW_SHARE_INTO_MANAGED_PROFILE is set, prevent personal
data from being pasted into work profile.

Bug: 71988352
Test: Manual - set restriction, try pasting from personal to profile.
Change-Id: I6b067050b4e01671d2c65b5b1ca2120a112233ff

6 years agoMerge "Improve ConnectivityManager.getNetworkWatchlistConfigHash() javadoc" into...
Ricky Wai [Mon, 26 Mar 2018 16:46:20 +0000 (16:46 +0000)]
Merge "Improve ConnectivityManager.getNetworkWatchlistConfigHash() javadoc" into pi-dev

6 years agoMerge "add airplane mode shell commands to connectivity" into pi-dev
Michael West [Mon, 26 Mar 2018 16:38:03 +0000 (16:38 +0000)]
Merge "add airplane mode shell commands to connectivity" into pi-dev

6 years agoMerge "Shorter bucket elevation for system_interaction and sync_adapter" into pi-dev
Amith Yamasani [Mon, 26 Mar 2018 16:17:33 +0000 (16:17 +0000)]
Merge "Shorter bucket elevation for system_interaction and sync_adapter" into pi-dev

6 years agoMerge "AudioSystem: Add case for FOR_VIBRATE_RINGING in forceUseUsageToString" into...
TreeHugger Robot [Mon, 26 Mar 2018 16:06:22 +0000 (16:06 +0000)]
Merge "AudioSystem: Add case for FOR_VIBRATE_RINGING in forceUseUsageToString" into pi-dev

6 years agoMerge "Clear identity when asking for other users." into pi-dev
TreeHugger Robot [Mon, 26 Mar 2018 15:06:28 +0000 (15:06 +0000)]
Merge "Clear identity when asking for other users." into pi-dev

6 years agoMerge changes from topic "cleanup-ble-app-list-at-death" into pi-dev
TreeHugger Robot [Mon, 26 Mar 2018 15:03:19 +0000 (15:03 +0000)]
Merge changes from topic "cleanup-ble-app-list-at-death" into pi-dev

* changes:
  Calls unlinkToDeath in binderDied to deregister
  Remove BLE App entry from mBleApps list when App died

6 years agoMerge "Consolidate logic for 'recent notifications'" into pi-dev
Julia Reynolds [Mon, 26 Mar 2018 14:36:07 +0000 (14:36 +0000)]
Merge "Consolidate logic for 'recent notifications'" into pi-dev

6 years agoMerge "Add Osu2.apk to the AndroidTest so the tests have a target" into pi-dev
Julien Desprez [Mon, 26 Mar 2018 13:45:45 +0000 (13:45 +0000)]
Merge "Add Osu2.apk to the AndroidTest so the tests have a target" into pi-dev

6 years agoMerge changes from topic "executor_api" into pi-dev
TreeHugger Robot [Mon, 26 Mar 2018 13:31:30 +0000 (13:31 +0000)]
Merge changes from topic "executor_api" into pi-dev

* changes:
  Camera: Accept user-supplied executors in capture sessions
  Camera: Async camera manager calls should use executors

6 years agoMerge "Tweaks to wireless charging animation" into pi-dev
Beverly Tai [Mon, 26 Mar 2018 13:22:07 +0000 (13:22 +0000)]
Merge "Tweaks to wireless charging animation" into pi-dev

6 years agoGet application info in the correct user id
Tony Mak [Mon, 26 Mar 2018 11:38:04 +0000 (12:38 +0100)]
Get application info in the correct user id

Fixes: 76396560

Test: Create work profile and launch hangouts in work profile.
Change-Id: Ic3727ac899153b6a96dd9b6d6921c32ba0bbd93e

6 years agoMerge "MediaSession2: Change return type of CommandGroup#getCommands()" into pi-dev
Jaewan Kim [Mon, 26 Mar 2018 10:55:30 +0000 (10:55 +0000)]
Merge "MediaSession2: Change return type of CommandGroup#getCommands()" into pi-dev

6 years agoMerge "MediaMetadata2: Remove radio constants" into pi-dev
Jaewan Kim [Mon, 26 Mar 2018 10:53:24 +0000 (10:53 +0000)]
Merge "MediaMetadata2: Remove radio constants" into pi-dev

6 years agoMerge "MediaSession2: Revisit command code" into pi-dev
Jaewan Kim [Mon, 26 Mar 2018 10:52:22 +0000 (10:52 +0000)]
Merge "MediaSession2: Revisit command code" into pi-dev

6 years agoMerge "Add more hidden API uses to light greylist" into pi-dev
TreeHugger Robot [Mon, 26 Mar 2018 10:49:21 +0000 (10:49 +0000)]
Merge "Add more hidden API uses to light greylist" into pi-dev

6 years agoFix setServerParams to not always set snapshot pending
Robert Berry [Mon, 26 Mar 2018 10:36:40 +0000 (11:36 +0100)]
Fix setServerParams to not always set snapshot pending

Only updates should set snapshot pending. Setting the server params for
the first time should not set snapshot pending. If it did, then just
initializing the recovery agent would cause a snapshot to be made, even
if it contained no keys. Also, setting the snapshot to the same value as
it was previously should not set snapshot pending, for the exact same
reason. If the server params were to change, however, for some reason,
then a new snapshot must be made, so that it can be synced to the correct
vault.

Bug: 74949975
Test: runtest frameworks-services -p \
      com.android.server.locksettings.recoverablekeystore

Change-Id: Ie09284553f922de869be7bcd577d0f0eb9d0bbd3

6 years agoMerge "Expose hidden API to check whether a given package is state protected" into...
Benjamin Franz [Mon, 26 Mar 2018 09:15:41 +0000 (09:15 +0000)]
Merge "Expose hidden API to check whether a given package is state protected" into pi-dev

6 years agoAdd more hidden API uses to light greylist
David Brazdil [Mon, 26 Mar 2018 09:03:46 +0000 (10:03 +0100)]
Add more hidden API uses to light greylist

From bug reports.

Bug: 64382372
Bug: 76350169
Bug: 76329535
Bug: 76329536
Bug: 76355229
Bug: 76350172
Bug: 76384058
Bug: 76350170
Test: make
Change-Id: Id5f99235d0abc1a8326ed254dd835c9ac05dc996

6 years agoMerge "MediaSession2: Add CommandGroup#add/removeCommand(int)" into pi-dev
Jaewan Kim [Mon, 26 Mar 2018 08:10:44 +0000 (08:10 +0000)]
Merge "MediaSession2: Add CommandGroup#add/removeCommand(int)" into pi-dev

6 years agoMediaSession2: Add CommandGroup#add/removeCommand(int)
Jaewan Kim [Tue, 20 Mar 2018 07:19:07 +0000 (16:19 +0900)]
MediaSession2: Add CommandGroup#add/removeCommand(int)

Bug: 74648408
Test: Build
Change-Id: Icfcde5946e75ad74c2123be8064eb365366f5960

6 years agoMediaMetadata2: Remove radio constants
Jaewan Kim [Mon, 26 Mar 2018 05:13:37 +0000 (14:13 +0900)]
MediaMetadata2: Remove radio constants

Removeing radio constants until their names are finalized.

Bug: 75500592
Test: Build
Change-Id: I6f7a219c19dd24579a76c2064e9781ca53618c69

6 years agoMerge "Greylist camera API used by CameraITS test" into pi-dev
Nicolas Geoffray [Mon, 26 Mar 2018 07:58:43 +0000 (07:58 +0000)]
Merge "Greylist camera API used by CameraITS test" into pi-dev

6 years agoMerge "Add APIs to light grey." into pi-dev
Nicolas Geoffray [Mon, 26 Mar 2018 07:53:38 +0000 (07:53 +0000)]
Merge "Add APIs to light grey." into pi-dev

6 years agoMediaSession2: Change return type of CommandGroup#getCommands()
Jaewan Kim [Tue, 20 Mar 2018 07:11:40 +0000 (16:11 +0900)]
MediaSession2: Change return type of CommandGroup#getCommands()

Bug: 74648408
Test: Build
Change-Id: I443dd0a1f244b285754561a4c485ef2e8530d42d

6 years agoMediaSession2: Revisit command code
Jaewan Kim [Tue, 20 Mar 2018 08:06:01 +0000 (17:06 +0900)]
MediaSession2: Revisit command code

Bug: 74648408
Test: Build
Change-Id: I0c66d6dec7f5a25bd4c36aa6e2c140951ea38855

6 years agoMerge "MediaSession2: Match APIs with MediaPlayerBase" into pi-dev
Jaewan Kim [Mon, 26 Mar 2018 05:12:17 +0000 (05:12 +0000)]
Merge "MediaSession2: Match APIs with MediaPlayerBase" into pi-dev

6 years agoMerge "MediaPlayerBase: Add PlayerEventCallback#onPlaybackSpeedChanged()" into pi-dev
Jaewan Kim [Mon, 26 Mar 2018 04:57:48 +0000 (04:57 +0000)]
Merge "MediaPlayerBase: Add PlayerEventCallback#onPlaybackSpeedChanged()" into pi-dev

6 years agoShorter bucket elevation for system_interaction and sync_adapter
Amith Yamasani [Mon, 26 Mar 2018 04:55:50 +0000 (21:55 -0700)]
Shorter bucket elevation for system_interaction and sync_adapter

Don't keep the app in ACTIVE for too long after an indirect
use of the app. Also don't mark as used, so bucketing algorithm
can override quickly.

Bug: 74340258
Test: atest AppStandbyControllerTests
Change-Id: I3b8014873aaf881de07304b64039da211a63a525

6 years agoClear identity when asking for other users.
Jeff Sharkey [Mon, 26 Mar 2018 04:53:29 +0000 (22:53 -0600)]
Clear identity when asking for other users.

Bug: 76394640
Test: nope
Change-Id: I8d1530ed01669947e91725e905240729e31c7234

6 years agoMerge "Remove unimplemented RecoverableKeystoreManager APIs." into pi-dev
Dmitry Dementyev [Mon, 26 Mar 2018 02:18:33 +0000 (02:18 +0000)]
Merge "Remove unimplemented RecoverableKeystoreManager APIs." into pi-dev