Commit Graph

58938 Commits

Author SHA1 Message Date
Hemal Patel
f8c0a138fb Docs: Fixed the link that loads Fragments guide am: a8e1c75bf6
am: dabee01e9b

Change-Id: I6a17d73c3dab8980c57e9f6c9617bb465c48f1a5
2016-08-09 21:10:40 +00:00
Hemal Patel
dabee01e9b Docs: Fixed the link that loads Fragments guide
am: a8e1c75bf6

Change-Id: I26ea32ff32067d86fb5390103eec737b293ac031
2016-08-09 21:03:13 +00:00
Hemal Patel
a8e1c75bf6 Docs: Fixed the link that loads Fragments guide
In the class description, fixed the reference link that points to the
Fragments guide.

Bug: 29007808
Change-Id: I3399e5f10c461eb6666a04f8829c6cde774948e0
2016-08-08 16:43:22 -07:00
Mark Lu
9bc63b9bf0 docs: add info to SharedPreferences.Editor.putString
am: fb48521f41

Change-Id: I948c8091a70180e29a601d6cba40d7fb0cf2d76a
2016-08-08 22:49:08 +00:00
John Reck
8bcd5bc5b0 Merge "Fix currentAnimationTimeMillis to use vsync time" into nyc-mr1-dev 2016-08-08 21:49:04 +00:00
Dianne Hackborn
154cc8237b Merge "Have BatteryStats track and report the running wakelocks." into nyc-mr1-dev 2016-08-08 19:58:57 +00:00
Selim Cinek
5a3e33a82a Merge changes Idc4c2c14,Ibea016c6,I49ab58c3,Id911d405,I0f17dc5f, ... into nyc-mr1-dev
* changes:
  Improved the transition when clicking on the last notification
  Fixed a bug that could lead to an empty notification
  Removed contentDescriptions that hindered accessibility usability
  Fixes a bug where setting a null bigLargeIcon would not clear it
  Fixed the transition of the background of the notifications
  Fixed a bug where the notification would fade out in a ugly way
2016-08-08 19:18:33 +00:00
Muyuan Li
36ca72c6c2 Prevents screenshot layer from dismissing IME.
Add code to adjustWindowLw to force the flag
FLAG_NOT_FOCUSABLE to be set for layer type
TYPE_SCREENSHOT.

Bug: 30485483
Change-Id: I11725eb89fda59b6d50fa1700845cdfe9ffb930b
2016-08-06 20:49:51 -07:00
Joe Onorato
adbee556a9 Have BatteryStats track and report the running wakelocks.
The times reported are in the screen off / on battery time base.

Bug: 29546924
Change-Id: I025b2959becb256a26cf531e944786d4e9a59149
2016-08-05 16:10:13 -07:00
Yohei Yukawa
dd228fbb4d Make sure IME focus is synced to View focus
This CL fixes an edge case that my previous CL [1] forgot to handle.

The goal of my previous CL was to avoid InputMethodManager from getting
confused by a false focus-in event from temporarily detached Views.
However, my CL forgot to take care of the case where the temporarily
detached View is still focused even after the temporary detach mode is
done.

The bad news is that such a situation is relatively easy to trigger by
having a ListView that has EditText as follows, which seems to be
known to be a common technique in Android developer community to put an
EditText in a ListView.
  ListView#listView.addHeaderView(new EditText(context), null, true);

If the ListView is initialized as above, and the EditText has input
focus, View focus and IME focus start to disagree immediatelly after the
ListView's layout is re-evaluated.  This is really easy to trigger, for
example just by dismissing the IME window.

In summary, the root cause is that InputMethodManager#focusIn(View) is
now always ignored as long as the View is temporarily detached, under an
assumption that IMM#focusIn(View) will be called back again with a View
that is not temporarily detached when everything is stable.  Hence the
fix is to do so by hooking up View#dispatchFinishTemporaryDetach() to
call IMM#focusIn(View) again when the View is actually focused in the
final state.

 [1]: Ia79bbd8468f768d546354382b47b39dd31ef7bb5
      a4ed0cfcb6

