4444 Commits

Author SHA1 Message Date
Ying Wang
d685894212 Add liblog
Bug: 8580410
Change-Id: I746aa8258866508c3a725d0773faf4518096548f
2013-04-09 21:54:12 -07:00
Michael Jurka
104ca45a04 Merge "Fix janky icon fade-in animation in Recents" into jb-mr2-dev 2013-04-09 06:04:36 +00:00
Michael Jurka
e0523f7c80 Fix janky icon fade-in animation in Recents
Change-Id: I15d2274add8903820dac3da0fa47c9e54f6ec97d
2013-04-08 18:20:20 -07:00
Jeff Brown
3a2854bcee Merge "Queues, queues, queues and input." into jb-mr2-dev 2013-04-08 23:59:24 +00:00
Jeff Brown
f9e989d5f0 Queues, queues, queues and input.
Redesigned how ViewRootImpl delivers input events to views,
the IME and to native activities to fix several issues.

The prior change to make IME input event delegation use
InputChannels failed to take into account that InputMethodManager
is a singleton attached to the main looper whereas UI may be
attached to any looper.  Consequently interactions with the
InputChannel might occur on the wrong thread.  Fixed this
problem by checking the current thread and posting input
events or callbacks to the correct looper when necessary.

NativeActivity has also been broken for a while because the
default event handling logic for joysticks and touch navigation
was unable to dispatch events back into the native activity.
In particular, this meant that DPad synthesis from touch navigation
would not work in any native activity.  The plan is to fix
this problem by passing all events through ViewRootImpl as usual
then forwarding them to native activity as needed.  This should
greatly simplify IME pre-dispatch and system key handling
and make everything more robust overall.

Fixed issues related to when input events are synthesized.
In particular, added a more robust mechanism to ensure that
synthetic events are canceled appropriately when we discover
that events are no longer being resynthesized (because the
application or IME is handling or dropping them).

The new design is structured as a pipeline with a chain of
responsibility consisting of InputStage objects.  Each InputStage
is responsible for some part of handling each input event
such as dispatching to the view hierarchy or to the IME.
As a stage processes an input event, it has the option of
finishing the event, forwarding the event to the next stage
or handling the event asynchronously.  Some queueing logic
takes care to ensure that events are forwarded downstream in
the correct order even if they are handled out of order
by a given stage.

Cleaned up the InputMethodManager singleton initialization logic
to make it clearer that it must be attached to the main looper.
We don't actually need to pass this looper around.

Deleted the LatencyTimer class since no one uses it and we have
better ways of measuring latency these days using systrace.

Added a hidden helper to Looper to determine whether the current
thread is the indicated Looper thread.

Note: NativeActivity's IME dispatch is broken by this patch.
This will be fixed later in another patch.

Bug: 8473020
Change-Id: Iac2a1277545195a7a0137bbbdf04514c29165c60
2013-04-08 15:31:47 -07:00
John Spurlock
c8b46ca575 Awaken dreams on home + recents.
Fixes the KEYCODE_HOME case, awakes when home is
started for any reason.

Also awaken when toggling recents (and not locked).

Bug:8557212
Change-Id: I6578ae3971740a03c27596b838d27a5ab9b03752
2013-04-08 19:18:59 +00:00
Daniel Sandler
5feceebb89 New NotificationListenerService.
This is the best and only way for apps to listen for
notifications: create a NotificationListenerService, wait
for the NoMan to bind to you (as a result of the user
checking a box somewhere in Settings and agreeing to a
scary dialog box), and you'll start receiving notification
posted and dismissed callbacks. Your service, while enabled,
will also be able to clear one or all notifications.

Use this power wisely.

This change moves StatusBarNotification out of
com.android.internal into android.service.notification.
[Internal customers, including System UI and early users of
the system-only listener binder API, will need to be
updated.]

Bug: 8199624
Change-Id: I1be46f823d4b3ddc901109ec1e085cd6deb740c2
2013-04-05 19:54:44 +00:00
Winson Chung
3a5a774954 Fixing NPE on screenshot error. (Bug 8328886)
Change-Id: Id47b8429c512c02e63d86de2ce37bd8e3ee02359
2013-04-01 16:04:28 -07:00
Amith Yamasani
27db46850b Block access to accounts for limited users.
Make sure that apps that have access to restricted accounts can see them.
If they don't have access, they shouldn't be able to add a new account either.
Show an error message in the account picker if the user/app is not authorized.

