OSDN Git Service

android-x86/frameworks-base.git
7 years agoMerge "Introduce early exit path for non resource path." into oc-dev
TreeHugger Robot [Thu, 18 May 2017 23:30:08 +0000 (23:30 +0000)]
Merge "Introduce early exit path for non resource path." into oc-dev

7 years agoMerge "Workaround issue with pip overlay not hiding cleanly." into oc-dev
Winson Chung [Thu, 18 May 2017 23:15:27 +0000 (23:15 +0000)]
Merge "Workaround issue with pip overlay not hiding cleanly." into oc-dev

7 years agoMerge "Fixing issue with double tapping PiP." into oc-dev
Winson Chung [Thu, 18 May 2017 23:14:54 +0000 (23:14 +0000)]
Merge "Fixing issue with double tapping PiP." into oc-dev

7 years agoMerge "Fix ordering of notifying dismiss callback" into oc-dev
Jorim Jaggi [Thu, 18 May 2017 22:25:46 +0000 (22:25 +0000)]
Merge "Fix ordering of notifying dismiss callback" into oc-dev

7 years agoMerge "Import translations. DO NOT MERGE" into oc-dev
TreeHugger Robot [Thu, 18 May 2017 20:10:29 +0000 (20:10 +0000)]
Merge "Import translations. DO NOT MERGE" into oc-dev

7 years agoMerge "don't dex when installing an instant app" into oc-dev
Todd Kennedy [Thu, 18 May 2017 19:36:11 +0000 (19:36 +0000)]
Merge "don't dex when installing an instant app" into oc-dev

7 years agoMerge "Filter package related info" into oc-dev
TreeHugger Robot [Thu, 18 May 2017 19:34:58 +0000 (19:34 +0000)]
Merge "Filter package related info" into oc-dev

7 years agoMerge "Change currentTimeMillis to elapsedRealtime" into oc-dev
TreeHugger Robot [Thu, 18 May 2017 19:25:53 +0000 (19:25 +0000)]
Merge "Change currentTimeMillis to elapsedRealtime" into oc-dev

7 years agoMerge "In onDragEvent(), don't assume text is Spannable" into oc-dev
TreeHugger Robot [Thu, 18 May 2017 19:21:46 +0000 (19:21 +0000)]
Merge "In onDragEvent(), don't assume text is Spannable" into oc-dev

7 years agoMerge "Audio focus: start players in ducked state when focus is already lost" into...
Jean-Michel Trivi [Thu, 18 May 2017 19:06:38 +0000 (19:06 +0000)]
Merge "Audio focus: start players in ducked state when focus is already lost" into oc-dev

7 years agoMerge "More unit tests for classes needed in reading uid times per cpu freq." into...
Sudheer Shanka [Thu, 18 May 2017 17:42:10 +0000 (17:42 +0000)]
Merge "More unit tests for classes needed in reading uid times per cpu freq." into oc-dev

7 years agoMerge "Work on issue #36891897: Need to ensure foreground services..." into oc-dev
Dianne Hackborn [Thu, 18 May 2017 17:35:08 +0000 (17:35 +0000)]
Merge "Work on issue #36891897: Need to ensure foreground services..." into oc-dev

7 years agoMerge "Add action to launch intent" into oc-dev
TreeHugger Robot [Thu, 18 May 2017 17:31:04 +0000 (17:31 +0000)]
Merge "Add action to launch intent" into oc-dev

7 years agoMerge "AAPT2: Ignore trailing data after IEND chunk in PNG" into oc-dev
TreeHugger Robot [Thu, 18 May 2017 17:30:21 +0000 (17:30 +0000)]
Merge "AAPT2: Ignore trailing data after IEND chunk in PNG" into oc-dev

7 years agoMerge "Fix issue with deferred start of the background loader." into oc-dev
Winson Chung [Thu, 18 May 2017 17:18:52 +0000 (17:18 +0000)]
Merge "Fix issue with deferred start of the background loader." into oc-dev

7 years agoChange currentTimeMillis to elapsedRealtime
Yipeng Cao [Tue, 16 May 2017 03:23:12 +0000 (20:23 -0700)]
Change currentTimeMillis to elapsedRealtime

System.currentTimeMillis does not gauntness to be monotonically
increasing, changed to SystemClock.elapsedRealtime

Bug: 38317243
Fixes: 38317243
Test: make -j 32; flash the angler device using local build

Change-Id: I3fd8f8b03655183d257d69412bc1c17cc38ccead
Merged-In: I75a70d43028e901d9f3459d6b525cac58e8e64af

7 years agoFixing issue with double tapping PiP.
Winson Chung [Mon, 15 May 2017 21:20:46 +0000 (14:20 -0700)]
Fixing issue with double tapping PiP.

