Commit Graph

6418 Commits

Author SHA1 Message Date
Jesse Hall
e8ce1276e2 DO NOT MERGE Revert "Stop preloading EGL/GLES in Zygote"
This reverts commit 93f630e1c3.
Change has already been reverted in master, hence DO NOT MERGE.

Bug: 34348911
2017-01-17 12:34:14 -08:00
TreeHugger Robot
a959ccbc33 Merge "Stop preloading EGL/GLES in Zygote" into nyc-mr2-dev 2017-01-14 05:54:18 +00:00
Jesse Hall
93f630e1c3 Stop preloading EGL/GLES in Zygote
It's not clear this actually makes much difference on modern
devices/drivers. With updatable graphics drivers, we'd have to be able
to unload the preloaded driver from processes that don't use the
system driver, which is additional complexity and risk.

On bullhead and sailfish, meminfo actually showed slightly more memory
available while sitting at launcher just after boot with this change
than previously. Looking at detailed stats, the differences appeared
to mostly within run-to-run variation, but there wasn't evidence of a
regression.

Bug: 33531483
Test: boot through lockscreen/launcher
Change-Id: I1892302c1750cdbeaf5b9979f8da4dc6bd7b3e75
Merged-In: I1892302c1750cdbeaf5b9979f8da4dc6bd7b3e75
2017-01-13 20:09:57 -08:00
Andrew Scull
3c9b36482f resolve merge conflicts of ad4aa1ce7d to nyc-mr1-dev am: eb35ad9969
am: 3aac3ebee1

Change-Id: Id7be6d9656b292ec1bf526750db8081022267c4a
2017-01-13 21:16:31 +00:00
Andrew Scull
3aac3ebee1 resolve merge conflicts of ad4aa1ce7d to nyc-mr1-dev
am: eb35ad9969

Change-Id: I4fd9ce4c79db5a10f28008c89205fc9c8ef2888f
2017-01-13 17:17:49 +00:00
Andrew Scull
eb35ad9969 resolve merge conflicts of ad4aa1ce7d to nyc-mr1-dev
Change-Id: I97ef31536cd06495a08a3f94f81df2d1376186e0
2017-01-13 15:28:36 +00:00
Andrew Scull
ad4aa1ce7d resolve merge conflicts of e4cefbf4fc to nyc-dr1-dev
Change-Id: Ib536a33ba381c28397320edd516d52727e5bdacc
2017-01-13 13:16:09 +00:00
Andrew Scull
e4cefbf4fc Don't save password metrics to disk.
On FBE devices, don't save the metrics to disk but compute them when the
password is first entered and only store them in RAM.

Merged-in: 5daf273b7e
Bug: 32793550
Change-Id: Icee7f615167761177b224b342970a36c7d90f6ba
2017-01-12 16:01:59 +00:00
Michael Kwan
fe9e68a63c Check if the activity translucency was converted before converted back.
am: 39dd370d8e

Change-Id: Ibf6e7b3a1d2767c91cca402fabcc1a0a3616733e
2017-01-09 23:06:22 +00:00
Michael Kwan
39dd370d8e Check if the activity translucency was converted before converted back.
Bug: 34084490
Change-Id: Ib04c76549a31c7e523649f9d284637d44d7477ae
2017-01-09 13:43:52 -08:00
Mark Renouf
bf30b430d4 Omit NavigationGuard if the input method uses FLAG_LAYOUT_IN_OVERSCAN
am: 9b32a35aa7

Change-Id: I1576235d933d467963a4522e138036fca3e49891
2017-01-09 19:13:41 +00:00
Mark Renouf
5df216f209 Merge "Omit NavigationGuard if the input method uses FLAG_LAYOUT_IN_OVERSCAN" into cw-f-dev 2017-01-09 19:00:05 +00:00
Alain Vongsouvanh
cb29c97907 widget: Adding support for custom LockPatternView.
am: 2fda2ce159

Change-Id: Ib0d53bd7258f784dc3cb0661757b7c6d4979007f
2017-01-05 19:45:02 +00:00
Mark Renouf
9b32a35aa7 Omit NavigationGuard if the input method uses FLAG_LAYOUT_IN_OVERSCAN
In some cases (e.g. Android Wear) SystemWindowInsets can be non-zero
due to overscan layout hints even when no SystemUI is present.

This change resepects the overscan flag on input method windows
allowing an IME to opt-out of the navigation bar guard and receive
full-height content view.

