7912 Commits

Author SHA1 Message Date
Jeff Brown
fa25bf5382 Add display manager skeleton.
The purpose of this change is to remove direct reliance on
SurfaceFlinger for describing the size and characteristics of
displays.

This patch also starts to make a distinction between logical displays
and physical display devices.  Currently, the window manager owns
the concept of a logical display whereas the new display
manager owns the concept of a physical display device.

Change-Id: I7e0761f83f033be6c06fd1041280c21500bcabc0
2012-07-25 18:56:16 -07:00
Jeff Brown
ffed02b95a Merge "Stop using raw display size except in window manager." 2012-07-25 16:14:38 -07:00
Wink Saville
b208a24cf5 Revise and update CellInfo API's
Change-Id: I25a46076a244f50edb9da65816b3717e00820b34
2012-07-25 14:08:09 -07:00
Jeff Brown
a8b9defade Stop using raw display size except in window manager.
We don't actually need the raw size in these places.
The logical size is good enough.

Starting to move dependencies on surface flinger
and window manager out of the Display class.

Change-Id: I2065bee8e5bf7f42c5a452dd1e8479e40ebb0d37
2012-07-25 11:38:48 -07:00
Fabrice Di Meglio
85d28a0004 Merge "Replace left/right with start/end for Gravity / LayoutParams / Padding" 2012-07-24 11:11:02 -07:00
Nick Pelly
2eeeec248a Improve Location object.
Add getElapsedRealtimeNano():

Currently Location just has getTime() and setTime() based on UTC time.
This is entirely unreliable since it is not guaranteed monotonic.
There is a lot of code that compares fix age based on deltas -
and it is all broken in the case of a system clock change. System
clock can change when switching cellular networks (and in some
cases when switching towers).

Document the meaning of getAccuracy():
It is the horizontal, 95% confidence radius.

Make some fields mandatory if they are reported by a LocationProvider:

All Locations returned by a LocationProvider must include at the
minimum a lat, long, timestamps, and accuracy. This is necessary
to perform fused location. There are no public API's for applications
to feed locations into a location provider so this should not cause
any breakage.

If a LocationProvider does not fill in enough fields on a Location
object then it is dropped, and logged.

Bug: 4305998
Change-Id: I7df77125d8a64e174d7bc8c2708661b4f33461ea
2012-07-20 10:07:07 -07:00
Fabrice Di Meglio
aac0d4ed02 Replace left/right with start/end for Gravity / LayoutParams / Padding
- see bug #5429822 UI should be mirrored for RTL locales (Arabic, Hebrew, farsi)

Change-Id: Id9af5375fb9b0edeae5232c77e52ecd497bd2e67
2012-07-19 19:21:26 -07:00
Haoyu Bai
db3c8678e5 Network data activity change intent for network interfaces.
The activity notification is received from netd, an intent
DATA_ACTIVITY_CHANGE is then raised for other part of the system to
consume.

Change-Id: Idfcc4763c51c5b314c57f546c12557082f06bebf
2012-07-17 17:13:03 -07:00
Haoyu Bai
6b7358d951 Netd event code for interface class acitivity.
Change-Id: I83d5ca9ab854cb30ce6d9c06a977ca295f0cdbfd
2012-07-17 16:55:05 -07:00
Matthew Xie
cdce0b9897 Handle airplane mode messages in BroadcastReceiver, safe locking, etc
Handle airplane mode messages in BroadcastReceiver
Safe-lock the access of mBluetooth as a indication of binding state
break indent

Change-Id: Ib24ba0b1f5102c80e55e44b40a8dbf88bc2fad2e
2012-07-16 21:31:02 -07:00
Matthew Xie
fe19f1234e Add TODO comments to remove start/stopReverseTethering
Change start/stopReverseTethering permission from CHANGE_NETWORK_STATE
to CONNECTIVITY_INTERNAL

Change-Id: Iac76d5af6418e6a3e2d2f77bf713466981285e1a
2012-07-16 21:30:45 -07:00
Matthew Xie
6fde309807 Minor changes. Change some instance variables to be final.
Variable name changes, better code reability.

Change-Id: I9f0e9c8a57d4bacf0723be1f91d621c592860683
2012-07-16 21:30:10 -07:00
Fred
a8c6df0d3a Removed startService() call from BluetoothManagerService.
BT enable()/disable() are handled by using the binder interface