Change-Id: I117c0b14d7d06c5ac4e66506df156b174567f5f3
2013-03-30 18:25:49 -07:00
Dianne Hackborn
cb5a4bf2ee Merge "Apparently SystemUI no longer needs the carousel." into jb-mr2-dev 2013-03-29 16:53:54 +00:00
Elliott Hughes
94eaab4a5d am 3ae30483: am a19647d3: Merge "Correct executable bit for source files [Take 2]"
* commit '3ae30483777708ff3a4f59a4fa75c6a76213cc30':
  Correct executable bit for source files [Take 2]
2013-03-28 14:29:21 -07:00
Dianne Hackborn
e8587722b6 Apparently SystemUI no longer needs the carousel.
Change-Id: Ib886b83fb096a8ef35b167e2727360353c020ec1
2013-03-27 17:43:57 -07:00
Maggie Benthall
a12fccf57d Add user restrictions for bluetooth, sideloading, usb file transfer
Created constants for these in UserManager and current.txt. Also created
an accessor for individual user restrictions that takes the restriction key
(removing individual methods for particular restrictions).

Change-Id: Ibb5517cbcdffadd3925f52cbe67d7d525813faa9
2013-03-27 18:14:29 -04:00
Chirayu Desai
3e4a3ea2ff Correct executable bit for source files [Take 2]
Change Ieb51bafb46c895a21d2e83696f5a901ba752b2c5 left out some
files, this fixes them.

Change-Id: Ia949a8581668836ea0251602e048f09c852f5169
2013-03-27 16:52:35 +05:30
Jim Miller
fd81f91052 Merge "Prevent Recents from doing a relayout" into jb-mr2-dev 2013-03-20 21:38:31 +00:00
Jeff Sharkey
e37e9ba3ca Show notification ticker for finished bugreports.
Change-Id: I7d326b0da83c3ae334739cdb8cb4ca18f948c50f
2013-03-20 12:10:51 -07:00
Michael Jurka
31a6fb3b08 Prevent Recents from doing a relayout
Don't relayout Recents when going from a
fullscreen app to Recents; set the proper flags
to do the layout underneath the status bar
2013-03-20 16:44:13 +01:00
Jeff Sharkey
debbeec575 Merge "Move deleteOlderFiles() to framework, tests." into jb-mr2-dev 2013-03-14 22:06:15 +00:00
Jeff Sharkey
d9526907d1 Move deleteOlderFiles() to framework, tests.
Supports both age and count based constraints.  Added light docs and
tests to verify behavior.

Bug: 8387555
Change-Id: If4d0dac8bc54ce705c2a339bc09a60ea748728b8
2013-03-14 15:04:12 -07:00
Chet Haase
2e417be5c4 Better fix for GL wallpaper creation
A previous fix made initializing GL work better by calling eglMakeCurrent()
prior to querying the max texture size. However, that fix worked by creating an eglSurface
earlier than we did before, which for some reason causes problems later if wallpaper creation
fails and we back off to a software solution.

This new fix creates a temporary pbuffer surface instead, which still allows us to make the
call to eglMakeCurrent() prior to querying the max texture size, but does not result in the
later canvas lock failure if the wallpaper creation fails anyway.

Issue #8319960 sluggish yakju animations over launcher

Change-Id: I394d672549260a354f03ad9fd1b9e1f9a161a371
2013-03-14 09:38:01 -07:00
Jeff Sharkey
34f37e7412 Merge "Handle finished bugreports, share from private." into jb-mr2-dev 2013-03-14 15:44:12 +00:00
Chet Haase
7534707b34 Merge "Ensure wallpaper creation succeeds" into jb-mr2-dev 2013-03-14 13:28:13 +00:00
Chet Haase
187e1e2fc7 Ensure wallpaper creation succeeds
ImageWallpaper was sometimes querying GL for a max texture size too early
(before the first call to eglMakeCurrent()). This problem caused the wallpaper
to then get created in software, resulting in noticeably slower performance
when the wallpaper was visible.