BUG: 32700226
Change-Id: Ic38f204a892bf34e8dae65990d5aa8c95af555d8
2017-01-05 13:52:59 -05:00
Alain Vongsouvanh
2fda2ce159 widget: Adding support for custom LockPatternView.
OEMs can overlay the default 9 dots by providing two drawables that represent
those dots:
  * lockscreen_notselected: asset to display when a cell has not been selected.
  * lockscreen_selected: asset to display when a cell has been selected.

BUG: 33755663
Change-Id: Ic595b01f5e1321696b7a3feb0ff73c1acccfb942
2017-01-05 16:16:49 +00:00
Michael Kwan
a2160c27f9 Fix OnCancelListener for Dialogs on swipe to dismiss.
am: 67639a5f67

Change-Id: I8ceab83a3a8287bdf8d2a7ff88427404543755c9
2016-12-19 19:11:45 +00:00
Hugo Benichi
85f3996d72 Merge changes I1450c126,I8926a922,I54403377,Idf216797 into nyc-mr2-dev
* changes:
  DO NOT MERGE IP Connectivity metrics: add connect() statistics
  DO NOT MERGE Fix IP connectivity metrics tests
  DO NOT MERGE IP connectivity metrics: introduce ConnectStatistics and DNS statistics
  DO NOT MERGE IP connectivity metrics: add transport field.
2016-12-19 08:31:17 +00:00
Justin Klaassen
868a859fd7 Merge "Reset BatteryStats when too large for clients to handle" into nyc-mr2-dev 2016-12-17 02:00:26 +00:00
Kweku Adams
1decad5e8c Merge "Fixing issue in current and max duration calculations." into nyc-mr2-dev 2016-12-16 23:37:21 +00:00
Michael Kwan
67639a5f67 Fix OnCancelListener for Dialogs on swipe to dismiss.
Swipe to dismiss on dialogs did not dispatch onCancel events
to OnCancelListeners. Resolve by adding listener to monitor
swipe to dismiss events and dispatch onCancel events when
that occurs.

Bug: 33663411
Change-Id: I64ff29e008d485a4559eb3d1ff7f0e74dccff404
2016-12-16 13:43:16 -08:00
Adam Lesinski
45489787d7 Reset BatteryStats when too large for clients to handle
When BatteryStats history is too large, the Settings app crashes.
Reset the battery stats by marking an *OVERFLOW* event at the
beginning of the newly reset history.

This seems to happen in Retail mode when the devices are on charger
for an extended period of time and accumulate a sufficiently large
history. Resetting makes sense because the phone is most likely
charged and will reset anyways when unplugged.
Bug: 32540341
Test: Manual

Change-Id: I8c2892458b5d9ce64b1c44aa2e2a000340e71e63
2016-12-16 19:27:53 +00:00
Michael Kwan
4308eaa477 Fix swipe-to-dismiss to properly react to swipe gestures.
am: 8a9b27773b

Change-Id: I2b25052c22b5f50f95d0365eff4e3b2e27625b7f
2016-12-15 21:16:05 +00:00
Hugo Benichi
2299a1c401 DO NOT MERGE IP Connectivity metrics: add connect() statistics
This patch adds a ConnectStats class to aggregate connect() statistics
gathered in NetdEventListenerService. ConnectStats is uploaded once a
day by IpConnectivityMetrics.

Test: $ runtest frameworks-net + new unit test
Bug: 32198976

(cherry picked from commit 4f71a15973f7048076ed10f63d708f020e1a21e0)

Change-Id: I1450c126b90b628d9f1c73ddf054b4742f5e84c5
2016-12-15 22:56:36 +09:00
Kweku Adams
c6bd4243a4 Fixing issue in current and max duration calculations.
It looks like one operation was done out of order and some of the times used in
the calculations were leading to incorrect results.

BUG: 31023263
Test: bit FrameworksCoreTests:com.android.internal.os.BatteryStatsDurationTimerTest

Change-Id: I417cc28c5a55748067b6c7f682a66fe3dbc09f09
(cherry picked from commit 47db5a8bf7)
2016-12-14 21:54:48 +00:00
Michael Kwan
8a9b27773b Fix swipe-to-dismiss to properly react to swipe gestures.
Test: manual test
Bug: 33588580
Change-Id: If8d03f90a25e989e254e3a21bafef4e76bab5d7b
2016-12-13 17:10:12 -08:00
Hugo Benichi
f6fdb4a552 DO NOT MERGE TokenBucket for rate-limiting and throttling
This patch adds a TokenBucket class that can accumulate and distribute
tokens over time.

Test: comes with unit tests.
Bug: 32198637

(cherry picked from commit 998493f0ee)

