This adds a new ActivityOption for the caller to ask the
system to track the time the user is in the app it launches,
delivering the result when they are done.
The time interval tracked is from when the app launches the
activity until the user leaves that app's flow. They are
considered to stay in the flow as long as new activities
are being launched or returned to from the original flow,
even if they cross package or task boundaries. For example,
if the originator starts an activity to view an image, and
while there the user selects to share, which launches gmail
in a new task, and they complete the share, the time during
that entire operation will be included.
The user is considered to complete the operation once they
switch to another activity that is not part of the tracked
flow. For example, use the notification shade, launcher, or
recents to launch or switch to another app. Simply going
in to these navigation elements does not break the flow
(although the launcher and recents stops time tracking of
the session), it is the act of going somewhere else that
completes the tracking.
The data is delivered to the app through a PendingIntent,
which includes the total time the app was in the flow along
with a time break-down by app package.
Change-Id: If1cf8892d422c52ec5042eba0e15a8e7e8f83abf
Previously getHomeActivity() returned the topmost home activity
independent of which user was currently running. That defeated the
purpose of the method. This fix returns the home activity of the
current user or null if one has not yet been created.
Also remove some cruft that accumulated.
Fixes bug 21055376.
Change-Id: Ic1d58129aedbe3624f8a9d12c05c84674687b0a4
As per API council request, factory methods should be used instead of using
boolean.
Bug: 21343772
Change-Id: Ia0889e46916f4ed7edb942217880cdf9c27771c2
This is a follow up CL for I219394178e4172bc47864297f1418e677dba.
As explained in the commit message of I219394178e4172bc47864297f,
IMM#mCurRootView needs to be synchronized with the actual window
focus more precisely to fix Bug 20820914. Hence we should not
clear IMM#mCurRootView in IMM#finishInputLocked() anymore.
Ideally this CL should have been included in the previous CL.
Manually tested following scenarios.
- Repro steps in Bug 6413553. Made sure that IMM#mCurRootView
is cleared after switching back from the current application to
the previous application with back key.
- Test application that calls WebView#showFindDialog(). Made sure
that LatinIME works fine when switching text fields. This is
non-trivial because android.webkit.FindActionModeCallback is
changed in the previous CL I219394178e4172bc47864297f1418e677db.
- Repro steps in Bug 21144633. Made sure that we can enter
recipient's name in the messaging app.
This CL depends on I219394178e4172bc47864297f1418e677dba25e5.
Bug: 20820914
Change-Id: Id6afc8fc64512225578c62557b96c7dc2e969adf
This CL didn't ship with diamond-release, but will make diamond-mr1.
This reverts commit 80fa3fa027c06be0f4bbd3a4ab319914377d883d.
Change-Id: I1b037b6ac6a504235463a36a5dcd152b6a1434f3
This CL didn't ship with diamond-release, but will make diamond-mr1.
This reverts commit c663d99f007c0faa7b66a569ec4083b82d60ef15.
Change-Id: I1430ed7a3221a4f06ad730778c757a68e16b808b
If there was a window with FLAG_DISMISS_KEYGUARD first, when the
device was unlocked, mWinDismissingKeyguard was set to that window.
Now, a window with FLAG_SHOW_WHEN_LOCKED came on top, so we set the
Keyguard as occluded, but we didn't reset the window that is
dismissing Keyguard.
After that, the old window with FLAG_DISMISS_KEYGUARD was the focused
window again. However, since we didn't reset mWinDismissingKeyguard,
we ended up with DISMISS_KEYGUARD_CONTINUE, and lockscreen was not
occluded anymore. However, we never really told Keyguard about it
because DISMISS_KEYGUARD_CONTINUE was set instead of
DISMISS_KEYGUARD_START.
The first fix of this bug is to always tell Keyguard about the
current occluded state. The second fix is to reset
mWinDismissingKeyguard in case a window SHOW_WHEN_LOCKED comes on top.
Bug: 20102975
Change-Id: I7c778df09a1e393b9eeaf51fd2013012cb40fea9
This flag indicates if scan was successful and results were
updated. It will be set to false if a scan is not performed
(intentionally) or if it failed to produce any results.
Bug: 20642015
Change-Id: I06a1fdd684932db68891ee28d5a049980f483f0f
Currently was using toString(), switch to "flattenToString" so it is
consistent with the call log.
Bug: 20954214
Change-Id: Ia9ed67bf463e4a2d4d9a02e00243d49238be17fe
This lead to a temporary flash when a notification came in with
the empty shade view being visible.
Bug: 20972545
Change-Id: I2b06f63dd43bf53bb2d1da0cddb635a709663f71