summaryrefslogtreecommitdiff
path: root/core/java/android/app/ApplicationThreadNative.java
Commit message (Collapse)AuthorAgeFilesLines
* Move ApplicationThread to aidl.Sudheer Shanka2016-10-191-1544/+0
| | | | | | Bug: 30977067 Test: Existing tests are passing, dump commands still working. Change-Id: Iecb382e8720dfb1b6b707272497e3793e6995edb
* Merge "Move device serial behing a permission"Svetoslav Ganov2016-09-211-2/+5
|\
| * Move device serial behing a permissionSvet Ganov2016-09-111-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Build serial is non-user resettable freely available deivice identifier. It can be used by ad-netowrks to track the user across apps which violates the user's privacy. This change deprecates Build.SERIAL and adds a new Build.getSerial() API which requires holding the read_phone_state permission. The Build.SERIAL value is set to "undefined" for apps targeting high enough SDK and for legacy app the value is still available. bug:31402365 Change-Id: Iddd13430b2bd1d9ab4966e31038ecabdbdcec06d
* | Immediately deliver new intent to paused activity in docked stack am: ↵Wale Ogunwale2016-09-141-2/+4
|\ \ | |/ |/| | | | | | | | | | | 826c706156 am: 35871b76b3 am: f872ce62c4 Change-Id: I266b97e858e7b4aa9c56fd3b55401970b4575698
| * Immediately deliver new intent to paused activity in docked stackWale Ogunwale2016-09-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the docked stack is minimized and we are unminimizing it due to a request to start it's currently paused top activity, it is possible for the new intent not do be delivered immediately because it isn't resumed due to another activity been launched in the system (Recents) which is resumed instead. So, the user won't see the effect of the new intent until they touch the docked activity causing it to get the new intent and resume. We now deliver new intents to the top activity in the docked stack if it is in a minimized state. Then on the client side we temporarily resume the activity and pause it again to guarantee onResume is called after onNewIntent. Bug: 31371093 Change-Id: Ib1764ccf5efc9d6498ce6cc8a34236c79fc07dad
* | Update trusted certificates when the trust store is changedChad Brubaker2016-06-301-0/+14
|/ | | | | | | | | This CL flushes the trusted cert cache of all active Network Security Configs and their TrustManagers. Previously CA addition mostly worked however removed CAs would remain cached in the X509TrustManager causing the removed CA to still be trusted. Change-Id: I0f5fd39932f8f8ed3ec5dfd088a82e982b366c43
* Fix multi-window assiststructure trashingAmith Yamasani2016-05-101-2/+4
| | | | | | | | | | | | | | When multiple activities within the same process try to handle requests for AssistStructure, the singleton mLastAssistStructure tends to trash the old structure when a second window's request comes in. This change passes in a sessionId so that the cache is only cleared if the session id changes. Bug: 28348867 Change-Id: I07efcd933db7e48aefd25a1c95493b71bbcffe4b
* Refactor usages of Picture In Picture and Multi Window (1/4)Andrii Kulian2016-03-291-7/+7
| | | | | Bug: 27365860 Change-Id: I1590e430a12ceb84cb83da295e0bf7e4378fea96
* Add dumpsys meminfo --unreachableColin Cross2016-02-181-2/+5
| | | | | | | | | dumpsys meminfo --unreachable will search the native heap for allocations that are unreachable. Bug: 27208635 Change-Id: I40ab1c261cb222ca71d04ab8408f355bcb18ed94 (cherry picked from commit 84b1e3554b36b7fbccf57330c93bf484985ae3d6)
* Renamed Activity class multi-window APIsWale Ogunwale2016-02-011-13/+13
| | | | | | | As requested by API council. Bug: 26507736 Change-Id: I2a87c5eb3c1b48d52703103c2a4f72c250a9a827
* Voice Interaction from within an ActivityAmith Yamasani2016-01-231-0/+21
| | | | | | | | | | | | | | | | | | This allows an app to show a voice search button and invoke a voice interaction session for use within the activity. Once the activity exits, the session is stopped. Test application has a new activity that demonstrates it with the test voice interaction service. This initial version is functional enough for an integration test, with some more tests and improvements to come later. Bug: 22791070 Change-Id: Ib1e5bc8cae1fde40570c999b9cf4bb29efe4916d
* APIs for activity to know when its windowing/pip modes changeWale Ogunwale2015-12-071-0/+42
| | | | | | | | | | Added APIs that allow activities to ask the system if they are currently in multi-window or picture-in-picture mode and also get notified when their modes change. Bug: 25509834 Bug: 25683717 Change-Id: I4b8c316a49940bd6a8b31a93b345f9fd725a4721
* Update client configuration when resizing without crossing size threshold.Filip Gruszczynski2015-12-041-3/+5
| | | | | | | | | | Even though the activity won't be relaunched and won't receive a callback about the resize, we still need to update it's configuration. Otherwise when the application queries for it, it will receive wrong data. Bug: 23904868 Change-Id: I601e91b8e71691c1cb5edb2734894441c4fde8e2
* Remove GLTrace supportPablo Ceballos2015-10-061-8/+5
| | | | | | | | | | GLTrace is defunct, it does not support newer GL features, breaks security requirements, and has no supported tooling now that Eclipse is at end of life. Bug 22329852 Change-Id: I64c58464f8c2c7ae6125f5d5c7884e3fd34d68ea
* Preserve window during resize triggered relaunches.Filip Gruszczynski2015-09-141-16/+19
| | | | | | | | | | | | | | | | | | | | | | This changes application code behavior when the activity relaunches due to configuration change. It only applies to scenarios, where the configuration change was triggered by a user generated resize of an activity (i.e. user drags a corner of an activity and thus changes its size). Preserving a window means that we will keep the decor view and non client decor view around, but remove all children views when the activity gets destroyed. When the activity gets created again, it will attach its new content to the preserved view hierarchy. Mind, we actually recreate application side Window object, since some of its features might changed, but we retain its elevation (to not trigger relayout with new layout params). Preserving the window also means that we don't call the window manager service to remove and later add the window. Instead, we continue using a single window state throughout the resize operation. Change-Id: Ie3d2878ed09c99ff343044bfe7a29a0ba07a265e
* resolved conflicts for merge of 8fb82074 to masterMan Cao2015-06-241-7/+12
|\ | | | | | | Change-Id: I27c7ddeead5a589ae8824f87bf6b42998dc081eb
| * resolved conflicts for merge of 0f14548c to mnc-dev-plus-aospMathieu Chartier2015-06-241-4/+7
| |\ | | | | | | | | | Change-Id: I2f79840f82150eddebfbd549afd1eca28075eb43
| | * Add an AM option to start with allocation trackingMan Cao2015-06-241-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | The new option "--track-allocation" is to work with the new allocation tracker in ART. Bug:20037135 Change-Id: Ic5f8945ab4c1f167c27b05ad0d11d04bac680c1f
* | | Merge "Add binder transaction tracking."Rahul Chaturvedi2015-06-221-8/+51
|\ \ \ | |/ / |/| |
| * | Add binder transaction tracking.Rahul Chaturvedi2015-06-221-8/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the ability to am to be able to track binder transact calls. This will help us diagnose excessive IPC calls. This CL adds the trace-ip command to am. The usage is, To start binder transaction tracking, am trace-ipc start To stop tracking and dump the data to a file, am trace-ipc stop --dump-file <FILE> Bug: 21398706 Change-Id: Ic0c9b3be757dd0662a2750a0d8447e2a5ef1fa90
* | | Debug logging for a certain class of binder transaction failuresChristopher Tate2015-06-191-2/+10
|/ / | | | | | | | | | | Bug 21801759 Change-Id: I9973d4ffb9450e510a4e1c64e2eae1489ce93054
* | Add 'App Summary' section to meminfo.Richard Uhler2015-05-081-2/+5
| | | | | | | | | | | | | | | | The 'App Summary' section is shown by default when other memory details are shown. This adds a new meminfo flag '-s' to show only the App Summary section. Change-Id: I66913673cd3afca873a8b13e45abe071d4c57b82
* | Include stack override configurations in onConfigurationChanged() call.Wale Ogunwale2015-02-091-2/+16
| | | | | | | | | | | | Important for activities that handle configuration changes. Change-Id: I4d1612026f293fbb99e1abc17e663f0215658ae6
* | Support activities in the same process having different resources.Wale Ogunwale2015-01-271-17/+28
|/ | | | | | | | | Activities can be of various sizes in a multi-window environment. This change allows them to have override configurations that allows different resources to the loaded if needed. Bug: 19002213 Change-Id: Ib2c7be0b427f5ce05e7a362bcdd496ddbc9164f0
* Merge commit '605eb79c9519307147fc1795d0eb155638a7f542' into manualmergeJeff Sharkey2015-01-151-0/+18
|\ | | | | | | Change-Id: Id6db8cce3a477572478a1d50f624823200848896
| * Offer to detect non-SSL/TLS network traffic.Jeff Sharkey2015-01-151-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces new module that provides network-related features for the StrictMode developer API. The first feature offers to detect sockets sending data not wrapped inside a layer of SSL/TLS encryption. When a developer enables, we ask netd to watch all outgoing traffic from our UID, and penalize us accordingly if cleartext sockets are detected. When enabled, netd captures the offending packet and passes it back to the owning process to aid investigations. When death penalty is requested, all future traffic on the socket is blocked, which usually results in a useful stacktrace before the app is actually killed. Bug: 18335678 Change-Id: I3adbc974efd8d3766b4b1a23257563bb82d53c29
* | Add Activity API to get referrer information.Dianne Hackborn2014-11-111-9/+13
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This expands the use of EXTRA_REFERRER to be relevant anywhere, allowing apps to supply referrer information if they want. However, if they don't explicitly supply it, then the platform now keeps track of package names that go with Intents when delivering them to apps, which it can be returned as the default value. The new method Activity.getReferrer() is used to retrieve this referrer information. It knows about EXTRA_REFERRER, it can return the default package name tracked internally, and it also can return a new EXTRA_REFERRER_NAME if that exists. The latter is needed because we can't use EXTRA_REFERRER in some cases since it is a Uri, and things like #Intent; URI extras can only generate primitive type extras. We really need to support this syntax for referrers, so we need to have this additional extra field as an option. When a referrer is to a native app, we are adopting the android-app scheme. Since we are doing this, Intent's URI creation and parsing now supports this scheme, and we improve its syntax to be able to build intents with custom actions and stuff, instead of being all hung up on custom schemes. While doing this, fixed a problem when parsing both intent: and new android-app: schemes with a selector portion, where we were not respecting any scheme that was specified. Change-Id: I06e55221e21a8156c1d6ac755a254fea386917a2
* Work on issue #17357238: Recents is often slow if not used in a whileDianne Hackborn2014-09-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new activity attribute, resumeWhilePausing, that allows an activity specifying it to immediately start running without waiting for the previous activity to pause. The recents activity is updated to use this. The implementation of this is ultimately fairly simple -- if we are in the path of resuming such an activity, and find that we first need to pause the existing activity, then within the activity manager we do the regular pause flow but act like it has immediately finished pausing right then so that we can immediately go on to the resume. To make this clean, we tell the activity when asking it to pause that it should not come back and tell us it is done, because we aren't in any way waiting for it. One potentially important change I needed to make here is the pause callback no longer provides the saved persistent state, because we now can't count on that callback happening. I don't think there was really any utility in this anyway -- all modern apps will have their save state flow happen as part of stopping, not pausing, so we'll only capture that saved state when the stop is reported back anyway. And since we do send the saved state back when stopping, it would always blow away whatever we had gotten at the pause. Finally, update the documentation for AppTask.startActivity(), and fix the implementation handling that to be cleaner -- we need to deal with inTask first before getting in to "oh noes add NEW_TASK if this isn't coming from a calling activity" flow. Change-Id: Ia1da0fac90d7bdbaafdda2e34850d795ce17a39f
* Add sample profiling option to am.Jeff Hao2014-08-261-51/+33
| | | | | | | Also bundles all profiling options into a class. Bug: 17040932 Change-Id: I85d675ee1494bdc7308caffdf94145d27c996e9d
* Renamed "media playing" APIs to "visible behind"Jose Lima2014-08-141-8/+10
| | | | | | | | | | | | - Request from API Review: rename the media playing APIs to a more generic name, reflecting the background visibility feature these methods actually control. - Made the new isActivityVisibleBehind(). - Changed convertFromTranslucent() and convertToTranslucent() to be SystemApi. Bug: 16959028 Change-Id: I526eac22f44273b3254dd6201f89194d13e597e2
* Create end of animation callback for ActivityCraig Mautner2014-07-251-0/+18
| | | | | | | | | | Activities cannot draw while their entering animations are active. This change introduces a callback, onEnterAnimationComplete() so that activities can know when their draws will be effective. Fixes bug 13658460. Change-Id: Ic48540cd4c7e37538f10cb2dc0852aa3f55d11e1
* Add Media Playing APICraig Mautner2014-07-081-0/+38
| | | | | | | | | | | | | | | These methods permit an activity to play or continue playing media behind a translucent activity above it. Particularly the home activity in Android TV. Methods exist to notify the upper activity when playing starts or stops and for notifying the playing activity when to stop playing and release its resources. Methods are called when either activity's state changes or new activities are launched. Fixes bug 14469711. Change-Id: I7ba10c5a4683504931cffa228488f5281e5bbf86
* Introduce onNewActivityOptions for return activityCraig Mautner2014-07-071-1/+24
| | | | | | | | | | | When an activity that is already translucent returns to the previous activity using a scene transition the receiving activity did not receive its ActivityOptions for its side of the animation. The new method onNewActivityOptions() delivers those options. Fixes bug 14869070. Change-Id: I09b136b3213aae5d3521894e17a7500ac793f3d2
* am b9a45aae: am 447b68e7: am b5e05cff: Merge "Fixing parcel leaks to avoid ↵Jeff Sharkey2014-06-191-0/+1
|\ | | | | | | | | | | | | virtual memory leak" * commit 'b9a45aae8d07e7a92806b53cbc36f5488e3bac2d': Fixing parcel leaks to avoid virtual memory leak
| * Fixing parcel leaks to avoid virtual memory leakMaunik Shah2014-06-191-0/+1
| | | | | | | | | | | | | | | | Client has to call recycle() on parcel object after its usage otherwise native layer of binder won't clear the resources of parcel which were allocated for IPC Change-Id: Ib31ddcc92aa4ebd80bb66729922b9133692e9c9e
| * Inform libcore of time format pref. changes.Narayan Kamath2014-03-071-0/+18
| | | | | | | | | | | | | | | | | | | | - Introduce a boolean extra for intent TIME_CHANGED that specifies if the user wants a 24 hour format or not. - Have the ActivityManagerService inform running processes of changes to this preference. - Add plumbing in ActivityThread to inform j.t.DateFormat Change-Id: I05fafb903ae54e39c03a048b7a219dc5a93fd472
* | Merge "Pass ActivityOptions back from finishing activity."Craig Mautner2014-05-141-5/+2
|\ \
| * | Pass ActivityOptions back from finishing activity.Craig Mautner2014-05-131-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding an ActivityOptions parameter to convertToTranslucent provides a mechanism for delivering these options to the activity that launched the one that is returning. Fixes bug 13032208. Fixes bug 14469460. Fixes bug 14597427. Change-Id: I4115dd3c69de9d175f6df0498a6e964fca5eca29
* | | Switch PacUrl storage from String to UriJason Monk2014-05-121-3/+4
|/ / | | | | | | | | | | | | | | Since the interface for creating/accessing PAC URLs through a ProxyInfo is Uri based, so should the internal storage and references. Change-Id: Ibf15c350f4cc526f81aba3ec463070f26af8f535
* | Introduce persistent forms of Activity lifecycle calls.Craig Mautner2014-05-091-5/+8
| | | | | | | | | | | | | | | | | | | | When an Activity is created with R.attr.persistable true different forms of activity lifecycle methods including PersistableBundle will be used. Fixes bug 13736007. Change-Id: I7e92917b300b76964257cfcc26c24e76aa19bd16
* | Make GET_TASKS signature|system.Dianne Hackborn2014-05-021-18/+0
| | | | | | | | | | | | | | | | | | | | | | Normal apps can't hold it now. If they try to use getRecentTasks() or getRunningTasks() without the permission, they will only see their own tasks and home in the list. Also took this opportunity to eradicate all of the old pending thumbnail stuff. Change-Id: I6dc52a06221c78097162e4a8b482027b798bf3ee
* | Initial implementation of new voice interaction API.Dianne Hackborn2014-04-241-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gives a basic working implementation of a persist running service that can start a voice interaction when it wants, with the target activity(s) able to go through the protocol to interact with it. It may even work when the screen is off by putting the activity manager in the correct state to act like the screen is on. Includes a sample app that is a voice interation service and also has an activity it can launch. Now that I have this initial implementation, I think I want to rework some aspects of the API. Change-Id: I7646d0af8fb4ac768c63a18fe3de43f8091f60e9
* | Inform libcore of time format pref. changes.Narayan Kamath2014-03-071-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | - Introduce a boolean extra for intent TIME_CHANGED that specifies if the user wants a 24 hour format or not. - Have the ActivityManagerService inform running processes of changes to this preference. - Add plumbing in ActivityThread to inform j.t.DateFormat (cherry-picked from dd491cc756233c088fd26eba4918671fcc9cfc30) Change-Id: Ib90636bda4bc8332cfa22def831877b524b5c486
* | Tabs -> spaces in frameworks/base.John Spurlock2014-02-251-2/+2
| | | | | | | | Change-Id: I5a84e8e93ac99b5ed0212b37bf66efa5e53864be
* | Add support for cross-activity scenes and transitionsAdam Powell2013-12-051-6/+13
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add theme attributes for specifying a top-level TransitionManager for an activity window. * Add window feature for automatic content transitions. This automatically assigns/creates a Scene for setContentView calls. * Add named transitions. This allows apps to define APIs for handshake-agreements about which exit/entrance transitions to play. * Add new transition type for ActivityOptions. This lets the system use ActivityOptions to communicate transition specifics and arguments to the called activity. * Have ActivityManager pass appropriate ActivityOptions through to the called Activity. Have the called activity call back into the caller to let it know which transition of a possible requested set was chosen. Still to do: * Define and pass arguments for transitions. This will require defining a Parcelable version of TransitionValues and deciding how much leeway apps should have for these things. * Determine how to appropriately filter the ActivityOptions bundle so that only appropriate data reaches the target. * Determine if generalizing the auto-Scenes functionality to ViewGroups is appropriate. Change-Id: I10684b926129ab2fbc1adec9ef31767237acae79
* Install providers enabled after app started.Jeff Sharkey2013-10-081-0/+18
| | | | | | | | | When an app has already been started, and a ContentProvider component is enabled with DONT_KILL_APP, use the existing ProcessRecord to install the provider. Bug: 11118692 Change-Id: I990f18b337eb19768ee1db895f1e2eb982046cce
* Unmarshall PFDs properly when hand-crafting interface stubsAmith Yamasani2013-09-231-4/+4
| | | | | | | | | ParcelFileDescriptors now carry an optional socket fd to communicate close events. So, make sure that the correct creator is called when reconstructing parceled PFDs. Bug: 10759966 Change-Id: Ic6b9ffb8cb7af5f3a12440def595f74682231866
* Implement issue #10691475: Kill cached processes if about to...Dianne Hackborn2013-09-191-29/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...be uncached and too large When the device is in a low RAM state, when we go to pull a cached process out to use for some background operation, we can now kill the current process if we consider its size to be too large. Note that the current implementation for killing processes is to just use the same killUnneededProcessLocked() method that we already have for other things like too many cached processes. This is a little wrong here, though, because in this case we are at the point where the caller is actually looking for a process to use. This current code is not actually removing or cleaning up the process, so we still need to return the now killed ProcessRecord and let things fall out from there, which typically means the caller trying to make an IPC on it and failing and falling into its "oh no the process died unexpectedly" path. All code using this *should* be able to handle this correctly, anyway, since processes really can be killed at any time. At some point we may to make this implementation cleaner, where it actually tears down the process right in the call and returns a null ProcessRecord. That is very dangerous however (we'd need to go through all paths into this to make sure they are going to be okay with process state changing on them like that), and I'm not sure it is really worthwhile. This intention is that killing processes like this is unusual, due to processes being too large, and anyway as I wrote all of our incoming code paths must already be able to handle the process being killed at this point and one could argue this is just another way to excercise those code paths. Really, the main negative to this is that we will often have spam in the log with exceptions about processes dying unexpectedly. If that is the only issue, we could just add some conditions to quiet that up at in this case. We don't want to compute the size of the process each time we try to evaluate it here (it takes 10s or ms to do so), so there is now a new field associated with the process to give us the last pss size we computed for it while it was in the cached state. To be able to have better cached pss data when we now need it, the timing for computing process pss has been tuned to use a much shorter delay for the situations when the process has first switch into a new state. This may result in us having a fair amount more pss data overall, which is good, as long as it doesn't cause us to be computing pss excessively and burning cpu. Procstats now also has new state to keep track of the number of times each process has been killed by this new system, along with the min, avg, max pss of all the times it has happened. This has slightly changed the checkin format to include this additional data at the end of pkgkills/prockills lines. Other changes here: - Fixed a problem where GPU RAM was not being seen when dumping the full RAM details of a process. This was because in that case the system would ask the process to compute its own MemInfo, which it returned, but the process doesn't have permission to access the files containing the GPU RAM data. So now the system always computes the MemInfo and hands it to the app. - Improved broadcast delays to not apply the delay if the next receiver of the broadcast is going to run in the same process as the last one. A situation I was seeing was an application that had two receivers, one of which started a service; we are better off letting the second receiver run while the service is running. - Changed the alarm manager's TIME_TICK broadcast to be a foreground broadcast. This really should have been anyway (it is supposed to go out even minute, on the minute, very accurately, for UI elements to update), and is even more important now that we are doing more things to delay background broadcasts. - Reworked how we maintain the LRU process list. It is now divided into the two parts, the top always containing the processes holding activities. This better matches the semantics we want (always try to keep those around modulated by the LRU order we interleave with other cached processes), and we now know whether a process is being moved on the LRU list because of an activity operation so we can only change the order of these activity processes when user operations happen. Further, this just makes that common code path a lot simpler and gets rid of all the old complexity that doesn't make sense any more. Change-Id: I04933ec3931b96db70b2b6ac109c071698e124eb
* Revert services assist context in KitKatAdam Skory2013-09-111-4/+2
| | | | | | | | | | | Reverts extension to assist context API to query foreground services for assist context data. Also hides Intent.ACTION_VOICE_ASSIST because nobody's actually using it yet. Bug: 10461702 Change-Id: Idf6836adc659b434e11ebb2b98e8b814c94a7227
* Merge "Extend assist context to foreground services"Matt Casey2013-08-081-5/+8
|\