2581 Commits

Author SHA1 Message Date
Scott Greenwald
9a05b31aab Add support for notification scorers.
This CL adds an interface and classes for scoring notifications.
The NotificationManagerService initializes an array of scorers
specified as a resource. When a Notification is enqueued, the
getScore() method is called successively on the scorers, each
getting the Notification to be scored, and the score outputted
by the previous scorer. At present there is a single scorer
which prioritizes Notifications that mention the display name of
a starred contact.

To turn off the StarredContactNotificationScorer:
  adb shell settings put global contact_scorer_enabled 0

Change-Id: Ic16c80952e7c85bdde292ebb3f7900efb01f2e29
2013-07-23 17:16:51 -04:00
Geremy Condra
1b6868cc4b Merge "Support multiple Vpn ManageDialogs" 2013-07-23 17:55:45 +00:00
Amith Yamasani
1a7472e722 Have UserManagerService clear the restrictions and unblock apps
Since this is an operation that could take a few seconds to run and needs to be
completed even if Settings dies, best to do it in the user manager.

Refactored PIN challenge/setup UI with a field to verify existing pin
when changing to a new one.

Change-Id: I0b7df5b2ccb7f343aa9282a9245d3bc2b577a794
2013-07-18 16:12:27 -07:00
Dianne Hackborn
06f2122050 Merge "Make it safe to use start/stop app ops outside of system proc" 2013-07-18 18:12:50 +00:00
Elliott Hughes
4c8dfabff4 am e9643874: am 0bad5370: Merge "Handle missing and invalid numeric values in XmlUtils."
* commit 'e964387466e380f17e28ab3dd75139509d043ffd':
  Handle missing and invalid numeric values in XmlUtils.
2013-07-18 10:45:38 -07:00
Elliott Hughes
e964387466 am 0bad5370: Merge "Handle missing and invalid numeric values in XmlUtils."
* commit '0bad537093ed5b493e4c2af778cf802a2cf2c15f':
  Handle missing and invalid numeric values in XmlUtils.
2013-07-18 10:41:41 -07:00
Elliott Hughes
0bad537093 Merge "Handle missing and invalid numeric values in XmlUtils." 2013-07-18 17:38:57 +00:00
Dianne Hackborn
e98f5dbe6b Make it safe to use start/stop app ops outside of system proc
We now keep track of all of the active start operations per
non-system process, so they can be cleaned up if the process
goes away.

Change-Id: I9d05f1e0281c47dbe1213de014f0491f1359685c
2013-07-17 17:25:13 -07:00
Chad Brubaker
bf6ff2c025 Support multiple Vpn ManageDialogs
Move away from storing the configs in the Intent to prevent issues with
PendingIntents and multiple configs.

The Dialog now queries ConnectivityService for the configuration to
display in the management dialog.

Change-Id: I0e0ef52db840152914d117a24f776d8106e836ff
2013-07-16 18:59:12 -07:00
Adam Powell
2dc27f22c9 Fix collapsible action views.
Fix a regression caused by a previous overzealous refactoring. (Oops.)
Watch those conditionals, everyone!

Bug 9866559

Change-Id: Ia88a4ee38edef378e70bdc7151c825375a3d482d
2013-07-16 11:35:17 -07:00
Alan Viverette
08ec9b2f93 Merge "Revert "Update ListMenuItemView to use a single RelativeLayout"" 2013-07-15 23:56:24 +00:00
Alan Viverette
d9ddf52c12 Revert "Update ListMenuItemView to use a single RelativeLayout"
This reverts commit 8933efd49a0b2c10ddb30b23b57f5676634d0277.

BUG: 9774755
Change-Id: Ib6481e396092da81edd2c69f619f45f61e8fa393
2013-07-15 16:43:58 -07:00
Geremy Condra
045ad910b7 Merge changes Ia6646363,I94389b64
* changes:
  Add per user VPN support
  Add NetworkUtil function for marking sockets
2013-07-15 21:56:30 +00:00
Chad Brubaker
4ca19e8377 Add per user VPN support
VPNs are now per user instead of global. A VPN set by user A routes only
user A's traffic and no other user can access it.

Change-Id: Ia66463637b6bd088b05768076a1db897fe95c46c
2013-07-12 20:51:03 -07:00
Adam Powell
cc5b49f07f Merge "Fix MenuItemImpl#hasCollapsibleActionView for action providers" 2013-07-12 21:36:07 +00:00
Adam Powell
b4c8ba49ac Fix MenuItemImpl#hasCollapsibleActionView for action providers
hasCollapsibleActionView was previously checking only that mActionView
was not null, even if the item had a valid ActionProvider that would
later lazily create an action view when prompted. Account for this and
attempt to create the action view if needed when
hasCollapsibleActionView is called.

Bug 8732876

Change-Id: Idf7b329770f686208882509b82a4cb13c70ef32c
2013-07-11 16:24:12 -07:00
Adam Powell
ea04f3cfc6 Always show overflow buttons on action bars
The menu button is not pining, it's passed on! This button is no more!
It has ceased to be! It's expired and gone to meet its maker! It's a
stiff! Bereft of life, it rests in peace! If you hadn't nailed it to a
flagship device it'd be pushing up the daisies!