Change-Id: I0bb8d4984129706e424320241ca3ea7e12caf0d3

Conflicts:

	core/java/android/bluetooth/IBluetooth.aidl
2012-07-16 21:29:44 -07:00
Matthew Xie
9631314e3d Fix merge error, put in tmp workaround for input manager.
Fix merge error, missing enableNoAutoConnect api.
Remove bluetoothF from inputManageF.systemReady call as tmp workaround.
Recover shutdownRadios(MAX_RADIO_WAIT_TIME) call in ShutdownThread

Change-Id: Ice2b5c54267755bdbf56c742feabbb8709b92570
2012-07-16 21:29:12 -07:00
fredc
bf072a712f Moved BluetoothAdapter.ACTION_STATE_CHANGED broadcast from AdapterService to BluetoothManagerService
Change-Id: I88e5f3fe050cf11eae9c5cf1b7c393a178b8f9b1
2012-07-16 21:28:12 -07:00
zzy
c2f5cc50f7 disable the sync addr flag 2012-07-16 21:27:44 -07:00
Andre Eisenbach
a732ffd8e0 Re-enable Bluetooth after a reboot, even if airplane mode is enabled.
This is to resolve Buganizer issue 6325950 and make the behaviour of
Blueooth and Wifi consistant.

Change-Id: Idd6cfa79136f7847e9e670d6d2aa0bf613b0381f
2012-07-16 21:26:26 -07:00
fredc
d6883533e4 Fixed socket not closing on BT off. Used RemoteCallbackList to monitor binder deaths in BluetoothManagerService.
Change-Id: I524964bd2836d8c5a4bae095b93ac9481337941d
2012-07-16 21:25:05 -07:00
fredc
116d1d4696 Fixed issue with getting Bluetooth adapter's name and airplane mode
Change-Id: I18b632223574aa41b09ba30de8e35417fad86cbe
2012-07-16 21:23:34 -07:00
fredc
649fe497ce Fixed BT on/off issues and added airplane mode handling
Change-Id: If39df19b99a3f45ebe82e89205d8bb0ff036e2a2
2012-07-16 21:22:56 -07:00
fredc
f24588615e Fixed issue with Bluetooth not turning on if enabled called twice in a row or disabled called twice in a row
Change-Id: I26cac2fa347934e0740578b811aa5a6767cf4862
2012-07-16 21:21:50 -07:00
fredc
0f42037eb7 Non persistent adapter service
Change-Id: Ib13d5c77416e58161df0e04d7a15ec0dddbde8b5

Conflicts:

	core/java/android/bluetooth/BluetoothInputDevice.java

Conflicts:

	core/java/com/android/internal/app/ShutdownThread.java
	services/java/com/android/server/SystemServer.java

Conflicts:

	services/java/com/android/server/SystemServer.java
	services/java/com/android/server/pm/ShutdownThread.java
2012-07-16 21:20:54 -07:00
Jaikumar Ganesh
e21a4ac09d Add a new version of the disable API.
This allows for the setting to be persisted or not.
Also turn on Bluetooth in System Server if needed.
It won't work currently because the service wouldn't have
started.

Change-Id: I15fa2bff93aa32134c1b565fcbe90ba68614b6a1
2012-07-16 21:14:15 -07:00
Matthew Xie
3a6794cad7 Merge "Changes to Bluetooth Service structure." 2012-07-16 21:13:26 -07:00
Matthew Xie
a0a69897df Merge "Remove BT references from System Server." 2012-07-16 21:13:06 -07:00
Matthew Xie
a8ae2ee371 Merge "Dock: Temporary removal of function to get BT address" 2012-07-16 21:12:48 -07:00
Jeff Brown
c69238ebc8 Merge "Remove dithering support." 2012-07-16 16:18:13 -07:00
Jeff Brown
3cc321ecf5 Remove dithering support.
The dithering flag is no longer implemented in Surface Flinger
so this is all dead code.

