History log of /frameworks/base/core/java/android/os/Binder.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f9b941f528e28f4afa7c6e09b9dff6f65d72f26c 11-Mar-2016 Makoto Onuki <omakoto@google.com> Add a flag to log service side runtime exception

Often during development I get runtime exceptions from system
server but I only see client side stacktrace on logcat, which is
pretty much inconvenient.

Change-Id: I9c60fd92f6008d2c3a7eaf848b89ce3f1dffbe8a
/frameworks/base/core/java/android/os/Binder.java
2e931f56c77cf53df9daf99d5afdd7bc4c109a54 28-Jan-2016 Dianne Hackborn <hackbod@google.com> Some small binder shell command improvements.

- Improve documentation.
- Add low-level access to input/output streams.

Change-Id: I3892be222d6fd919b164fa4e4882185940947f70
/frameworks/base/core/java/android/os/Binder.java
9461b6f91f37fd32207da1bd734d9ea9629eb8e5 08-Oct-2015 Dianne Hackborn <hackbod@google.com> Add new "shell command" feature to Binder objects.

IBinder has a new common interface for sending shell commands
to it. This can be implemented by system services to provide
a shell interface to the service, without needing to have separate
shell java code.

This includes changes to DeviceIdleController to implement the
shell interface for all of the commands it has been providing
through dumpsys.

Change-Id: I76518ea6719d1d08a8ad8722a059c7f5fd86813a
/frameworks/base/core/java/android/os/Binder.java
02cb6e773b323a0d54b21f43460a23f668b7727c 19-Sep-2015 Fyodor Kupolov <fkupolov@google.com> Added --restricted option for create-user command

Also moved restricted profile create/setup logic from Settings to
UMS.createRestrictedProfile.

Bug: 24212155
Bug: 24303609
Change-Id: I0346a3368de53f4bb4b6e054349f19adac959d7f
/frameworks/base/core/java/android/os/Binder.java
9249a9097707bb57ae0a7d114eff54bc82ad462d 26-Sep-2015 Bart Sears <bsears@google.com> Revert "Added --restricted option for create-user command"

This reverts commit 737b216b5c28f7d7162f219136d4e8a9eb1a486b.

Change-Id: I4c43967933bb2e46cdb8ad6e643d7037d722cab2
/frameworks/base/core/java/android/os/Binder.java
737b216b5c28f7d7162f219136d4e8a9eb1a486b 19-Sep-2015 Fyodor Kupolov <fkupolov@google.com> Added --restricted option for create-user command

Also moved restricted profile create/setup logic from Settings to
UMS.createRestrictedProfile.

Bug: 24212155
Bug: 24303609
Change-Id: I5f0d48bcbd3c0b51927926b874fd057c15ac5219
/frameworks/base/core/java/android/os/Binder.java
52613f9084f40100021fbf21173bda329a2d5cc3 18-Jun-2015 Rahul Chaturvedi <rkc@google.com> Add binder transaction tracking.

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
/frameworks/base/core/java/android/os/Binder.java
8d90634aab535aaaf1e7e187fee6f7c0d6957625 15-Apr-2015 Wale Ogunwale <ogunwale@google.com> @hide Binder#blockUntilThreadAvailable API

Bug: 19297165
Change-Id: I15f1139330830b95d7078a5eedd6def794cca6a7
/frameworks/base/core/java/android/os/Binder.java
d7fdd0228e6abdbc079f9cf08b780e4222dfe7c5 14-Apr-2015 Wale Ogunwale <ogunwale@google.com> Added watchdog monitor for Binder threads availability.

The watchdog will trigger if all binder threads in the system_server
are stuck for a long time (1min) preventing the process from
handling additional IPC requests.

Bug: 19297165
Change-Id: I5909a9c230bf23917feaed53f2b54bd50425bf3c
/frameworks/base/core/java/android/os/Binder.java
ab4a81b3c625e33d04ae8070fcce6b6baee6522c 10-Oct-2014 Dianne Hackborn <hackbod@google.com> Improve some docs, fix some debugging.

- Add docs to Binder, Messenger, ResultReceier to explain their
relation (or lack there-of) to process lifecycle.
- Clarify some aspects of process lifecycle for services.
- Fix help text of am command.
- Fix per-package dumping of battery stats to not include history.
- Fix per-package dumping of proc stats to only include aggregated
and current stats and fix some formatting.
- Fix per-process dumping of meminfo to have an option to interpret
the input as a package, so including all processes that are
running code of that package.
- Fix top-level per-package debug output to correctly include all
of these improvements and give them a little more time (10s) to
complete for timing out.

