2407 Commits

Author SHA1 Message Date
Christopher Tate
fc05434908 Throw on illegal arguments to ArrayUtils.equals(a1, a2, len)
Specifically, throw an explicit IllegalArgumentException if
'len' is negative, rather than falling over in some other
way further down the line.

Change-Id: If955de7ec1a15aa9aa8c42b6994b059e0cdffcee
2013-03-22 15:01:13 -07:00
Wink Saville
24d248acdf Add new StateMachine constructor with name and handler params.
Change-Id: Ic252de6cac24a043050b37d81767d19e2739b2fc
2013-03-17 14:26:21 -07:00
Craig Mautner
e4bbb1cc45 Catch BadTokenException and continue.
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
2013-03-15 11:38:44 -07:00
Irfan Sheriff
11aefad94d Add support for scan always available mode
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
2013-03-14 13:55:56 -07:00
Irfan Sheriff
1c80a05176 Merge "Add all variations message parameters for send/obtain." into jb-mr2-dev 2013-03-14 20:26:36 +00:00
Wink Saville
8b0db52040 Add all variations message parameters for send/obtain.
Change-Id: Ib8f3b66650d2ae2a8af7a537871361613e65b48e
2013-03-14 13:23:19 -07:00
Craig Mautner
ca0ac718cb Remove WindowManager messages from remote queue.
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
2013-03-14 09:43:02 -07:00
Michael Wright
e8cc96b8f8 Remove unused interface IInputConnectionCallback
Bug: 8276952
Change-Id: I3755df557388bee55f0cc4780adc300672cbe9a1
2013-03-12 11:01:14 -07:00
Wink Saville
614edf5833 Merge "Add additional message methods." into jb-mr2-dev 2013-03-11 16:46:05 +00:00
Wink Saville
4753cd2014 Add additional message methods.
Change-Id: Iac96815f7b72bcb3b9c658a24c24e0733e0ea1b0
2013-03-11 09:32:48 -07:00
Jim Miller
6e5d6492db Merge "Fix long-standing bug with LockPatternView drawing artifacts" into jb-mr2-dev 2013-03-09 00:09:18 +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
Jim Miller
0caa377f46 Fix long-standing bug with LockPatternView drawing artifacts
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
2013-03-07 18:49:32 -08:00
Jeff Sharkey
94c91dca55 ArrayUtils.indexOf(), containsAll() with tests.
Change-Id: I040164d4e45126e4a6c1df54bd114f47951da560
2013-03-06 16:28:36 -08:00
Dianne Hackborn
474690caf8 Fix issue #8325007: EyeEm app crashes on launch- NPE at...
...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
2013-03-06 11:33:26 -08:00
Dianne Hackborn
7cf71fbdc3 A few small missing things from the custom action bar layout.
Change-Id: I91e0b43ccf92d5c9541f80220922951acb0795e7
2013-03-05 18:00:12 -08:00
Dianne Hackborn
9c9aec721a Merge "Fix issue #8311263: Corrupted UI across all tabs in People app" into jb-mr2-dev 2013-03-05 17:34:40 +00:00
Dianne Hackborn
1dc5f92716 Fix issue #8311263: Corrupted UI across all tabs in People app
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
2013-03-04 18:17:50 -08:00
Justin Koh
4207fda51b Add policy check to always show overflow menu button on TV devices.
Add policy check to always show overflow menu button on TV devices.
Bug: 8236681

Change-Id: I4f92eef7a6d530feb698f83b0720b36115f7a04a
2013-03-01 13:03:20 -08:00
Dianne Hackborn
df7221ced3 Unify normal and overlay action bar layouts.
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
2013-02-27 18:27:42 -08:00
Daniel Sandler
4d85af68a4 Spurious file removed.
Change-Id: I2ac3f417553aea806ad570e247afc985e9ececb3
2013-02-26 10:51:45 -05:00
Wink Saville
ff4fcdb98c Tweak logging and some code reformatting.
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
2013-02-24 07:21:45 -08:00
Dianne Hackborn
c4aad01cbb Formalize overscan metrics.
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
2013-02-22 19:14:37 -08:00
Jim Miller
ab8e936e85 Merge "Add explicit userId to AppWidget binder calls" 2013-02-21 00:00:49 +00:00
Jim Miller
a75a883fe9 Add explicit userId to AppWidget binder calls
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
2013-02-20 15:41:14 -08:00
Fabrice Di Meglio
50c291b653 Merge "SystemUI optimization - rely on inheritance for layout direction" 2013-02-20 23:18:04 +00:00
Daniel Sandler
09a247e9a8 New INotificationListener interface.
Use with INotificationManager.registerListener(). Limited to
system only right now.

