summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Prevent authenticators from using Settings to launch arbitrary ↵Carlos Valdivia2013-09-301-1/+55
|\ | | | | | | activities." into klp-dev
| * Prevent authenticators from using Settings to launch arbitrary activities.Carlos Valdivia2013-09-291-1/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various authenticator results such as getAuthToken and addAccount might result in an Intent returned to the AccountManager caller. A malicious authenticator could exploit the fact that the Settings are a system app, lead the user to launch add account for their account type and thus get Settings to use the intent to start some arbitrary third parties Activity. The fix is to make sure that the UID of the app associated with Activity to be launched by the supplied intent and the Authenticators UID share the same signature. This means that an authenticator implementer can only exploit apps they control. Bug: 7699048 Change-Id: I34330454c341e6a8422ca1ed3b390466a0feedce
* | Merge "Fix issue #10948509: Crash in procstats when there is no data" into ↵Dianne Hackborn2013-09-302-16/+28
|\ \ | | | | | | | | | klp-dev
| * | Fix issue #10948509: Crash in procstats when there is no dataDianne Hackborn2013-09-292-16/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not dealing with the case where there is a null list. Also fixed some bugs I found while looking at this: - When resetting the stats, we would use a newly computed time stamp for the total durations rather than the one we used to reset the proc/service entries. This would result in them being able to be slightly > 100%. - There was a bug in how we split a single process state into its per-package representation, where we would but the cloned process state into the new package's entry (instead of properly for its own package entry), to be immediately overwritten by the new process state we make for that package. This could result in bad data for processes that have multiple packages. - There was a bug in resetting service stats, where we wouldn't update the overall run timestamp, allowing that time to sometimes be > 100%. - There was a bug in computing pss data for processes with multiple packages, where the pss data was not distributed across all of the activity per-package process states. - There was a bug in computing the zram information that would cause it to compute the wrong value, and then never be displayed. Finally a little code refactoring so that ProcessState and ServiceState can now share a common implementation for the table of duration values. Change-Id: I5e0f4e9107829b81f395dad9419c33257b4f8902
* | | Merge "Ensure correct window ordering." into klp-devCraig Mautner2013-09-292-2/+2
|\ \ \
| * | | Ensure correct window ordering.Craig Mautner2013-09-282-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that moveStackWindowsLocked() is called every time that the stack ordering changes. This will rebuild the window list. Previously the call was being made after the moveStack() call which got forgotten in the addAppToken() causing the home stack to obscure incoming phone and video calls. Fixes bug 10023223. Fixes bug 10678010. Maybe fixes bug 10858941. Change-Id: I59922dc979a19210008eac1f528704984c63c886
* | | | Merge "Don't kill home process with the rest of its package." into klp-devCraig Mautner2013-09-291-0/+4
|\ \ \ \
| * | | | Don't kill home process with the rest of its package.Craig Mautner2013-09-281-0/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Killing the GEL search results was killing everything in its package. This fix keeps the home process from being killed when a task in its package is killed. Fixes bug 10927223. Change-Id: I56e75f0a0118885a1604cbd70320bbdb4f8cf1a2
* | | | Merge "Remove home package name methods." into klp-devCraig Mautner2013-09-294-50/+6
|\ \ \ \ | |_|_|/ |/| | |
| * | | Remove home package name methods.Craig Mautner2013-09-284-50/+6
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not use the shortcut of the package name to identify the home activity. Fixes bug 10963726. Fixes bug 10920950. Change-Id: I725781a26672b055a816994aee6ea458a7f07c88
* | | Ignore historical printer records for installed servicesSvetoslav2013-09-272-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | When loading historical records for previously used printers we now ignore the ones whose target print service is not installed. bug:10955652 Change-Id: Ib295e7d88ed3c308ef6d8a11bdc1792ebbb6d526
* | | Merge "Fix permissions on WindowManagerService.showAssistant()" into klp-devJim Miller2013-09-281-10/+0
|\ \ \
| * | | Fix permissions on WindowManagerService.showAssistant()Jim Miller2013-09-271-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since binder call permissions are not transitive by design, the proper way to fix this is to have the call talk directly to keyguard from the navigation bar. Fixes bug 9409008 Change-Id: Ibd90a79bb638c969b514455a2ad93c6ff668222d
* | | | Merge "Print job files and print job records not always cleaned up." into ↵Svetoslav Ganov2013-09-282-83/+153
|\ \ \ \ | | | | | | | | | | | | | | | klp-dev
| * | | | Print job files and print job records not always cleaned up.Svetoslav Ganov2013-09-272-83/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. We want the files for a print job to be removed as early as possible typically because the print job was cancelled, completed, the app or the spooler crashed during print job construction. We were keeping around in the spooler and hence to disc infos for jobs that are in final state since the app that created them may hold a reference to a local print job objec whose info it can access to get the latest print job state potentially after the job reached final state. The issue was that we were persisting to disc created print jobs which were during construction which requires careful handling for the various cases above. This is tricky and error prone. We used to tell the spooler to forget the print jobs infos when the app that created them died. The implementation to forget a print job was not careful and was nuking currently running print jobs in addition to the ones in a terminal state. Further, if the app dies before a print job is completed we were left with a stale print job in the spooler since we missed the signal to forget it (assuming we forget only inactive jobs). These issues suggest that the approach is problematic. Now we have a cache of print job infos for the jobs an app created. This cache is updated when the state of a print jobs changes using the new print job state observation code. When the app dies we remove the cached jobs for that app. Now if the app calls to get the print jobs it gets the cached ones, i.e. the print jobs it created during its lifetime, plus the print jobs that are still active fetched from the spooler. Note that transient state cannot be kept in the spooler since we unbind from it if there is no work and it may get killed. 2. Improved the print sub-system logging code to show the cached print job infos for apps and also dump the print job PDF file names. bug:10958357 Change-Id: I6f7c1968b6b7ba5be182a10df044ff7ea1fc3a61
* | | | | Merge "Centralize handleAppDied and fix return to home." into klp-devCraig Mautner2013-09-283-32/+65
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Centralize handleAppDied and fix return to home.Craig Mautner2013-09-273-32/+65
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The home activity was being returned to when any activity in a task that was launched from home crashed. If there were still activities left in the task then the crash should have brought up those activities next, not home. This may be a partial fix for crashes where the back stack was showing up under launcher icons. Bug 10858941. Change-Id: I840a25bd8395bfce46f4e21b112d78b12884706d
* | | | Dismiss keyguard when resuming visible activitiesCraig Mautner2013-09-261-0/+4
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an activity is visible behind the keyguard when it is launched by another activity then there would be no call to dismissKeyguard. Because the other activity is pausing the call to dismissKeyguard is skipped in startActivityLocked(). And because it is already visible the call to ActivityRecord.windowsVisible() is never made and the call to reportActivityVisibleLocked() which calls dismissKeyguard() is also never made. This change recognizes when an activity is resumed and visible and calls dismissKeyguard() in that case. Fixes bug 10732489. Change-Id: I3de1350a55231aaa14dadc8709fd0fcf4960742c
* | | Merge "Fix Sending PAC Broadcast before downloaded" into klp-devJason Monk2013-09-261-1/+23
|\ \ \ | |_|/ |/| |
| * | Fix Sending PAC Broadcast before downloadedJason Monk2013-09-261-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | The PacManager now waits until the local proxy is bound and the PAC file is downloaded before sending out the proxy broadcast. Bug: 10895515 Change-Id: Iaa7fc0989b52453aeeb720b44df0fca0fcb959ca
* | | Revert behavior to perform onResume.Craig Mautner2013-09-263-47/+29
| | | | | | | | | | | | | | | | | | | | | | | | Back out changes from CLs ag/363992 and ag/363859. These introduced the bugs found in bug 10917435 which is now fixed. Note that backing out these changes reintroduces bug 10732489. Change-Id: Ic5105dd4cfc8bf79c6f06188283d1ee3680c370c
* | | Merge "Sigh." into klp-devChristopher Tate2013-09-261-3/+3
|\ \ \
| * | | Sigh.Christopher Tate2013-09-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Bug 10746233 Change-Id: I18c84f2bd53a511fc86be42b5d72062650e5b289
* | | | Merge "PackageManager#queryIntentServices breaks its contract." into klp-devSvetoslav Ganov2013-09-261-0/+4
|\ \ \ \
| * | | | PackageManager#queryIntentServices breaks its contract.Svetoslav Ganov2013-09-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PackageManager#queryIntentServices javadoc contract states that this method (and the like) never returns null, rather an empty list if no result is found. However, there is a path in the PackageManagerService that returns null, thus breaking the contract. Handling the null list explicitly. bug:10930560 Change-Id: I708c51b8b7075e529145c8b0bf159efd6b697532
* | | | | Merge "Don't remove restrictions files that are valid" into klp-devAmith Yamasani2013-09-261-7/+17
|\ \ \ \ \
| * | | | | Don't remove restrictions files that are validAmith Yamasani2013-09-261-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug in parsing the package name from a file name. The suffix was not taken into account, resulting in all restrictions files being removed on switching to a user. Bug: 10947554 Change-Id: I62725bbbdc0e15609872de3896130d4acbc35386
* | | | | | Merge "Tighten flags enforcement, API to test Uris." into klp-devJeff Sharkey2013-09-262-20/+9
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | |
| * | | | | Tighten flags enforcement, API to test Uris.Jeff Sharkey2013-09-262-20/+9
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check and throw if callers request invalid grant flags. Add API to test if a Uri is backend by a DocumentsProvider. Bug: 10919391, 10935608 Change-Id: Ifa6afefb95983558c8c64dc15ddf650e9fe07080
* | | | | Merge "Adding hidden APIs for observing the print jobs state." into klp-devSvetoslav Ganov2013-09-263-0/+164
|\ \ \ \ \ | |_|_|/ / |/| | | |
| * | | | Adding hidden APIs for observing the print jobs state.Svetoslav Ganov2013-09-253-0/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed for implementing the print job settigns UI. bug:10935736 Change-Id: I63b42cbf4ce6a259fa1af47fa368b148ca5621c1
* | | | | Fix issue #10919261: Don't clear OP_WRITE_SMS when resetting app prefsDianne Hackborn2013-09-261-1/+2
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | Add a new array indicating whether each op allows itself to be reset, and use it. Change-Id: I494f630bda170e061196a380563512e9e77b51a8
* | | | Merge "Fix issue #10903002: com.facebook.katana keeps itself in A Services" ↵Dianne Hackborn2013-09-253-27/+120
|\ \ \ \ | | | | | | | | | | | | | | | into klp-dev
| * | | | Fix issue #10903002: com.facebook.katana keeps itself in A ServicesDianne Hackborn2013-09-253-27/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now when memory low, if a service's process is above a selected pss, then the process is not allowed to go in to the service a list. Also simplified the normal meminfo details dump to not include the shared dirty and shared clean sizes by default, since these can be very confusing. You will still get to see them with the "-a" flag. Finally some small steps to better managing service processes in the LRU list, so hopefully we can some day be better about letting them drop down in the list when there isn't really much interesting happening in the process. Not yet used at this point. Change-Id: I654bfd6d05de2a63120185ebb15ffda8cbeb5dac
* | | | | Require that persistable Uri permissions be taken.Jeff Sharkey2013-09-252-113/+302
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change our Intent flag to indicate that a Uri permission grant is persistable, but don't actually persist it until explicitly taken by the receiving app. This prevents apps from spamming each other if persisted permissions aren't really required. Remember the last time a persisted grant was taken by an app, and use this to prune away the oldest grants when the number of grants grows too large. Allow apps to query persisted grants they are holding, and allow them to release previously persisted grants. Add public UriPermission class to return grant details and timestamp. Track various permission strengths separately, and combine together after each mutation pass. Persistable grants are currently treated like global grants, but they could be moved to have owners in the future. Require that grant holders trying to extend a persistable permission actually hold a persistable permission themselves. Bug: 10835779 Change-Id: I95b2f797c04ce7fd2612f9a644685dbd44e03759
* | | | Merge "Don't crash when no alarms are scheduled" into klp-devChristopher Tate2013-09-251-3/+2
|\ \ \ \
| * | | | Don't crash when no alarms are scheduledChristopher Tate2013-09-241-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backing until you hear glass is generally contraindicated. Bug 10056484 Change-Id: Ie1331fbbc5fbb5d6384a6cfc975aa1840a5c9a2d
* | | | | Merge "Be less aggressive when not resuming top activity" into klp-devCraig Mautner2013-09-251-6/+3
|\ \ \ \ \
| * | | | | Be less aggressive when not resuming top activityCraig Mautner2013-09-241-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous fix for keeping activities from running on startup, ag/363992, was keeping the home task from launching when the keyguard should have allowed it. This fix permits the home activity to launch in such situations. Fixes bug 10916877. Change-Id: I429f0d5a13e06a247b9b6b7241f9a3514044c371
* | | | | | Merge "Fix issue #10848916: "Always" button is not working." into klp-devDianne Hackborn2013-09-244-16/+39
|\ \ \ \ \ \
| * | | | | | Fix issue #10848916: "Always" button is not working.Dianne Hackborn2013-09-244-16/+39
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the ResolverActivity filters some activities out of the list it shows, but it uses that display list as the list of components the preference is set against when ultimately setting it on the package manager... but that filtered list is *not* the right component set, since it is not the same as the package manager's view on it. The fix here is to retain the original set of matching components and use that when setting the preferred activity. Note that this does mean that in very unusual cases where filtering is happeing (such as one of the activities not being exported but being seen as a possible completion from another app), then you will be setting the preference for the complete set. Ultimately we probably need to have the package manager apply these filtering rules up-front so this is all consistent, but this is a very rare case so not that important. And then most of the change here is just improving the debug output for intent resolution. Change-Id: Ie35ac2c05a45946439951bbf41433c8b7de79c05
* | | | | | Merge "Remove Rect allocation in each layout pass." into klp-devJohn Spurlock2013-09-241-3/+3
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Remove Rect allocation in each layout pass.John Spurlock2013-09-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug:10786445 Change-Id: I0cb1ab7697f33e02adeb5319bae19d3a1d20753c
* | | | | | Merge "Multiple printer discovery session instances and other bugs." into ↵Svetoslav2013-09-242-11/+23
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | klp-dev
| * | | | | | Multiple printer discovery session instances and other bugs.Svetoslav2013-09-232-11/+23
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. The fused printers provider was dropping on the floor received printers if it was not active. It is in fact a loaded and if not active it should compute the printers and not deliver them until activated. This fixes an issue where opening the print dialog, then enabling a print service results in the printers reported by the service not showing up in the print dialog. 2. Printer discovery session was created twice which leads to incorrect behavior as the pint system is designed around the contract that there is a single printer discovery session per service at a time. This was possible due to an incorrect initialization of a member variable resulting in double session creation when the print service is connected. 3. When a print service is enabled during discovery we did not use the correct condition to start printer discovery resulting in starting it all the time even if not needed. Also if some of the printers that had to be tracked are reported by the service just enabled (typically historical printers) we did not ask the service to start tracking them. 4. Removed some logging. bug:10903343 Change-Id: I46c049471a4b099fc668df3aee2aaedc8d7786ac
* | | | | | Merge "Fix method for determining focused window." into klp-devCraig Mautner2013-09-241-53/+30
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | |
| * | | | | Fix method for determining focused window.Craig Mautner2013-09-241-53/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Method had been rewritten to be task-based and there were errors when a task had no apptokens. New version is much easier to maintain. Maybe fixes bug 10689184. Change-Id: I5e4c8447a33a4f5686296c20b9f9fe302c9ae49f
* | | | | | Merge "Pause activities behind keyguard after boot." into klp-devCraig Mautner2013-09-243-12/+55
|\ \ \ \ \ \ | |_|/ / / / |/| | | | |
| * | | | | Pause activities behind keyguard after boot.Craig Mautner2013-09-243-12/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following boot the initial activity was automatically resumed even if a lockscreen is obscuring it. Refer to CL 363859 for why this breaks things. This fix pauses all activities the first time a lockscreen appears. Completes the fix for bug 10732489. Change-Id: I6fcac14b574c495aa0e16d798cddc1263c6b4c25
* | | | | | Merge "Implement issue #10895990: Better durations for proc stats" into klp-devDianne Hackborn2013-09-231-2/+2
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | |