* Use Theme.SubSettingsBase for theme
* Replace PreferenceActivity with CollapsingToolbarBaseActivity
* Add Titles to preference screen
* Remove onOptionsItemSelected and where necessary move to activity
Change-Id: Ic879ce61d83a33da12829008a4336c8a23230d63
Signed-off-by: SamarV-121 <samarvispute121@pm.me>
Signed-off-by: Bruno Martins <bgcngm@gmail.com>
Maybe it is just a leftover, but these permissions are certainly
not needed for the current doze implementation.
Change-Id: I9bc83eee591e0a8c258a5fa8b8443652729aeaa4
* Fixes non-working pulse notifications from sensors until user toggles
the main switch and also sets the proper initial status of the
AoD preference for the devices that have the feature available.
Signed-off-by: Henrique Silva <jhenrique09.mcz@hotmail.com>
Change-Id: I8e554decca3734b165fdc722d904d90713666db9
* There's no need to manually write to the gestures prefs
as long we are sure the handler is run after we return true
in the onPreferenceChangeListner
Change-Id: I090c0c6c91267aff69c45365b95b5f5e26d07b07
* This makes the always on display mode feature visible for those
devices that explicitly set it as available via AOSP overlay.
Should only be enabled on devices where the display has been tuned
to be power efficient in DOZE and/or DOZE_SUSPEND states.
Change-Id: If543936f9421dd7a6c0be594f7cb76afb227e34b
Replicate what Google did for SystemUI in this commit.
fabc743bcf
Registering a sensor seems to be an expensive operation,
and we do it on each screen-on event, so moving it to
an asynchronous task looks like a good idea anyway.
By moving all non-essential binder calls of the main thread or to the
next frame, we bring this down to 5ms, such that window animation
and Keyguard animation starts about at the same time.
The interesting part about the ExecutorService:
"Memory consistency effects: Actions in a thread prior to the submission
of a Runnable or Callable task to an ExecutorService happen-before any
actions taken by that task, which in turn happen-before the result is
retrieved via Future.get()."
(from https://developer.android.com/reference/java/util/concurrent/ExecutorService)
Change-Id: I4f37bb9a7dc9d7775d587d4ebd4b6619f3b77e81
* Introduce a main switch to actually enable/disable doze globally
* Move preferences handling out of SamsungDozeService class and
create Utils class to hold all helper methods.
Change-Id: Idb40650296d50352b4a985d2068f14cda6cb4aaf
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.
Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.
Bug: 73535841
Change-Id: Iabb0556dc1c80c7fc7f6c76d61d5e441b03cdce0
* Apply the default Oreo theme and inherit the layouts
from Google for the Settings app, in order to keep
UI consistency.
* Get rid of SettingsDrawerActivity as it no longer fits in
and include the back button in the action bar.
* Kill the icon drawable not only because is a leftover,
but also doesn't really serve any puropose in the new UI.
Change-Id: I71ea2c118dcfd387904d04516572902babb16e35
Should fix this:
W/ContextImpl(3700): Calling a method in the system process without a qualified user:
android.app.ContextImpl.sendBroadcast:877
android.content.ContextWrapper.sendBroadcast:421
com.cyanogenmod.settings.device.SamsungDozeService.launchDozePulse:151
com.cyanogenmod.settings.device.SamsungDozeService.-wrap1:-1
com.cyanogenmod.settings.device.SamsungDozeService$SamsungProximitySensor.onSensorChanged:81
Change-Id: I680a57c9010d06719c3bd014001b00353f8e12fd
As stated in ActivityManagerService:
The vast majority of broadcasts sent from system internals
should be protected to avoid security holes
Change-Id: I1dc989d9d132d40835ca8dbf277285eb88e30a58
As of commit 8cd28f3bce5612d35c4b6196554c7e2846057310,
this app no longer lives on the Settings dashboard.
This reverts commit a75b016e61ef544abdadf4c5e7a508c04b18c8dc.
Change-Id: If5b1fa89ddcc9de3c93217ef79189ad9ebd5193d
Reduce the clutter on the dashboard and move the ambient display
settings to where it belongs - in the display settings.
Change-Id: Ib08cc799e9f58884465b1730ce794cbc8be080f9
* Use SecureSettingSwitchPreference for Ambient Display
* Use the XML preference dependency attribute
Change-Id: I3480af71e334110aed834a53f49b33a853f16316
* Translations moved to the new project
android_packages_resources_devicesettings
Change-Id: I06536915e1963a2fe464c3d6c46dd8728aba0cb4
Signed-off-by: Adrian DC <radian.dc@gmail.com>
Currently, the preference titles are very vague and confusing,
with no way for the user to understand what the preferences
do at a glance (e.g. in Settings search).
Make the purpose of the preferences more explicit through the titles.
Also, the current drawable is colored white, when it should be
colored green. This results in a near-invisible icon in the
Settings search results.
Color the drawable the appropriate teal instead.
Change-Id: I2dac9a73e8689f14d676b41922e0eba364c6500f
Bring this up to speed on the Settings changes in N:
* Use support libs for preferences
* Hook up to Settings drawer through SettingsDrawerActivity
Change-Id: I9365b3ebd1bbfed2936302e30da50e3f9af06665
Starting N, top-level Settings activities should a drawer menu up
on the action bar. Remove the up/back button as it is now obsolete.
This reverts commit 5cfd7e76cf8099ebd22f4580cac8ed2217c3ead4.
Change-Id: I07af4c08a12bafbef424d01f62521cf226abbc2f
The gestures settings are the only settings on the
main screen to contain a summary line, and it looks
extremely out of place.
Change-Id: I2cacef71e8db204ab4380f77d9282009e0e5df03
Signed-off-by: KhasMek <Boushh@gmail.com>
Previously attempted fix at review.cyanogenmod.org/#/c/104083/
The timestamp isn't in the future, that would be impossible.
The real issue is the timestamp from the SensorEvent is a true
timestamp, the System.nanoTime is nanoseconds since boot.
So the previous patch would always return false and never pulse.
I've simply changed it so that the wakeup call gets sent the current
System.nanoTime in milliseconds since boot so it does not think the
event came from the future since the wakeUp method expects
uptimeMillis, not true world time.
Change-Id: I78f5e9d61107caf9c3bf6c10fa7c5bb400082294
Prevents:
java.lang.IllegalArgumentException: event time must not be in the future
at android.os.Parcel.readException(Parcel.java:1550)
at android.os.Parcel.readException(Parcel.java:1499)
at android.os.IPowerManager$Stub$Proxy.wakeUp(IPowerManager.java:550)
at android.os.PowerManager.wakeUp(PowerManager.java:666)
at com.cyanogenmod.settings.device.SamsungDozeService$SamsungProximitySensor.shouldPulse(SamsungDozeService.java:95)
at com.cyanogenmod.settings.device.SamsungDozeService$SamsungProximitySensor.onSensorChanged(SamsungDozeService.java:75)
at android.hardware.SystemSensorManager$SensorEventQueue.dispatchSensorEvent(SystemSensorManager.java:405)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:143)
at android.os.Looper.loop(Looper.java:122)
at android.app.ActivityThread.main(ActivityThread.java:5289)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
Change-Id: I8ed248271d67216e531b124bf27101fa538f1195
Signed-off-by: Brandon McAnsh <brandon.mcansh@gmail.com>
* Allow user to disable ambient display from gesture panel
* Disable/enable doze settings based on ambient display state
Change-Id: I0ff7686ccc04037b3ada9a8355384ba6746cf30c
* Added custom service that uses proximity sensor in wake-up mode
to trigger display on
* If more sensor triggers are suitable to use, they can be added
to the service
Change-Id: Id0849fb5c17ff569d771a19cebfc579dc93dbc48