THIS IS AN EX-BUTTON!!

Change-Id: Id523ef8efa7d0fa7120f8430222ac892fcafefda
2013-07-11 13:25:58 -07:00
Dianne Hackborn
9865ef1ba5 Merge "Add -c option to meminfo to dump a compact form." 2013-07-11 02:03:33 +00:00
Dianne Hackborn
20cdcee47d Add -c option to meminfo to dump a compact form.
Also fix a bug in FastPrintWriter where println(long) was
not printing the newline.

Change-Id: Idcb4eaab0c1ec4b992032b5e36478ef11a6533d9
2013-07-10 18:47:04 -07:00
Adam Powell
c39451267b Fix ListMenuItemView regression from patch 8933efd49
Passing 'true' as the third parameter of LayoutInflater#inflate does
cause it to add the inflated view to the parent in a single step, but
it also changes the return value to be the root of the resulting
hierarchy after the add rather than the root of the inflated layout.

Return to adding the view to its parent as a separate step.

Bug 9754101

Change-Id: I7ca4c921993594931f5007af69d45e9ff06065df
2013-07-10 11:51:33 -07:00
Satoshi Kataoka
42e230cdb4 Merge "Consolidate InputMethodUtils" 2013-07-09 14:42:18 +00:00
Satoshi Kataoka
b282726d86 Consolidate InputMethodUtils
Change-Id: Ib5a5f3af8ea9eaaa81697d13c20abe28121e7373
2013-07-09 23:20:06 +09:00
Jean-Baptiste Queru
a2bbb9a7d1 am 6cd4281d: am 65ba6d11: am 1e7276ce: Merge "Fix typo in AlertController.java"
* commit '6cd4281dae6c1de0196f79c6c155f75602de64f6':
  Fix typo in AlertController.java
2013-07-08 14:48:04 -07:00
Jean-Baptiste Queru
6cd4281dae am 65ba6d11: am 1e7276ce: Merge "Fix typo in AlertController.java"
* commit '65ba6d11e1f3ecf33a5b6e68ab8a6322e993b4d8':
  Fix typo in AlertController.java
2013-07-08 14:42:56 -07:00
Jean-Baptiste Queru
65ba6d11e1 am 1e7276ce: Merge "Fix typo in AlertController.java"
* commit '1e7276ce35f68c2df10b52c8adf8adc2882b8671':
  Fix typo in AlertController.java
2013-07-08 14:25:06 -07:00
Jean-Baptiste Queru
1e7276ce35 Merge "Fix typo in AlertController.java" 2013-07-08 21:22:18 +00:00
Vladimir Marko
2ddce3226e Handle missing and invalid numeric values in XmlUtils.
Convert these errors to XmlPullParserException.

Bug: 8584433
Change-Id: I070ed517682e7f047ec00271db26110da2bebb09
2013-07-02 10:21:31 +01:00
Dianne Hackborn
f406e23012 Merge "More work on procstats: save/restore state, fixes." 2013-06-29 02:14:10 +00:00
Dianne Hackborn
904a857d5a More work on procstats: save/restore state, fixes.
We now persistent the current procstats to storage
to keep them across boots.  Still need to do division
and pruning across days; right now they will just keep
collecting forever.

Also fix some bugs in the checkin output.

Change-Id: I4dd9317dbe2ee0642af8f2f0be1f2bd9c4055e80
2013-06-28 18:45:46 -07:00
Elliott Hughes
6e7affeb3d am b8292830: resolved conflicts for merge of a920f25f to jb-mr2-dev-plus-aosp
* commit 'b8292830f79fc76ffb9a1be5cd316212ac494d03':
  Switch frameworks/base over from @hidden Charsets to public StandardCharsets.
2013-06-28 16:53:27 -07:00
Elliott Hughes
b8292830f7 resolved conflicts for merge of a920f25f to jb-mr2-dev-plus-aosp
Change-Id: I3349f8d2e6715171e2677c1385122ceb2810c1f6
2013-06-28 16:50:13 -07:00
Elliott Hughes
a920f25fe5 resolved conflicts for merge of fca0f92e to stage-aosp-master
Change-Id: I4791f0ffa324a313b8390fbde6d8f82f716ecf74
2013-06-28 16:41:19 -07:00
Elliott Hughes
d396a448b2 Switch frameworks/base over from @hidden Charsets to public StandardCharsets.
Bug: 3484927
Change-Id: I5d136d2ee629588538602766a182ae14ce5fc63c
2013-06-28 16:24:48 -07:00
Jim Miller
afb292a23c Merge "Simplify wake management code in keyguard." 2013-06-27 23:05:19 +00:00
Jim Miller
e51cf7aeb6 Simplify wake management code in keyguard.
Removes onWakeKey/Motion handling from keyguard since it's no longer used.
The legacy code was originally intended to have keyguard filter wake events
which is now done in PhoneWindowManager. Ultimately it just needs to call
PowerManager.wakeUp() since keyguard no longer filters these keys.

