Commit Graph

73554 Commits

Author SHA1 Message Date
TreeHugger Robot
6ba95dab42 Merge "Fix bugs in FontResourcesParser and add coretests" 2017-02-03 10:16:01 +00:00
Yohei Yukawa
74e5ff6e92 Merge "Simplify the constructor of InputMethodInfo" 2017-02-03 01:33:42 +00:00
Selim Cinek
4f3463290b Merge "Increased the collapsed size of messaging notifications" 2017-02-02 23:59:08 +00:00
Paul Lawrence
46e48b9aa4 resolve merge conflicts of fde0a41065 to master
Test: Make sure builds, boots
Change-Id: Idf86dc5d888c09e8a65ada51fc2f32aae6d5570d
2017-02-02 13:28:45 -08:00
Abodunrinwa Toki
fafdb7372f Fix TextClassifier.getTextClassificationResult()
Gracefully handles situations where a default app cannot be found
to handle the intent.

1. If we can not find any app to handle the intent,
   do not include an "assist" menu item entry to fire the intent.
   Also, do not linkify the entry.
2. If we do not have a default app to handle the intent,
   show a generic title for apps that will handle the intent
   and do not include an icon.

In the ideal case where we find a default app to include the intent,
show the app's (preferably activity's) title and icon.

Test: Manually tested. There's an AI to write more automated tests.
Bug: 34777322
Bug: 34927631
Change-Id: Ia94efbbdda3da8f181fac9228cd2d3a76cb727d3
2017-02-02 20:35:51 +00:00
TreeHugger Robot
e8ae5566fb Merge "Batterystats commands to simulate screen on/off" 2017-02-02 20:05:45 +00:00
Erik Kline
e8bc75bfcc Merge "Add ConnectivityManager.networkCapabilitiesForType()" am: c313123afe am: 6f32aa0259 am: 7196e935a8
am: c700509ade

Change-Id: I15fe6fe4c9aec3d244b46516c2992ded33337a9f
2017-02-02 20:03:51 +00:00
TreeHugger Robot
62e1a05076 Merge "Alert Windows behavioral changes" 2017-02-02 19:47:29 +00:00
TreeHugger Robot
c54e1a6017 Merge "TextClassificationManager: Make certain methods thread-safe" 2017-02-02 19:13:45 +00:00
Chad Brubaker
aea3ec67a2 Merge "Allow ephemeral apps to reach any CATEGORY_BROWSABLE" 2017-02-02 19:08:00 +00:00
Clara Bayarri
9b161fbdbc Fix bugs in FontResourcesParser and add coretests
Bug: 34920360
Test: runtest --path frameworks/base/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java
Change-Id: I41da558957d25a6f7ee62a4ed9fecf470b74f1d0
2017-02-02 18:45:54 +00:00
Paul Lawrence
fde0a41065 Install seccomp into zygote not init am: ef85477470 am: 521d25294b
am: e6e8c7a1dd

Change-Id: I97d2843a2c2940b558f216cf550891a80963be54
2017-02-02 18:37:22 +00:00
Paul Lawrence
e6e8c7a1dd Install seccomp into zygote not init am: ef85477470
am: 521d25294b

Change-Id: I7c2c84a5bd67490070777d11d7f930c5dba90cbe
2017-02-02 18:30:49 +00:00
Paul Lawrence
521d25294b Install seccomp into zygote not init
am: ef85477470

Change-Id: I22745a759cc4f9797cb3c806bbdd4d69d6cccdcb
2017-02-02 18:18:08 +00:00
TreeHugger Robot
61d7a8a7f5 Merge "port status bar logs to Tron V2" 2017-02-02 18:07:56 +00:00
Paul Lawrence
ef85477470 Install seccomp into zygote not init
Bug: 34710876
Test: Boots, correct size filter installed, blocks unallowed calls

Change-Id: I3e66e8724ace37f7d30451b98a5e574766252ea0
2017-02-02 17:45:11 +00:00
Abodunrinwa Toki
4039454f6f TextClassificationManager: Make certain methods thread-safe
1. getDefaultTextClassifier()
2. getLanguageDetector()

