6419 Commits

Author SHA1 Message Date
Guang Zhu
6ffa76077d Revert "Make NDC not block forever and handle restart."
Reverting because it seems to break `adb reboot`

This reverts commit 813af8d46467f41ed2d492917cbb9f9f45d2a3d7.

Change-Id: I75d827664a08799de15369c24c84cc3f49a8f297
2012-02-07 19:25:42 -08:00
Robert Greenwalt
ec159352fe Merge "Make NDC not block forever and handle restart." 2012-02-07 16:19:56 -08:00
Robert Greenwalt
813af8d464 Make NDC not block forever and handle restart.
Need changes in core.

Still possible for netd to get wedged but system won't die because of it.
Leads the way to having forking netd - then only individual commands would
wedge, promoting stability.

bug:5864209
Change-Id: Ifcd37511c8239fe3df7e9070869b63a9c5649bd2
2012-02-07 15:59:49 -08:00
Jeff Sharkey
b5718c29ae Merge "Send broadcast when changing restrict background." 2012-02-07 15:50:02 -08:00
Jeff Sharkey
1f8ea2dcd1 Send broadcast when changing restrict background.
When changing global restrict background status, send connectivity
change broadcast, since it radically changes DISCONNECTED/BLOCKED
status system-wide.

Also reduce verbose stats logging.

Bug: 5854466
Change-Id: I3b612c520f50cc3000a3a569b7e0ab5f691cc2bd
2012-02-07 12:08:58 -08:00
Jeff Sharkey
e7171effdf Merge "List rotated netstats files during --checkin dump." 2012-02-07 10:45:41 -08:00
Jeff Sharkey
706498d387 List rotated netstats files during --checkin dump.
Also disable verbose logging.

Change-Id: I4c51e05d695eac43f0d9c28f9699f1655c642a99
2012-02-06 17:35:11 -08:00
Craig Mautner
a52b6e7bcf Merge "Extract code from performLayoutAndPlaceSurfacesInnerLocked() into multiple methods." 2012-02-06 17:04:23 -08:00
Craig Mautner
61ac6bb250 Extract code from performLayoutAndPlaceSurfacesInnerLocked() into multiple methods.
Change-Id: I80152c38741ce73b92da9483cfed84efbac34f89
2012-02-06 16:52:16 -08:00
Amith Yamasani
13c7b82234 Merge "Check for null ActivityInfo." 2012-02-06 15:39:40 -08:00
Amith Yamasani
2f6c9eb9c2 Check for null ActivityInfo.
Bug: 5970556
Change-Id: I87ebad1918311f24333d16cb6732742a1dd96685
2012-02-06 15:31:35 -08:00
Jeff Sharkey
241dde2306 Unify shorthand for byte-based units.
Change-Id: If990859dee3f0973e1d4c48f05312c84071b3328
2012-02-03 14:50:13 -08:00
Amith Yamasani
1ef7d13172 Merge "Multi-user - 1st major checkin" 2012-02-03 12:04:40 -08:00
Amith Yamasani
742a671273 Multi-user - 1st major checkin
Switching activity stacks
Cache ContentProvider per user
Long-press power to switch users (on phone)

Added ServiceMap for separating services by user
Launch PendingIntents on the correct user's uid
Fix task switching from Recents list
AppWidgetService is mostly working.

Commands added to pm and am to allow creating and switching profiles.

Change-Id: I15810e8cfbe50a04bd3323a7ef5a8ff4230870ed
2012-02-03 12:01:47 -08:00
Robert Greenwalt
f0be1d89bf Add some logging to NDC.
We're getting some lockups of netd and this can help point us
in the right direction.

bug:5864209
Change-Id: Id8bdb0a758c5b161e0143de61b5f39c3a982e329
2012-02-02 16:38:38 -08:00
Jeff Sharkey
34c4d2e249 Merge "Support snoozing of data warning notification." 2012-02-02 16:26:41 -08:00
Jeff Sharkey
0e2e5f8b56 Support snoozing of data warning notification.
Introduce second snooze timestamp to support dismissal of data usage
warning notification.  Also explicitly set notification "when" to
avoid fighting with other notifications, such as ongoing downloads.

