summaryrefslogtreecommitdiff
path: root/core/java/android/os/ShellCallback.java
Commit message (Collapse)AuthorAgeFilesLines
* [Bugfix] Fix after performing adb shell am hang and kill this process, the ↵yuxi12021-03-051-0/+4
| | | | | | | | | | | | | | phone can not resume from hang state After performing adb shell am hang and kill this process, the phone can not resume from hang state. The reason is that the IBinder object in runHang(PrintWriter pw) of ActivityManagerShellCommand.java is not the IBinder object of client. Bug: 180949375 Fixes: 180949375 Test: Run adb shell am hang, and open some APPs, then the phone will hang. Then perform ctrl + c, the phone can resume from hang state. Signed-off-by: yuxi1 <yuxi1@xiaomi.com> Change-Id: Ie1153df2e21fc267fd131994422b7c263a17372a
* All Parcelable CREATOR fields are @NonNull.Jeff Sharkey2019-02-281-1/+1
| | | | | | | | | If they were null, then the Parcelable would fail to work. Bug: 126726802 Test: manual Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014 Exempt-From-Owner-Approval: Trivial API annotations
* The pm command is no more.Dianne Hackborn2017-11-211-0/+3
| | | | | | | | | | It is now just a shell of itself. :) Also brings in a few fixes to never try to open files from the system process. Test: manual Change-Id: Ia8187196af597046fd2e7092dbf19ce1dc1ea457
* Fully implement "install" and "install-write" in PackageManagerShellCommand.Dianne Hackborn2017-10-311-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can use the new mechanism to ask the calling shell to open a file in order to implement the rest of these commands, allowing you to give the path to an apk to install. That API is thus extended to allow you to open readable files, not just opening file for writing. Doing this however means we no longer can pass a file path to AssetManager for the apk to parse, we only have an already open fd for that. Extending AssetManager to allow adding apks from fds is not that hard, however, since the underlying zip library already supports this. This main thing this changes is in AssetManager.cpp where we retrieve the open zip file for a particular apk that has been added. This used to look up the zip file by path every time it was needed, but that won't work anymore now that we can have things added by fd. Instead, we keep track of each opened zip in the AssetManager, so we can just directly retrieve it from the asset_path representing the item that was added. As a side-effect, this means for normal paths we no longer need to look up by name, but just have the opened zip file directly accessible. (This is probably good, but it does mean that we no longer run the logic of seeing if the zip file's timestamp has changed and re-opening it if it has. We probably shouldn't be relying on that for an active AssetManager anyway, and maybe it is even good that we don't allow the zip file to change under it?) A follow-up change will finally remove the Pm.java implementation and turn the pm "command" into a simple shell script that runs cmd package. Test: manual Change-Id: Ie103e3bdaa5b706796cc329254f2638151a3924f
* New infrastructure to switch remaining commands to "cmd" calls.Dianne Hackborn2016-09-291-0/+114
This introduces a new feature of the IBinder command protocol to allow the shell command implementation to call back into its caller to ask it to open files in the calling context. This is needed so that commands that have arguments specifying files can open those files as the calling shell, not the system (or whatever) process. To test this all out, move the "am start" implementation over to ActivityManagerShellCommand, in particular along with its option to specify a file in which to write profiling data. Test: Manual Change-Id: I0c1e3857defefbd19a2ac29413aafbb34b1e48a3