Commit Graph

7610 Commits

Author SHA1 Message Date
TreeHugger Robot
171ef98df6 Merge "Fix interaction w/ work profile & last chosen" 2017-02-14 01:24:19 +00:00
Michael Kwan
321ceda49f Merge "Only modify window layout params when necessary." into cw-f-dev am: 9fbd981f23 am: a26e371c9b
am: 49fa0405b1

Change-Id: Iadf40b31d57157bc1303102b6afc38d23afc3996
2017-02-14 01:06:03 +00:00
Michael Kwan
49fa0405b1 Merge "Only modify window layout params when necessary." into cw-f-dev am: 9fbd981f23
am: a26e371c9b

Change-Id: I72bf9b5fa5dfaaa7573115ed5b6cca23a0be05f4
2017-02-14 01:00:23 +00:00
Michael Kwan
a26e371c9b Merge "Only modify window layout params when necessary." into cw-f-dev
am: 9fbd981f23

Change-Id: I36aa427a3023dcba2a29eccfc0b7aac43748e534
2017-02-14 00:55:32 +00:00
Michael Kwan
9fbd981f23 Merge "Only modify window layout params when necessary." into cw-f-dev 2017-02-14 00:48:12 +00:00
Hakan Seyalioglu
aeb1f1241e DO NOT MERGE - Check exported status in chooser
am: 7bae18232e

Change-Id: Id29e65bd455c704738618f1dacfcad53b8d0b773
2017-02-14 00:41:55 +00:00
Hakan Seyalioglu
13405c5529 Fix interaction w/ work profile & last chosen
bug: 34677697
Test: New unit tests added
Change-Id: Ibb5c804c16a758ff041ce7165fda561d903b5f31
2017-02-13 15:24:58 -08:00
Hakan Seyalioglu
7bae18232e DO NOT MERGE - Check exported status in chooser
Relevant change in master is ag/1844170

bug: 34147053
Change-Id: Ic9d9d65c66325904c95ab3966bdcc16e7668278b
(cherry picked from commit e3286c3145)
2017-02-13 23:12:28 +00:00
Yohei Yukawa
ff54b306de Merge "Track event flow to IMMS#setImeWindowStatus" 2017-02-13 22:08:35 +00:00
Michael Kwan
134ad6ef3f Only modify window layout params when necessary.
Cancelling swipe-to-dismiss will trigger a check to ensure the window
is reset to its original state. Ensure that the reset is actually
required before setting the new layout attributes.

Bug: 34816397
Change-Id: Idf26ce7c8b63dc44a76effefcb32eb8d8665f605
2017-02-13 13:20:09 -08:00
Winson Chung
4de191dc1b Merge "Adding PipManager dumps." 2017-02-13 20:40:35 +00:00
Winson Chung
12cb6628db Merge "Create a new stack for the assistant activity." 2017-02-13 20:39:52 +00:00
Selim Cinek
2698d1d1e8 Merge changes Ie3736d80,I52444f4e
* changes:
  Improved collapsed messaging notifications
  Fixed a bug where the heads-up couldn't time out
2017-02-13 20:37:48 +00:00
Yohei Yukawa
6db3bfe33d Track event flow to IMMS#setImeWindowStatus
This is part of work to introduce historical debugging infrastructure
for Android IME.

In this CL, we will focus on the following two event flows.

 A1. IMMS#attachNewInputLocked() queues MSG_(RE)START_INPUT to deliver
     new InputConnection/EditorInfo to the current IME
 A2. The IME triggers IMS#onStartInput()/IMS#onRestartInput() and
     updates the following fields:
      - InputMethodService#mStartedInputConnection
      - InputMethodService#mInputEditorInfo

 B1. IME is expected to call back IMM#setImeWindowStatus() to notify
     its window visibility change to IMMS.
 B2. IMMS updates the following field if the caller is still the
     current IME.
      - InputMethodManagerService#mImeWindowVis

What this CL aims to do is to enable IMMS to access A1 state when it
was in B2 state, by considering that for given a B1 the last A2
happened before B1 is the cause of B1 and B2.

To do this, IMMS issues a binder token in A1 and each IME keeps it
so that it can be passed in B1. By using this Binder token as a key,
IMMS can keep tracking state snapshot taken from each A1. Note that
those state snapshots keep alive until the Binder token's proxy in the
IME process loses strong reference from its GC root.

Test: Make sure `adb shell dumpsys input_method | grep mImeWindowVis`
      matches to the IME window visibility.
Test: Make sure the current IME is not receiving any
      InvalidParameterException from IMMS.