Change-Id: Iaf477c7bb14f8ddb293b7a907e2ab0cf76d09e07
2016-12-13 10:20:03 +09:00
Adrian Roos
8f250c13d7 Merge "Notifications: Fix bad layout for long texts" into nyc-mr2-dev 2016-12-08 00:30:08 +00:00
Ned Burns
d7a313fb11 DO NOT MERGE Fix android:noHistory for Wear
Modifies swipe-to-close activities to be opaque by default (instead
of translucent by default). Previously, android:noHistory properties
on most activities in Wear were being ignored because they were
usually transitioning to a swipe-to-close activity that was marked
as translucent. This meant that the noHistory activity was still
technically visible, and so would never be culled from the task
history.

Now, we convert a swiped activity to translucent as soon as a swipe
begins, and convert it back after the swipe finishes. The previous
version of SDL tries to do this, but fails in the case where the
context is a ContextWrapper.

This approach is hacky and isn't merge-able into master. We leave
it DO NOT MERGE and will do a long-term fix after the holidays.

Test: Built a test app to verify that noHistory is now being
correctly respected. Manually verified that new activities start
out opaque and not translucent. Manually verified that Home
correctly starts/stops when it's revealed from underneath a
partially swiped activity. Tested general swipe behavior on Settings,
Contacts, Flashlight, Fit.

Bug: 33252029

Change-Id: Ib2e7f21ea1e0d52db03e78d25676501e5f73b31f
2016-12-07 15:05:25 -05:00
Adrian Roos
62be439d26 Notifications: Fix bad layout for long texts
Fixes a bug where the max lines restriction was not properly
passed to ImageFloatingTextView's layout, causing the TextView
to improperly apply bottom padding.

Change-Id: Ibe07515866a4599047712a0482332ed4430c9056
Test: runtest -x core/tests/coretests/src/com/android/internal/widget/ImageFloatingTextViewTest.java
Fixes: 32658499
Bug: 32658499
2016-12-06 14:17:06 -08:00
Ned Burns
7d6cb913de Modify SwipeDismissLayout to perform its own exit animation
Instead of relying on the window animation system, in the special
case of a swipe-dismiss, disable any default window exit animation
and perform a custom animation. This bypasses some bugs in the
window animator codebase and allows us to have a nice "rebound"
animation if the user doesn't swipe far/fast enough to trigger a
dismiss.

Bug: 33041168
Change-Id: Ied45700d35a59950bacef1ba0650eaa5bc60fadb
2016-12-05 19:38:14 -05:00
Michael Kwan
f7964be938 Disable swipe-to-dismiss for not cancelable dialogs.
Bug: 33249829
Change-Id: Ib3d2c9982ece22d1b080b821eaf306f6b686d099
2016-12-02 17:33:56 -08:00
Selim Cinek
6cc0b517ba Fixed a bug with the emergency affordance in multi user
am: b8a7f78d24

Change-Id: I68fa35dbedb3740eff1c83d03c9c9b5080d3ea81
2016-11-15 01:18:35 +00:00
Selim Cinek
b8a7f78d24 Fixed a bug with the emergency affordance in multi user
The emergency call was not launched in the current user
and therefore was only launching once the user had switched.

Change-Id: If6f3bcf77d88a0658b6e0f91f7e4da5d6264b04f
Fixes: 32424103
Test: manual: switch to secondary user and launch emergency affordance
2016-11-14 23:00:24 +00:00
Selim Cinek
0294f9e39b Fixed a bug with the emergency affordance in multi user
The emergency call was not launched in the current user
and therefore was only launching once the user had switched.

Change-Id: If6f3bcf77d88a0658b6e0f91f7e4da5d6264b04f
Fixes: 32424103
Test: manual: switch to secondary user and launch emergency affordance
2016-11-03 14:58:01 -07:00
Adrian Roos
59116440e7 Separate ambient display triggers
am: b7e4e10618

Change-Id: I575f96338cffa0f6e8adb1b9ff300dbd322398dc
2016-10-18 22:07:03 +00:00
Adrian Roos
b7e4e10618 Separate ambient display triggers
Allows configuring notification and sensor triggers
separately. Introduces a helper class that hosts the
logic for determining what kinds of triggers a device
supports.

Bug: 32073185
Change-Id: Ie7e8eb6b895dcc54e6f972e70642c7248b9e223a
Test: disable "ambient display", sensor triggers should still work
2016-10-18 10:43:44 -07:00
Yohei Yukawa
f8621ff5bf Handle exceptions from #requestPermission()
am: 93278ca144

Change-Id: I5e8a3a9a670b1e794ce3af670fb30ffc4b8302a5
2016-10-15 00:37:24 +00:00
Yohei Yukawa
93278ca144 Handle exceptions from #requestPermission()
This is a follow up CL to my previous CL [1] that let
IInputConnectionWrapper to call InputContentInfo#requestPermission()
automatically so that temporary URI permissions can be granted
automatically on API 25+ devices whenever
INPUT_CONTENT_GRANT_READ_URI_PERMISSION is specified.

