To make the WebView preparation mechanism testable we add a utility
interface that can be overridden during a test to avoid calling the
Android framework and to provide custom WebView packages.
With this change we also split some of the code from the WebViewFactory
(code unrelated to WebView loading) into a separate utility class.
Bug: 27635535
Change-Id: I265ecd42b24ad5383637e125b3654ff339c9df9c
Also fixes a bug where the remote input view stays focused
when the inline settings open.
Also prevents sharing from contexts that are not activities,
and prevents text processing when the device is not provisioned.
Bug: 27633360
Change-Id: I8b6e7f661bd873d88e7e2460d043c2aa5f849516
API changes to allow a meteredHint to be passed
from a network scorer through to the wifi subsystem.
BUG:27702356
Change-Id: Ic466852d855af54c1754c4663388f24f54ed0691
Do not call Configuration.setLocales(empty LocaleList) if the locale
list is empty since Configuration.setLocales calls setLayoutDirection
which resets the layout to LTR.
Bug: 27411138
Change-Id: I7fa9693cdb7ed90267f074812c26ea50314ad839
Print ActivityClientRecord state when ActivityThread#performStopActivityInner
is called for already stopped activity.
Bug: 25267624
Change-Id: I2b044e42d0188ef9eaf15422b6a05617ade802e2
The last caller of the deprecated constructor of InputMethodSettings was
just removed [1]. Since it is not a public API, we can now safely
remove it.
[1]: I09cba4066b95c4a9e89a3e4f83d75b97882502dc
143a6869476a4be5962d4bba3b222d078f46b9a0
Bug: 26279466
Change-Id: I9035c417d6a8166c0ef4e4c7a00c151ffdd5fb49
If we have an existing file in the destination directory, which has the
same name with the source file, adding suffix number is
DocumentsProvider's responsibility.
Because MTP does not provide a way to check existance of files with
given name, the logic is implemented as try-and error strategy. The CL
lets If we MtpDocumentsProvider assume we have a file that shares the
same name with the source file if it failed to invoke
MtpDevice#sendObjectInfo. In this case MtpDocumentsProvider retry to
invoke sendObjectInfo with new name with suffix number.
BUG=26991190
Change-Id: I223ac5031f079bc91eb27709b0356f621a1ed55b
* changes:
Add more @NonNull/@Nullable to TextServicesSettings.
Remove an unnecessary int to String conversion.
Add more @NonNull/@Nullable to InputMethodSettings.
This is a safe refactoring to remove an unnecessary int to String
conversion in TextServicesSettings.
Settings.Secure.SELECTED_SPELL_CHECKER_SUBTYPE is a integer value that
indicates subtype ID (or SpellCheckerSubtype#hashCode() if the subtype
ID is not specified), and we can just rely on
Settings.Secure#putIntForUser() rather than converting int to String
by ourselves then pass it to Settings.Secure#putStringForUser().
Note that this change is still OK for existing users because
Settings.Secure#putIntForUser() has been internally doing exactly the
same thing.
Bug: 27687531
Change-Id: Ibcf12746f1295c12bec095300ea7f6ced0a51d09
This follows up to a previous CL [1] for Bug 26279466.
It turns out that we have not clearly defined how nonexistent key should
be handled in InputMethodSettings#getEnabledInputMethodsStr(), e.g. it
returns "" for when mCopyOnWrite is true but returns null when
mCopyOnWrite is false.
Also, since InputMethodSettings now can revert changes made during
mCopyOnWrite is true, the caller may also start receiving null in the
following scenario.
1. call mSettings.switchCurrentUser(userId, true).
2. call mSettings.putEnabledInputMethodsStr(str) where str is non-null.
3. call mSettings.switchCurrentUser(userId, false).
4. call mSettings.getEnabledInputMethodsStr().
If the caller of getEnabledInputMethodsStr() has assumed that it would
never return null, then it would start crashing due to NPE.
With this CL, getEnabledInputMethodsStr() is marked to be @NonNull we
should no longer see such kind of NPE.
[1]: I9c6f9bb3d51174198e5f73588637f87ea0d90e11
68645a638a
Bug: 27687531
Change-Id: I169ad4957e68b65c64251b0849056195b8ca4911
This is needed to change the default launcher on CTS for
ShortcutManager.
- When the default set with DPM.addPersistentPreferredActivity() is
still stronger.
- Ideally we should unify the code with HomeSettings, but I couldn't
find a good way to do this.
- I didn't make it to work to set the default for any intents
because building an intent filter from a command line would be
painful.
Bug 27548047
Change-Id: I66b153c20c7796147f77214b483112629f9d80c5
- Consolidates the use of handles in context hub, and nano apps.
- Quick fixes to typos.
- Update the signature to find nano apps to use primitive types
Change-Id: Icffa6fa86e0e33a536516d98bc4674c0a39b2163
It's easy for apps to throw custom Parcelables into Bundles, but
if the system tries peeking inside one of these Bundles, it triggers
a BadParcelableException. If that Bundle was passed away from the
Binder thread that delivered it into the system, we end up with a
nasty runtime restart.
This change mitigates this trouble by "defusing" any Bundles parsed by
the system server. That is, if it encounters BadParcelableException
while unpacking a Bundle, it logs and delivers an empty Bundle as
the result.
Simultaneously, to help catch the system process sticking its
fingers into Bundles that are destined for other processes, a Bundle
now tracks if it's "defusable." For example, any Intents delivered
through ActivityThread are marked as being defusable, since they've
arrived at their final destination. Any other Bundles are considered
to be "in transit" and we log if the system tries unparceling them.
Merges several Parcel boolean fields into a flags int. Add better
docs to several classes.
Bug: 27581063
Change-Id: I28cf3e7439503b5dc9a429bafae5eb48f21f0d93