OSDN Git Service

android-x86/frameworks-base.git
7 years agoMerge "Fix broken Backspace/ForwardDelete tests" into oc-dev
TreeHugger Robot [Mon, 8 May 2017 13:21:27 +0000 (13:21 +0000)]
Merge "Fix broken Backspace/ForwardDelete tests" into oc-dev

7 years agoMerge "Don't yell when calling into SystemUI" into oc-dev
Jorim Jaggi [Mon, 8 May 2017 12:51:42 +0000 (12:51 +0000)]
Merge "Don't yell when calling into SystemUI" into oc-dev

7 years agoMerge "Clear Gatekeeper state before a new enrollment" into oc-dev
TreeHugger Robot [Mon, 8 May 2017 12:02:45 +0000 (12:02 +0000)]
Merge "Clear Gatekeeper state before a new enrollment" into oc-dev

7 years agoMerge "Defeat @Nullable String[] with empty list." into oc-dev
Jeff Sharkey [Sun, 7 May 2017 17:40:27 +0000 (17:40 +0000)]
Merge "Defeat @Nullable String[] with empty list." into oc-dev

7 years agoMerge "No quota-level details for public volumes." into oc-dev
Jeff Sharkey [Sun, 7 May 2017 17:38:15 +0000 (17:38 +0000)]
Merge "No quota-level details for public volumes." into oc-dev

7 years agoMerge "Only clear state for force stopped fill service" into oc-dev
TreeHugger Robot [Sun, 7 May 2017 01:17:02 +0000 (01:17 +0000)]
Merge "Only clear state for force stopped fill service" into oc-dev

7 years agoMerge "Fix issue #38037532: Toasts cause apps to become foreground" into oc-dev
Dianne Hackborn [Sun, 7 May 2017 00:59:06 +0000 (00:59 +0000)]
Merge "Fix issue #38037532: Toasts cause apps to become foreground" into oc-dev

7 years agoOnly clear state for force stopped fill service
Svet Ganov [Sat, 6 May 2017 23:12:16 +0000 (16:12 -0700)]
Only clear state for force stopped fill service

Test: manual

bug:37785814

Change-Id: I5e40a284788bacf1ebae5ddefffb93b1a5b47d39

7 years agoMerge "Add call super" into oc-dev
TreeHugger Robot [Sat, 6 May 2017 22:46:37 +0000 (22:46 +0000)]
Merge "Add call super" into oc-dev

7 years agoAdd call super
Svet Ganov [Sat, 6 May 2017 02:38:45 +0000 (19:38 -0700)]
Add call super

Test: manual

bug:37775067

Change-Id: I50a50f1fbdb7e9c087c72ad0be3b767aeab9572a

7 years agoMerge "Prune abandoned autofill sessions" into oc-dev
TreeHugger Robot [Sat, 6 May 2017 15:51:44 +0000 (15:51 +0000)]
Merge "Prune abandoned autofill sessions" into oc-dev

7 years agoMerge "Properly translate text locations to screen coords" into oc-dev
Phil Weaver [Sat, 6 May 2017 15:29:19 +0000 (15:29 +0000)]
Merge "Properly translate text locations to screen coords" into oc-dev

7 years agoMerge "Audio service: always unduck focus requester when granted" into oc-dev
TreeHugger Robot [Sat, 6 May 2017 03:03:07 +0000 (03:03 +0000)]
Merge "Audio service: always unduck focus requester when granted" into oc-dev

7 years agoMerge "Hide from the world that ssaid is in a dedicated table" into oc-dev
Svetoslav Ganov [Sat, 6 May 2017 02:41:50 +0000 (02:41 +0000)]
Merge "Hide from the world that ssaid is in a dedicated table" into oc-dev

7 years agoMerge "Report less data in structure to autofill provider" into oc-dev
TreeHugger Robot [Sat, 6 May 2017 02:07:54 +0000 (02:07 +0000)]
Merge "Report less data in structure to autofill provider" into oc-dev

7 years agoMerge "Offer to wait until broadcasts have drained." into oc-dev
Jeff Sharkey [Sat, 6 May 2017 01:58:07 +0000 (01:58 +0000)]
Merge "Offer to wait until broadcasts have drained." into oc-dev

7 years agoMerge "Call ActivityManager to request activity relaunch" into oc-dev
TreeHugger Robot [Sat, 6 May 2017 01:52:10 +0000 (01:52 +0000)]
Merge "Call ActivityManager to request activity relaunch" into oc-dev