Bug: 5443756, 5262414
Change-Id: I03342c25b0410b1b2db84de9a40884f04cb1d8ae
2012-02-02 16:22:33 -08:00
Jeff Sharkey
2c5674aa7b Merge "Avoid NDC deadlock when re-arming network alert." 2012-02-02 13:19:37 -08:00
Jeff Sharkey
25ce9ed57f Avoid NDC deadlock when re-arming network alert.
When NDC delivers limitReached() event, NMS re-arms the alert, which
makes another call back to NDC.  If NDC already started processing
another call, this causes deadlock.

Fix this by re-arming on a handler thread.

Bug: 5879848
Change-Id: I46fa78fe1f1122c5f31dd6020483e5ae89a9f39d
2012-02-02 13:09:52 -08:00
Chet Haase
659793bcd0 Merge "Add Developer Option setting for Animator scaling." 2012-02-02 10:42:44 -08:00
Chet Haase
c38fa1f636 Add Developer Option setting for Animator scaling.
This new setting allows users to set a scale factor for the
duration and startDelay of all Animator-based animations. This
setting is very similar to the Transition animation scale and
Window animation scale settings, except this one applies specifically
to Animator animations. The property is only accessible by users
through the Settings UI, not programmatically. The value applies
system-wide and is picked up per-process at the time of the first
ValueAnimator construction.

This is an update to a previous CL; this approach uses the WindowManager
to store the animator scale settings, instead of SystemProperties.

Change-Id: I8295fab060aa6d597ae507ded8f9c9d6077be966
2012-02-02 08:40:44 -08:00
Dianne Hackborn
8bcd54b98a Use Choreographer for window manager animation timing.
Change-Id: Ic34aff698c63d383ecd06af7da9957475683a1db
2012-02-01 16:02:14 -08:00
Christopher Tate
f46723b41f Implement background vs foreground broadcasts
Before now, receiving a broadcast would cause a process to be hoisted
to foreground priority / cgroup.  This is no longer the case: broadcasts
by default are handled in the background, with a suitably increased
timeout interval.  When a given broadcast needs to be dealt with in a
more timely manner, the issuer can set the new FLAG_BROADCAST_FOREGROUND
flag on the Intent, which will produce the old foreground-priority
behavior.

To avoid priority inversions, foreground broadcasts are tracked on a
separate outgoing queue and can be in flight simultaneously with a
background-priority broadcast.  If there is already a background-level
broadcast in flight to a given app and then a foreground-level one is
dispatched to that app, the app [and its handling of both broadcasts]
will be properly hoisted to foreground priority.

This change is also essentially the first step towards refactoring the
broadcast-handling portions of the Activity Manager into a more
independent existence.  Making BroadcastQueue a top-level class and
regularizing its operation viz the primary Activity Manager operation
is the next step.

Change-Id: If1be33156dc22dcce318edbb5846b08df8e7bed5
2012-02-01 14:36:34 -08:00
Svetoslav Ganov
2eecea3b48 Merge "Speedup the accessibility window querying APIs and clean up." 2012-02-01 13:45:24 -08:00
Jeff Sharkey
e630f7b31b Clear identity when updating network stats.
Bug: 5945461
Change-Id: Ie51ea3f107a705c395b65684f21bf4c28c7f4d33
2012-01-31 17:13:09 -08:00
Jeff Sharkey
5e61331da5 Move away from deprecated NetworkInfo extra.
Because the NetworkInfo included in CONNECTIVITY_ACTION broadcast
extra does not reflect the state applicable to the calling UID, and
the last sticky broadcast may have stale state, transition to calling
ConnectivityManager.getActiveNetworkInfo() directly.

Change-Id: I86b316fbedd0273585ad5f1248b091bc3a3a5520
2012-01-30 11:21:35 -08:00
Wink Saville
b675f516da Merge "Add additional debug" 2012-01-25 14:04:59 -08:00
Wink Saville
c7d7eafb66 Add additional debug
When ConnectivityService#startUsingNetworkFeature is called and the
special network is not available output some additional information.

Change-Id: I34b226a208596fa6418f1f37a0feec1d274d493c
2012-01-25 13:47:54 -08:00
Jeff Sharkey
629c6765ca Merge "Move network stats to FileRotator pattern." 2012-01-24 11:49:51 -08:00
Dianne Hackborn
08cec4ee46 am a5853595: am 47163685: Merge "Another attempt at issue #5823276: home repaints after full-screen app is exited" into ics-mr1
* commit 'a5853595165a6395ca41bbc17a3dd88e12259ad1':
  Another attempt at issue #5823276: home repaints after full-screen app is exited
