13144 Commits

Author SHA1 Message Date
Svetoslav
3b817aed7d Improper initialization of the accessibility manager service.
Initially the current user in the accessibility manager service is the
owner. This is correct since the system should be able to respond to
queries immediately and their result depends on the current user. However,
the system is calling the user switch callback with the current user
which is the same as the one we initialized with. Switching the user
causes clearing state for the old user winch is in case the current
one. Hence, we are losing state for the current user. This behavior was
masked from the fact that accidentally no events in the system were
fired before the first use user switch call.

repo Losing current user state puts the manager service in an inconsistent
state and it binds to accessibility services more than once. As a result
the accessibility layer starts to misbehave rendering the device useless
to a blind user.

Now we are ignoring user switch callbacks if the new user is the same
as the current one. Since we can no longer initialize at the first user
switch, this change adds explicit system ready method called from
the system server at the right moment.

bug:9496697

Change-Id: Icb39e929ea44e6c0360aba7ddc12f941ca2c9f98
2013-06-21 18:38:20 -07:00
Daniel Sandler
a0c9b9d2a7 Merge "Temporarily restore some support for icon==0 notifications." into jb-mr2-dev 2013-06-14 20:29:24 +00:00
Jeff Brown
04c699218a Fix logspam when battery sysfs file not available.
This was a regression caused by a recent change to use String8
instead of char*.  We missed the implicit null check here.

Bug: 9377604
Change-Id: I7eff138096622c47b5d45678010373dc82138384
2013-06-12 15:57:38 -07:00
Ashish Sharma
59dc7a8e75 Do not allow 0 or smaller periodicity for syncs.
b/9295383

Change-Id: I5f758f4a033d74e42a04b214a6b70b94d394280d
(cherry picked from commit 4970974d74a2986a333e645a5c141ef5f9a753cc)
2013-06-10 19:14:52 +00:00
Daniel Sandler
4e5694aaa7 Merge "Do not block notifications or toasts for SYSTEM_UID or PHONE_UID." into jb-mr2-dev 2013-06-10 18:31:51 +00:00
Daniel Sandler
7c011302b6 Do not block notifications or toasts for SYSTEM_UID or PHONE_UID.
The specific bug is this: SIM PIN unlock attempt toasts are
sent from com.android.settings/.IccLockSettings which runs
as the phone process; NoMan wasn't having any of that and
was blocking the toasts.

With this change we treat SYSTEM_UID and PHONE_UID the same
for all security checks, and furthermore we guarantee that
all notifications and toasts from those UIDs will be
permitted.

Bug: 9098802
Change-Id: Idc788527aa2cb38e015fe92773766a514167999e
2013-06-10 12:19:16 -04:00
Jeff Sharkey
56cd646abe Avoid logging sensitive data.
When building commands to send across NativeDaemonConnector, scrub
sensitive arguments to prevent them from being logged.

Bug: 8609800
Change-Id: I84b16791749264a010f7e59f9918f68d71bac6b9
2013-06-07 15:09:32 -07:00
Dianne Hackborn
f5fdca9dc1 Maybe fix issue #9296868: Crash in system process
There were some paths in LocationManagerService where
mRecivers was being accessed/modified without the lock held.
Update method names to indicate they need to be called with
lock held to make it more clear in the future when such a
problem may happen.

Change-Id: Ie2a9d019155ac7cedd1db298caca75b8fe382ca7
2013-06-05 14:53:33 -07:00
Robert Greenwalt
05caa2a3de Apply scan-always setting to initial wifi state.
Otherwise there's nothing to kick us into scanable modes unless
the user toggles wifi.

bug:9217455
Change-Id: I6460305e3f299646433546598412f817579cc805
2013-06-01 10:59:29 -07:00
Robert Greenwalt
304aad49cd Remember wifi country that's set before boot
Telehony seems to sometimes be reporting the country before boot
is completed so can't persist the data at that time.  Remember
and write it on BOOT_COMPLETED

Also, there are permission issues around writing the setting.

bug:9225156
Change-Id: Ifdf2243da71b0d2ce5743267842597937d790ef5
2013-05-31 21:10:15 -07:00
Victoria Lease
a9770e4f06 break up LocationManagerService's WakeLock
This commit splits LocationManagerService's monolithic WakeLock into
per-LocationManagerService.Receiver WakeLocks, for better WorkSource
accounting. This should make it easier to debug location-related
power issues.

Change-Id: I0d2897c305a38099f9663dc1bc9354ce4bbe1077
(cherry picked from commit 0aa28602d51bf41e46d18ffefe724ebc3ff7a704)
2013-05-29 17:11:25 -07:00
Maunik Shah
46c94b6626 DO NOT MERGE. Framework/base: Added synchronization block to avoid race condition
Fix for the synchronization issue leading to access of an array
Index out of bounds. Issue occurs due to race condition between
removing the activities of a crashed process from history stack
and resuming a separate activity.