7 years agoMerge "Prevent crashes when user is stopping" into oc-dev
TreeHugger Robot [Sat, 6 May 2017 01:44:11 +0000 (01:44 +0000)]
Merge "Prevent crashes when user is stopping" into oc-dev

7 years agoMerge "Don't crash in TextUtil.concat() with paragraph spans" into oc-dev
TreeHugger Robot [Sat, 6 May 2017 01:40:58 +0000 (01:40 +0000)]
Merge "Don't crash in TextUtil.concat() with paragraph spans" into oc-dev

7 years agoMerge "AudioAudioPolicyFocusListener and ducking enforced by framework" into oc-dev
Jean-Michel Trivi [Sat, 6 May 2017 01:16:38 +0000 (01:16 +0000)]
Merge "AudioAudioPolicyFocusListener and ducking enforced by framework" into oc-dev

7 years agoMerge "LightsService: open hal less aggressively" into oc-dev
TreeHugger Robot [Sat, 6 May 2017 01:15:38 +0000 (01:15 +0000)]
Merge "LightsService: open hal less aggressively" into oc-dev

7 years agoAudio service: always unduck focus requester when granted
Jean-Michel Trivi [Fri, 5 May 2017 18:43:31 +0000 (11:43 -0700)]
Audio service: always unduck focus requester when granted

When an app is requesting focus, it might
  have been in the focus stack before, and ducked. Always
  unduck the associated players when the app requests audio
  focus and it is granted.
When an app gains focus from an another abandoning focus,
  do not make unducking conditional to having a focus
  dispatcher (== app has a focus listener).

Test: test app made to duck, re-request focus and verify not ducked
Bug: 37433811
Change-Id: I7e5b29c9148c923e7510957b971e28b6139d6156

7 years agoCall ActivityManager to request activity relaunch
Fyodor Kupolov [Fri, 5 May 2017 00:27:16 +0000 (17:27 -0700)]
Call ActivityManager to request activity relaunch

Instead of relaunching activity in-process, ask ActivityManager.
requestActivityRelaunch to relaunch it. It can make the correct
decision when activity needs to be relaunched.

Test: manual - switch between users to trigger ActivityThread.handleApplicationInfoChanged

Bug: 37992833
Bug: 37412579
Change-Id: I662a04e3cd82115a6008cef9308a2cf1038d51e1

7 years agoFix issue #38037532: Toasts cause apps to become foreground
Dianne Hackborn [Fri, 5 May 2017 06:27:23 +0000 (23:27 -0700)]
Fix issue #38037532: Toasts cause apps to become foreground

ForegroundToken is now ImportanceToken, and doesn't actually
cause an app to become foreground (that is not needed for
toasts anyway).

Also improved output and logging -- new logs for changing
in key uid stats, and when force stopping services after a
uid goes idle.

Test: manual

Change-Id: I44dd391bb8d37857be1359f4b7021dc8d2cd0285

7 years agoPrune abandoned autofill sessions
Philip P. Moltmann [Fri, 5 May 2017 20:30:38 +0000 (13:30 -0700)]
Prune abandoned autofill sessions

Regularly check if the sessions are still valid and clear the ones that
are not.

Test: 1. Started session in dialer
      2. Home button (dialer goes in background)
      3. kill -9 dialer
      4. Wait 30 seconds
      5. Start session is messenger
      6. dialer session stays

      1. Started session in dialer
      2. Home button (dialer goes in background)
      3. kill -9 dialer
      4. Swipe dialer from recents
      5. Wait 30 seconds
      5. Start session is messenger
      6. dialer session is removed
Fixes: 38005472

Change-Id: I8199ce44777b313141ee1eab6c8de5ad5089474a

7 years agoHide from the world that ssaid is in a dedicated table
Svet Ganov [Fri, 5 May 2017 21:27:13 +0000 (14:27 -0700)]
Hide from the world that ssaid is in a dedicated table

Test: manual

bug:37793918

Change-Id: I7c7405c7bd192d528f1f87095a03a2d21953dbc8

7 years agoMerge "android.os.VintfObject: add API for EDI." into oc-dev
TreeHugger Robot [Fri, 5 May 2017 21:47:43 +0000 (21:47 +0000)]
Merge "android.os.VintfObject: add API for EDI." into oc-dev

7 years agoMerge "Remove duplicated onBackStackChanged() call." into oc-dev
TreeHugger Robot [Fri, 5 May 2017 21:42:55 +0000 (21:42 +0000)]
Merge "Remove duplicated onBackStackChanged() call." into oc-dev