Change-Id: I65b6a8778267022cdc5e58eb75ae607a54b1cc52
2013-02-19 15:26:37 -05:00
Fabrice Di Meglio
b5fe52b389 SystemUI optimization - rely on inheritance for layout direction
- 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
2013-02-15 13:10:38 -08:00
Jeff Sharkey
9a2c2a6da9 Parse network stats using native code.
Switch to parsing detailed network stats with native code, which
is 71% faster than ProcFileReader.

Change-Id: I2525aaee74d227ce187ba3a74dd08a2b06514deb
2013-02-13 17:40:49 -08:00
Dianne Hackborn
d7d28e675e App ops: media ops, set up to be callable from native code.
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
2013-02-12 15:03:55 -08:00
Wink Saville
f643069ad5 Fix record logging.
Change-Id: I246159dec9522e58ee88593000ac0f86aff4bb25
2013-02-11 16:16:02 -08:00
Adam Powell
e8c8ae401b Fix setting action bar backgrounds after layout
Fix a bug that would prevent the drawable bounds from being set
correctly for action bar containers.

Change-Id: I396aa40e3d8f6e3b47bcd438e1f26bbfc7b20a7f
2013-02-08 18:07:19 -08:00
Daniel Sandler
fde19b106b New API to request a list of current notifications.
The ACCESS_NOTIFICATIONS permission is signature|system only.

Change-Id: I41338230aee9611117cbdac251c1b6b6c3cebf00
2013-02-07 15:43:02 -05:00
Dianne Hackborn
c2293025a2 App ops: track system windows, monitoring changes.
Change-Id: I273e82bdad66ada3bf0f7ec9176bc304b9ee1ee8
2013-02-06 23:59:56 -08:00
Adam Powell
1fb69f0f35 am 0714e37c: am a7e028a9: am cef582ab: am 07cf971e: Fix re-enabled state of up after action view collapse
# Via Android Git Automerger (3) and Adam Powell (1)
* commit '0714e37cb7acafbc93f2fac40dbb200cd2a96514':
  Fix re-enabled state of up after action view collapse
2013-02-05 16:57:53 -08:00
Adam Powell
0714e37cb7 am a7e028a9: am cef582ab: am 07cf971e: 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
2013-02-05 16:54:45 -08:00
Adam Powell
a7e028a976 am cef582ab: am 07cf971e: 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
2013-02-05 16:53:04 -08:00
Adam Powell
07cf971e58 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
2013-02-05 16:24:25 -08:00
Adam Powell
9c684aab21 am 638af2fb: am 6a33c403: am 569f138e: am 67389e0a: Merge "Fix regression in expanded action view up" into jb-mr1.1-dev
# Via Android Git Automerger (3) and others
* commit '638af2fbb6ecb6ca0e58b06d5b2c6ecabbc7f812':
  Fix regression in expanded action view up
2013-02-04 17:19:43 -08:00
Adam Powell
638af2fbb6 am 6a33c403: am 569f138e: am 67389e0a: Merge "Fix regression in expanded action view up" into jb-mr1.1-dev
# Via Android Git Automerger (2) and others
* commit '6a33c4031de8f0b323855c6db8d6ee0c812b0f00':
  Fix regression in expanded action view up
2013-02-04 13:54:56 -08:00
Adam Powell
6a33c4031d am 569f138e: am 67389e0a: Merge "Fix regression in expanded action view up" into jb-mr1.1-dev
# Via Adam Powell (1) and others
* commit '569f138ef1a94e6d6cfc0587f06b396a77f00c1c':
  Fix regression in expanded action view up
2013-02-04 13:53:24 -08:00
Adam Powell
62f33030b9 Fix regression in expanded action view up
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
2013-02-04 12:47:34 -08:00
Jeff Sharkey
8e7b3b15f7 Support optional values in ProcFileReader.
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
2013-01-31 18:27:00 -08:00
Jeff Sharkey
ed1ad7fada Merge "Add wrapping support to IndentingPrintWriter." 2013-01-31 00:37:34 +00:00
Jeff Sharkey
71cb446f01 Add wrapping support to IndentingPrintWriter.
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
2013-01-30 16:35:35 -08:00
Wink Saville
d21e24bcce Merge "Cleanup StateMachine LogRec handling and get tests working." 2013-01-30 19:44:16 +00:00
Wink Saville
efcc3d3566 Cleanup StateMachine LogRec handling and get tests working.
Change-Id: I13107e846812b16f1c95be11626500dbd7a13b2a
2013-01-30 11:21:22 -08:00
Jeff Sharkey
1410db83f9 Merge "Check text length when testing for newline." 2013-01-30 19:03:33 +00:00
Jeff Sharkey
3029bf225c Check text length when testing for newline.
Also add tests to verify.

Bug: 8102140
Change-Id: I7e5dbff53caeb50bfa0fb4ea5dce73e3c742986a
2013-01-30 11:01:12 -08:00
Nick Kralevich
cae3d9f0ab ZygoteInit: more dead code cleanup
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
2013-01-30 10:01:51 -08:00