- If a user taps the PiP quickly multiple times, you can hit a case where
  you expand the PIP, which triggers the re-registration of the
  InputConsumer, but doesn't disable touches until the pinned stack
  animation starts.  If the user taps in between that time, it can trigger
  a resizing of the stack what aborts the expand animation
- Also adding additional debugging logs

Bug: 37657050
Test: Quickly tap the PiP

Change-Id: Ib0088a3aa8e917aca3214c289a0787bdf7e66199

7 years agoAudio focus: start players in ducked state when focus is already lost
Jean-Michel Trivi [Wed, 17 May 2017 00:59:54 +0000 (17:59 -0700)]
Audio focus: start players in ducked state when focus is already lost

The volume ramp for ducking is only to be heard when a player is
  playing while focus is lost. When a player is starting when
  focus is already lost (and ducking is applicable), it should
  play at the same level as that reached after a duck. This is
  implemented using the VolumeShaper.Operation time offset
  (a.k.a. XOffset), set to 1, i.e. the end of the duck.

Test: see bug
Bug: 38353147
Change-Id: Iec36fbe002b183d6d70c258d9ab26b577dc1d2ce

7 years agoMerge "Fix a race condition in the A2dpProfile constructor" into oc-dev
Antony Sargent [Thu, 18 May 2017 16:37:28 +0000 (16:37 +0000)]
Merge "Fix a race condition in the A2dpProfile constructor" into oc-dev

7 years agoMerge "VolumeShaper: Enable xOffset from Java" into oc-dev
Andy Hung [Thu, 18 May 2017 16:15:44 +0000 (16:15 +0000)]
Merge "VolumeShaper: Enable xOffset from Java" into oc-dev

7 years agoMerge "Unbreak APK 26 apps running on "O" preview/beta builds." into oc-dev
Jeff Sharkey [Thu, 18 May 2017 15:59:34 +0000 (15:59 +0000)]
Merge "Unbreak APK 26 apps running on "O" preview/beta builds." into oc-dev

7 years agoMerge "Unbreak even more APK 26 apps running on "O" preview/beta builds." into oc-dev
TreeHugger Robot [Thu, 18 May 2017 15:52:37 +0000 (15:52 +0000)]
Merge "Unbreak even more APK 26 apps running on "O" preview/beta builds." into oc-dev

7 years agoMerge "Enable starting window logging" into oc-dev
Jorim Jaggi [Thu, 18 May 2017 14:51:44 +0000 (14:51 +0000)]
Merge "Enable starting window logging" into oc-dev

7 years agodon't dex when installing an instant app
Todd Kennedy [Wed, 17 May 2017 22:16:04 +0000 (15:16 -0700)]
don't dex when installing an instant app

Bug: 38259387
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Test: install an instant app, see that it doesn't dex
Test: install a full app, see that it does dex
Change-Id: Id7dc749954d0be24bbd80da2ef0f43e39f77993e

7 years agoEnable starting window logging
Jorim Jaggi [Wed, 17 May 2017 13:10:29 +0000 (15:10 +0200)]
Enable starting window logging

Also extend it to make sure we catch the bug!

Test: Open a couple of cold/hot apps, make sure logs look accurate
Bug: 37888853
Change-Id: Ied394969748d4d2d40359af15e0b491a2dc2b078

7 years agoMerge "Fix refactoring typo" into oc-dev
Jorim Jaggi [Thu, 18 May 2017 12:41:18 +0000 (12:41 +0000)]
Merge "Fix refactoring typo" into oc-dev

7 years agoMerge "Captive portals: reinspect http result after fallback probe" into oc-dev
Hugo Benichi [Thu, 18 May 2017 05:39:24 +0000 (05:39 +0000)]
Merge "Captive portals: reinspect http result after fallback probe" into oc-dev

7 years agoImport translations. DO NOT MERGE
Bill Yi [Thu, 18 May 2017 04:18:52 +0000 (21:18 -0700)]
Import translations. DO NOT MERGE

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

7 years agoCaptive portals: reinspect http result after fallback probe
Hugo Benichi [Wed, 17 May 2017 01:30:40 +0000 (10:30 +0900)]
Captive portals: reinspect http result after fallback probe

When DNS queries that precede the http and https probe take a long time
to complete, it is possible that the fallback probe fires earlier than
either the http and https probes.

This causes the detection logic to ignore the result of the http probe,
which may cause the system to miss captive portals advertising
themselves on the url used by the http probe but not on the url used by
the fallback probe.

This patch fixes that issue by forcing the detection to wait on the
result of the http probe if the fallback probe does not find a portal.

Bug: 38259299
Bug: 36532213
Test: manually tested with nearby captive portal networks
Merged-In: I07ea23a2b5f694c5ada9633169af98409efedff1
Change-Id: Ie016cad52719d07167acf026f738d31000c78cd2

(cherry picked from commit fc47442b31761e64e188c51c3dd2a782ecbd9c62)