7 years agoNo quota-level details for public volumes.
Jeff Sharkey [Fri, 5 May 2017 21:37:26 +0000 (15:37 -0600)]
No quota-level details for public volumes.

Fall back to whatever statvfs() tells us.

Test: builds, boots
Bug: 37573475
Change-Id: I713564292d41797e80860d6aa739266d9799af7f

7 years agoMerge "Adding SecureTouchListener to drop suspicious touches" into oc-dev
Suprabh Shukla [Fri, 5 May 2017 21:32:12 +0000 (21:32 +0000)]
Merge "Adding SecureTouchListener to drop suspicious touches" into oc-dev

7 years agoMerge "Improved dump() on Autofill UI." into oc-dev
TreeHugger Robot [Fri, 5 May 2017 21:28:05 +0000 (21:28 +0000)]
Merge "Improved dump() on Autofill UI." into oc-dev

7 years agoDefeat @Nullable String[] with empty list.
Jeff Sharkey [Fri, 5 May 2017 21:26:13 +0000 (15:26 -0600)]
Defeat @Nullable String[] with empty list.

Test: builds, boots
Bug: 37577123
Change-Id: I6bf1af565398c30aecc0939a23846c0f85c13ffe

7 years agoReport less data in structure to autofill provider
Philip P. Moltmann [Thu, 4 May 2017 19:29:59 +0000 (12:29 -0700)]
Report less data in structure to autofill provider

Fixes: 35899963
Test: CtsAutoFillServiceTestCases, CtsAccessibilityTestCases,
      CtsAccessibilityServiceTestCases
Change-Id: Ia7dba3e252e7678c033d67bcf653e592f3134304

7 years agoProperly translate text locations to screen coords
Phil Weaver [Fri, 5 May 2017 21:17:06 +0000 (14:17 -0700)]
Properly translate text locations to screen coords

Using the same method as getBoundsInScreen.

Bug: 35095925
Test: Manually verified location with test app, ran a11y cts
Change-Id: I1eee2a4eb23912698be61c9030d92bbade1d743a

7 years agoPrevent crashes when user is stopping
Fyodor Kupolov [Fri, 5 May 2017 21:07:50 +0000 (14:07 -0700)]
Prevent crashes when user is stopping

Added defensive checks to prevent sporadic crashes due to various race
conditions when user is stopped:
* onPackageBroadcastReceived - moved the check inside the synchronized block.
  This guarantees that onUserStopped (that also grabs mLock) is not yet
  called and we can proceed.
* stopListening - Since it is invoked before onUserStopped callback, we can call
  ensureGroupStateLoadedLocked(userId, false). The state will be subsequently cleaned
  up in the onUserStopped.

Test: manual user switching + SecondaryUserContentResolverTest and
      ManagedUserContentResolverTest
Fixes: 37472670
Fixes: 36890589

Change-Id: I44d0a0c004e9c3e6cfb37a24cb8a5b6f20a42f13

7 years agoOffer to wait until broadcasts have drained.
Jeff Sharkey [Wed, 3 May 2017 17:38:01 +0000 (11:38 -0600)]
Offer to wait until broadcasts have drained.

We've seen evidence of lab devices racing with other apps that are
using cache space immediately after tests wipe it clean, which can
cause test failures.  To mitigate this, try our best to wait for the
device to go "idle" by watching for broadcast queues to fully drain.

Also improve javadocs along the way.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 37486230375669833791344237914374
Change-Id: I4d430db443b6fa6d33a625fe07b90279b5d51c12

7 years agoMerge "Fix issue in InsetDrawable where master inset attribute get ignored. Test...
Hyunyoung Song [Fri, 5 May 2017 20:52:48 +0000 (20:52 +0000)]
Merge "Fix issue in InsetDrawable where master inset attribute get ignored. Test: builds, and did manual test b/37752336" into oc-dev

7 years agoMerge "Reject smart selection if outside original selection." into oc-dev
TreeHugger Robot [Fri, 5 May 2017 20:29:27 +0000 (20:29 +0000)]
Merge "Reject smart selection if outside original selection." into oc-dev

7 years agoMerge "Update carrier text when phone service state is changed" into oc-dev
TreeHugger Robot [Fri, 5 May 2017 20:25:44 +0000 (20:25 +0000)]
Merge "Update carrier text when phone service state is changed" into oc-dev