Bug: 30022872
Bug: 30578745
Bug: 30706985
Change-Id: Iecbdb00dcef8c72e4f7b31035c9bf0f4a40a578f
2016-08-05 15:38:55 -07:00
Adrian Roos
c49dfaf4d6 Merge changes from topic 'smooth_unlock' into nyc-mr1-dev
* changes:
  Keyguard: Improve trusted unlock while occluded
  Keyguard: Refactoring for improving trusted unlock while occluded
2016-08-05 18:37:29 +00:00
Chris Tate
b3690ccf2c Merge "Fix "adb backup -shared"" into nyc-mr1-dev 2016-08-05 18:04:25 +00:00
TreeHugger Robot
9d9621f472 Merge "Move EphemeralResolverService" into nyc-mr1-dev 2016-08-05 17:37:35 +00:00
John Reck
a2acb4f077 Fix currentAnimationTimeMillis to use vsync time
Bug: 30674719
Change-Id: I71f51eea971e43cbe85bb0713a1c457a1b3243b3
2016-08-05 09:16:06 -07:00
Todd Kennedy
31b95e0265 Move EphemeralResolverService
It should not have been under com.android.internal

Fixes: 30673742
Change-Id: I2277aa4a4799fa59bf68af7c4cfcb4e1216aeb8d
2016-08-05 07:17:52 -07:00
Christopher Tate
60af594c3e Fix "adb backup -shared"
An accidental side-effect of introducing the XML content file and its
domain semantic checking was that the shared-storage domain got
dropped on the floor.  Now the mechanism understands what it means
again.

Bug 29999884

Change-Id: I22b99c96869683d1a92430f237dda54b170b8f60
2016-08-04 17:23:20 -07:00
Adrian Roos
d88eb2693b Keyguard: Refactoring for improving trusted unlock while occluded
- Adds a trusted signal from Keyguard to PhoneWindowManager
- Allows PhoneWindowManager to exempt DISMISS_KEYGUARD windows from force hiding
- Allows PhoneWindowManager to dismiss Keyguard while occluded

Bug: 27410215
Change-Id: I3ad490b64a5805b6f3888a9f37fcfbdd0116395e
2016-08-05 00:04:07 +00:00
Selim Cinek
e99acb29db Fixes a bug where setting a null bigLargeIcon would not clear it
Because we were also looking for legacy icons and the legacy icon
was always restored for old listeners, the icon would not disappear.

Change-Id: Id911d405e5ae00bf45e34368effbf67c2425a40c
Fixes: 30663590
2016-08-04 13:04:29 -07:00
Makoto Onuki
0fd8670fd5 Merge "ShortcutManager: Update foreground check." into nyc-mr1-dev 2016-08-04 19:29:27 +00:00
Chris Wren
a61f179c3d only rate limit notification updates
Updates to progress bars are the main culprit in system
performance events caused by apps spamming the notification
service. Rate-limiting only updates allows us to set a lower
threshold wihtout the owrry of mistakenly dropping bursts of
notifications being quickly posted after a network sync.

Also reduce logspam caused by the rate-limit events.

Bug: 30132961
Change-Id: I49acda6a2831204da45e899ddd3d62d571d7174b
2016-08-04 17:04:02 +00:00
John Reck
3c2587f26e Fix NPE in TextureView
Bug: 30651595
Change-Id: Ic6cc2a1598de173aaadb4061562236a563a662b3
2016-08-04 07:55:38 -07:00
TreeHugger Robot
1584d5d6e2 Merge "ResourcesManager: Return null on failure to create Resources" into nyc-mr1-dev 2016-08-04 00:08:21 +00:00
Makoto Onuki
33525d2f1a ShortcutManager: Update foreground check.
- When the cached UID state says a UID is in the background,
check with AM and get the latest state, since the state
might just have been changed.

Bug 30640208