Test: CtsWidgetTestCases passes
Change-Id: Ie0cb866cdefea2839efb38a1113e434a3e8159b0
2017-02-02 17:16:36 +00:00
Wale Ogunwale
5cd907d3d6 Alert Windows behavioral changes
- Introduced TYPE_APPLICATION_OVERLAY window type. Can be used by apps
to display windows on top of other app windows, but below critical
system windows.
- Deprecate alert window types TYPE_PHONE, TYPE_SYSTEM_ALERT,
TYPE_SYSTEM_OVERLAY, TYPE_PRIORITY_PHONE, and TYPE_SYSTEM_ERROR.
Apps should now use TYPE_APP_OVERLAY for this.
- Apps targetting O or greater are not allowed to add the old alert
window types.
Apps targetting less than O can still add the old types.
Apps with permission INTERNAL_SYSTEM_WINDOW (system signature apps) can
still add the old types.
- Z-order old alert windows types below TYPE_APPLICATION_OVERLAY if
they are added by an app without the INTERNAL_SYSTEM_WINDOW permission.

Test: android.server.cts.AlertWindowsTests
Bug: 33256752
Change-Id: I12170955a7a333151d3387c169b51c53c32164fc
2017-02-02 08:20:49 -08:00
Gustav Sennton
f9295bcc24 Merge "Make sure we cannot use packages targeting pre-O as WebView packages." 2017-02-02 14:34:04 +00:00
Esteban Talavera
3355950785 Merge "Affiliated profile owners can set lock task packages" 2017-02-02 14:15:55 +00:00
Narayan Kamath
ff5659fbc3 Revert "Call ActivityCallbacks after corresponding activity methods"
This reverts commit 660cf30e21.

bug: 34415265
bug: 34914977
Test: chrome launches

Change-Id: I170365fd47313bafb0d722e6d55ee119336137c4
2017-02-02 13:55:31 +00:00
Chris Wren
27a52fa86b port status bar logs to Tron V2
Bug: 33303260
Test: runtest --path frameworks/base/core/tests/coretests/src/com/android/internal/logging/legacy/ && runtest --path frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone
Change-Id: I7746b846247e930617f0b440217635e71ed58bb5
2017-02-02 07:47:16 -05:00
Yohei Yukawa
ddad4b93fa Simplify the constructor of InputMethodInfo
This is a preparation CL for fixing Bug 32343335, where we aim to
avoid unnecessary reconstruction of InputMethodInfo objects by caching
immutable part of those metadata by APK revisions.

The reason why we have had to pass additional subtypes not just as
List<InputMethodSubtype> but as Map<String, List<InputMethodSubtype>>
to create an instance of InputMethodInfo is that how to compute
so-called IME ID is not exposed from InputMethodInfo even as @hide
method.

In practice it has been calculated as
  new ComponentName(packageName, serviceName).flattenToShortString()
and those IDs are already stored here and there including secure
settings.  It is almost impossible to change the rule anymore hence
we should consider them to be a kind of public API.

This CL adds a @hide static method InputMethodInfo#computeId() to
make it clear.  This also enables us to simplify the constructor
of InputMethodInfo finally, because we have used IME IDs as keys
in subtypes.xml, where additional subtypes are stored.

Test: Manually verified that addtional subtypes still work
Test: checkbuild
Bug: 32343335
Change-Id: I1deaa470e042eac749e7a847933d14448a0d9e03
2017-02-02 01:46:13 -08:00
Ying Wai (Daniel) Fan
419fbce429 Merge "Prevent division-by-zero error when calculating battery capacity." 2017-02-02 08:32:13 +00:00
Erik Kline
c700509ade Merge "Add ConnectivityManager.networkCapabilitiesForType()" am: c313123afe am: 6f32aa0259
am: 7196e935a8

Change-Id: I2ab05143299f13012dc2a88efca52160e08c6d97
2017-02-02 07:32:09 +00:00
Erik Kline
7196e935a8 Merge "Add ConnectivityManager.networkCapabilitiesForType()" am: c313123afe
am: 6f32aa0259

Change-Id: I6828bc3bb094ca8597ca2d8538045758638c374f
2017-02-02 07:27:13 +00:00
Erik Kline
6f32aa0259 Merge "Add ConnectivityManager.networkCapabilitiesForType()"
am: c313123afe