Change-Id: I74c0e452923207e5b7cfe0eeca9457e5cb990947
2012-07-16 16:17:25 -07:00
Jeff Brown
f422a56694 Merge "Remove freezeDisplay(), which is no-op." 2012-07-16 15:52:54 -07:00
Jeff Brown
55e395ab33 Remove freezeDisplay(), which is no-op.
Change-Id: I981ee49e6e2d41a09feaee4b384392e83f7faf3d
2012-07-16 14:57:22 -07:00
Nick Pelly
7d4252171c Merge "Improve geofencing: throttle location updates with distance to fence." 2012-07-16 14:26:14 -07:00
Nick Pelly
e0fd693c60 Improve geofencing: throttle location updates with distance to fence.
Previously any geofence (proximity alert) would turn the GPS on at full rate.
Now, we modify the GPS interval with the distance to the nearest geofence.
A speed of 100m/s is assumed to calculate the next GPS update.

Also
o Major refactor of geofencing code, to make it easier to continue to improve.
o Discard proximity alerts when an app is removed.
o Misc cleanup of nearby code. There are other upcoming changes
  that make this a good time for some house-keeping.

TODO:
The new geofencing heuristics are much better than before, but still
relatively naive. The next steps could be:
- Improve boundary detection
- Improve update thottling for large geofences
- Consider velocity when throttling

Change-Id: Ie6e23d2cb2b931eba5d2a2fc759543bb96e2f7d0
2012-07-16 12:18:52 -07:00
Adam Cohen
f08a8b78b6 Fixing issue where you couldn't set null RemoteViews for a widget
-> As noted here: http://code.google.com/p/android/issues/detail?id=35014

Change-Id: Id5d1c47b6961d4b448453d8b16700801c0137f2b
2012-07-16 12:04:17 -07:00
Svetoslav Ganov
c9c9a48e7b Removing a workaround for incorrect window position on window move.
1. The window manager was not notifying a window when the latter
   has been moved. This was causing incorrect coordinates of the
   nodes reported to accessibility services. To workaround that
   we have carried the correct window location when making a
   call from the accessibility layer into a window. Now the
   window manager notifies the window when it is moved and the
   workaround is no longer needed. This change takes it out.

2. The left and right in the attach info were not updated properly
   after a report that the window has moved.

3. The accessibility manager service was calling directly methods
   on the window manager service without going through the interface
   of the latter. This leads to unnecessary coupling and in the
   long rung increases system complexity and reduces maintability.

bug:6623031

Change-Id: Iacb734b1bf337a47fad02c827ece45bb2f53a79d
2012-07-16 08:46:11 -07:00
Jaikumar Ganesh
1abb1cb3a8 Changes to Bluetooth Service structure.
Changes to make Bluetooth Service part of the system_service.
These changes may be temporary.

Changes to update to the new disable API.

Change-Id: If89dba17e6e6c6daa53c37684221763a2da076e9

Conflicts:

	services/java/com/android/server/pm/PackageManagerService.java
2012-07-13 22:22:51 -07:00
Jaikumar Ganesh
3419618736 Remove BT references from System Server.
Change-Id: Icfdb3e140aa35174a8b70da57472a1bf2bd0143b

Conflicts:

	services/java/com/android/server/SystemServer.java
2012-07-13 22:22:51 -07:00
Jaikumar Ganesh
9773ebb778 Dock: Temporary removal of function to get BT address
Change-Id: I0d1033654e2708f864649f2b2568be7c9da014ed
2012-07-13 22:22:51 -07:00
Amith Yamasani
99e34591c6 Does not compile!!!
Revert "Removing a workaround for incorrect window position on window move."

This reverts commit 939f2e43a80f9a6df16b7e18eba5cfffdbf032da
2012-07-13 20:23:16 -07:00
Svetoslav Ganov
939f2e43a8 Removing a workaround for incorrect window position on window move.
1. The window manager was not notifying a window when the latter
   has been moved. This was causing incorrect coordinates of the
   nodes reported to accessibility services. To workaround that
   we have carried the correct window location when making a
   call from the accessibility layer into a window. Now the
   window manager notifies the window when it is moved and the
   workaround is no longer needed. This change takes it out.

2. The left and right in the attach info were not updated properly
   after a report that the window has moved.

3. The accessibility manager service was calling directly methods
   on the window manager service without going through the interface
   of the latter. This leads to unnecessary coupling and in the
   long rung increases system complexity and reduces maintability.

bug:6623031