Change-Id: If448f6f21f290fa0fc13550d9c740f56aa8bfce0
2016-08-03 16:36:38 -07:00
Sergei Vasilinetc
ba3d4f6ea1 Merge "TextureView: destroy layer on destroyHardwareResources event" into nyc-mr1-dev 2016-08-03 21:54:10 +00:00
Adam Lesinski
53fafdfbe7 ResourcesManager: Return null on failure to create Resources
A lot of calling framework code expects a null value on failure,
and didn't catch the previous exception. There were some strange
corner cases where previously a null value was not checked for
in framework code, allowing the null Resources object to be
returned to the caller. Introducing an exception changed the
semantics and can crash certain apps.

Bug:30422475
Change-Id: I51d34ae43c9ec605a8790989c56cf85b815ff5b8
2016-08-03 14:44:52 -07:00
sergeyv
1c16c37d86 TextureView: destroy layer on destroyHardwareResources event
bug:30468770
Change-Id: I5174808e3fa6e4a87e3522246522c4e6d7ee2c3c
2016-08-02 15:40:27 -07:00
Yigit Boyar
828d4ff61d Merge "Target API check for margin params fix" into nyc-mr1-dev 2016-08-02 20:41:08 +00:00
Mark Lu
fb48521f41 docs: add info to SharedPreferences.Editor.putString
The information explains what happens when null is passed
as value parameter

Bug: 24696308
Change-Id: I362c2b1885e882312d1b4b2ff829f8f9f3546301
2016-08-02 12:10:48 -07:00
Jorim Jaggi
1340221244 Merge changes I03844bce,I8035357c,Ibe7cb6df into nyc-mr1-dev
* changes:
  Remove lock contention when unlocking users
  Only get trace name if tracing is enabled
  Fix multi-window drag jank if vsync-app is before vsync-sf
2016-08-02 18:31:08 +00:00
Yigit Boyar
2dd20a61e9 Target API check for margin params fix
Prior to N, our widgets were not converting MarginLayoutParams
properly between ViewGroups. The fix intrudced some issues in
older apps as the broken conversion code would hide developer
errors. This CL guards the change with a target API check so
that we don't affect older apps.

Bug: 30378230
Change-Id: I215281d261b553c3b4cedcd29ea0a861df809471
2016-08-02 11:27:18 -07:00
TreeHugger Robot
0d8f164cde Merge "Fix FrameMetricsObserver crash" into nyc-mr1-dev 2016-08-02 18:06:08 +00:00
Makoto Onuki
61dd3c557c Merge "LauncherApps should also throw when user is locked" into nyc-mr1-dev 2016-08-02 17:58:20 +00:00
Phil Weaver
41e185e73b Merge "Reduce extra a11y events when alpha changes." into nyc-mr1-dev 2016-08-02 16:54:43 +00:00
John Reck
65ddb154c7 Fix FrameMetricsObserver crash
Bug: 30587465

Someday maybe the technology will exist to
allow sharing a simple constant between
Java and C++, but today is not that day.

Change-Id: I17694746cb8712058133cd5ea10c47b9909f740b
2016-08-02 09:38:26 -07:00
Jorim Jaggi
407c0be727 Only get trace name if tracing is enabled
String formatting creates new objects, so only do it if needed.

Bug: 30549756
Change-Id: I8035357c2b9c3066ef7663b938654f698a2321bc
2016-08-02 11:06:46 +02:00
Svetoslav Ganov
a2f247e6a6 Merge "Revert "Prevent apps to overlay other apps via toast windows"" into nyc-mr1-dev 2016-08-02 01:56:10 +00:00
Svetoslav Ganov
2fc661a453 Revert "Prevent apps to overlay other apps via toast windows"
bug:30150688

This reverts commit dc24f937b0.

Change-Id: Id7e8ddbf82ab426f55a5296791f1e8ebb61514bc
2016-08-02 01:55:01 +00:00
Makoto Onuki
02f338e23d LauncherApps should also throw when user is locked
otherwise it'd be racy.

Bug 30406401