Change-Id: I0ad50fbf38f11b383fd889dc598cfddd47051477
2017-02-02 07:22:05 +00:00
TreeHugger Robot
82c8e5c960 Merge "No warning/info log for expected/normal situations" 2017-02-02 06:46:33 +00:00
Tomasz Mikolajewski
813ef268ac Merge "Add plain mode for the quick viewer." 2017-02-02 05:10:31 +00:00
Tomasz Mikolajewski
867addf393 Add plain mode for the quick viewer.
When EXTRA_QUICK_VIEW_PLAIN is passed, then plain UI should be shown.
This is just a hint for third party apps, whic may ignore it.

Test: Not testable, as it's just a hint.
Bug: 32161075
Change-Id: Ie244d28d552f6c654be93a5749ac164d2a77d25f
2017-02-02 12:21:16 +09:00
Erik Kline
35bf06c968 Add ConnectivityManager.networkCapabilitiesForType()
This static method returns a NetworkCapabilities instance with
transports and capabilities set according to the given legacy type.

Also:
    - add NetworkRequest.Builder.setCapabilities(), to be able to use
      the NetworkCapabilities instances returned from the above
    - update UpstreamNetworkMonitor to make immediate use of this

Test: as follows
    - build (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
    - WiFi to DUN upstream tethering works
Bug: 32163131

Change-Id: Idfe1ddd2815c355cbf27cf29eb0e3de177de84e9
2017-02-02 11:07:59 +09:00
Felipe Leme
5523f9a2fc Merge "Improved AutoFill Save workflow." 2017-02-02 02:05:32 +00:00
Amith Yamasani
674c9bb2ff Batterystats commands to simulate screen on/off
Needed for batterystats cts tests to measure partial wakelock
duration reporting.

Bug: 34233085
Test: adb shell dumpsys batterystats enable pretend-screen-off
Change-Id: Ia7c76d6a0636d206e04f01be58d1e6dc3332c50d
2017-02-01 15:39:57 -08:00
TreeHugger Robot
bc5d58307a Merge "Fix a bug in View#hasFocusable with new auto-focusable behavior" 2017-02-01 23:23:43 +00:00
Yohei Yukawa
d033283508 No warning/info log for expected/normal situations
This CL hides warning and info log messages from
InputMethodManagerService (IMMS) and InputMethodService (IMS) behind
DEBUG flag like other logs unless the state is certainly unusual.

Of course the definition of "unusual" is still an open question, but
basically that we should not see any suspicious message from IMMS/IMS
just by turning on a new phone, launching some applications, typing
something, and turning off the device. IMMS and IMS should expect all
events that can (easily) occur in that scenario, and no log is
necessary for such things.

Note that warnings suppressed with TODO comments will be tracked
under Bug 34851776 (and Bug 34886274).

Test: adb logcat -s InputMethodManagerService:* InputMethodService:*
      to monitor log in the following scenario:
       1. Boot the device.
       2. Complete the setup wizard.
       3. Launch Dialer and type something on it.
       4. Launch Contacts app and type something on it.
       5. Try some special modes:
           - Turn on/off display
           - Recents screen
           - Split-window mode
           - Guest user
           - Multi user
           - Direct-boot (setup a device password and reboot)
      except for logs about actual IPC calls from a background user.
Bug: 34838583
Bug: 34851776
Bug: 34886274
Change-Id: I3fcdeb919bb2f2940da9ff45e17ac00baa1253f4
2017-02-01 13:59:43 -08:00
TreeHugger Robot
edae71777f Merge "Fix setting null target fragments" 2017-02-01 20:54:55 +00:00
Julia Reynolds
986c32dafe Merge "Deprecate notification fields" 2017-02-01 20:24:24 +00:00
Brad Ebinger
e3482c2601 Merge "Adds @hide permission granting API for ImsServices" am: 390ec27f9d am: 6734275c2f am: fa1dca0ad6
am: 3aaf673c60

Change-Id: I6a6a2d136f0f31bbac984e4ba18f9f6b90808705
2017-02-01 19:46:55 +00:00
Brad Ebinger
3aaf673c60 Merge "Adds @hide permission granting API for ImsServices" am: 390ec27f9d am: 6734275c2f
am: fa1dca0ad6

Change-Id: Id2875b5b60401405e31e76eb07968798144df700
2017-02-01 19:42:16 +00:00
Brad Ebinger
fa1dca0ad6 Merge "Adds @hide permission granting API for ImsServices" am: 390ec27f9d
am: 6734275c2f

Change-Id: I6d502db3362aafcfed426b6598be0bd39dd38890
2017-02-01 19:35:56 +00:00
Brad Ebinger
6734275c2f Merge "Adds @hide permission granting API for ImsServices"
am: 390ec27f9d

Change-Id: I0f3d38811925884681d11cf18e12f1b0574d64c6
2017-02-01 19:30:41 +00:00
Treehugger Robot
390ec27f9d Merge "Adds @hide permission granting API for ImsServices" 2017-02-01 19:24:11 +00:00
Felipe Leme
0200d9ea15 Improved AutoFill Save workflow.
Currently, the onProvideAutoFillStructure() methods can be called
twice: to auto-fill an activity and to save the activity's data
in the service.

The problem with this approach is that when the save workflow is
called, the activity might have been gone. Hence, a proper approach
is to keep the initial AssistStructure data in the system_service
memory, watch for view changes, and then passed the new structure
back to the AutoFillService.

A side effect of this change is that we need another way to determine
if the view is sanitized or not. For "standard" views, that will be
defined based on whether the view content come from a resource or not,
but that logic is not implemented yet (for now, all views will be
considered sanitized, except for TextView passwords). For "custom"
views (such as WebView), this logic is responsibility of the view
implementation, through the newChild() method, which now takes a
flag (whose value could be AUTO_FILL_FLAG_SANITIZED for sanitized
views).

The SaveCallback.onSuccess() method was simplified: it does
not need a list of saved ids anymore the auto-fill UI will not use it
anymore.

Another side effect is that the Save notification is gone - until
it's attached again, it can be test by using:

    adb shell cmd autofill save

Finally, hook AutoFillUI on ACTION_CLOSE_SYSTEM_DIALOGS events.

BUG: 33269702
BUG: 31001899
Test: manual verification
Test: CtsAutoFillServiceTestCases passes
Change-Id: I907a7e21d1b3cd1ab6dec3a08d144a52655da46f
2017-02-01 11:00:15 -08:00
Adam Powell
0621742d3c Fix setting null target fragments
Bug 34869013
Test: CTS

Change-Id: Ibeed66f9a889a8e395bfabedcf22aebcbb848908
2017-02-01 10:45:12 -08:00
Sergei Vasilinetc
40c509ff0f Merge "Call ActivityCallbacks after corresponding activity methods" 2017-02-01 18:02:34 +00:00
Esteban Talavera
bdcada9762 Affiliated profile owners can set lock task packages
Mentioned that in the documentation, cleaned up the code
a bit and added unit tests

Bug: 34614754

Test: runtest -c com.android.server.devicepolicy.DevicePolicyManagerTest    frameworks-services
Change-Id: I91232bbe494398015094ab977c6a2adce339811f
2017-02-01 15:02:22 +00:00
Julia Reynolds
a33f5c4312 Deprecate notification fields
And move references to the deprecated fields to
NotificationRecord for testability.

Test: runtest systemui-notification
Change-Id: If3910dc78297ad66679b1efa380315127261a018
2017-02-01 09:56:00 -05:00
Gustav Sennton
564c2fd5db Make sure we cannot use packages targeting pre-O as WebView packages.
Using a WebView package targeting a release before O as WebView provider
on O will cause crashes (because of incompatibility issues), this CL
makes us interpret a package targeting a pre-O release as being invalid
on O.

Also remove the code that lets us fall back to loading the old
WebViewChromiumFactoryProvider (pre-O) class.

Bug: 34773740
Bug: 34180497
Test: Ensure WebView provider with targetSdkVersion="O" shows up in the
WebView Implementation Dev Setting, ensure targetSdkVersion=25 doesn't
show up.
Test: Add WVUS unit test to ensure a packages with targetSdkVersion < 26
are considered invalid, and > 26 are valid. Run WVUS unit tests.

Change-Id: I4d80d46019e2522bc3fc6068712d28eedb31fcce
2017-02-01 13:59:26 +00:00
Abodunrinwa Toki
8e332cc54b Merge "Ignore smart selection for multi-word selections." 2017-02-01 10:51:06 +00:00
TreeHugger Robot
07072e1c9f Merge "Add an API hint for metered multipath traffic." 2017-02-01 09:54:21 +00:00