This fix ensures that the
makeCurrent happens before the query, ensuring that wallpapers of the right
size actually get created instead of failing due to this error at creation time.

Issue #8319960 sluggish yakju animations over launcher

Change-Id: I12a3eba9f1818bdf544691e0727fe12f7e820651
2013-03-14 06:24:32 -07:00
Jeff Sharkey
02ffba940c Handle finished bugreports, share from private.
Show notification when a bugreport is finished, letting the user
launch a SEND_MULTIPLE intent to share them.  Add dialog that warns
user about contents before sharing.  Since bugreports are now stored
in private app data of the Shell app, use FileProvider to build Uris
that we can grant others access to.

Define BUGREPORT_FINISHED as being a protected broadcast.  Delete
older bugreports automatically to reclaim disk space.  Migrate any
Intent extras to ClipData when building PendingIntents.

Add --receiver-permission support to am shell command.

Bug: 7005318
Change-Id: If6c607dbcf137362d5887eac482ff7391563890f
2013-03-13 16:42:38 -07:00
Daniel Sandler
faa4bea4c0 am 39099fee: am 1bc1699c: Merge ""[+>" more icon was never shown in PhoneStatusBar"
* commit '39099feeece6d76b0c68727506609331e7a6b64c':
  "[+>" more icon was never shown in PhoneStatusBar
2013-03-12 13:27:10 -07:00
Mats H Carlsson
cd231432ff "[+>" more icon was never shown in PhoneStatusBar
"[+>" more icon was never show in status bar because
the member variable for this icon was not initialized
from resources. This fix enables "[+>" icon to appear
in status bar when the number of indications in status
bar becomes large.

Bug: 8368569
Change-Id: Ieb3412eed831052d69c0cf63c9b4230c38171e4a
2013-03-12 19:51:07 +00:00
Christopher Tate
294b512eca DO NOT MERGE - Full backup/restore now handles OBBs sensibly
OBB backup/ restore is no longer handled within the target app
process.  This is done to avoid having to require that OBB-using
apps have full read/write permission for external storage.

The new OBB backup service is a new component running in the
same app as the already-existing shared storage backup agent.
The backup infrastructure delegates backup/restore of apps'
OBB contents to this component (because the system process
may not itself read/write external storage).

From the command line, OBB backup is enabled by using new
-obb / -noobb flags with adb backup.  The default is noobb.

Finally, a couple of nit fixes:

- buffer-size mismatch between the writer and reader of chunked
  file data has been corrected; now the reading side won't be
  issuing an extra pipe read per chunk.

- bu now explicitly closes the transport socket fd after
  adopting it. This was benign but triggered a logged
  warning about leaked fds.

(Cherrypicked)

Change-Id: I471f6348abcccb7bf1e1710b7beda9f23de53e14
2013-03-08 15:08:10 -08:00
Fabrice Di Meglio
02c40c2404 Fix bug #8058390 Space is required after the battery sign in the RTL locales
- fix remaining left/right properties that needed to be start/end properties

Change-Id: Iaa5090c2ad256e378313f164e2388f42428e5700
2013-03-08 14:05:28 -08:00
Michael Jurka
5b532abdc2 Merge "Fix bug where Recents wasn't always properly updated" into jb-mr2-dev 2013-03-06 22:52:39 +00:00
Michael Jurka
0e7757b6a1 Fix bug where Recents wasn't always properly updated
Also fix bug where icons were sometimes missing

Change-Id: I98fb30242e0f1bbe4f3088b350bd808cd9c3ae67
2013-03-06 23:29:46 +01:00
Michael Jurka
4aab3c8a78 Merge "Fix Recents in RTL/landscape mode" into jb-mr2-dev 2013-03-06 22:11:58 +00:00
Michael Jurka
e9c90271ac Fix Recents in RTL/landscape mode
The normal LTR Recents interface in landscape
actually scrolls/behaves like a RTL interface,
so we hardcode the layout to stay the same in both
modes

Change-Id: I57e5e76de3260c6de1dd9e939797b7e1c23cca03
2013-03-06 22:04:05 +01:00
Michael Jurka
499293f096 Improve swipe performance in Recents 2013-03-06 18:08:45 +01:00
Daniel Sandler
e7c5bbb171 Defend against NaNs in panel animation code.
Once these get into the Animators, they freeze up and
disable the whole notification panel. Not cool.

Bug: 7686690
Change-Id: I04567417b3840a82d9cfe071c601e3078b2e3fe3
2013-03-05 14:06:12 -05:00
Michael Jurka
7ac02bfb86 Merge "Fix RTL layout in Recent Apps, landscape mode" into jb-mr2-dev 2013-03-04 10:56:58 +00:00
Jeff Sharkey
2e0da1ea5f Merge "Improve performance of storage measurement." into jb-mr2-dev 2013-03-02 06:14:51 +00:00
Jeff Sharkey
63d0a06799 Improve performance of storage measurement.
When calculating directory sizes of data living on emulated external
storage, translate the path to use the internal backing data, which
avoids going through the emulation layer.  It carefully retreats to
the original path when it runs into trouble.

Testing with a hierarchy of 10 directories deep and 2 directories
and 10 files wide at each level, this change improves performance
from 5900ms before to 250ms after; over 20 times faster (!).

Bug: 8172425
Change-Id: Ia7365416f091e102bf7345a49f7d7209a22580a9
2013-03-01 16:36:52 -08:00
Michael Jurka
e60bc7f2d8 Fix RTL layout in Recent Apps, landscape mode
Bug: 8067692
2013-03-01 16:00:32 +01:00
Romain Guy
d9731a57c6 am bf53be46: am 09353f74: Merge "Check and fail early if requested wallpaper size exceeds maximum texture size."
* commit 'bf53be46d237866a9964a4f1fa960eb6ef4a70a6':
  Check and fail early if requested wallpaper size exceeds maximum texture size.
2013-02-27 07:08:15 +00:00
Maggie Benthall
6794458f86 Add location sharing toggle user restriction.
And add support for respecting it.

Change-Id: Ia5cf9134c5f5741c3f55afadbe54f862da7bfe5b
2013-02-25 12:45:14 -05:00
Derek Sollenberger
bc340d03c3 Merge "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'" 2013-02-22 18:39:13 +00:00
Daniel Sandler
458d5e1b03 Make QUICK_CLOCK work on tablets.
Bug: 7724222
Change-Id: Ib8f4beb206736ed01edda96fbd3638a377a8f49e
2013-02-21 15:12:49 -05:00
Fabrice Di Meglio
584e5af847 am 50c291b6: Merge "SystemUI optimization - rely on inheritance for layout direction"
* commit '50c291b653062e7356fd8764bf625a1e1f2c678d':
  SystemUI optimization - rely on inheritance for layout direction
2013-02-20 15:21:26 -08:00
Fabrice Di Meglio
50c291b653 Merge "SystemUI optimization - rely on inheritance for layout direction" 2013-02-20 23:18:04 +00:00
Michael Wright
01fc6fc4c1 am 1fd2ed58: Merge "Add brightness dialog to SystemUI"
* commit '1fd2ed58da3e578df0cd0c326c719cf1c282b793':
  Add brightness dialog to SystemUI
2013-02-20 15:06:43 -08:00
Michael Wright
1fd2ed58da Merge "Add brightness dialog to SystemUI" 2013-02-20 23:03:18 +00:00
Michael Wright
0087a14d4b Add brightness dialog to SystemUI
Change-Id: If31406c9144bb2583876f08dd54b259d1dfa3601
2013-02-20 14:39:03 -08:00
Romain Guy
09bd2113e3 am 14bd8359: Merge "Wallpaper software rendering fallback Bug #8230579"
* commit '14bd8359a84c9b3f634d1fd816ddf5750d6539a9':
  Wallpaper software rendering fallback Bug #8230579
2013-02-20 10:36:12 -08:00
Romain Guy
14bd8359a8 Merge "Wallpaper software rendering fallback Bug #8230579" 2013-02-20 18:33:05 +00:00
Romain Guy
c8d983f725 Wallpaper software rendering fallback
Bug #8230579

If the wallpaper fails to render with OpenGL, fall back to software
rendering instead of throwing an exception and crashing the wallpaper.

Change-Id: I40ed6056e6ea09b92b6cd441f16101dcc296fb8e
2013-02-20 10:05:36 -08:00