Specifically, throw an explicit IllegalArgumentException if
'len' is negative, rather than falling over in some other
way further down the line.
Change-Id: If955de7ec1a15aa9aa8c42b6994b059e0cdffcee
BadTokenException is a normal consequence of swapping IMEs while there
is a DO_SHOW_SOFT_INPUT message in the IIMethodWrapper queue. This
race condition cannot be avoided without an unacceptable lock down of
InputMethodManagerService.
Fixes bug 8387663.
Fixes bug 8263462.
Change-Id: I2c21573cf972145ab08e66604cdb9344139a3f31
Modify WifiService to add a controller to track the various
desired states and let the WifiStatemachine actually control
the bring up.
Bug: 8141918
Change-Id: I6e98fd5a29b43c3c50c315eff5255cd0a3eaebcd
When a new IME is attached it is not enough to remove the
WindowManager messages from the local queue, but the ones in
the previous IME queue must also be removed.
Fixes bug 8263462.
Change-Id: I9e916c6052a83dc7691bcba0b6ab8328b9b7cc36
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
Moving very slowly in LockPatternView would often draw discontinuous
lines and have missing wedges in the pattern rings.
This fixes the problem by correctly accounting for the invalidate
region. The invalidate region is constrained to the last registered
pattern cell and the current point. When a new pattern cell is added,
the bounding region expands to refresh it once.
Fixes bug 8315830
Change-Id: I72342535ae292fcadb02d96b89665ba8431886b2
...android.view.ViewGroup.measureChildWithMargins
The app is doing grungy stuff with trying to insert its own
views inside the window decor. This new custom layout of the
action bar was assuming it would get fitSystemWindows() called
at which point it would retrieve all of its child views... but
with the app doing this, it blocks the call down to
fitSystemWindows() and breaks us. So we now make the layout
manager more robust and ensure it has retrieved its children
when measuring.
Also fix an issue where the xlarge layouts were not updated.
Change-Id: I6c69f26f26b59a6aa8fa1e5788288ffce0b490ca
The problem is that there are other configurations that the
action bar can be in that ActionBarOverlayLayout didn't account
for -- such as here, the nav part visible but the rest hidden.
Fixing this was non-trivial because it means that to correctly
implement fitSystemWindows() we need to in these cases take the
actual measured height of the action bar for positioning the
content view... but that is not yet available, since
fitSystemWindows() must run before layout.
To solve this, ActionBarOverlayLayout now inherits directly from
ViewGroup and implements its own custom layout. In its measure
pass it does all of the fitSystemWindows() work that is dependent
on the measured sizes of the action bar child views after those
are measured and applies them to the content view before it is
measured.
Change-Id: Ie327075d502e9c348aa80b0968c6b0403478301e
Switch the action bar to always use the overlay layout, and
make it smarter to do the right thing depending on whether the
action bar is in overlay mode or not.
This allows apps to use the system UI magic flags without
having to worry about whether the action bar is configured
in overlay mode or note -- just select a stable layout and it
will automatically go into overlay mode.
In the future this should also allow us to simplify the action
bar code, since it is all sitting on one common implementation.
For example, much of the logic in ActionBarImpl can be moved
to the root action bar layout, and that layout can be optimized
to do custom layout with all of the known elements it has.
Also fixed a little bug in the performance tests.
Change-Id: Iec0c0c0699754f0d1ce37402d786b4966e052a56
Add logAndAddLogRec method that logs a string and adds it to LogRecords.
Add loge(s, e)
Add missing javadoc to the logging methods
Reformatted the code.
Change-Id: I42f39e45aae77e5b6968f16b6b83f4804ccb7e73
The window manager now maintains and reports a new formal
"overscan insets" for each window, much like the existing
content and visible insets. This is used to correctly
position the various UI elements in the various combination
of layout options. In particular, this allows us to have
an activity that is using fitSystemWindows to have the content
of its UI extend out to the visible content part of the screen
while still positioning its fixed UI elements inside the
standard content rect (and the entire window extending all
the way into the overscan area to fill the screen as desired).
Okay, maybe that is not written so clearly. Well, it made
my head hurt too, so suffer!
The key thing is that windows now need to know about three
rectangles: the overall rectangle of the window, the rectangle
inside of the overscan area, and the rectangle inside of the
content area. The FLAG_LAYOUT_IN_OVERSCAN option controls
whether the second rectangle is pushed out to fill the entire
overscan area.
Also did some improvements to debug dumping in the window
manager.
Change-Id: Ib2368c4aff5709d00662c799507c37b6826929fd
Keyguard currently relies on being in the system process to grab the
given user's widgets. When we split keyguard into a new process,
it will need to have access to user-specific info to instantiate a
specific user's widgets. In order to accomplish this, we add an
explicit userid to each binder call as well as new permission
check to allow keyguard access.
This also fixes a potential race condition of having an incorrect user id
due to an async call to change the user. Every binder call now has a specific
user id. The user id is either the calling process user's id or an explicit
one passed by applications like keyguard. It is created once when an
AppWidgetManager is instantiated and remains for the lifetime of the object.
Fixed bug where widgets sometimes didn't show up for secondary users.
Moved permission check in AppWidgetService into getImplForUser()
Refactored to use userid from context associated AppWidgetManager instance.
Clean up AppWidgetHost to use userId from Context.
Remove redundant userId check in checkPermission since it's handled by
ActivityManager.handleIncomingUser()
Removed redundant userid check.
Upload after rebase...
Change-Id: Iae3e20f2b342c323bb58768b3d22051510f8268b
- this CL purpose is to fully rely on inheritance for setting the
SystemUI views layout direction. This is the default case for layout
direction and should stay like that.
Change-Id: I8efb6ab6e5bd10f519c7a27e8837efb69631940e
Switch to parsing detailed network stats with native code, which
is 71% faster than ProcFileReader.
Change-Id: I2525aaee74d227ce187ba3a74dd08a2b06514deb
This is to help implementation of bug #8181262 and maybe
bug #8181261
Adds some definition for media ops (though nothing is yet using
them), and re-arranges things a bit so we can implement native
calling in to the app ops service.
Also add some java docs.
Change-Id: I637959745db820e676f23a35a5d2224f51bc6689
Fix a bug that would prevent the drawable bounds from being set
correctly for action bar containers.
Change-Id: I396aa40e3d8f6e3b47bcd438e1f26bbfc7b20a7f
# Via Android Git Automerger (3) and Adam Powell (1)
* commit '0714e37cb7acafbc93f2fac40dbb200cd2a96514':
Fix re-enabled state of up after action view collapse
# Via Android Git Automerger (2) and Adam Powell (1)
* commit 'a7e028a976c3f3692fa3c72f0ae11c01354e4c9a':
Fix re-enabled state of up after action view collapse
# Via Adam Powell (1) and Android Git Automerger (1)
* commit 'cef582ab0346afdaff9190565d432a9468ecdd7d':
Fix re-enabled state of up after action view collapse
A certain call ordering to the action bar could cause the record of
the pre-action view expanded home button enabled state to be
incorrect. Store this in all cases, not just when the action view is
initially expanded. (Except for when we actually disable it for the
expanded view.)
If an action view is already expanded when we get a call to change the
enabled state of the home/up button, don't modify the state of the up
container or other accessibility info, but record the new state if
requested.
Bug 8142097
Change-Id: I070c151aa9f2046d2114ee541d964bf68c6f0def
A bug was introduced when these views were restructured. Make sure that the
Up button for expanded action views functions/focuses correctly.
Bug 8124825
Change-Id: I0a886e62fca21dbb9a173db87642bb79ce9245e7
When new values are added to proc files, we need to handle reading
them from both old and new kernels. This change supports optionally
reading long values. Tests to verify.
Bug: 7903145
Change-Id: I9fe250c0486c3cce3cf3d8624f01af01128d1191
When created with a wrapping width, any content longer than the
requested width will be wrapped onto additional lines. This supports
use-cases like dumping lots of data with printPair().
Improve documentation and add tests to verify behavior.
Change-Id: Ibdfce198f0e69f4df7725544fd1cd02fa029c647
ZYGOTE_FORK_MODE has been set to false since 2009, and the
code indicates that runForkMode() was "retained for reference only."
Remove this dead code. There will always be a reference to this code
in git.
Change-Id: Iddfdca8379fdc6521febea81e553de763b6f4fd0