7 years agoMerge "Show warning log when ShortcutInfo is re-published" into oc-dev
Makoto Onuki [Fri, 5 May 2017 20:11:02 +0000 (20:11 +0000)]
Merge "Show warning log when ShortcutInfo is re-published" into oc-dev

7 years agoMerge "WifiManagerTest: alt way to check callback" into oc-dev
TreeHugger Robot [Fri, 5 May 2017 20:04:14 +0000 (20:04 +0000)]
Merge "WifiManagerTest: alt way to check callback" into oc-dev

7 years agoLightsService: open hal less aggressively
Steven Moreland [Fri, 5 May 2017 18:41:51 +0000 (11:41 -0700)]
LightsService: open hal less aggressively

Only try to reopen the hal if it has been successfully opened before.

Test: remove lights hal from marlin, no more spam
Test: use with ToT marlin, lights hal still works

Fixes: 38006310
Change-Id: Ib21e26184f8a94987d005c8d320ec4d988df66ee

7 years agoMerge "Create auxiliary info for local instant apps" into oc-dev
TreeHugger Robot [Fri, 5 May 2017 19:35:22 +0000 (19:35 +0000)]
Merge "Create auxiliary info for local instant apps" into oc-dev

7 years agoMerge "Add StrictMode.noteSlowCall to calls that result in hw bitmap readback" into...
Sergey Vasilinets [Fri, 5 May 2017 19:31:47 +0000 (19:31 +0000)]
Merge "Add StrictMode.noteSlowCall to calls that result in hw bitmap readback" into oc-dev

7 years agoMerge "Use the StorageStatsManager in FileCollector." into oc-dev
Daniel Nishi [Fri, 5 May 2017 18:57:41 +0000 (18:57 +0000)]
Merge "Use the StorageStatsManager in FileCollector." into oc-dev

7 years agoMerge "Update process state after unbinding a service." into oc-dev
TreeHugger Robot [Fri, 5 May 2017 18:51:56 +0000 (18:51 +0000)]
Merge "Update process state after unbinding a service." into oc-dev

7 years agoMerge "Resolve styles by font table if not specified." into oc-dev
TreeHugger Robot [Fri, 5 May 2017 18:51:21 +0000 (18:51 +0000)]
Merge "Resolve styles by font table if not specified." into oc-dev

7 years agoMerge "Revert "Treat apps that use channels as O apps"" into oc-dev
TreeHugger Robot [Fri, 5 May 2017 18:50:52 +0000 (18:50 +0000)]
Merge "Revert "Treat apps that use channels as O apps"" into oc-dev

7 years agoMerge "Bluetooth: Move Bluetooth battery stats tracking (1/2)" into oc-dev
Ajay Panicker [Fri, 5 May 2017 18:45:08 +0000 (18:45 +0000)]
Merge "Bluetooth: Move Bluetooth battery stats tracking (1/2)" into oc-dev

7 years agoUpdate carrier text when phone service state is changed
Akira Oshimi [Tue, 31 Jan 2017 05:34:59 +0000 (14:34 +0900)]
Update carrier text when phone service state is changed

The carrier text is not updated when the phone service state has
changed. To solve this issue, the EmergencyCryptkeeperText view should
receive the KeyguardUpdateMonitorCallback#onRefreshCarrierInfo().

Bug: 37331677
Test: visual

Change-Id: I359991688552b731eaa02f443902eb7bdc894d10
(cherry picked from commit 76c36c4dc5eb2195c918590b23c16f6410a52df0)

7 years agoWifiManagerTest: alt way to check callback
Rebecca Silberstein [Tue, 2 May 2017 20:21:00 +0000 (13:21 -0700)]
WifiManagerTest: alt way to check callback

We are seeing failures on automated tests.  This is occuring when the
thread id is retrieved from the TestLooper.  Since we do not have
control over exactly which thread is used in the TestLooper for these
environments, this CL changes the checks to make sure the the callback
is called, and also that we never attempt to get the main looper (the
behavior when the provided handler is null).

Bug: 37828843
Test:  frameworks/base/wifi/tests/runtests.sh
Change-Id: I853c423b5f383225c250357d638c4cfd2c098edc

7 years agoDon't crash in TextUtil.concat() with paragraph spans
Roozbeh Pournader [Wed, 3 May 2017 01:10:10 +0000 (18:10 -0700)]
Don't crash in TextUtil.concat() with paragraph spans

