History log of /frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b1e2da7c24613ce393bca871069d379cd4378c26 30-Jun-2016 Svetoslav Ganov <svetoslavganov@google.com> Add Bluetooth toggle prompts - framework

If permission review is enabled toggling bluetoth on or off
results in a user prompt to collect consent. This applies
only to legacy apps, i.e. ones that don't support runtime
permissions as they target SDK 22.

Also added a configuration resource which controls whether
permission review mode is enabled. By default it is not and
an OEM can change this via an overlay. For now we also keep
the old mechanism to toggle review mode via a build property
which is still used and will be removed when clients have
transitioned.

bug:28715749

Change-Id: I94c5828ad6c8aa6b363622a26ff9da4fc2e2fac7
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
2a03586998b857bb13f1119005be186e4a88ff02 25-Sep-2016 Tianjie Xu <xunchang@google.com> Log the error when uncrypt timeouts

Log the error code to uncrypt_status if uncrypt gets killed because
of timeout.

Test: We log the error code correctly in uncrypt_status when uncrypt timeouts.
Bug: 31603820
Change-Id: Ia623c333714295e68f4269257fbb4297a867e42b
(cherry picked from commit 036d08638e6a5f849847a32d794ad34d7dec1368)
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
1ceb0fcf3a61cd1eb903473b7084cbb1158d3e6f 31-Aug-2016 Adam Seaton <aseaton@google.com> Revert "Bump up the uncrypt timeout to 30 min." Creates Null Build to test OTA failure fix. This reverts commit 8abcfed8a42a1ca517ee3c8d0448fda669ff9ded. am: b57e6560d0
am: e245037327

Change-Id: I477f3e1c5e685df2ef2a335790ab49aac6c13eef
e245037327738fbc82b538086c88378dc608cf15 31-Aug-2016 Adam Seaton <aseaton@google.com> Revert "Bump up the uncrypt timeout to 30 min." Creates Null Build to test OTA failure fix. This reverts commit 8abcfed8a42a1ca517ee3c8d0448fda669ff9ded.
am: b57e6560d0

Change-Id: Idaafcb7c835aa7b7b83bb7382900ef3d18fa551f
b57e6560d0cc8d11b0845296831e4421d85d4441 31-Aug-2016 Adam Seaton <aseaton@google.com> Revert "Bump up the uncrypt timeout to 30 min."
Creates Null Build to test OTA failure fix.
This reverts commit 8abcfed8a42a1ca517ee3c8d0448fda669ff9ded.

Change-Id: I64474dad467ce8d8e379e0e2c47814d76ac0ee0d
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
18f9533910d019c844b8105faba08b9a8a0e02b4 29-Aug-2016 Tao Bao <tbao@google.com> Bump up the uncrypt timeout to 30 min. am: 8abcfed8a4
am: c5a17fc39f

Change-Id: Ib637e1f00ddebbac5a3bea6ff31f08854a95b7ea
c5a17fc39fd22cd1dbf7483bbfd7e76f101d99c2 29-Aug-2016 Tao Bao <tbao@google.com> Bump up the uncrypt timeout to 30 min.
am: 8abcfed8a4

Change-Id: I35340614fe09f96f8c31cc53a99e366580294490
8abcfed8a42a1ca517ee3c8d0448fda669ff9ded 27-Aug-2016 Tao Bao <tbao@google.com> Bump up the uncrypt timeout to 30 min.

Bug: 30490464
Change-Id: I9b65afb10134d79b2f5b5275a6d81065a04e91b9
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
995c90aa1856e8ef7b3397b775720941d3dcb133 26-May-2016 Christine Hallstrom <hallstrom@google.com> Properly check if BT is off when shutting down radios

Use BluetoothAdapter#getState() instead of
BluetoothAdapter#isEnabled() when checking if Bluetooth has turned
off, as isEnabled() is set to false early in the shutdown process
and getState() provides a better indication of the state of BT.

Bug: 27354612
Change-Id: Ic7828f0726491d49c9a14ba5d654b24f66743662
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
f44f5a460e9610e027a3b6257b1cf904dc3afbc7 03-Mar-2016 dcashman <dcashman@google.com> Add setting and detection of ro.sys.safemode property.

Bug: 28008032
Change-Id: I6b19b32df615becd88a56a337c999b57011c6200
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
a6e9e24be53d2516138f487e340e46b8d0212d86 05-Feb-2016 Sami Tolvanen <samitolvanen@google.com> Support persist.sys.audit_safemode

Don't leave safe more if persist.sys.audit_safemode is set, unless the
current build date is newer than the specified value.

This allows us to keep the device in safe mode across reboots until an
OTA has been applied or user data is wiped.