Change-Id: I14bb5834e778c15b674248e46fe93b0ce9f37967
2013-05-28 13:46:24 -07:00
Michael Wright
bf0d561c73 Merge "Pipe through bounding box information (DO NOT MERGE)" into jb-mr2-dev 2013-05-24 20:52:40 +00:00
Robert Greenwalt
36a151abcd Merge "Use the old interface when resetting connections" into jb-mr2-dev 2013-05-24 16:21:35 +00:00
Robert Greenwalt
80eb63b58b Use the old interface when resetting connections
The new one is often null when disconnected, so using the new fails.
In other situations, it's the connections on the old network we want
to reset anyway, so the old code when it would work would also do
the wrong thing (unless new iface == old iface).

bug:9112928
Change-Id: I1fcae89cc3aa9d712e516e7c97cece0b89869bd9
2013-05-23 18:33:06 -07:00
Michael Wright
5e025eb1dc Pipe through bounding box information (DO NOT MERGE)
Bug: 9110236
Change-Id: I7aefe6589fbaf92e5c71a0ba5425623578bafe95
2013-05-23 15:06:47 -07:00
Andrew Wilson
55bf965e89 Merge "Compare binder instances when checking if listeners match." into jb-mr2-dev 2013-05-23 18:47:48 +00:00
Amith Yamasani
e342309704 Fix account filtering for specific package name
Hacks to enable gms to see accounts were interfering with checking for
explicit package name.

Bug: 9095427
Change-Id: Iae65ea2a678d7403d023fa1a61c01347b77c3b5a
2013-05-22 19:41:45 -07:00
Daniel Sandler
ffcc976928 Temporarily restore some support for icon==0 notifications.
This is WRONG WRONG WRONG but certain apps rely on it to
poke the LED and so forth. In a future release this will
stop working.

Bug: 8623399
Change-Id: I49bb8ccc6891b1398ceec94c64d6c3a510ad1c38
2013-05-22 15:04:00 -04:00
Andrew Wilson
152942be13 Compare binder instances when checking if listeners match.
Bug: 9069919
Change-Id: I06130105cb703de35de76ab2fceba3855fa5407a
2013-05-22 09:35:35 -07:00
Robert Greenwalt
4c32885c42 Merge "Don't put up wifi-available note when disabled" into jb-mr2-dev 2013-05-21 19:54:39 +00:00
Robert Greenwalt
8c77692554 Don't put up wifi-available note when disabled
With the new scan-always mode we will get scan results when disabled.
Don't tell the user about open AP when they've turned off wifi.

bug:9067982
Change-Id: I7a303c2a6f87a331443eeb54fa8ff5b467c0a1ff
2013-05-21 11:17:11 -07:00
Daniel Sandler
f5ceaf4b19 Merge "Archive a copy of each dismissed notification." into jb-mr2-dev 2013-05-21 17:35:17 +00:00
Daniel Sandler
26b81d594c Archive a copy of each dismissed notification.
We don't want to save all the heavyweight stuff, but we
can't lighten the notification in place because there may be
other active references.

Bug: 8839246
Change-Id: Id6dcc1cf5ae196ee3e42908d6b3ec4e928e9f0c5
2013-05-21 00:58:32 -04:00
Svetoslav Ganov
507bd53aa8 Merge "Do not report the fake UI automation service to clients." into jb-mr2-dev 2013-05-20 23:36:41 +00:00
Robert Greenwalt
e47d7d4380 Add a time margin for deferred enable.
We were getting delayed message delivered 1 ms before we expected.
bug:9014777

Change-Id: I70e681ff6b4155d31097b43529478b39c816e70b
2013-05-20 11:49:46 -07:00
Robert Greenwalt
5c11e8ee54 Fix off-by-1 error in timing
If deferred action msg was delivered promptly it would end up
looking like it too needed to be deferred and then nothing
would end up getting done.

bug:9014777
Change-Id: I243df70463ebb9333efd6df510f71f9d8d9bdf91
2013-05-20 09:28:08 -07:00
Robert Greenwalt
30c798d587 Merge "Add some temp wifi debugging output" into jb-mr2-dev 2013-05-19 19:46:58 +00:00
Robert Greenwalt
02ba86f0cc Add some temp wifi debugging output
bug: 9014777
Change-Id: I38c61f235742a36be10cdf9125e19ac9406a61b9
2013-05-18 13:40:49 -07:00
John Spurlock
79f7892c10 Deactivate notification listeners disabled at runtime.
PACKAGE_CHANGED is called when either the application or any
of its components change.  Rework old early exit code to
handle component-level disabling wrt listeners.

Note PACKAGE_CHANGED can take quite a while to reach NMS.
Up to ten seconds (!) after component-disabling in app.

Bug:8982243
Change-Id: Ia325516140dd9288466a663192a5326019f071ab
2013-05-18 14:29:40 -04:00
Svetoslav Ganov
319d55bd15 Do not report the fake UI automation service to clients.
For UI test automation purposes we register a fake accessibility service
and suspend all other services. When the UI automation serivce is unregistered
we restore the suspended ones. Since the UI automation serivce is fake and
incomplete, for example it has not resolve info, it should not be reported
to clients as being installed or enabled.