7 years agoMerge "Optimize latency when unlocking phone" into oc-dev
TreeHugger Robot [Thu, 18 May 2017 01:55:42 +0000 (01:55 +0000)]
Merge "Optimize latency when unlocking phone" into oc-dev

7 years agoMerge "WifiManager: add unspecified ip mode" into oc-dev
TreeHugger Robot [Thu, 18 May 2017 01:44:30 +0000 (01:44 +0000)]
Merge "WifiManager: add unspecified ip mode" into oc-dev

7 years agoMerge "Don't report displays that are going to be removed" into oc-dev
Andrii Kulian [Thu, 18 May 2017 01:36:12 +0000 (01:36 +0000)]
Merge "Don't report displays that are going to be removed" into oc-dev

7 years agoVolumeShaper: Enable xOffset from Java
Andy Hung [Mon, 15 May 2017 22:41:14 +0000 (15:41 -0700)]
VolumeShaper: Enable xOffset from Java

Previously only accessible from native.
Also improve documentation and comments.

Test: CTS VolumeShaperTest, Ducking
Bug: 38353147
Change-Id: I27bb34f0a5d28f80d138111bbeeb92653b5195c5

7 years agoFix for Bluetooth not restarting on User Switch
Ram Periathiruvadi [Thu, 4 May 2017 02:11:20 +0000 (19:11 -0700)]
Fix for Bluetooth not restarting on User Switch

The flag that keeps track of the Bluetooth adapter status(mEnable) is
not guarded correctly and could go out of sync with the adapter status.
This causes User Switch handling to not function correctly since it
checks for the status of the mEnable flag before restarting Bluetooth.
This fix queries the Bluetooth Adapter for the status instead of using
the mEnable flag.

Bug: b/37648701
Test: Tested switching users multiple times in both phone and carkit.
Also tested pairing and connection for sanity.

Change-Id: I17facecf8e1de90df11c11d5b0a184f48a0356e4
(cherry picked from commit 7d1203a2f4fdbafe26d33421c3cdd83f07a5fba8)

7 years agoFix ordering of notifying dismiss callback
Jorim Jaggi [Thu, 18 May 2017 00:05:29 +0000 (02:05 +0200)]
Fix ordering of notifying dismiss callback

Otherwise all unlocks will result in onDismissCancelled.

Also fixes a race condition bug where we call
reportKeyguardShowingChanged but we don't wait until the state is
updated. Then, we called onDismissSucceeded such that
KeyguardManager.isDeviceLocked would still return true. Fix this
by waiting for the message to be processed.

Note that delays shouldn't be a problem here as we are soon
calling reportKeyguardShowingChanged from the UiOffloadThread.

Test: KeyguardLockedTests
Change-Id: I0b312a5f02be3a3d1028d8bf0cd1b8e6a33476ce
Fixes: 38219395

7 years agoMerge "Fix GraphicBuffer leaks in system_server" into oc-dev
TreeHugger Robot [Wed, 17 May 2017 23:55:21 +0000 (23:55 +0000)]
Merge "Fix GraphicBuffer leaks in system_server" into oc-dev

7 years agoMerge "Reset hidden state of AppToken that was cleared due to starting window" into...
TreeHugger Robot [Wed, 17 May 2017 23:54:48 +0000 (23:54 +0000)]
Merge "Reset hidden state of AppToken that was cleared due to starting window" into oc-dev

7 years agoFix refactoring typo
Jorim Jaggi [Wed, 17 May 2017 23:53:56 +0000 (01:53 +0200)]
Fix refactoring typo

Seems like when we renamed/rearranged the methods we didn't ignore
mPolicyVisibility..and that's the most important part!

Fixes a bug where the dock divider isn't animating when unlocking
the phone.

Bug: 36200726
Change-Id: I4c5e9ca7f1b6e7bf21f793e1cf39d92fe77489e8

7 years agoUnbreak even more APK 26 apps running on "O" preview/beta builds.
Jeff Sharkey [Wed, 17 May 2017 23:53:07 +0000 (17:53 -0600)]
Unbreak even more APK 26 apps running on "O" preview/beta builds.

Bug: 38391358
Test: builds
Change-Id: Ic48f9cb53da3ed8241e5d40d3096304ee4dfebd2

7 years agoOptimize latency when unlocking phone
Jorim Jaggi [Mon, 15 May 2017 00:40:05 +0000 (02:40 +0200)]
Optimize latency when unlocking phone

Latency when unlocking the phone regressed a bit for two reasons:
- For lockscreen -> app we now have to create a full starting
window containing the snapshot, while previously this was just
showing a surface.
- For lockscreen -> home, we can't use the saved surface anymore
because currently we don't support snapshotting translucent
activities. However, in the long term, we want home screen to be
more involved into transitions anyways, so we'll have to wait for
the first frame draw anyways.