2012-01-24 11:39:49 -08:00
Dianne Hackborn
47163685eb Merge "Another attempt at issue #5823276: home repaints after full-screen app is exited" into ics-mr1 2012-01-24 11:33:15 -08:00
Jeff Sharkey
63abc37356 Move network stats to FileRotator pattern.
Split existing network stats into two separate classes: a recorder
which generates historical data based on periodic counter snapshots,
and a collection of historical data with persistance logic.

Recorder keeps a pending history in memory until outstanding data
crosses a specific threshold.  Persisting is handled through a given
FileRotator.  This pattern significantly reduces disk churn and
memory overhead.  Separate UID data from UID tag data, enabling a
shorter rotation cycle.  Migrate existing stats into new structure.

Remove "xt" stats until iptables hooks are ready.  Avoid consuming
Entry values when recording into NetworkStatsHistory.  Assign
operation counts to default route interface.

Introduce "Rewriter" interface in FileRotator with methods to enable
rewriteAll().  Introduce IndentingPrintWriter to handle indenting in
dump() methods.

Bug: 5386531
Change-Id: Ibe086230a17999a197206ca62d45f266225fdff1
2012-01-24 11:13:14 -08:00
Svetoslav Ganov
79311c4af8 Speedup the accessibility window querying APIs and clean up.
1. Now when an interrogating client requires an AccessibilibtyNodeInfo
   we aggressively prefetch all the predecessors of that node and its
   descendants. The number of fetched nodes in one call is limited to
   keep the APIs responsive. The prefetched nodes infos are cached in
   the client process. The node info cache is invalidated partially or
   completely based on the fired accessibility events. For example,
   TYPE_WINDOW_STATE_CHANGED event clears the cache while
   TYPE_VIEW_FOCUSED removed the focused node from the cache, etc.
   Note that the cache is only for the currently active window.
   The ViewRootImple also keeps track of only the ids of the node
   infos it has sent to each querying process to avoid duplicating
   work. Usually only one process will query the screen content
   but we support the general case. Also all the caches are
   automatically invalidated so not additional bookkeeping is
   required. This simple strategy leads to 10X improving the
   speed of the querying APIs.

2. The Monkey and UI test automation framework  were registering a
   raw event listener for accessibility events and hence perform
   connection and cache management in similar way to an AccessibilityService.
   This is fragile and requires the implementer to know internal framework
   stuff. Now the functionality required by the Monkey and the UI automation
   is encapsulated in a new UiTestAutomationBridge class. To enable this
   was requited some refactoring of AccessibilityService.

3. Removed the *doSomethiong*InActiveWindow methods from the
   AccessibilityInteractionClient and the AccessibilityInteractionConnection.
   The function of these methods is implemented by the not *InActiveWindow
   version while passing appropriate constants.

4. Updated the internal window Querying tests to use the new
   UiTestAutomationBridge.

5. If the ViewRootImple was not initialized the querying APIs of
   the IAccessibilityInteractionConnection implementation were
   returning immediately without calling the callback with null.
   This was causing the client side to wait until it times out. Now
   the client is notified as soon as the call fails.

6. Added a check to guarantee that Views with AccessibilityNodeProvider
   do not have children.

bug:5879530

Change-Id: I3ee43718748fec6e570992c7073c8f6f1fc269b3
2012-01-23 20:13:58 -08:00
Dianne Hackborn
b7ff51bde9 Another attempt at issue #5823276: home repaints after full-screen app is exited
This is between the two previous attempts.  I returned the part from the
original that was breaking gallery, but have some new code to detect when
something about the window params has changed that would require a
layout pass to make sure we still do a layout then, even if the window is
not currently visible.

Change-Id: I07745e1f66022583e3076b84cc8bbe8bd2acd48f
2012-01-23 19:15:27 -08:00
Jim Miller
eda775cc89 am 9f080e2a: am 44760b10: Merge "Revert "Fix 5797764: Increase lock screen\'s thread priority"" into ics-mr1
* commit '9f080e2a5bc6a268934e32201c69ea8a86900396':
  Revert "Fix 5797764: Increase lock screen's thread priority"
