19 Commits

Author SHA1 Message Date
Alan Viverette
4a357cd2e5 Replace usages of deprecated Resources.getColor() and getColorStateList()
Change-Id: I8f64fe6c4c44a92ff6d07250223ba590a1d691b0
2015-03-18 18:37:18 -07:00
Svet Ganov
f983d084e7 Increase bind remote print spooler timeout for eng builds.
bug:17734729

Change-Id: I70bfe3b64fca24752cf3efc225b21d5453e53b68
2014-10-07 22:40:28 +00:00
Svetoslav
c82768ff4b Handle user changes off the main thread.
The remote print spooler can only be accessed off the main thread
by design as calls into it may block for a short amoun of time since
the frist call into the spooler may have to wait for the system to
bind to the spooler service. A recent change introduced a regression
where the user state changes are now dispatched on the main thread.
This change schedules the user change handling to a background handler
thread.

bug:17396682

Change-Id: I059be8f31ba41122cb2967d8afadd19e6b5a08e5
2014-09-04 18:57:05 -07:00
Kenny Guy
07ad8dc208 Use context for user when calling notifyAsUser
Create a context for the user the notification is
being posted for when using NotificationManager.notifyAsUser.

Bug: 17002733
Change-Id: Ie41d27bbb781ca38cc9bc910bd4410b8862edee1
2014-09-01 20:56:12 +01:00
Svetoslav
86b1df2343 Print services setting changes not handled for managed profiles.
We keep per user settings for enabled print services which are
observed to update the print manager service state. We were listening
to all user changes but the handling code was not updating the state
of the user whose settings changed, rather the current user.

Added hidden APIs in content observer to know which user changed
and now the print manager serivce handles content changes for the
correct user.

bug:16977006

Change-Id: I71ec88c8f3f38cb405844c13ab83695c2029eb79
2014-08-26 18:19:13 -07:00
Selim Cinek
255dd04271 Added notification color to all system notifications
Bug: 17128331
Change-Id: I81a94510ef51b99916f314c0dd65852426a1fbeb
2014-08-20 14:25:18 +02:00
Narayan Kamath
29564cd245 Remove system_server classes from the boot image.
We set the system_server classpath in the environment
(like we do with BOOTCLASSPATH). After the zygote forks
the system_server, we dexopt the classpath (if needed)
and then launch the system server with the correct
PathClassLoader. This needed several small / medium
refactorings :

- The logic for connecting to installd is now in a separate
  class and belongs in the system_server.
- SystemService / SystemServiceManager have now moved to
  classes.jar. They are only used from there, and since they
  use Class.forName, we want them to be loaded by the
  system_server classloader, and not the bootclassloader.
- BootReceiver now moves to frameworks.jar, because it is
  used by ActivityThread and friends.

bug: 16555230

Change-Id: Ic84f0b2baf611eeedff6d123cb7191bb0259e600
2014-08-15 13:37:03 +01:00
Svet Ganov
194db6ad91 Fix cross-user permission checks in print manager service.
The cross-user check was requesting both interact across users and
interact across users all permissions which is too restrictive. Each
one is sufficient. Further, if the app has one of these premissions
but specifies a given user not current or current-self, the code
was throwing while the correct actions is to return the requested
user id as we alreay vetted the caller's permissions.

bug:16398152

Change-Id: I1a4863eb7b05dababb66bac6e143b78dfad42b81
2014-08-05 17:06:07 +00:00
Svetoslav
564560e46d Installed and enabled print services not working after boot.
Due to system server changes the print manager services did not
receive the expected callbacks in correct order. This lead to
installed and enabled print services not working until toggled
from settings.

bug:16018217

Change-Id: I8d53d8d8f06507ee135cebe5201f00910a4cb364
2014-07-01 16:30:43 -07:00
Svetoslav
a798c0a984 Refactor printing
Change-Id: I19850154ef2798afff511e4490a268ce38e8cbae
2014-06-06 13:33:16 -07:00
Svetoslav
04533dd3ba Teach print manager services about user profiles.
For user profiles the printing layer will have a separate state and
set a set of print plugins. The rationale behind this is that if a user
uses different profiles for different domains he would expect that
each domain is separate as domains may have different security and
privacy requirements.

bug:14567366

Change-Id: I461ae4636294fa8968785295afb952aeb14a13b5
2014-05-13 21:21:36 +00:00
Jeff Brown
cab8617b8c am 25df673b: am 1b51c9cb: Merge "Make SystemService constructor take a Context." into klp-modular-dev
* commit '25df673b849de374cf1de40250dfd8a48b7ac28b':
  Make SystemService constructor take a Context.
2014-02-11 08:33:50 +00:00
Jeff Brown
b880d880c6 Make SystemService constructor take a Context.
This change simplifies the process of initializing a SystemService
by folding the onCreate() step back into the constructor.  It removes
some ambuiguity about what work should happen in the constructor and
should make it possible for services to retain most of their final
fields after refactoring into the new pattern.

Change-Id: I25f41af0321bc01898658ab44b369f9c5d16800b
2014-02-10 20:01:43 -08:00
Adam Lesinski
9f97de1335 am a5a93f55: am 7f416631: Merge "Check feature bits before loading optional services" into klp-modular-dev
* commit 'a5a93f559d337ad5b79716b05ea43707eb779dc8':
  Check feature bits before loading optional services
2014-02-06 20:25:51 +00:00
Adam Lesinski
898c13df7b Check feature bits before loading optional services
At startup, we check with PackageManager whether a system service is
available before attempting to load it. A system service is available
if its associated feature (similar to hardware features) is present.
This does not remove unavailable services from the compiled jar.

Change-Id: I13571805083aa4e65519a74acb52efd17b9fb3d7
2014-02-05 19:26:40 +00:00
Amith Yamasani
e58a49e411 Merge commit '817ec49e' into manualmerge
Conflicts:
	services/print/java/com/android/server/print/PrintManagerService.java

Change-Id: I1b9bf364ca50ee3c48f53d87ae0ce23e7f3c2bc2
2013-12-20 16:36:48 -08:00
Amith Yamasani
817ec49e79 Wrap some services into a SystemService
These services can now be excluded by modifying the list of REQUIRED_SERVICES (TB renamed)

Changed appwidget, devicepolicy, backup and print services.

Change-Id: Id8e2855d5c045cd57bdb02dca9ed75172803bce7
2013-12-20 14:46:56 -08:00
Amith Yamasani
49782e46c0 am 9158825f: Move some system services to separate directories
* commit '9158825f9c41869689d6b1786d7c7aa8bdd524ce':
  Move some system services to separate directories
2013-12-19 23:30:35 +00:00
Amith Yamasani
9158825f9c Move some system services to separate directories
Refactored the directory structure so that services can be optionally
excluded. This is step 1. Will be followed by another change that makes
it possible to remove services from the build.

Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
2013-12-19 15:25:37 -08:00