Bug: 35079353
Change-Id: I9921b381e02106dbffff5e0b3d13f0a1245ce807
2017-02-13 12:04:41 -08:00
Michael Kwan
6853de9729 Add tweaks to smooth out swipe to dismiss. am: 5758a9a94c
am: 2155f773db

Change-Id: Iab07b13f24b7ca32b6bbb6faf788a71fccb969ec
2017-02-13 19:38:32 +00:00
Michael Kwan
2155f773db Add tweaks to smooth out swipe to dismiss.
am: 5758a9a94c

Change-Id: I64b9e88a7efb164b0e0160f8b25f770fb986efd6
2017-02-13 19:32:35 +00:00
Winson Chung
29a786590f Adding PipManager dumps.
Test: adb shell dumpsys activity service com.android.systemui
Change-Id: Id647833f1b4dcb6226517c058d17d1812f022671
2017-02-13 10:23:04 -08:00
Shreyas Basarge
69f42ecbb6 Merge "BackupAgent#getBackupQuota() API" 2017-02-13 13:46:00 +00:00
TreeHugger Robot
0bb700914c Merge "Rely on com.android.internal.os.SomeArgs" 2017-02-13 09:32:34 +00:00
Yohei Yukawa
ce82eb2d86 Rely on com.android.internal.os.SomeArgs
Before introducing new state tracking IDs to IInputConnectionWrapper,
this CL cleans up IInputConnectionWrapper to use
com.android.internal.os.SomeArgs instead of local-defined one in favor
of possible performance improvement thanks to the process grobal
object pool that com.android.internal.os.SomeArgs has.

This is a mechanical refactoring CL. No behavior change is intended.
Test: No new warnings in `adb logcat` from the following TAGs
      - IInputConnectionWrapper
      - InputMethodManager
      - InputMethodManagerService
      - InputMethodService
Bug: 35079353
Change-Id: Ic614f112f960382280acd8891b3af56d47679f08
2017-02-12 23:16:47 -08:00
TreeHugger Robot
d2c4784359 Merge "Hide logspam due to redundant finishComposingText" 2017-02-13 06:49:52 +00:00
Michael Kwan
5758a9a94c Add tweaks to smooth out swipe to dismiss.
Bug: 34673753
Change-Id: I5a9d420c70d124fc764803d505291e66818b1aa2
(cherry picked from commit 2e11adaac3)
2017-02-13 06:17:06 +00:00
Yohei Yukawa
77e51831a4 Hide logspam due to redundant finishComposingText
Currently we see two warning messages
  "finishComposingText on inactive InputConnection"
  "finishComposingText on inactive InputConnection"
every time every time the View focus is switched from one EditText
to another EditText on the same window, which is really spammy.

This is actually not critical if IInputConnectionWrapper was already
finished, because with my previous CL [1] it is guaranteed that
InputConnection#finishComposingText() was already called followed by
InputConnection#closeConnection(), which means that the connection
is closed and should not accept any further requests. Thus ignoring
further #finishComposingText() only means that the system and/or IME
is calling #finishComposingText() unnecessarily, which is worth
showing spammy warnings in production builds.

To reduce logspam this CL hides warnings from the above case behind
DEBUG flag.

 [1]: If2a03bc84d318775fd4a197fa43acde086eda442
      aaa38c9f1a

Test: Make sure `adb logcat -s IInputConnectionWrapper:*` does not
      show "finishComposingText on inactive InputConnection" warnings
      while switching focus across different EditText on the same
      window.
Bug: 35079353
Bug: 35301295
Change-Id: I17f3a4f500bc19ebf8bae771bf658a93627b3ba3
2017-02-12 20:08:13 -08:00
TreeHugger Robot
639c371e96 Merge "Introduce @SoftInputModeFlags annotation" 2017-02-13 03:36:07 +00:00
TreeHugger Robot
618b7a9aec Merge "Track the last softInputMode in IMMS" 2017-02-13 03:31:45 +00:00
TreeHugger Robot
06c84f95f0 Merge "Merge restartInput into startInput in internal IPC" 2017-02-13 03:28:57 +00:00
Yohei Yukawa
22dac1c8df Introduce @SoftInputModeFlags annotation
Doing this allows us to annotate integer values that should corresponds
to WindowManager.LayoutParams#softInputMode.

Test: There should be no behavior change.  RetentionPolicy.SOURCE
      annotation should change nothing in production code.
Test: checkbuild
Bug: 32784563
Bug: 35079353
Change-Id: I96300b090edce327d0515c740183abe91ded6bac
2017-02-12 16:54:16 -08:00
Yohei Yukawa
22a8923368 Track the last softInputMode in IMMS
A field in WindowManager.LayoutParams softInputMode is something that
definitely needs to be kept tracking in historical debugging
infrastructure across IME-related processes (Bug 35079353) [1].  As a
preparation, this CL enables InputMethodManagerService (IMMS) to
include the last softInputMode specified in IMMS#windowGainedFocus()
in the dumpsys in human readable format.

 [1]: As explained in b.android.com/224318, softInputMode misspecified
      by app developers is a typical root cause of unexpected behavior
      in keyboard visibility.  Bugs such as Bug 23168250, Bug 27275709,
      and Bug 31770400 fall into this category.

Test: `adb shell dumpsys input_method | grep softInputMode=`
Bug: 35079353
Change-Id: I485ced030def179dad78b4b811c6eb52b5e5c951
2017-02-12 16:38:59 -08:00
TreeHugger Robot
9b66112906 Merge "Add tweaks to smooth out swipe to dismiss." 2017-02-12 23:57:29 +00:00
Winson Chung
8347163dbb Create a new stack for the assistant activity.
- Add a new stack that is not resized with multiwindow, and
  appears above the fullscreen and docked stacks, but below
  the pinned stack
- Add a method on VoiceInteractionSession to allow the assistant
  to launch activities into this new fullscreen stack.
- Also prevent any activities in the assist stack from the
  fetching of the on screen assist data.

Bug: 30999386
Test: android.server.cts.ActivityManagerAssistantStackTests

Change-Id: I22ab7629b5f758cf1e66d7d1c26648af6bc887c9
2017-02-12 14:52:15 -08:00
Michael Kwan
2e11adaac3 Add tweaks to smooth out swipe to dismiss.
Bug: 34673753
Change-Id: I5a9d420c70d124fc764803d505291e66818b1aa2
2017-02-12 13:43:45 -08:00
Yohei Yukawa
f7526b5896 Merge restartInput into startInput in internal IPC
This is the 2nd attempt to merge restartInput into startInput in
internal IPC after fixing the mistake in new parameter order in
the previous CL [1].

As a preparation to start tracking all the event flows that
cause InputMethodManagerService#setImeWindowStatus(), this CL
merges an internal IPC method IInputMethod#restartInput() into
IInputMethod#startInput() in favor of simplicity.

This is a refactoring CL that should have no behavior change.

 [1]: Ifda6f74ac1b1370d9e9a9fe60354b692121fdcb9
      1a5838e966

Test: Set true to InputMethodService#DEBUG and make sure startInput()
      and restartInput() are called in the following scenario.
      1. Complete the setup wizard.
      2. adb shell am start -a android.app.action.SET_NEW_PASSWORD
      3. Proceed to "Choose your password" page
      4. Make sure startInput() gets called.
      5. Type "aaaa" then hit "CONTINUE" button.
      6. Make sure restartInput() gets called.
Bug: 35079353
Change-Id: I476d0cf8cbb0a0134941854f9337d9ad15e66a71
2017-02-11 20:57:10 -08:00
TreeHugger Robot
9a49f85ae4 Merge "Revert "Merge restartInput into startInput in internal IPC"" 2017-02-12 02:08:10 +00:00
Yohei Yukawa
3eaf867487 Revert "Merge restartInput into startInput in internal IPC"
This reverts commit 1a5838e966 [1].

Reason of revert:
There was a mistake in the parameter order of MSG_START_INPUT.

 [1]: Ifda6f74ac1b1370d9e9a9fe60354b692121fdcb9

Test: none. This is a revert.
Bug: 35079353
Change-Id: Ic1487768932febe0f1f1b6e71929464e91f357e0
2017-02-11 23:42:15 +00:00
Yohei Yukawa
aab4e11c0a Merge "Inline IMMS#resetAllInternalStateLocked()" 2017-02-11 23:09:37 +00:00
Yohei Yukawa
d5c1d92eb5 Merge "Merge restartInput into startInput in internal IPC" 2017-02-11 23:07:51 +00:00
Yohei Yukawa
1a5838e966 Merge restartInput into startInput in internal IPC
As a preparation to start tracking all the event flows that
cause InputMethodManagerService#setImeWindowStatus(), this CL
merges an internal IPC method IInputMethod#restartInput() into
IInputMethod#startInput() in favor of simplicity.

Test: Done some quick manual testing to make sure that IME is
      still working
Bug: 35079353
Change-Id: Ifda6f74ac1b1370d9e9a9fe60354b692121fdcb9
2017-02-11 02:56:48 +00:00
Jesse Hall
01f47c116c resolve merge conflicts of b3a1417663 to nyc-mr2-dev-plus-aosp
am: 516274249f