This switches TextUtils.concat() to use SpannableStringBuilder
if there are any spans in the input strings. As a result, we can
avoid crashes when concatenating two CharSequences can result in
paragraph spans that now don't happen to be at paragraph boundaries.

Also document the exact behavior of the method for edge cases based
on the previous implementation.

Change-Id: I9caffbe95ed729b9c10d63a9e7d22b1e8c7185a3
Fixes: 28271770
Test: CTS tests added and old CTS tests continue to pass.
Test: cts-tradefed run cts-dev --module CtsTextTestCases --test android.text.cts.TextUtilsTest

7 years agoMerge "Fixing regression in what is considered a restart attempt" into oc-dev
TreeHugger Robot [Fri, 5 May 2017 18:03:49 +0000 (18:03 +0000)]
Merge "Fixing regression in what is considered a restart attempt" into oc-dev

7 years agoMerge "TextClassifier: Remove debug logs." into oc-dev
TreeHugger Robot [Fri, 5 May 2017 17:49:38 +0000 (17:49 +0000)]
Merge "TextClassifier: Remove debug logs." into oc-dev

7 years agoCreate auxiliary info for local instant apps
Todd Kennedy [Fri, 5 May 2017 17:15:38 +0000 (17:15 +0000)]
Create auxiliary info for local instant apps

This reverts commit a1d8051fa2317d897a6b20442177e357172e93db.

