Separate commands to create an install session, stream files into the
staging area, and then commit the install. Streaming can accept data
from stdin across adb, avoiding extra copy from push.
Extend FileBridge to support blocking close(). Always destroy
session regardless of result.
Bug: 14975160
Change-Id: Ic3f462e7d1901079b785e210228950cdfa676466
Permits apps with permission
android.permission.ACCESS_PERSISTENT_PARTITION to obtain
a read and write data blocks to the PST partition.
Only one block ever exists at one time in PST. When
a client writes another block, the previous one is
overwritten.
This permits storing a block of data that will live
across factory resets.
Change-Id: I8f23df3531f3c0512118eb4b7530eff8a8e81c83
This attempts to fix a bug where ordered broadcasts like
ACTION_SCREEN_ON are substantially delayed by misbehaving
receivers. Instead, we immediately send the state to mPolicy
so that it can wake/sleep the device without delay.
Fixes bug 14313639
Change-Id: I21a191f90e0a19f1ee75c160ecc4e63e8def709e
The uid and pid will be used to together to find any forked processes
and kill them.
Bug: 15313911
Change-Id: I2edb51527e5d1a977c0fad0e6c959c8438bb4be9
Sympton:
When application crash in a special timing and system server's InputMethodManager is binding, deadlock may occur.
Root Cause:
Thread(1): When using InputMethodManager in system server, it will lock mH(handler) of InputMethodManager,
and sometimes it will call to InputMethodManagerService::showCurrentInputLocked and will call bindService at some condition,
then it will also lock ActivityManagerService.
Thread(2): When an application crashed, it will lock ActivityManager when showing crash dialog, inside the dialog,
it will call setEnabled of Button and lock mH of InputMethodManager.setEnable of TextView will lock IMM's handler.
So the deadlock happened as the flow: (2) lock AMS -> (1)lock mH -> (2)wait mH -> (1) wait AMS
Solution:
Reduce nested lock of error dialog: post message to let (2) lock mH after release AMS lock.
Change-Id: Id85c29406236db3b5fca9655fde1fcaf0afd1337
Root Cause:
Use removeTask with flag ActivityManager.REMOVE_TASK_KILL_PROCESS will set waitingToKill = "remove task"
to the target process when its setSchedGroup is not BG_NONINTERACTIVE.
Later the target process may be killed when applying oom-adj due to setSchedGroup has changed to BG_NONINTERACTIVE.
If the process is needed to restart, the process record will be resued.
Then the restarted process may be killed again because its waitingToKill is not null.
Solution:
Clean waitingToKill when process is dead.
Change-Id: I5ffb5388127f4221da4c700d3f1c224f7ca6e7b2
Symptom: Unable to kill by Am again and will be skipped updating its oom adj.
Root Cause:
A restarted process will reuse original process record.
The flag killedByAm will keep previous state.
Solution:
Reset the flag killedByAm to false when the process is started.
Note: Found another similiar patch If95137d91939cc44882ad2813131bcde0edd0c1b
Change-Id: I59a86648ca8d0aed4c489d92751af120aae5ef90
Root Cause:
When there is only home activity existed,
updating home apk will call forceStopPackageLocked to finish the activity.
Then activity history becomes empty, then home will be launched,
but its package is still target to close that results a loop.
Solution:
If home activity has been force-stopped, do not stop the same home activity again.
Change-Id: Icff12028d407873c2e6f50a06bcad231b908ccbd
Also change all debug to use the new log method and send the debug
to Rlog rather than Slog. This way we don't spam the main log buffer
just our radio log buffer while we're debugging 16148026.
Bug: 16148026
Change-Id: I5571f7d07405ddb3c208efd1756106b78343c843
Now that all the other pieces are in place, we're ready to start
installing new file-based packages as a cluster (the new unified
directory-based layout). This greatly simplifies the renaming
process.
Also add helper methods to ApplicationInfo to give a much clearer
mapping between it and internal field names, since we can't change
the public API.
Add recursive restorecon().
Bug: 14975160
Change-Id: I72a63c5ddbc594c2fec4a91dd59f73ef253fbfd7
This makes sure that if the user id gets reassigned without restarting the phone,
we do not have old information from the preexisting profile.
Also renames method which needs write locks.
Bug: 15928463
Change-Id: I30b0f85cf90d3e0c289a37bcbaec8da63499a170