Change-Id: Ibbf98afd29439783ba331a7a0cdce55d7f138922
2012-07-13 19:53:37 -07:00
Craig Mautner
052db7c25e Merge "Further isolate layout side from animation side." 2012-07-13 13:39:25 -07:00
Craig Mautner
322e403156 Further isolate layout side from animation side.
- Use local AppWindowAnimators in WindowAnimator rather than
    using shared WindowManagerService objects.
- Use local WindowStateAnimators in AppWindowAnimator rather
    than use AppToken's WindowState objects.
- Remove redundant WindowManagerService parameter passed to
    AppWindowAnimator ctor.
- Keep from copying parameters from performLayout if the
    parameters haven't changed since the last copy.
- Link WindowStateAnimator to AppWindowAnimator to keep
    from going through WindowStateAnimator.mWin,
    WindowState.mAppToken and AppWindowToken.mAppAnimator.
- Converted attached WindowState in WindowStateAnimator to
    WindowStateAnimator to eliminate multiple conversions.

Change-Id: I5e35af88d8fdc1a7454984eaea91a1bc4f926978
2012-07-13 13:35:20 -07:00
Dianne Hackborn
af665efcbc Merge "Improve cleanup of file caches." 2012-07-12 16:37:01 -07:00
Dianne Hackborn
197a0c82a1 Improve cleanup of file caches.
This rewrites installd's code for deleting cache files to be better:

- Isn't really stupid about just deleting directories in the order
  they are found on the filesytem; now collects all cache files and
  sorts them by mod time to determine which to delete.
- Also deletes cache files in /data/media and for all users.

This also tweaks DeviceStorageMonitor to be a little smarter about
deciding when to flush cache files, having upper and lower limits
that it allows memory to get down to and then flash files to reach
the higher free storage limit.  This should reduce the amount that
we perform flushing when starting to reach the storage limit.

Finally add a new pm command to force a cache flush.

Change-Id: I02229038e1ad553d1168393e5cb6d5025933271d
2012-07-12 14:46:04 -07:00
Svetoslav Ganov
f1ca09b990 Merge "Gestures don't work when turning on Explore by Touch pragmatically." 2012-07-12 13:14:34 -07:00
Svetoslav Ganov
a43ef3d1c5 Gestures don't work when turning on Explore by Touch pragmatically.
1. There was a misspelled duplicate member in the accessibility service
   class which was causing inconsistent behavior because one field was
   updated and another checked.

2. When the set of services that can put the device in explore by touch
   mode changes we were disconnecting and reconnecting all services
   and this is not correct. Now only the state of explore by touch is
   updated appropriately.

bug:6798860

Change-Id: Ib3c119cef8e71c3458d56e4ce6fbde2c2f750dcd
2012-07-12 13:07:59 -07:00
Wink Saville
5362f17ff5 Merge commit '1b003ef0' into mit
* commit '1b003ef0':
  Create telephony-common and mms-common

Change-Id: Ie8876541dbe7f4c933cf7d69910dd204538bc975
2012-07-11 18:15:50 -07:00
Wink Saville
a639b311e9 Create telephony-common and mms-common
These have been created to reduce the size and complexity
of frameworks/base.

mms-common was created by moving all of
  frameworks/base/core/java/com/google/android/mms
to:
   frameworks/opt/mms

telephony-common was created by moving some of
   frameworks/base/telephony
to:
   frameworks/opt/telephony

Change-Id: If6cb3c6ff952767fc10210f923dc0e4b343cd4ad
2012-07-11 16:02:08 -07:00
Craig Mautner
64ab8fcd6f am dcddea95: Merge "Handle keyguard visibility states separately. DO NOT MERGE" into jb-dev
* commit 'dcddea95301641e3dc9692ed7d70127085458a24':
  Handle keyguard visibility states separately. DO NOT MERGE
2012-07-11 15:18:14 -07:00
Craig Mautner
f333f5f67a Handle keyguard visibility states separately. DO NOT MERGE
Previous to this change the forceHiding variable was a boolean. This
change recognizes the different configurations of the keyguard by
defining separate states for forceHiding and testing for window
visibility differently in each state.

Fixes bug 6786114.

Change-Id: I3460c45ea6da772a4ff76bb016de7aa4b051a673
2012-07-11 14:38:29 -07:00
Craig Mautner
fbf885b652 Merge "Notify client side of window movement." 2012-07-10 14:48:06 -07:00