However, crystal ball trainee developer Jorim added some
artificial latency in this transition 3 years ago, because he knew
that it is going to be an issue at some point so we have some
headroom to improve! Genius! On a more serious note, it was because
he didn't understand how to read systraces with binders involved (to
be fair, there was also no binder tracing).

Now, we can completely fix the introduces latencies above by
removing this latency of 100ms, and we are 30-70ms better than
before! However, this requires a lot of discipline in SystemUI.
Currently, the callback to dismiss Keyguard takes around 30ms. By
moving all non-essential binder calls of the main thread or to the
next frame, we bring this down to 5ms, such that window animation
and Keyguard animation starts about at the same time.

Test: Take systrace, unlock phone...profit!

Fixes: 38294347
Change-Id: I481fe4ecf358ed09f7142dd9e7ecd290b53c500c
Merged-In: I3ea672bc2eca47221bc6c9f3d7c56b6899df207d

7 years agoUnbreak APK 26 apps running on "O" preview/beta builds.
Dan Sandler [Wed, 17 May 2017 23:07:56 +0000 (16:07 -0700)]
Unbreak APK 26 apps running on "O" preview/beta builds.

Bug: 38391358
Test: runtest systemui-notification
Change-Id: Ib78dd3e2a3dcb16faae33a0d5a07475187fb3463

7 years agoFix a race condition in the A2dpProfile constructor
Antony Sargent [Wed, 17 May 2017 22:46:51 +0000 (15:46 -0700)]
Fix a race condition in the A2dpProfile constructor

When constructing A2dpProfile objects, we were creating an
A2dpServiceListener before initializing the mWrapperFactory instance
variable that it depended on. If the onServiceConnected callback happens
immediately after the listener is created, we'd get a null pointer
exception. The fix is to move initialization of mWrapperFactory up before
the construction of the A2dpServiceListener.

Bug: 38391718
Test: run boot tests
Change-Id: Ib0be947099862b19da7737b54b99b944241b605f

7 years agoMerge "AAPT2: Respect format attr in <array> resource" into oc-dev
Adam Lesinski [Wed, 17 May 2017 22:52:20 +0000 (22:52 +0000)]
Merge "AAPT2: Respect format attr in <array> resource" into oc-dev

7 years agoMerge "AudioFocusRequest: longer code sample, javadoc fixes" into oc-dev
Jean-Michel Trivi [Wed, 17 May 2017 22:51:35 +0000 (22:51 +0000)]
Merge "AudioFocusRequest: longer code sample, javadoc fixes" into oc-dev

7 years agoAdd action to launch intent
Todd Kennedy [Wed, 17 May 2017 22:32:10 +0000 (15:32 -0700)]
Add action to launch intent

Change-Id: Ief861ed349b99619d0458eb7ce1b9edd6679a860
Fixes: 38350785
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest

7 years agoIn onDragEvent(), don't assume text is Spannable
Roozbeh Pournader [Wed, 17 May 2017 22:04:45 +0000 (15:04 -0700)]
In onDragEvent(), don't assume text is Spannable

Previously, onDragEvent() tried to set the anchor even if
the text was not Spannable. Now we check to make sure it is
Spannable before trying to set the selection.

Test: cts-tradefed run cts-dev --module CtsTextTestCases
Change-Id: I835bf3d6024bf3c85e1d248458829eef496ad93d
Fixes: 37261326

7 years agoFix GraphicBuffer leaks in system_server
Jorim Jaggi [Tue, 16 May 2017 20:26:02 +0000 (22:26 +0200)]
Fix GraphicBuffer leaks in system_server

IWindowId is being kept alive by binder in certain cases, which
will leak WindowState, which can leak a whole lot including
the snapshot GraphicBuffer.

- Fix a leak in WindowContainer.mTmpChain1/2
- When the window gets removed, make sure to release the reference
to the window state so even if Binder keeps IWindowId alive, we
don't keep WindowState alive
- Make sure that even if we leak TaskSnapshotSurface we don't leak
the GraphicBuffer.

Test: Boot, some basic sanity testing.
Bug: 36279079
Change-Id: I4a0a784b32bc2df47934b1bed1d62b0682beb2dd

7 years agoMerge "Match attributes to actions for pip a11y" into oc-dev
Phil Weaver [Wed, 17 May 2017 20:25:44 +0000 (20:25 +0000)]
Merge "Match attributes to actions for pip a11y" into oc-dev

7 years agoMerge "Add config option to enable/disable pause workaround." into oc-dev
Tyler Gunn [Wed, 17 May 2017 20:05:16 +0000 (20:05 +0000)]
Merge "Add config option to enable/disable pause workaround." into oc-dev

7 years agoMerge "We notify VR Core when a 2D intent is running in VR in persistent mode." into...
TreeHugger Robot [Wed, 17 May 2017 19:43:53 +0000 (19:43 +0000)]
Merge "We notify VR Core when a 2D intent is running in VR in persistent mode." into oc-dev