Bug: 26902605
Change-Id: I781c3059ea8d4fb2f0c923e4488b1932d69678d3
(cherry picked from commit ee2b49283261f7b4518ec7c98f568f883f817c9d)
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
e8a403d57c8ea540f8287cdaee8b90f0cf9626a3 31-Dec-2015 Tao Bao <tbao@google.com> Add support for update-on-boot feature.

Add a separate system service RecoverySystemService to handle recovery
related requests (calling uncrypt to de-encrypt the OTA package on the
/data partition, setting up bootloader control block (aka BCB) and etc).

We used to trigger uncrypt in ShutdownThread before rebooting into
recovery. Now we expose new SystemApi (RecoverySystem.processPackage())
to allow the caller (e.g. GmsCore) to call that upfront before
initiating a reboot. This will reduce the reboot time and get rid of the
progress bar ("processing update package"). However, we need to reserve
the functionality in ShutdownThread to optionally call uncrypt if
finding that's still needed.

In order to support the update-on-boot feature, we also add new
SystemApis scheduleUpdateOnBoot() and cancelScheduledUpdate() into
android.os.RecoverySystem. They allow the caller (e.g. GmsCore) to
schedule / cancel an update by setting up the BCB, which will be read by
the bootloader and the recovery image. With the new SystemApis, an
update package can be processed (uncrypt'd) in the background and
scheduled to be installed at the next boot.

Bug: 26830925
Change-Id: Ic606fcf5b31c54ce54f0ab12c1768fef0fa64560
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
82e780743046e620b724c28023b580e0e624bb15 03-Aug-2015 Yusuke Sato <yusukes@google.com> am b98e2353: am 158560ad: Merge "Distinguish user-requested shutdown from power-related ones"

* commit 'b98e235364c2b221521f622c546733b2862e4677':
Distinguish user-requested shutdown from power-related ones
705ffd1efe529bb291e90fa06e92c8090ee98627 22-Jul-2015 Yusuke Sato <yusukes@google.com> Distinguish user-requested shutdown from power-related ones

With this patch, when the user requested shutdown,
PowerManagerService sets sys.powerctl is set to
"shutdown,userrequested", and init runs fsck on shutdown.

When shutdown is triggered due to a low power state etc.,
the service sets the property to "shutdown,", and init
immediately shuts down the system without running the
command.

This is a follow-up CL for http://r.android.com/158525.

Bug: 21853106
Change-Id: Iae72990130fe9aa479c802f77301438190dbbfb3
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
f2a91ee148a3b753f85abff0d8adeace0c713726 03-Jun-2015 Tao Bao <tbao@google.com> Improve the reboot-to-recovery dialogs

To address the UX comments, this CL modifies the dialogs when the
device is rebooted to install an update or to perform factory data
reset.

Bug: 20949086
(cherry picked from commit 81dce6631396012e8b722bbed6d003f584800ae1)
Change-Id: I6d0cbbbaf184806366c6581c1c2e7dbcc5d89a17
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
fa861429f7ec0b9f83a2baacc3c6fb680467039b 22-May-2015 Tao Bao <tbao@google.com> Wait for uncrypt to finish before rebooting

/system/bin/uncrypt needs to be triggered to prepare the OTA package
before rebooting into the recovery. For larger packages, uncrypt may be
killed before it finishes the work after the timeout. Change to monitor
the uncrypt status and show the progress to user.

Needs matching changes in bootable/recovery/uncrypt, system/core and
external/sepolicy.

Also pick up the two NPE fixes in commits
9bb765448df43d41e0a3edb7de1d1641c9251c35 and
da3f63ffb87397943546a7c5c893ce98f2489df2.

Bug: 20012567
Bug: 20949086
(cherry picked from commit 90237f7beb55dae79cdcba5271f96be778573737)
Change-Id: Ibf2fc80032967e5f6cda3cd469005dd29665c87c
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
81dce6631396012e8b722bbed6d003f584800ae1 03-Jun-2015 Tao Bao <tbao@google.com> Improve the reboot-to-recovery dialogs

To address the UX comments, this CL modifies the dialogs when the
device is rebooted to install an update or to perform factory data
reset.

Bug: 20949086
Change-Id: Icc1cdec7e0336ae37c17fffde7dae7ff882e5470
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
983d449a84b6040e15368da925149419fc6b7010 02-Jun-2015 Tao Bao <tbao@google.com> Fix the NPE when checking mRebootReason

Bug: 21584198
Change-Id: Ie11092dbc771b54bd049d258dc705835a3eda494
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
9bb765448df43d41e0a3edb7de1d1641c9251c35 29-May-2015 Guang Zhu <guangzhu@google.com> fix NPE in shutdown thread

null reboot reason is used when it's a simple reboot.

Change-Id: I9d3110ca733a1b0401721fde907924c101997c4f
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
90237f7beb55dae79cdcba5271f96be778573737 22-May-2015 Tao Bao <tbao@google.com> Wait for uncrypt to finish before rebooting

/system/bin/uncrypt needs to be triggered to prepare the OTA package
before rebooting into the recovery. For larger packages, uncrypt may be
killed before it finishes the work after the timeout. Change to monitor
the uncrypt status and show the progress to user.

Needs matching changes in bootable/recovery/uncrypt, system/core and
external/sepolicy.

Bug: 20012567
Bug: 20949086
Change-Id: I2348a98312c4dae81f618b45a2ee3b4cf6246ff5
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
df7f02b6e098dbcda6a6d52252c31ee2e02d8e00 30-Apr-2015 John Spurlock <jspurlock@google.com> am ad61b833: Merge "Fix no vibration during shutdown."

* commit 'ad61b8336aa9627a6ae19580bbdc370dc8bd6810':
Fix no vibration during shutdown.
bff46bac807ae8a9ebdc22c449a8d4f78711b4d2 05-Mar-2015 Benjamin Franz <bfranz@google.com> Add DO policy to disable safe boot mode.

Bug: 19615843
Change-Id: I14dbe911995ec216c57bd285d6b7b04c9684591a
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
d3b371755df509cabbc5b4451df83309be5439b0 18-Mar-2015 riddle_hsu <riddle_hsu@htc.com> Fix no vibration during shutdown.

In ShutdownThread:rebootOrShutdown, the vibrator is created
by "new SystemVibrator()" which will use default constructor
of Vibrator.

And because system server is not bound application,
ActivityThread.currentPackageName will be null.
Then the member mPackageName of Vibrator is null.

When doing vibration:
VibratorService.startVibrationLocked
-> mAppOpsService.startOperation
-> getOpsLocked (null package will get null op)
-> return MODE_ERRORED
-> no vibration

https://code.google.com/p/android/issues/detail?id=160830

Pass null context in SystemServer.performPendingShutdown
because vibrator service is not ready, and from the call
sequence, there is no available context to use.

Change-Id: I3e0175ba6dc2e1a92787873eda4461fba6e89783
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
bd7723637b14d1895c043c2257f1cd9560322d4e 02-Aug-2014 Naveen Kalla <nkalla@codeaurora.org> Invoke shutdownMobileRadios Telephony APIs from ShutdownThread

shutdownMobileRadios API shuts down multiple Radios on MSIM devices and
also gracefully shuts down Radios and SIM cards on single SIM and
MSIM devices. Use this API instead of the old setRadio APIs.

Add RIL_REQUEST_SHUTDOWN to RILConstants. Message is sent to notify
RIL that the device is shutting down.

Bug: 9773278
Change-Id: I6afa9e810cefc7855f7ae42e51f39cc51fa2aa6e
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
7b41467704f941b11af6aace3e40993afc7f6c6f 18-Jul-2014 John Spurlock <jspurlock@google.com> Zen mode filtering should use new usage constants.

Refactor stream-based calls to usage-based calls.

Bug:15279516
Change-Id: I3f7757d8123c14670e2ad5f8e6aa4e9803efe7ec
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
6422abef786632e53337c6c298ffa64f7ddf4d90 07-May-2014 Brian Carlstrom <bdc@google.com> resolved conflicts for merge of 3bbef521 to master

Change-Id: I0bbb7c80f6c4f003779da784475d7acbfb898c94
3bbef521d4b07f86010ba0729a36ff8b73bcb0ac 07-May-2014 Brian Carlstrom <bdc@google.com> resolved conflicts for merge of f2db00fd to klp-modular-dev-plus-aosp

Change-Id: I745164033962f6222832f8f19fa316a2e2634fd0
f9e1a0b369740e11ea1ed4f141ffb936fc1a6cdb 20-Mar-2014 John Spurlock <jspurlock@google.com> Annotate framework vibrate calls with stream hints.

Migrate existing framework usages of Vibrator.vibrate to use
the new overload with an explicit stream hint. This prevents
them from being blocked by rules targeting the unspecified stream.

For calls that pass the existing appops check in VibrateService,
pass streamHint down to the input device vibrator so we don't lose
the signal, but leave it up to InputManager to decide what to do
with it - currently unused.

Change-Id: I65c944e4010edea29a412bf57d8d7d3b8098b746
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java
9158825f9c41869689d6b1786d7c7aa8bdd524ce 22-Nov-2013 Amith Yamasani <yamasani@google.com> Move some system services to separate directories

Refactored the directory structure so that services can be optionally
excluded. This is step 1. Will be followed by another change that makes
it possible to remove services from the build.

Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
/frameworks/base/services/core/java/com/android/server/power/ShutdownThread.java