2012-01-23 15:53:17 -08:00
Jim Miller
44760b106a Merge "Revert "Fix 5797764: Increase lock screen's thread priority"" into ics-mr1 2012-01-23 15:49:32 -08:00
Jim Miller
54dbbce1c3 Revert "Fix 5797764: Increase lock screen's thread priority"
This reverts commit 6d6a70a33746ef5147ab146f1802f0db424dd2f1

This doesn't appear to have a measurable impact for this issue.
2012-01-23 15:24:42 -08:00
Dianne Hackborn
fd1c5ed370 New screen rotation animation design.
We now have an animation that can start as soon as we detect to
rotate the screen, and have a different phase once the new UI
is ready to complete the transition into it.

Change-Id: I05b9c12a699232acbddc36b4a994a4452db71476
2012-01-23 12:52:43 -08:00
Dianne Hackborn
d9ea468d6a New brightness setting to adjust auto-brightness mode.
Change-Id: Icfec22be99d8c79e9ff5720b80fb9dacbba36134
2012-01-23 12:01:00 -08:00
Andy McFadden
30f1312b3c Merge "Use Map.Entry, not HashMap.Entry" 2012-01-23 09:34:17 -08:00
Jim Miller
8ffd2cccf0 am b1c7785c: am eaa11a72: Merge "Fix 5797764: Increase lock screen\'s thread priority" into ics-mr1
* commit 'b1c7785c1110e171d3dd3deb259b1caeed0b9da6':
  Fix 5797764: Increase lock screen's thread priority
2012-01-23 09:18:36 -08:00
Dianne Hackborn
02d37b9731 resolved conflicts for merge of 892d11f4 to master
Change-Id: I21eca0002100d898e167a25aaa46d896deca2a11
2012-01-20 18:42:07 -08:00
Christopher Tate
65f87ec733 Merge "Fix shared-storage full backup" 2012-01-20 17:59:06 -08:00
Christopher Tate
73d7369e0f Fix shared-storage full backup
The special shared-storage step was mistakenly writing its data directly
to the USB output pipe rather than to the proper stacked data handling
chain that applies compression and encryption.  Fix this by getting rid
of the custom handling of the shared-storage data, instead folding it
into the normal data handling flow [with a small amount of additional
management because e.g. it doesn't need a "manifest" pseudofile in the
archive stream].

Fixes bug 5897791

Change-Id: I3995b07963334d2f8cce49b247c87d3d3ff93bed
2012-01-20 17:41:41 -08:00
Jim Miller
d3fe9abfb9 am ab9601cd: am 230a7092: Merge "Fix 5863053: Add method to lock screen immediately." into ics-mr1
* commit 'ab9601cdbb95ae94088750eff9a926a572c1a4d6':
  Fix 5863053: Add method to lock screen immediately.
2012-01-20 15:48:21 -08:00
Jim Miller
eaa11a7231 Merge "Fix 5797764: Increase lock screen's thread priority" into ics-mr1 2012-01-20 15:24:20 -08:00
Andy McFadden
2f36229db8 Use Map.Entry, not HashMap.Entry
Map.Entry is the defined return value from entrySet().  HashMap.Entry
shouldn't be used directly.

Change-Id: Ia21598c6a73fe7eb22179ce114095f779c903084
2012-01-20 14:43:38 -08:00
Jim Miller
6d6a70a337 Fix 5797764: Increase lock screen's thread priority
This increases lock screen's thread priority from THREAD_PRIORITY_FOREGROUND
to THREAD_PRIORITY_DISPLAY to ensure it runs before other activities that
might stall lock screen when the screen turns on.

Change-Id: I14cf9f3f5c092817bc6cf2d0a254001a5d34f744
2012-01-20 14:41:55 -08:00
Robert Greenwalt
2772143eff Merge "Stop using shared DUN APN when tethering stops." 2012-01-20 14:35:41 -08:00
Dianne Hackborn
cfbf7dedad Fix issue #5823276 again: home repaints after full-screen app is exited
Don't consider a window as a candidate for the top fullscreen window
if it is not going to be a candiate for layout.

This fix does not include the change to ignore app tokens that are
hidden.  This causes problems in some dialogs that stay hidden until
their app is ready to display, but need to perform a series of relayouts
during that time to get to the right size.  Dropping this part of
the change still (mostly?) seems to allow us to avoid the bad states.

Change-Id: Ic052cb1499d3287f47e9ffeac5cd2470ee5a308c
2012-01-20 11:01:01 -08:00