7 years agoMerge "AAPT2: Update locale script filtering logic" into oc-dev
Adam Lesinski [Wed, 17 May 2017 19:15:59 +0000 (19:15 +0000)]
Merge "AAPT2: Update locale script filtering logic" into oc-dev

7 years agoMerge "Fix call to get the current user id from a secondary SystemUI process." into...
Winson Chung [Wed, 17 May 2017 19:10:35 +0000 (19:10 +0000)]
Merge "Fix call to get the current user id from a secondary SystemUI process." into oc-dev

7 years agoMerge "Add a "Use high quality audio" option to Bluetooth A2DP device settings" into...
TreeHugger Robot [Wed, 17 May 2017 18:59:48 +0000 (18:59 +0000)]
Merge "Add a "Use high quality audio" option to Bluetooth A2DP device settings" into oc-dev

7 years agoMerge "Purge Nonexistent User Jobs on Boot" into oc-dev
Michael Wachenschwanz [Wed, 17 May 2017 18:58:06 +0000 (18:58 +0000)]
Merge "Purge Nonexistent User Jobs on Boot" into oc-dev

7 years agoMerge "Stop system process crash in TouchExplorer" into oc-dev
Phil Weaver [Wed, 17 May 2017 18:53:43 +0000 (18:53 +0000)]
Merge "Stop system process crash in TouchExplorer" into oc-dev

7 years agoMerge "Optimize App -> Recents" into oc-dev
TreeHugger Robot [Wed, 17 May 2017 18:15:37 +0000 (18:15 +0000)]
Merge "Optimize App -> Recents" into oc-dev

7 years agoMerge "WifiP2pWfdInfo: Only pass the wfd info to WifiNative" into oc-dev
Roshan Pius [Wed, 17 May 2017 18:14:30 +0000 (18:14 +0000)]
Merge "WifiP2pWfdInfo: Only pass the wfd info to WifiNative" into oc-dev

7 years agoMerge "Fix TimePicker crash on rotation." into oc-dev
TreeHugger Robot [Wed, 17 May 2017 18:09:47 +0000 (18:09 +0000)]
Merge "Fix TimePicker crash on rotation." into oc-dev

7 years agoWe notify VR Core when a 2D intent is running in VR in persistent mode.
Alex Sakhartchouk [Wed, 17 May 2017 16:34:53 +0000 (12:34 -0400)]
We notify VR Core when a 2D intent is running in VR in persistent mode.

One of the paths that sends these notifications incorrectly indicated
that a VR app was not running. Fix the callsite to include the current
VR component instead of null.

Bug: 38004624
Test: Launch VR app, verify null component is not sent to VR core
while it's running.

Change-Id: I0589ee51952a503bfddec214999ed5bce48715ba

7 years agoFix call to get the current user id from a secondary SystemUI process.
Winson Chung [Wed, 17 May 2017 17:46:49 +0000 (10:46 -0700)]
Fix call to get the current user id from a secondary SystemUI process.

- The secondary SystemUI process's KeyguardUpdateMonitor is not updated
  so we can't rely on it to get the current user id.

Bug: 38372598
Test: Switch users, launch some tasks, and switch back. Ensure that original
      tasks still exist

Change-Id: I26a7c70b5f7032a106dc1342c8b366e4797e8fa0

7 years agoMerge "Fix broken LoaderLifecycleTest#loaderIdentityTest" into oc-dev
TreeHugger Robot [Wed, 17 May 2017 16:18:57 +0000 (16:18 +0000)]
Merge "Fix broken LoaderLifecycleTest#loaderIdentityTest" into oc-dev

7 years agoStop system process crash in TouchExplorer
Phil Weaver [Tue, 16 May 2017 23:23:18 +0000 (16:23 -0700)]
Stop system process crash in TouchExplorer

We need to straighten out this state machine so we can
fix bugs in it without a high risk of creating others
(b/38246304). In the meantime, catching this exception at
least allows the device to keep operating.

Bug: 37338581
Test: Reproduced the conditions of the crash. Verified that
we now print the log message.

Change-Id: I1f4f84b5529b2bf638e225d474808e3d42484e78

7 years agoReset hidden state of AppToken that was cleared due to starting window
Wale Ogunwale [Wed, 17 May 2017 15:56:03 +0000 (08:56 -0700)]
Reset hidden state of AppToken that was cleared due to starting window

If a starting window is tranferred to a token from another token that is
visible, we also make the receiving token visible, however we don't
reset the start when the starting window is tranferred out again when no
other windows were added to the token. We now do.

Fixes: 38317227
Test: Launch Audible app music player and verify the LibraryActivity
token isn't in the visible state.

Change-Id: I0186c79aa24d64362f742229d60c75eb0c1a3f97