Change-Id: I953eb6ae58e029d254d9fdbd5d05a0090b8d2391
2016-08-01 18:15:47 -07:00
Phil Weaver
9937f81ac6 Reduce extra a11y events when alpha changes.
Changes in alpha only matter if they affect visibility,
so only 0 <-> nonzero changes are worth reporting. Report
them as subtree changes, as visibility affects subviews.

Not reporting every change greatly reduces the number of
event reported when alpha is animated.

Bug: 30183085
Change-Id: I905d53aa81ca8248b3aed86a91842ef499f303a8
2016-08-01 17:41:19 -07:00
Alan Viverette
7dd40cd411 Merge "Adjust touch progress offset to account for changes to AbsSeekBar" into nyc-mr1-dev 2016-08-01 20:53:50 +00:00
Alan Viverette
1d33c3f3a3 Adjust touch progress offset to account for changes to AbsSeekBar
Previously AbsSeekBar always rounded up, which resulted in poor handling
of touches near the edge of a progress value. We fixed this but forgot
to adjust RatingBar for the new behavior.

Bug: 30558586
Change-Id: I634fa7a0b98568093e16279ef5a80abe08d2e2fe
2016-08-01 15:14:05 -04:00
Svetoslav Ganov
fea7cfce8b Merge "Prevent apps to overlay other apps via toast windows" into nyc-mr1-dev 2016-08-01 18:48:11 +00:00
Svet Ganov
dc24f937b0 Prevent apps to overlay other apps via toast windows
It was possible for apps to put toast type windows
that overlay other apps which toast winodws aren't
removed after a timeout.

Now for apps targeting SDK greater than N MR1 to add a
toast window one needs to have a special token. The token
is added by the notificatoion manager service only for
the lifetime of the shown toast and is then removed
including all windows associated with this token. This
prevents apps to add arbitrary toast windows.

Since legacy apps may rely on the ability to directly
add toasts we mitigate by allowing these apps to still
add such windows for unlimited duration if this app is
the currently focused one, i.e. the user interacts with
it then it can overlay itself, otherwise we make sure
these toast windows are removed after a timeout like
a toast would be.

We don't allow more that one toast window per UID being
added at a time which prevents 1) legacy apps to put the
same toast after a timeout to go around our new policy
of hiding toasts after a while; 2) modern apps to reuse
the passed token to add more than one window; Note that
the notification manager shows toasts one at a time.

bug:30150688

Change-Id: Icc8f8dbd060762ae1a7b1720e96c5afdb8aff3fd
2016-08-01 11:46:02 -07:00
Makoto Onuki
5faa852c57 Merge "Revert "LauncherApps should also throw when user is locked"" into nyc-mr1-dev 2016-08-01 17:30:31 +00:00
Makoto Onuki
2ec16b08ac Revert "LauncherApps should also throw when user is locked"
This reverts commit bc4ad85d29.

Will retry when the updated launcher is in.

Change-Id: I428dc93132615480df70aeca7977089af008c041
2016-08-01 17:20:59 +00:00
Jack Yu
a4e616e0dc Merge "Added todo items for a potential metrics issue" into nyc-mr1-dev 2016-07-30 02:07:53 +00:00
Jack Yu
dc5a63bdd1 Added todo items for a potential metrics issue
bug: 29390529
Change-Id: I15826d5f513748a423eb4cc103f1b010ddad2126
2016-07-29 15:01:18 -07:00
TreeHugger Robot
ba933b39ae Merge "LauncherApps should also throw when user is locked" into nyc-mr1-dev 2016-07-29 18:15:36 +00:00
Makoto Onuki
bc4ad85d29 LauncherApps should also throw when user is locked
otherwise it'd be racy.

Bug 30406401

Change-Id: Id6b0295933c5639fa23c56d737a7f0199cbd7497
2016-07-29 09:40:40 -07:00
TreeHugger Robot
66e7752ad1 Merge "Fix missing IpConnectivity metrics" into nyc-mr1-dev 2016-07-29 09:38:28 +00:00