Change-Id: I2a04c0f862bd47b08329443d722345a13ad9b6e2
/frameworks/base/core/java/android/os/Binder.java
ce92b0d070c4967914698b4e257c203d7121c972 30-Sep-2014 Dianne Hackborn <hackbod@google.com> More work on issue #17656716: Unhandled exception in Window Manager

Drop down the limit on when we log, since under normal operation we
will never get more than a few K of data due to strict mode.

Try to clean up the code paths coming in and out of binder IPCs to
plug any places where we could disrupt the gather flag of a thread,
causing it to keep gathering stack crawls (which is the thing that
is causing our strict mode data to become so large).

Change-Id: I9a46512283d33e863c429840b465855d1fabb74e
/frameworks/base/core/java/android/os/Binder.java
73d6a821aeecd6003c70c32f7ae6c38f062c4290 29-Sep-2014 Dianne Hackborn <hackbod@google.com> Work on issue #17656716: Unhandled exception in Window Manager

Remove the checks for large parcel sizes. Those were triggering,
and identifyng the area of the problem, but also cause a lot of
trouble by making the unsafe deadlocky code there much more likely
to deadlock.

Add logging for strict mode IPCs, since those seem to be the
problem. Only log when things look bad.

Also add a log when battery stats are reset, to diagnose why they
are getting reset when they shouldn't be.

Change-Id: I588c858fb8d8c45f3c9c164ae2de9ae01547b304
/frameworks/base/core/java/android/os/Binder.java
fad079dc5dbec1cb2461e4f8e0cdfd4784e9eada 27-Sep-2014 Dianne Hackborn <hackbod@google.com> More debugging for issue #17656716: Unhandled exception in Window Manager

Change-Id: I81d3678e21d293d5896c467ae5c6739c82cfaa95
/frameworks/base/core/java/android/os/Binder.java
017c6a28bee788d2ba5550548ea844d0236bc40e 26-Sep-2014 Dianne Hackborn <hackbod@google.com> Work on issue #17656716: Unhandled exception in Window Manager

Create descriptive errors when sending unreasonably large
parcels through IPC.

Change-Id: Ie93b5372a8ed87541db282876c4eeeae69a1e8bd
/frameworks/base/core/java/android/os/Binder.java
8ab665dda40ab10e60fc69392022171f454af530 22-Jan-2014 Ashok Bhat <ashok.bhat@arm.com> AArch64: Make Binder and Parcel 64-bit compatible

Changes include
[x] Long is used to store native pointers

[x] Added new method obtain(long obj) to Parcel. Binder
uses this method instead of obtain(int obj).

[x] obtain(int) has been changed to throw unsupported
operation exception.

Change-Id: I408e0f2a24deb28c9277d86670653a51eb314266
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
/frameworks/base/core/java/android/os/Binder.java
a2067473e8cb3e026503cf0c58dec51ea748b952 20-Sep-2013 Dianne Hackborn <hackbod@google.com> Fix issue #10310128: CTS: android.security.cts.ServicePermissionsTest

Change-Id: Id6432fc1b62db41c6c291ec08450c2fc37ced899
/frameworks/base/core/java/android/os/Binder.java
7eb6cfe10b1df1f9d6f4d449dff554e7fbca0362 16-Aug-2013 Igor Murashkin <iam@google.com> Binder: Log exceptions originating from the binder stub for oneway calls

- Under a normal situation, if an exception happens in managed, the stack trace
will be printed to logcat.
- Hitherto, the Binder#execTransact call silently caught exceptions and passed
them to the remote side with Parcel#writeException
- Although this behavior might be acceptable when there is a remote side,
for FLAG_ONEWAY calls the exception effectively disappeared.
- From the user point of view, it looked like code execution "halted" when an
exception was thrown.

This tries to make the binder exception handling behavior more like normal,
by printing the exception to the log, to give a better indication of what
happened.

Change-Id: I1f37f0468f61e766a71db60d2fda2104936ab096
/frameworks/base/core/java/android/os/Binder.java
d2932243e3313b59e7538641731aa98852bc5ac7 06-Aug-2013 Dianne Hackborn <hackbod@google.com> Refactor ProcessStats, ProcessTracker.

ProcessStats is now called ProcessCpuTracker.

ProcessTracker is now ProcessStatsService, and its inner State
class is broken out into a separate top-level ProcessStats class.
This ProcessStats is moved to the framework, so we will be able
to use it elsewhere.

Change-Id: I6a127bcb835b6b474b72647c0b99b82c2137e5c5
/frameworks/base/core/java/android/os/Binder.java
db4e33f1f1d766afa3218a6bbdbb561e7962c854 02-Apr-2013 Dianne Hackborn <hackbod@google.com> Faster PrintWriter.