7 years agoAdd config option to enable/disable pause workaround.
Tyler Gunn [Mon, 15 May 2017 18:43:25 +0000 (11:43 -0700)]
Add config option to enable/disable pause workaround.

Test: Manual/unit
Bug: 35304446
Change-Id: I9a0c73ce62812a87e30d9759a0d205ffa282caf2

7 years agoMerge changes I858017b8,Ife32b600 into oc-dev
Selim Cinek [Wed, 17 May 2017 15:59:03 +0000 (15:59 +0000)]
Merge changes I858017b8,Ife32b600 into oc-dev

* changes:
  Improved the media color extraction algorithm
  Fixed broken coretests

7 years agoMerge "PackageManager: Change post-install GC request" into oc-dev
TreeHugger Robot [Wed, 17 May 2017 15:32:03 +0000 (15:32 +0000)]
Merge "PackageManager: Change post-install GC request" into oc-dev

7 years agoFix TimePicker crash on rotation.
Aurimas Liutikas [Wed, 17 May 2017 15:17:09 +0000 (08:17 -0700)]
Fix TimePicker crash on rotation.

We were using two different types of layouts in landscape and portrait.

I unintentionally changed it from RelativeLayout to LinearLayout originally,
without even removing relative layout params.

Bug: 37650833
Test: Manual check that TimePicker no longer crashes on device rotation
Change-Id: If951e83c32377c0ed52d553ceb80683c4fba8b85

7 years agoMerge "Fingerprint: call onRemovalSucceeded with # of remaining templates." into...
Charles He [Wed, 17 May 2017 12:58:15 +0000 (12:58 +0000)]
Merge "Fingerprint: call onRemovalSucceeded with # of remaining templates." into oc-dev

7 years agoOptimize App -> Recents
Jorim Jaggi [Sat, 13 May 2017 21:16:44 +0000 (23:16 +0200)]
Optimize App -> Recents

- Use same strategy to draw thumbnail bitmap by moving
startActivity off from the main thread and start caching the future
when AM is busy executing startActivity.
- Move some binder calls off the main thread.
- Add some trace points for better analysis in the future.
- Make toggleRecentApps asynchronous so we don't have to wait on
the next app-vsync - it's totally not needed.

Test: com.android.apptransition.tests.LatencyTests

Fixes: 32668632
Change-Id: Id6483e26e9d6c1e319bceaa8268da976cedfbca3
Merged-In: I15db41f2e821779972ab3b430033c70aa1dfd907

7 years agoWifiManager: add unspecified ip mode
Rebecca Silberstein [Wed, 10 May 2017 05:58:01 +0000 (22:58 -0700)]
WifiManager: add unspecified ip mode

Add an unspecified IP mode that allows WifiServiceImpl to clear state
in the interface-based IP mode tracking.

Bug: 31466854
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I15485cdab95ed4308cf5c2877fba40eac82bf162

7 years agoMerge "Revert "Fix recent apps in system UI for Skia pipeline"" into oc-dev
TreeHugger Robot [Wed, 17 May 2017 04:29:00 +0000 (04:29 +0000)]
Merge "Revert "Fix recent apps in system UI for Skia pipeline"" into oc-dev

7 years agoMerge "Set notification channel to MTP notification." into oc-dev
TreeHugger Robot [Wed, 17 May 2017 03:13:23 +0000 (03:13 +0000)]
Merge "Set notification channel to MTP notification." into oc-dev

7 years agoMerge "Add more JSDoc about ErrnoException" into oc-dev
TreeHugger Robot [Wed, 17 May 2017 02:16:56 +0000 (02:16 +0000)]
Merge "Add more JSDoc about ErrnoException" into oc-dev

7 years agoSet notification channel to MTP notification.
Daichi Hirono [Fri, 12 May 2017 08:56:08 +0000 (17:56 +0900)]
Set notification channel to MTP notification.

Bug: 38252594
Test: Manually connect MTP device to Android
Change-Id: Ib7ab12b2401d36dbb4cca2fd9c18cbd3505ed9ef

7 years agoMerge "AudioEffect: return DEAD_OBJECT for FAILED_TRANSACTION" into oc-dev
Andy Hung [Wed, 17 May 2017 01:34:11 +0000 (01:34 +0000)]
Merge "AudioEffect: return DEAD_OBJECT for FAILED_TRANSACTION" into oc-dev

7 years agoMerge "Fix issue #38244875: Bring back testChargingConstraintFails" into oc-dev
Dianne Hackborn [Wed, 17 May 2017 00:50:43 +0000 (00:50 +0000)]
Merge "Fix issue #38244875: Bring back testChargingConstraintFails" into oc-dev

7 years agoPurge Nonexistent User Jobs on Boot
Michael Wachenschwanz [Mon, 15 May 2017 20:53:09 +0000 (13:53 -0700)]
Purge Nonexistent User Jobs on Boot