Change-Id: Ifd131fb69d3fb2fe31bd0f06c074fdf15408dece
2017-02-11 01:24:32 +00:00
Jesse Hall
516274249f resolve merge conflicts of b3a1417663 to nyc-mr2-dev-plus-aosp
Test: mmma frameworks/base
Change-Id: I2e1e04f55d05fd8aa33da304bdb951713b37793c
2017-02-10 17:15:15 -08:00
Jesse Hall
b3a1417663 Zygote: Restore GL preload
Preloading GLES drivers in Zygote was removed previously since it is
incompatible with updatable drivers. That caused some app startup
latency and system memory use regressions. This change re-adds GLES
driver preloading, but only on devices that don't support driver
updates.

Bug: 34611670
Bug: 35052548
Test: boot angler, systrace of Calculator app startup
Change-Id: Ibdc6b3c0ba4473574722641d4bfad4b375f908a3
(cherry picked from commit ba0370eef3)
2017-02-10 12:59:10 -08:00
Yohei Yukawa
0d7aff8ab2 Inline IMMS#resetAllInternalStateLocked()
Currently IMMS#resetAllInternalStateLocked(boolean, boolean) has
only two call sites, and the first parameter is the constant for
each call site.  We can get much simpler code by inlining the
method in question into those two call sites. It actually revealed
that UNBIND_REASON_RESET_IME should have been called
UNBIND_REASON_SWITCH_USER.

Test: no behavior change
Test: adb shell dumpsys input_method | grep "mMethodMapUpdateCount="
      to make sure that switching users can cause the same count
      increase.
Test: adb shell dumpsys input_method | grep "mMethodMapUpdateCount="
      to make sure that switching the device locale can cause the
      same count increase.
Bug: 35079353
Change-Id: I63388402369f58d11fdb21b508eb2051ff39fa5b
2017-02-10 10:50:32 -08:00
Shreyas Basarge
b6e73c9670 BackupAgent#getBackupQuota() API
This cl adds a getBackupQuota() method
to the BackupAgent abstract class. This
can be used by the agent to determine
how much data it can back up.

Ref: https://docs.google.com/document/d/18MnfwkDfKNtXQBPRmL8vpVgfLgSWJsDja1Nm1QV5hOw/edit#heading=h.unncio2r7de2

Bug: 33750400

Test: GTS test at ag/1850525

Change-Id: I2eb5c0066c99732ec84cae9211f3a1edaad2baf1
2017-02-10 18:11:40 +00:00
Andreas Gampe
c28592da33 Merge "Framework: Clean up RuntimeInit/ZygoteInit/WrapperInit" am: 851afe56b8 am: 0e01cae667
am: 74acde1bc5

Change-Id: I40d67fcde4d9263d5c75d5c3f782a860dcff93f8
2017-02-10 01:03:15 +00:00
Andreas Gampe
74acde1bc5 Merge "Framework: Clean up RuntimeInit/ZygoteInit/WrapperInit" am: 851afe56b8
am: 0e01cae667

Change-Id: Ifaa7595efaef554a47e05e030ccaf16a53a3bfce
2017-02-10 00:58:42 +00:00
Treehugger Robot
851afe56b8 Merge "Framework: Clean up RuntimeInit/ZygoteInit/WrapperInit" 2017-02-10 00:45:56 +00:00
TreeHugger Robot
d8502d0513 Merge "Zygote: Restore GL preload" 2017-02-10 00:36:45 +00:00
Andreas Gampe
a5b0ca3f89 Merge "Framework: Clean up RuntimeInit/ZygoteInit/WrapperInit" 2017-02-09 23:17:17 +00:00
Jesse Hall
ba0370eef3 Zygote: Restore GL preload
Preloading GLES drivers in Zygote was removed previously since it is
incompatible with updatable drivers. That caused some app startup
latency and system memory use regressions. This change re-adds GLES
driver preloading, but only on devices that don't support driver
updates.

Bug: 34611670
Bug: 35052548
Test: boot angler, systrace of Calculator app startup
Change-Id: Ibdc6b3c0ba4473574722641d4bfad4b375f908a3
2017-02-09 14:47:59 -08:00
Andreas Gampe
76d4fc8451 Framework: Clean up RuntimeInit/ZygoteInit/WrapperInit
Move methods where they belong.

(cherry picked from commit 4e66db8d0c)

Test: m
Test: Device boots
Change-Id: I805c6493078e960ff5b70d84dd93d2da6c7aa797
2017-02-09 13:16:34 -08:00
Andreas Gampe
4e66db8d0c Framework: Clean up RuntimeInit/ZygoteInit/WrapperInit
Move methods where they belong.

Test: m
Test: Device boots
Merged-In: I805c6493078e960ff5b70d84dd93d2da6c7aa797
Change-Id: I805c6493078e960ff5b70d84dd93d2da6c7aa797
2017-02-09 13:16:17 -08:00