Change-Id: I4e1ae7e0357214deb7e19ae65f8701b69b347c6e
/frameworks/base/core/java/android/os/Binder.java
5b88a2fd7b77880f6e09ae4a1de509bebe28bc3a 04-May-2013 Dianne Hackborn <hackbod@google.com> Debugging help for issue #8734824: WATCHDOG KILLING SYSTEM PROCESS

IActivityController has a new callback which the Watchdog calls
when it detects that the system process is hung. This may be
use full monkey. All hail the monkey!

Also add a new private feature to Binder to be able to turn off
all incoming dump() calls to a process. The watchdog uses this
when it reports it is hung, so that if someone, say, wants to
collect a bug report at this point they won't get stuck waiting
for things that are all busted.

Change-Id: Ib514d97451cf3b93f29e194c1954e29f948c13b1
/frameworks/base/core/java/android/os/Binder.java
1951ce86c21445ac191e4d2d95233f4f5c096b56 05-Apr-2013 Jeff Brown <jeffbrown@google.com> Correctly manage the lifecycle of IME InputChannels.

InputChannels are normally duplicated when sent to a remote process
over Binder but this does not happen if the recipient is running within
the system server process. This causes problems for KeyGuard because the
InputMethodManagerService may accidentally dispose the channel
that KeyGuard is using.

Fixed the lifecycle of InputChannels that are managed by the IME
framework. We now return a duplicate of the channel to the application
and then take care to dispose of the duplicate when necessary.
In particular, InputBindResult disposes its InputChannel automatically
when returned through Binder (using PARCELABLE_WRITE_RETURN_VALUE).

Bug: 8493879
Change-Id: I08ec3d13268c76f3b56706b4523508bcefa3be79
/frameworks/base/core/java/android/os/Binder.java
74ee8652e02fc94901177214fc9370659732c921 08-Sep-2012 Dianne Hackborn <hackbod@google.com> Add Binder.getCallingUserHandle().

Change-Id: I2a7eedfdc7baeeb4c2cd2ca0153aa95e0cf0bf45
/frameworks/base/core/java/android/os/Binder.java
4120375d46091df8527bb701882e056fbb0e6b06 31-Aug-2012 Dianne Hackborn <hackbod@google.com> Remove Binder.getOrigCallingUid().

Replaced all remaining places that used it with explicit user
specification.

While doing this, I ran into stuff that was creating PendingIntent
objects (that now need to specify the explicit user they are for),
which are also posting notifications... but have no way to specify
the user for the notification.

So the notification manager in the system process now also gets a
formal concept of a user associated with the notification, which
is passed in to all the necessary aidl calls. I also removed the
old deprecated aidl interface for posting/cancelling notifications,
since we now always need a user supplied.

There is more work that needs to be done here, though. For example
I think we need to be able to specify USER_ALL for a notification that
should be shown to all users (such as low storage or low battery).
Along with that, the PendingIntent creation needs to be tweaked to
be able to handle USER_CURRENT by evaluating the user at the point the
pending intent is sent.

That's for another change, however.

Change-Id: I468e14dce8def0e13e0870571e7c31ed32b6310c
/frameworks/base/core/java/android/os/Binder.java
f02b60aa4f367516f40cf3d60fffae0c6fe3e1b8 16-Aug-2012 Dianne Hackborn <hackbod@google.com> Rename UserId to UserHandle.

This is the start of turning this into a formal public API.

Change-Id: I5786d2c320f1de41a06ed5d0f65adb68967287a0
/frameworks/base/core/java/android/os/Binder.java
40eee61e25fb887f5267686f8a0a7c5bd9f95769 07-Aug-2012 Scott Main <smain@google.com> docs: fix broken links
and update sitemap text file

Change-Id: I6982c3f029c46135ae856b8484d906c2882bad3a
/frameworks/base/core/java/android/os/Binder.java
742a67127366c376fdf188ff99ba30b27d3bf90c 04-May-2011 Amith Yamasani <yamasani@google.com> Multi-user - 1st major checkin

Switching activity stacks
Cache ContentProvider per user
Long-press power to switch users (on phone)

Added ServiceMap for separating services by user
Launch PendingIntents on the correct user's uid
Fix task switching from Recents list
AppWidgetService is mostly working.

Commands added to pm and am to allow creating and switching profiles.

Change-Id: I15810e8cfbe50a04bd3323a7ef5a8ff4230870ed
/frameworks/base/core/java/android/os/Binder.java
7f97e65add29b3887755e998804b013168f773b1 15-Dec-2011 Jeff Sharkey <jsharkey@android.com> Clear reply before writing exception.