In the case that a user has been removed but their jobs still exist on
disk, the JobSchedulerService will remove all jobs not associated with
current users on boot.
Exposed UserManagerService#getUserIds() via UserManagerInternal for
quick user id retrieval.

Fixes: 38261977
Test: manual

Change-Id: Id4b3c0a4142b4818fcd875eef18ea03f3c45ca40
Signed-off-by: Michael Wachenschwanz <mwachens@google.com>
7 years agoRevert "Fix recent apps in system UI for Skia pipeline"
John Reck [Tue, 16 May 2017 22:02:36 +0000 (22:02 +0000)]
Revert "Fix recent apps in system UI for Skia pipeline"

This reverts commit 625dd56a45bfe95c5f1baa1891529503ff3374a9.

Reason for revert: Caused a memory leak, b/38330767
Bug: 38136140
Bug: 38330767
Test: manual, verified memory isn't leaking doing the steps in b/38330767

Change-Id: I998bea04788d58ba6bad71c1691d5a3b33190c1b
Merged-In: I98b2dfd750be57a15785808e2d5723616e2ce20a

7 years agoWork on issue #36891897: Need to ensure foreground services...
Dianne Hackborn [Wed, 17 May 2017 00:03:44 +0000 (17:03 -0700)]
Work on issue #36891897: Need to ensure foreground services...

...can't hide themselves

Propagate to notification manager the apps that are causing
the "running in background" notification to be shown.

Also hopefully this time fix the problem with the notification
being stuck.  (We were mixing elapsed time in the state management
with uptime in the message scheduling.)

Test: manual

Change-Id: I9e38bff5fe69fa75b418e34c84d4e704ef70f460

7 years agoWorkaround issue with pip overlay not hiding cleanly.
Winson Chung [Tue, 16 May 2017 22:27:49 +0000 (15:27 -0700)]
Workaround issue with pip overlay not hiding cleanly.

- We were just finishing the activity which was causing issues with the
  wrong app transition being applied.  We actually can just hide the menu
  activity first before finishing it like we do elsewhere.

Bug: 38222481
Test: Open PiP, launch to show assistant

Change-Id: I348f8a17f76006bcef46fe01c87deae0b89f6586

7 years agoFix issue with deferred start of the background loader.
Winson Chung [Tue, 16 May 2017 23:57:18 +0000 (16:57 -0700)]
Fix issue with deferred start of the background loader.

- Previously we were (incorrectly) assuming that the creation of the
  BackgroundTaskLoader would be followed synchronously by a call to start()
  the background loader itself.  However, now that we post the start of
  the loader, the run() call can be made before the start() call.

Bug: 38310660
Test: This is an intermittent bug, hard to repro.
Change-Id: I4dfd18b8c3c127429c790177e98ca41ec70f493d

7 years agoMerge "Updating Overview to work with PiP" into oc-dev
Winson Chung [Tue, 16 May 2017 23:41:09 +0000 (23:41 +0000)]
Merge "Updating Overview to work with PiP" into oc-dev

7 years agoAudioFocusRequest: longer code sample, javadoc fixes
Jean-Michel Trivi [Tue, 16 May 2017 01:49:33 +0000 (18:49 -0700)]
AudioFocusRequest: longer code sample, javadoc fixes

Test: make -j offline-sdk-docs
Bug: 38124458
Change-Id: I18e83175f6919fd6afeae9475c00eded829cb96a

7 years agoFilter package related info
Todd Kennedy [Tue, 16 May 2017 22:47:01 +0000 (15:47 -0700)]
Filter package related info

This is one of many CLs to go through the PackageManager API surface
and filter access depending upon the requested information and the caller.
In this change, we filter ActivityInfo, ApplicationInfo and PackageInfo.

Bug: 35871369
Test: bit FrameworksCoreTests:android.content.pm.PackageManagerTests
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Change-Id: Iaefd73f912ab1c7e1844e72625388455f783a362

7 years agoMerge "Discover primary service by UUID for PTS tests (4/4)" into oc-dev
TreeHugger Robot [Tue, 16 May 2017 22:53:42 +0000 (22:53 +0000)]
Merge "Discover primary service by UUID for PTS tests (4/4)" into oc-dev

7 years agoMerge "Use ArrayList as children" into oc-dev
Jorim Jaggi [Tue, 16 May 2017 22:52:57 +0000 (22:52 +0000)]
Merge "Use ArrayList as children" into oc-dev

7 years agoMerge "Don't specify screen orientation for ReceiverActivity." into oc-dev
Jeff Sharkey [Tue, 16 May 2017 22:42:03 +0000 (22:42 +0000)]
Merge "Don't specify screen orientation for ReceiverActivity." into oc-dev

7 years agoMerge "Specify behavior around DocumentsProvider#openDocument()." into oc-dev
TreeHugger Robot [Tue, 16 May 2017 22:34:35 +0000 (22:34 +0000)]
Merge "Specify behavior around DocumentsProvider#openDocument()." into oc-dev