bug:8871034

Change-Id: I66792cd028159c1652d3c8a2982164821282ab24
2013-05-17 19:23:51 -07:00
Chris Wren
743054f5b3 Merge "disable notification listeners on uninstall" into jb-mr2-dev 2013-05-17 22:06:14 +00:00
Michael Wright
4361e1f46e Remove assist swipe from TOUCH_NAVIGATION devices
Bug: 9019927
Change-Id: I0a67ee00038b6fba7818f64ba02515767e34fe06
(cherry picked from commit 681a3d710402b80a8375a05172b1fb6f720295be)
2013-05-17 21:30:02 +00:00
Chris Wren
ae9bb5737c disable notification listeners on uninstall
Bug: 8979640
Change-Id: I9f1d118e5ce210b829476e0971f3d55fc778c227
2013-05-17 16:02:53 -04:00
Dianne Hackborn
2c44c74b88 Fix issue #9000597: PackageManager get NPE while running performance plan
Change-Id: I2bf777e8b15704d21320f95059d94648122396a8
2013-05-17 12:07:21 -07:00
Robert Greenwalt
c12783a90e Add min delay between disable and enable of wifi
We sometimes have issues if disable, enable seq happens to fast.
This should only slow down those fast cases.

bug:8715336
Change-Id: I4f7fe9708b7c3c2300c441511838e8a70eaad5d1
2013-05-16 20:57:52 +00:00
John Spurlock
3ec4e7050a Rebind notification listeners for current user.
Use ForUser overload when reading setting inside system server.

Bug: 9000206
Change-Id: Ie87aed578d29425d8f32b23aeb8aa7118922c889
2013-05-16 13:42:38 -04:00
Christopher Tate
f95fdc9754 Merge "Maintain restrictions when downgrading system apps" into jb-mr2-dev 2013-05-15 00:14:06 +00:00
Christopher Tate
acee6e9121 Maintain restrictions when downgrading system apps
When an upgraded system-bundled app is reverted to the factory
version, we now maintain restricted profiles' access policies
w.r.t. that app.

Bug 8905395

Change-Id: I3f230ac3f70a77fb14c0180b44c9b42fc49250a2
2013-05-14 16:47:07 -07:00
Matthew Xie
f270fc3b50 Merge "cannot turn on bluetooth" into jb-mr2-dev 2013-05-14 23:18:04 +00:00
Zhihai Xu
dd9d17d458 cannot turn on bluetooth
implement error recovery when bluetooth stack return error with error
transition state from TURNING_ON to OFF due to ENABLE_TIMEOUT.

issue 7566317

Change-Id: I709b475bbfbd90e4f6e423f9eedc5340c89b2cb0
2013-05-13 19:18:26 -07:00
Chris Wren
c7588aa391 Merge "restart notification listener on package add" into jb-mr2-dev 2013-05-12 22:04:05 +00:00
Christopher Tate
1965b4479d Revert "The default home intent needs CATEGORY_DEFAULT"
This reverts commit 1fea6b374f612ca8cedc17de873526f0f7c42a4e.

Bug 8895796

Change-Id: I80ecf1b718829c25e2a7adae956ebe9493cb3f33
2013-05-10 15:01:02 -07:00
Chris Wren
3da7302dd2 restart notification listener on package add
Bug: 8813471
Change-Id: Icf6c69811392c4567a5c842740e463fb957e7563
2013-05-10 14:49:53 -04:00
Amith Yamasani
153919ed2f Merge "Cache the scaled avatar drawables in the keyguard user switcher" into jb-mr2-dev 2013-05-09 22:17:51 +00:00
Amith Yamasani
6fc1d4e8e6 Cache the scaled avatar drawables in the keyguard user switcher
Loading the avatar icons and drawing them into the sized bitmap
turns out to be quite expensive and the cost increases with number
of users. Caching them shaves off several hundred milliseconds from
Keyguard inflation time during user switching on the lockscreen.

For instance, 15ms vs. 750ms with 3 avatars on a certain 7" tablet.

Bug: 7986933
Change-Id: I3e2065bfa25aa263133ba204ca364c3b04d7c0ff
2013-05-09 14:44:38 -07:00
Matthew Xie
b566c466c7 Merge "Donot bind to GATT service when BLE is not supported" into jb-mr2-dev 2013-05-09 21:14:47 +00:00
Amith Yamasani
73094fbc23 Merge "Don't allow non-authorized apps to access auth tokens" into jb-mr2-dev 2013-05-09 17:43:16 +00:00
Daniel Sandler
60ac308e1d Merge "Defend against a system server crash." into jb-mr2-dev 2013-05-09 17:29:05 +00:00
Dianne Hackborn
cb35969708 Merge "DO NOT MERGE. Fix issue #8868003: Recents thumbnails scale..." into jb-mr2-dev 2013-05-09 17:19:57 +00:00