Changes Binder.execTransact() to clear any partial reply before
writing the exception. Specifically, this fixes case where an
onTransact() could leave a writeNoException() floating in the reply.

Bug: 5686023
Change-Id: Ibc944464a010f5ec2fd8ef3cc84ac23d8260a491
/frameworks/base/core/java/android/os/Binder.java
43a17654cf4bfe7f1ec22bd8b7b32daccdf27c09 07-Apr-2011 Joe Onorato <joeo@google.com> Remove the deprecated things from Config.java. These haven't been working since before 1.0.

Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
/frameworks/base/core/java/android/os/Binder.java
e17aeb31030cfeed339a39a107912ad5e9178390 08-Apr-2011 Dianne Hackborn <hackbod@google.com> Improve activity manager debug dumps.

Activity manager now does all dump requests into apps
asynchronously, so it can nicely timeout if there is an
app problem. Also lots of general cleanup of the am
dump output.

Change-Id: Id0dbccffb217315aeb85c964e379833e6aa3f5af
/frameworks/base/core/java/android/os/Binder.java
bd8b6f25bb48daea4aeb0c7463661c8e69baece0 01-Mar-2011 Christopher Tate <ctate@google.com> Fix binder proxy death notice tracking

There was an issue with stale recipient tracking when BinderProxy weak
references had been purged and a new proxy object allocated for a
still-live underlying IBinder. The death recipient bookkeeping has
now been reworked so that it's fundmentally tied to the BinderProxy
instances, not maintained as global state, to prevent this sort of
confusion entirely.

Bug 3499939

Change-Id: I75c5216b6d53b90868ac969e32c9725201e51be3
/frameworks/base/core/java/android/os/Binder.java
74923d3ae4bf7043a62a02c4df988ef3255737ce 18-Nov-2010 Jean-Baptiste Queru <jbq@google.com> am d34c1495: Merge "Prevent system crash when OOM in Binder thread."

* commit 'd34c1495020e5d72dd18959fb906375dc0874c04':
Prevent system crash when OOM in Binder thread.
19f22745aa0fa2344850bac3234460add9d94c4e 05-Nov-2010 Mattias Petersson <mattias.petersson@sonyericsson.com> Prevent system crash when OOM in Binder thread.

When handling large images during an update of a widget,
we can run out of memory in the Binder thread. This will
cause an OutOfMemoryError to be thrown. When an Error is
thrown in the Binder thread, the entire system will crash.
This was fixed by catching this OutOfMemoryError and instead
throw a RuntimeException to keep the system alive.

Change-Id: If27199676c6f8aef23fb249be1197ca5dfe0fe99
/frameworks/base/core/java/android/os/Binder.java
eb75888e6479317151c2ed44d47bd28ef567a4c7 27-Jul-2010 Brad Fitzpatrick <bradfitz@android.com> Fix StrictMode for Binder.dump()

Change-Id: I378f5e3d6512d06b46248b9bb6d9c727e3f6bf1d
/frameworks/base/core/java/android/os/Binder.java
5b747191ff8ad43a54d41faf50436271d1d7fcc8 12-Jul-2010 Brad Fitzpatrick <bradfitz@android.com> StrictMode: gather and return violating stacks in Binder replies

Now, when Thread A has a strict mode policy in effect and does a
Binder call to Thread B (most likely in another process), the strict
mode policy is passed along, but with the GATHER penalty bit set which
overrides other policies and instead gathers all offending stack
traces to a threadlocal which are then written back in the Parcel's
reply header.

Change-Id: I7d4497032a0609b37b1a2a15855f5c929ba0584d
/frameworks/base/core/java/android/os/Binder.java
727de40c6bc7c6521a0542ea9def5d5c7b1c5e06 08-Jul-2010 Brad Fitzpatrick <bradfitz@android.com> More StrictMode work, keeping Binder & BlockGuard's thread-locals in-sync.

Change-Id: Ia67cabcc17a73a0f15907ffea683d06bc41b90e5
/frameworks/base/core/java/android/os/Binder.java
a0527f207bf4af313e9f4fa9c39afe1bbee51e16 26-Mar-2010 Brad Fitzpatrick <bradfitz@android.com> Clarify some Binder docs regarding things that are thread-local.

Change-Id: I433c9c2f4593866b2e9846893676b93a670817d4
/frameworks/base/core/java/android/os/Binder.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/os/Binder.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/os/Binder.java
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/frameworks/base/core/java/android/os/Binder.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/os/Binder.java