7 years agoAAPT2: Update locale script filtering logic
Adam Lesinski [Tue, 16 May 2017 22:26:54 +0000 (15:26 -0700)]
AAPT2: Update locale script filtering logic

AAPT got an update to its locale script filtering logic that
dealt with enabling the removal of specific locales like
b+sr+Latn. Update AAPT2 to do the same.

Bug: 28055669
Bug: 29412034
Test: aapt2_tests
Change-Id: I3315c0814796cff05dfa1032d66d0306fe2b12bc

7 years agoMerge "ViewRootImpl: Guard against null in performMeasure" into oc-dev
TreeHugger Robot [Tue, 16 May 2017 22:25:04 +0000 (22:25 +0000)]
Merge "ViewRootImpl: Guard against null in performMeasure" into oc-dev

7 years agoMerge "Fixed leak of app token in exiting list." into oc-dev
TreeHugger Robot [Tue, 16 May 2017 22:14:17 +0000 (22:14 +0000)]
Merge "Fixed leak of app token in exiting list." into oc-dev

7 years agoMerge "Fix interaction of magnification and Final-crop." into oc-dev
TreeHugger Robot [Tue, 16 May 2017 21:59:49 +0000 (21:59 +0000)]
Merge "Fix interaction of magnification and Final-crop." into oc-dev

7 years agoMerge "Restrict access to instant app data in usage stats" into oc-dev
TreeHugger Robot [Tue, 16 May 2017 21:56:09 +0000 (21:56 +0000)]
Merge "Restrict access to instant app data in usage stats" into oc-dev

7 years agoMerge "SurfaceView: Reset window stopped state when attaching to window." into oc-dev
TreeHugger Robot [Tue, 16 May 2017 21:51:24 +0000 (21:51 +0000)]
Merge "SurfaceView: Reset window stopped state when attaching to window." into oc-dev

7 years agoDon't report displays that are going to be removed
Andrii Kulian [Tue, 16 May 2017 20:44:05 +0000 (13:44 -0700)]
Don't report displays that are going to be removed

When display is removed from system, it is immediately removed from
AM, but removal can be deferred in WM if there is an active animation
on that display. If AM then requests display ids in focus order from
WM, it might get a display that was already deleted in AM.
This CL skips displays marked for deferred removal.

Bug: 38166277
Test: DisplayContentTests#testDontReportDeferredRemoval
Change-Id: I49544963f476fc58a609094781ed46541af8a238

7 years agoDiscover primary service by UUID for PTS tests (4/4)
Jakub Pawlowski [Tue, 16 May 2017 17:56:35 +0000 (10:56 -0700)]
Discover primary service by UUID for PTS tests (4/4)

Bug: 38123054
Test: manual
Change-Id: I89e088e60f4325f1ece59d22efda0c907a3b716a
(cherry picked from commit fe2bf16a2b287c3c748cd6fa7c14026becfe83ff)

7 years agoMerge "Always add the instant app installer" into oc-dev
TreeHugger Robot [Tue, 16 May 2017 20:39:39 +0000 (20:39 +0000)]
Merge "Always add the instant app installer" into oc-dev

7 years agoMerge "Fix broken retaildemo tests" into oc-dev
Christine Franks [Tue, 16 May 2017 20:34:35 +0000 (20:34 +0000)]
Merge "Fix broken retaildemo tests" into oc-dev

7 years agoFix broken LoaderLifecycleTest#loaderIdentityTest
George Mount [Tue, 16 May 2017 20:07:51 +0000 (13:07 -0700)]
Fix broken LoaderLifecycleTest#loaderIdentityTest

Bug 37994415

We have a preemptive check for getLoaderManager() to ensure that
the host is set before returning a value. In this test, the host
was not set because the fragment was restored and on the back stack.

The solution is to pop the back stack to ensure that it is added
so that it comes up to the proper state before getting the loader
manager.

Test: ran the broken test
Change-Id: Ic91cc5ca9468da22bdfef28cda1d4488b2f737f0

7 years agoFix issue #38244875: Bring back testChargingConstraintFails
Dianne Hackborn [Tue, 16 May 2017 20:14:37 +0000 (13:14 -0700)]
Fix issue #38244875: Bring back testChargingConstraintFails

- Add new "get-job-state" shell command that the tests can use
  to find out what is going on with a job.
- Fix an issue in the battery controller where it would not
  immediately stop with a "battery not low" constraint when
  the battery becomes low.
- Also an optimization to rescheduling jobs, for every scheduled
  job that is not ready don't look to see if it is active.
  Instead, go through the active jobs and see if any are no
  longer ready.

Test: bit -t CtsJobSchedulerTestCases:*

Change-Id: I5611886653258ca337eee97c5ee1b9b3dfdb6d85