Change-Id: I5b8ef9b422abf850a85b57f21944e5eb09fbedc2
2013-06-27 15:58:29 -07:00
Alan Viverette
673e64dd62 Merge "Optimize width measurement and cache result in MenuPopupHelper" 2013-06-27 21:38:52 +00:00
Alan Viverette
62339911ba Merge "Update ListMenuItemView to use a single RelativeLayout" 2013-06-27 21:38:31 +00:00
Dianne Hackborn
053f61d6a6 Work on issue #9586838: Crash after waking up Hammerhead device
I made the power manager more rigid, not allowing different uids
to use the same wake lock.  This never should happen.  I would
guess there is somewhere that the activity manager is acquiring
the wake lock without clearing the calling identity...  but it is
hard to follow all the paths this may happen in.  So here we add
some checks when acquiring/releasing the wake lock to make sure
it is being done as the system uid.

Also:

- Protect the new activity stack calls with a permission, and
make sure to clear the calling uid once past that.
- Collect uid data from process stats so we can correctly
associate CPU use with a uid even if we don't know about the
pid for some reason.
- Fix battery stats dump commands to clear calling uid before
executing so they aren't broken.

Change-Id: I0030d4f7b614e3270d794ecfc3669139a5703ce9
2013-06-26 19:17:15 -07:00
Alan Viverette
0bce6ab8cd Optimize width measurement and cache result in MenuPopupHelper
BUG: 9591217
Change-Id: I0cc2fad39f967e92b2c954f6417430a42dce8e43
2013-06-26 17:46:16 -07:00
Alan Viverette
8933efd49a Update ListMenuItemView to use a single RelativeLayout
BUG: 9591217
Change-Id: If5d301f70ac3806ab14e309affa57c625d897c7d
2013-06-26 17:38:17 -07:00
Amith Yamasani
5fa9f2b127 Merge "Single-user restrictions" 2013-06-26 23:04:32 +00:00
Dianne Hackborn
13ac041b9f Update procstats to start collecting/reporting pss.
Completely reworked how it manages its data, since trying
to keep track of all of the possible pss data with the old
data structures would have made it huge.  Now we have a sparse
data structure for pss and process times.  (Will switch service
times over to it soon.)

Currently the only thing that collects pss data is running
"dumpsys meminfo".  More will be added later.

Modified checkin output to also scale better as more distinct
data categories are added, and added output of pss data.  Now
instead of dumping every possible entry as a comma-separated
list, it dumps a comma-separated list of only the entries with
data, tagged with the state they go with.

Also fixed some problems in the checkin reporting of batterystats
(it needs to escape commas), added checkin reporting of the history
list, fixed parsing of kernel wake locks to strip quotes, fixed
wake lock name that the sync manager generates to be more sane.

Change-Id: Ibf4010838a9f685ebe1d93aff86c064ccc52b861
2013-06-26 11:45:36 -07:00
Amith Yamasani
655d0e2029 Single-user restrictions
Introduces a new "blocked" state for each package. This is used to temporarily
disable an app via Settings->Restrictions.

PIN creation and challenge activities for use by Settings and other apps. PIN
is stored by the User Manager and it manages the interval for retry attempts
across reboots.

Change-Id: I4915329d1f72399bbcaf93a9ca9c0d2e69d098dd
2013-06-25 16:03:55 -07:00
Dianne Hackborn
8c84109b9f Use FastPrintWriter... everywhere.
One problem this turned up is, because FastPrintWriter does
its own buffering, a lot of code that used to use PrintWriter
would fail -- if it pointed to a StringWriter, there was no
buffering, so it could just immediately get the result.  Now
you need to first flush the FastPrintWriter.

Also added some new constructors to specify the size of buffer
that FastPrintWriter should use.

Change-Id: If48cd28d7be0b6b3278bbb69a8357e6ce88cf54a
2013-06-24 18:16:48 -07:00
Dianne Hackborn
e5a9c92377 Improve FastPrintWriter.
Change-Id: I23acb8d4c3db1f2f8e2f8003296f8c253e2ae7d2
2013-06-24 15:54:52 -07:00
Dianne Hackborn
142dd91583 Merge "Faster PrintWriter." 2013-06-21 23:49:08 +00:00
Dianne Hackborn
db4e33f1f1 Faster PrintWriter.
Change-Id: I4e1ae7e0357214deb7e19ae65f8701b69b347c6e
2013-06-21 16:00:30 -07:00
Michael Wright
76936eb96a Paint current points a different color in PointerLocation
Change-Id: I05be4ce1886f944cd948ded4d9ace08d70cdb00e
2013-06-21 15:18:06 -07:00
Jeff Sharkey
1a6a620e45 Merge "Add generic sugar for ArrayMap and ArraySet." 2013-06-18 16:42:45 +00:00
Jeff Sharkey
43f4263a85 Add generic sugar for ArrayMap and ArraySet.
Change-Id: Id749bd41f2e53664c00a0199c14babd2b63087fb
2013-06-18 09:29:56 -07:00