Change-Id: Ic471a4efe64406dd75cc0bf1d6464276a94347d8
Fixes: 37947648
Test: Manual
Test: Install an instant app [https://www.nytimes.com/crosswords/game/mini]
Test: Try to run installed instant app from gMail

7 years agoMerge "Add wifi throttling to backup blacklist." into oc-dev
TreeHugger Robot [Fri, 5 May 2017 17:15:48 +0000 (17:15 +0000)]
Merge "Add wifi throttling to backup blacklist." into oc-dev

7 years agoReject smart selection if outside original selection.
Abodunrinwa Toki [Fri, 5 May 2017 17:07:17 +0000 (18:07 +0100)]
Reject smart selection if outside original selection.

- The aim is to be defensive and prefer to reject a selection if
  it is likely to be wrong.

Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Bug: 38019270
Change-Id: I35ebc84fb102373949366296434a31d899edfef3

7 years agoRevert "Treat apps that use channels as O apps"
Geoffrey Pitsch [Fri, 5 May 2017 16:47:38 +0000 (16:47 +0000)]
Revert "Treat apps that use channels as O apps"

This reverts commit 07a08b2ae92cc26b5e7ec00064e6ecea79d3d9c3.
Bug: 38016678
Change-Id: I0bf2f6da9e145bfe1f79449cac38ad34f5956969

7 years agoMerge "Make status bar disable() debugging more concise." into oc-dev
Daniel Sandler [Fri, 5 May 2017 16:46:51 +0000 (16:46 +0000)]
Merge "Make status bar disable() debugging more concise." into oc-dev

7 years agoAudioAudioPolicyFocusListener and ducking enforced by framework
Jean-Michel Trivi [Fri, 5 May 2017 16:44:28 +0000 (09:44 -0700)]
AudioAudioPolicyFocusListener and ducking enforced by framework

Notify AudioPolicyFocusListener an app received
  AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK even when focus is enforced by
  the framework.

Test: see bug
Bug: 37241497
Change-Id: I569e6611fb398955adbcd5bbfbda9d44db4aa729

7 years agoResolve styles by font table if not specified.
Seigo Nonaka [Thu, 4 May 2017 23:39:28 +0000 (16:39 -0700)]
Resolve styles by font table if not specified.

android:fontStyle and android:fontWeight is an optional attribute.
If they are missing, we are using non-italic 400 weight, but this is
not good idea. We should resolve these style value from font metadata.

Bug: 37988154
Test: am instrument -w -e class android.content.res.cts.ResourcesTest
      android.content.cts/android.support.test.runner.AndroidJUnitRunner

Change-Id: I80a436cd3632d8c58fa3d8bdaedac73b95f61a8c

7 years agoMerge "Prevent NPE in ActivityStack#shouldbeVisible." into oc-dev
Bryce Lee [Fri, 5 May 2017 16:29:37 +0000 (16:29 +0000)]
Merge "Prevent NPE in ActivityStack#shouldbeVisible." into oc-dev

7 years agoMerge "Fix settings test for show_notification_channel_warnings" into oc-dev
TreeHugger Robot [Fri, 5 May 2017 16:20:53 +0000 (16:20 +0000)]
Merge "Fix settings test for show_notification_channel_warnings" into oc-dev

7 years agoMerge "WifiManagerTest: test for startLOHS return code" into oc-dev
Rebecca Silberstein [Fri, 5 May 2017 16:06:50 +0000 (16:06 +0000)]
Merge "WifiManagerTest: test for startLOHS return code" into oc-dev

7 years agoMerge "ImageWriter: Attach non-opaque Images as well." into oc-dev
Eino-Ville Talvala [Fri, 5 May 2017 16:06:03 +0000 (16:06 +0000)]
Merge "ImageWriter: Attach non-opaque Images as well." into oc-dev

7 years agoFixing regression in what is considered a restart attempt
Winson Chung [Fri, 5 May 2017 01:25:21 +0000 (18:25 -0700)]
Fixing regression in what is considered a restart attempt

- CTS tests can start activities directly in the pinned stack with the
  CLEAR_TASK and NEW_TASK flags, so this check should only consider it
  a restart attempt if mReusedTask is set, as in
  setTaskFromIntentActivity(), otherwise the newly started activity
  will be triggered back into fullscreen.

Bug: 37501224
Test: android.server.cts.ActivityManagerPinnedStackTests
Change-Id: Ia37f9d77bfb85882e50271300234bfc6c2969f9a

7 years agoMerge "Ensure that we hide the menu without resizing when expanding." into oc-dev
Winson Chung [Fri, 5 May 2017 15:52:13 +0000 (15:52 +0000)]
Merge "Ensure that we hide the menu without resizing when expanding." into oc-dev

7 years agoMerge "Revert "Create auxiliary info for local instant apps"" into oc-dev
Bryce Lee [Fri, 5 May 2017 15:46:32 +0000 (15:46 +0000)]
Merge "Revert "Create auxiliary info for local instant apps"" into oc-dev

7 years agoRevert "Create auxiliary info for local instant apps"
Bryce Lee [Fri, 5 May 2017 15:38:44 +0000 (15:38 +0000)]
Revert "Create auxiliary info for local instant apps"

This reverts commit e15e7cb592a923eea029c12aa9fc144a3fbaddc0.

Change-Id: I116904fd8c2b28df7e03bc5ec2414ed67761b380

7 years agoMerge "Add TRON logging for bindApplication" into oc-dev
Jorim Jaggi [Fri, 5 May 2017 15:34:52 +0000 (15:34 +0000)]
Merge "Add TRON logging for bindApplication" into oc-dev

7 years agoMerge "Audio service: always unduck focus winner" into oc-dev
Jean-Michel Trivi [Fri, 5 May 2017 15:33:42 +0000 (15:33 +0000)]
Merge "Audio service: always unduck focus winner" into oc-dev

7 years agoMerge "Fix bounds calculation" into oc-dev
Jorim Jaggi [Fri, 5 May 2017 14:59:39 +0000 (14:59 +0000)]
Merge "Fix bounds calculation" into oc-dev

7 years agoFix broken Backspace/ForwardDelete tests
Andrei Stingaceanu [Fri, 5 May 2017 14:43:52 +0000 (15:43 +0100)]
Fix broken Backspace/ForwardDelete tests

* correctly use @Before to intstantiate
* get rid of useless KeyListenerTestCase class
* move to KeyUtils, refactor and document util method to generate
  a KeyEvent

Bug: 37991689
Test: adb shell am instrument -w -e package android.text.method
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Change-Id: Ibbce351f31eb62492cd1c7c920fdef44df89b683

7 years agoMerge "Don't set the failure extra on split install" into oc-dev
TreeHugger Robot [Fri, 5 May 2017 14:21:14 +0000 (14:21 +0000)]
Merge "Don't set the failure extra on split install" into oc-dev

7 years agoMerge "Create auxiliary info for local instant apps" into oc-dev
TreeHugger Robot [Fri, 5 May 2017 14:20:47 +0000 (14:20 +0000)]
Merge "Create auxiliary info for local instant apps" into oc-dev

7 years agoPrevent NPE in ActivityStack#shouldbeVisible.
Bryce Lee [Thu, 4 May 2017 17:19:07 +0000 (10:19 -0700)]
Prevent NPE in ActivityStack#shouldbeVisible.

If there is a visibleBehind activity, we check to see if the top
activity in the top stack is not fullscreen. However, it is possible
for the top stack to be empty. This can happen if the previously top
activity is being re-installed.

This changelist addresses the issue by checking if the top activity is
null before referencing it.

Change-Id: I6de904bed1c7035ed1e112c9cacc1b6c2bac4e8f
Fixes: 32180256
Test: bit FrameworksServicesTests:com.android.server.am.ActivityStackTests#testShouldBeVisibleWithVisibleBehindActivity

7 years agoMerge "Finish noHistory activities immediately after resumed activity shown." into...
Bryce Lee [Fri, 5 May 2017 14:08:21 +0000 (14:08 +0000)]
Merge "Finish noHistory activities immediately after resumed activity shown." into oc-dev

7 years agoDon't yell when calling into SystemUI
Jorim Jaggi [Fri, 5 May 2017 13:16:14 +0000 (15:16 +0200)]
Don't yell when calling into SystemUI

Test: Open app from recents, make sure no yelling in logging
Bug: 32969571
Change-Id: I19ba834713edceae7c678c49629fe8530dc9dbb8

7 years agoAdd TRON logging for bindApplication
Jorim Jaggi [Fri, 5 May 2017 13:05:07 +0000 (15:05 +0200)]
Add TRON logging for bindApplication

Such that we know how much startup latency is the system to blame
and how much of it is the client process to blame.

Test: Open dead app, inspect logs
Change-Id: Ib8d359c2d59ef6f90893928f2b1d4e2ac2590d74
Fixes: 37327717

7 years agoFix bounds calculation
Jorim Jaggi [Thu, 4 May 2017 12:05:59 +0000 (14:05 +0200)]
Fix bounds calculation

Don't include the wallpaper window when calculating the frame
in multi-window.

Test: Go multi-window, go recents.
Change-Id: I8b4fb48767d6bdbda055d9c631811ad5a1dcaee6
Fixes: 36240988

7 years agoMerge "Import translations. DO NOT MERGE" into oc-dev
TreeHugger Robot [Fri, 5 May 2017 12:24:02 +0000 (12:24 +0000)]
Merge "Import translations. DO NOT MERGE" into oc-dev

7 years agoMerge "Import translations. DO NOT MERGE" into oc-dev
TreeHugger Robot [Fri, 5 May 2017 12:14:06 +0000 (12:14 +0000)]
Merge "Import translations. DO NOT MERGE" into oc-dev

7 years agoMerge "Import translations. DO NOT MERGE" into oc-dev
TreeHugger Robot [Fri, 5 May 2017 11:54:04 +0000 (11:54 +0000)]
Merge "Import translations. DO NOT MERGE" into oc-dev

7 years agoMerge "ActivityManagerService: Add an overall stack dumping timeout." into oc-dev
TreeHugger Robot [Fri, 5 May 2017 10:56:41 +0000 (10:56 +0000)]
Merge "ActivityManagerService: Add an overall stack dumping timeout." into oc-dev

7 years agoMerge "Don't include IME in app screenshot" into oc-dev
Jorim Jaggi [Fri, 5 May 2017 10:43:39 +0000 (10:43 +0000)]
Merge "Don't include IME in app screenshot" into oc-dev

7 years agoMerge "Store "block uninstall" flag separately from the rest of package state." into...
Vladislav Kuzkokov [Fri, 5 May 2017 09:36:45 +0000 (09:36 +0000)]
Merge "Store "block uninstall" flag separately from the rest of package state." into oc-dev

7 years agoMerge "All kinds of little foreground services fixes." into oc-dev
TreeHugger Robot [Fri, 5 May 2017 09:00:42 +0000 (09:00 +0000)]
Merge "All kinds of little foreground services fixes." into oc-dev

7 years agoMerge "Adjust forced dexopt in case of stripped APKs." into oc-dev
Nicolas Geoffray [Fri, 5 May 2017 08:09:06 +0000 (08:09 +0000)]
Merge "Adjust forced dexopt in case of stripped APKs." into oc-dev

7 years agoAll kinds of little foreground services fixes.
Dianne Hackborn [Thu, 4 May 2017 23:53:11 +0000 (16:53 -0700)]
All kinds of little foreground services fixes.

- Better explanations of some strings.
- Fix to use the right package when an item is pressed in
  the foreground services dialog.
- Improve java docs on Service.startForeground().

Bug: 37925387
    735566 lv - Android - [Source] Context unclear or missing:
    Apps running in background
Bug: 37925888
    735566 lv - Android - [Source] Context unclear or missing:
    Tap for details on battery and data usage
Bug: 37897953
    735566 gl - Android - [Source] Context unclear or missing:
    LEFT_SIDE, RIGHT_SIDE
Bug: 37943079
    Music is dying mid playback

Test: manual
Change-Id: Ied41932c61f59335bd18dfba3fcb13af28a0bddd

7 years agoImport translations. DO NOT MERGE
Bill Yi [Fri, 5 May 2017 05:14:51 +0000 (22:14 -0700)]
Import translations. DO NOT MERGE

Change-Id: I9b5ebe94df837619db36f6d104daff7637c449b5
Auto-generated-cl: translation import

7 years agoMerge "SmartTextShare: Update generic labels for assist menu item." into oc-dev
TreeHugger Robot [Fri, 5 May 2017 05:00:42 +0000 (05:00 +0000)]
Merge "SmartTextShare: Update generic labels for assist menu item." into oc-dev

7 years agoMerge "RemovalClient sendRemoved should check remaining instead of fingerId" into...
TreeHugger Robot [Fri, 5 May 2017 04:34:29 +0000 (04:34 +0000)]
Merge "RemovalClient sendRemoved should check remaining instead of fingerId" into oc-dev

7 years agoMerge "Avoid unnecessary ULocale.addLikelySubtags()" into oc-dev
Yohei Yukawa [Fri, 5 May 2017 04:29:07 +0000 (04:29 +0000)]
Merge "Avoid unnecessary ULocale.addLikelySubtags()" into oc-dev

7 years agoMerge changes Ie1686719,Ie6af7751 into oc-dev
TreeHugger Robot [Fri, 5 May 2017 03:31:52 +0000 (03:31 +0000)]
Merge changes Ie1686719,Ie6af7751 into oc-dev

* changes:
  Fixed a bug where the media notification image was wrong
  Improved the gradient drawing of the media notification

7 years agoMerge "Audio service: only duck started players + refactor" into oc-dev
TreeHugger Robot [Fri, 5 May 2017 02:48:25 +0000 (02:48 +0000)]
Merge "Audio service: only duck started players + refactor" into oc-dev

7 years agoImport translations. DO NOT MERGE
Bill Yi [Fri, 5 May 2017 02:14:00 +0000 (19:14 -0700)]
Import translations. DO NOT MERGE

Change-Id: I5197115980fb305b5bbd25b15c4bffb1a7985743
Auto-generated-cl: translation import

7 years agoMerge "Hyphenate text in CheckedTextView" into oc-dev
TreeHugger Robot [Fri, 5 May 2017 02:03:39 +0000 (02:03 +0000)]
Merge "Hyphenate text in CheckedTextView" into oc-dev

7 years agoAudio service: always unduck focus winner
Jean-Michel Trivi [Fri, 5 May 2017 01:33:06 +0000 (18:33 -0700)]
Audio service: always unduck focus winner

When a FocusRequester gains focus, always unduck it.
This fixes a bug where a player could remain ducked even after
  regaining focus. The issue was that the unducking was only
  done in the focus gain if the loss had been
  AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK, which is the only one
  that could have caused a duck. But between the moment
  the app lost audio focus with LOSS_TRANSIENT_CAN_DUCK and
  the moment it regains focus, it could have lost the focus
  once more with LOSS_TRANSIENT. And in this case, it would
  not have been unducked.
The fix consists in always unducking an app that gains focus. If
  it wasn't ducked, that operation is a no-op.

Test: see bug
Bug: 37433811
Change-Id: I95a5bfcc2d5063986bd62841c1893bbbd00b45bf

7 years agoFixed a bug where the media notification image was wrong
Selim Cinek [Thu, 4 May 2017 23:27:28 +0000 (16:27 -0700)]
Fixed a bug where the media notification image was wrong

In RTL the gradient was being applied the wrong way.

Test: switch to RTL, play music
Change-Id: Ie1686719d56436712fd0e6c99ba2723ba53d0025
Fixes: 37996998

7 years agoImproved the gradient drawing of the media notification
Selim Cinek [Wed, 3 May 2017 22:17:10 +0000 (15:17 -0700)]
Improved the gradient drawing of the media notification

Previously we were drawing with a color on top of the
image instead of fading it out. This could lead to
visible artefacts in the background.
We're now fading out the alpha in a similar manner instead.

Test: runtest systemui
Change-Id: Ie6af7751a734b8fa44279eba970e7ca5ba67a4c0
Fixes: 37950482