However, in that CL we forgot to handle exceptions thrown from
InputContentInfo#requestPermission().  This is problematic because it is
actually easy for IMEs to cause SecurityException by specifying a
content URI that does not allow grantUriPermission, e.g.:

  inputConnection.commitContent(
          new InputContentInfo(Uri.parse("content://call_log/test"),
          new ClipDescription("test", new String[]{"image/gif"}));

As a result, IMEs can let the application crash at any time because
InputContentInfo#requestPermission() is automatically called inside the
Framework.

This CL makes sure that exceptions thrown from
InputContentInfo#requestPermission() can be handled gracefully.

 [1]: Id955435dd2e72549ee7134f46b3c6951581694ad
      f3806f57a5

Bug: 32162481
Change-Id: I08916a1f54518390d3b67ab1673dc901e3f9716a
2016-10-14 22:26:35 +00:00
Xin Li
9b9906e9c0 Merge "Merge "DO NOT MERGE - Added Emergency affordance feature"
into nougat-dev" into nyc-dev.

Change-Id: Iffde36524f2335b90d4887dcdd189eaf55dc60e6
2016-10-13 13:40:33 -07:00
Nancy Zheng
1e746a415d Merge "Fix race condition in checkPattern and verifyPattern." into cw-f-dev 2016-10-07 17:47:47 +00:00
Nancy Zheng
9475460e66 Fix race condition in checkPattern and verifyPattern.
Bug: 31939282
Change-Id: I3250ab900f190ca9c820ac355ce94a699315b137
2016-10-07 10:41:00 -07:00
Dianne Hackborn
50b9f3513c Fix issue #31305336: File corrupt: too many wake locks 101
am: cb99a72e62

Change-Id: I01062999e2a1207c5d1bc826e8c9372c0fb012f7
2016-10-06 20:58:54 +00:00
Selim Cinek
e6680d93db DO NOT MERGE - Added Emergency affordance feature
Added a service that listens whether emergency affordances
are necessary.

If the they are needed, it adds an option to the
global actions dialog that directly launches the
emergency call and also adds a long-press listener
to the keyguard emergency button.

Test: adb shell settings put global force_emergency_affordance 1 && adb shell settings put global emergency_affordance_number 111112
Bug: 30404490
Change-Id: Ib96a15da2ef4b568a8d77140ebca6aa6f20f5ddb
2016-10-06 01:29:56 +00:00
Dianne Hackborn
cb99a72e62 Fix issue #31305336: File corrupt: too many wake locks 101
The limit is MAX_WAKELOCKS_PER_UID+1, since OverflowArrayMap
will add one more to contain the overflow.

Change-Id: I53004582daa0c405427308816728f2c1d2bef40d
2016-10-03 17:00:02 -07:00
Jorim Jaggi
0ea9093df7 Fix crash if drawable doesn't have constant state
am: 92d0602a7c

Change-Id: I8ab088ad588eac8baa674d551201713562d973ef
2016-09-30 09:10:11 +00:00
Jorim Jaggi
92d0602a7c Fix crash if drawable doesn't have constant state
Change-Id: I2364efb9dc1446bc1a8c50abf6bd34a73c226f7e
Fixes: 31755893
2016-09-29 14:37:14 +00:00
Hidenari Koshimae
ab8a42f7d9 Increase priority for broadcast intent triggered by HW key
am: 469e65e37f

Change-Id: I7b2aec06b7d2d0375b2f680e7880ca401684cddd
2016-09-26 19:33:25 +00:00
Hidenari Koshimae
469e65e37f Increase priority for broadcast intent triggered by HW key
Add the FLAG_RECEIVER_FOREGROUND flag to the broadcast intent
triggered by hardware key.
This prevents the framework from delaying the delivery of the
intent to its recipients, and improves the response for hardware
key event under heavy load on the system.

Bug: 28735973
Change-Id: Ib7f219845be34794f4c7545927e53cc6c2b504a3
2016-09-26 18:29:06 +01:00
dongwan0605.kim
4d590a91c2 Fix RTL issue of ImageFloatingTextView
am: dd8611fc5a

Change-Id: I101527b922604640fef684c6216b99289ac97f25
2016-09-23 22:04:42 +00:00
Selim Cinek
0e1f78da65 Added Emergency affordance feature
am: 705442fa7d

Change-Id: I03ebb84119f9cb310882ba9ea90ee1e1d7118d03
2016-09-23 22:00:42 +00:00