Commit Graph

15 Commits

Author SHA1 Message Date
Dinolek f006bb8739 doze: Clean up code 2017-12-31 12:08:22 +01:00
Dinolek 15e730949e doze: Fix not working sensors on mtk platform
Remove sensorsEnabled check as it breaks doze on mtk
2017-12-31 12:08:22 +01:00
Dinolek d09ba4bf0a Revert "Doze: Require non-wake up proximity sensor"
Breaks proximity sensor on mtk platform

This reverts commit d60a4bdfd3.
2017-12-31 12:08:22 +01:00
LuK1337 d60a4bdfd3 Doze: Require non-wake up proximity sensor
* getDefaultSensor(type) returns the first sensor
  and in case of capricorn it's wake-up one thus our
  doze package wouldn't work. Passing `false` as a second
  argument makes it work properly.

Change-Id: If73bc43bc166945d27b95513c4255ae5a5590849
2017-10-21 15:10:59 +02:00
Michael W 5f480054b3 doze: Set different timings for wave and pocket detection
* One second is a little bit short for pocket

Change-Id: Id27bba6f01a3a4d54ae9096fae87505f38ee5062
2017-10-21 15:10:59 +02:00
Gabriele M 616ff9adad doze: Protect com.android.systemui.doze.pulse
As stated in ActivityManagerService:

  The vast majority of broadcasts sent from system internals
  should be protected to avoid security holes

Change-Id: I1dc989d9d132d40835ca8dbf277285eb88e30a58
2017-10-21 15:10:59 +02:00
Bruno Martins 283041e455 Doze: Refactor
* Fix Ambient Display's switchbar on/off text.
 * Get rid of unnecessary receiver and all its related code,
   permissions and meta-data.
 * Keep the service running only if Doze is enabled system-wide along
   with at least one of the additional Ambient Display features.

Change-Id: Id1f7f5e099f289a20f5757b7869e297e0ce74f7a
2017-10-21 15:10:59 +02:00
Michael W 2036d7303d doze: Cleanup
* Remove unneccessary newlines
 * Remove redundancy
 * Remove unused variables and imports
 * Make variables local when sufficient

Change-Id: I48f5dfc24275388f1deb31dc27716ed75aae898e
2017-10-21 15:10:59 +02:00
Gabriele M 4faf0e3ab5 Doze: Perform operations as current user
* System processes should use the 'AsUser' variant of some methods

Change-Id: Ic2457950b1f0e9f29f4fb06ef38f00dd919ad8f7
2017-10-21 15:10:59 +02:00
Mister Oyster 2387037ae6 Revert: squashed reverts to make Doze&Ambiant Display work properly
Revert "doze: Protect com.android.systemui.doze.pulse"
Revert "doze: Set different timings for wave and pocket detection"
Revert "doze: Cleanup"
Revert "Doze: Perform operations as current user"
2017-08-21 14:58:58 +02:00
Gabriele M 133c5dd5e5 doze: Protect com.android.systemui.doze.pulse
As stated in ActivityManagerService:

  The vast majority of broadcasts sent from system internals
  should be protected to avoid security holes

Change-Id: I1dc989d9d132d40835ca8dbf277285eb88e30a58
2017-04-07 15:44:51 +02:00
Michael W 5b7328893f doze: Set different timings for wave and pocket detection
* One second is a little bit short for pocket

Change-Id: Id27bba6f01a3a4d54ae9096fae87505f38ee5062
2017-04-07 15:44:13 +02:00
Michael W 141b9058ff doze: Cleanup
* Remove unneccessary newlines
 * Remove redundancy
 * Remove unused variables and imports
 * Make variables local when sufficient

Change-Id: I48f5dfc24275388f1deb31dc27716ed75aae898e
2017-04-07 15:43:52 +02:00
Gabriele M a9de76965d Doze: Perform operations as current user
* System processes should use the 'AsUser' variant of some methods

Change-Id: Ic2457950b1f0e9f29f4fb06ef38f00dd919ad8f7
2017-04-07 15:41:18 +02:00
Mister Oyster 16e6bbbc2e initial commit 2017-02-05 19:57:35 +01:00