{"push_id":580705644,"size":1,"distinct_size":1,"ref":"refs/heads/android-5.0","head":"db1a7e60e2106eb2be57bf1aaf00ef66edff4135","before":"7046fdce28885ca82db861a05d91093860288b49","commits":[{"sha":"db1a7e60e2106eb2be57bf1aaf00ef66edff4135","author":{"email":"b44c3c00f729ff9a25e5772e0ccf5ae571531fb0@gmail.com","name":"Yanuar Harry"},"message":"[1/3] base: Implement ambient display as Active Display\n\nCurrently Ambient Display fully support if device has\n  Significant motion sensor and wake gesture sensor\n\nwith this change allow Ambient Display to work like\n    Active Display\n\n-- Allow wake up using shake event\n-- use different class to manage sensor\n\nenable this via overlay custom_config.xml\n\ninside Frameworks base\n\n    <!-- Doze: force using accelerometer as pick up sensor -->\n    <bool name=\"config_dozeUseAccelerometer\">false</bool>\n\ninside System UI\n\n    <!-- Doze: shake accelerometer threshold -->\n    <integer name=\"doze_shake_accelerometer_threshold\">10</integer>\n\nalso dont forget to setup other value for Ambient Display\n\nsee https://gerrit.omnirom.org/10140\n\nPS. 12 : prepare for user configurations\n\n<!------------------------------------------------------------>\n\nNOTE:\n   Shake event aka Wake up will not triggered until\n   Proximity is Covered (need to put inside pocket)\n\n   for shake accelerometer, you must setup based on your device\n   each device has different threshold\n\n<!------------------------------------------------------------>\n\nNOTE 2 :\n\n   you can also overwrite all value for Ambient Display inside BUILD.PROP\n   but i recommend only overwrite value from overlay fw base and system Ui\n\n   example value inside BUILD.PROP :\n\n   <!-- Doze: does this device support STATE_DOZE and STATE_DOZE_SUSPEND?  -->\n   doze.display.supported=true\n\n   <!-- Doze: pulse parameter - how long does it take to fade in? -->\n   doze.pulse.duration.in=1000\n\n   <!-- Doze: pulse parameter - once faded in, how long does it stay visible? -->\n   doze.pulse.duration.visible=3000\n\n   <!-- Doze: pulse parameter - how long does it take to fade out? -->\n   doze.pulse.duration.out=1000\n\n   <!-- Doze: should notifications be used as a pulse signal? -->\n   doze.pulse.notifications=true\n\n   <!-- Doze: when to pulse after a buzzworthy notification arrives -->\n   doze.pulse.schedule=1s,10s,30s,60s,120s\n\n   <!-- Doze: maximum number of times the notification pulse schedule can be reset -->\n   doze.pulse.schedule.resets=3\n\n   <!-- Doze: shake accelerometer threshold -->\n   doze.shake.acc.threshold=10\n\n   <!-- Doze: force using accelerometer as pick up sensor -->\n   doze.use.accelerometer=true\n\n<!------------------------------------------------------------>\n\nWith this change now we have 3 mode :\n\n    1. pocket mode = proximity enabled after screen off, if detect NEAR state (covered by hand or somethings), doze will disable\n          until FAR state (uncovered), if FAR state is triggered, Doze will appears.\n\n    2. pulse mode = doze is triggered by notifications, and so after notifications arrive, doze will show up, and doze will setup\n          time to show again (see doze.pulse.schedule=1s,10s,30s,60s,120s inside config.xml) and reset after see doze.pulse.schedule.resets=3\n    pulse mode by default is already there if device is support ambient display (e.g nexus 6), so there is no change in the code\n    (still using original code logic)\n\n    3. shake mode = enabled after proximity detect FAR state (pocket mode) or Doze is triggerd by notifications (pulse mode), and disabled\n          if proximity detect NEAR state, or user already shake\n\n<!------------------------------------------------------------>\n\nFeature describes:\n    1. Full mode (pocket,shake,pulse)\n    2. Pocket and shake only\n    3. Pocket and pulse only\n    4. Pocket only\n    5. Shake and pulse only\n    6. Pulse only (default)\n\n<!------------------------------------------------------------>\n\nNote :\n    Shake mode only enabled after Doze is triggered by proximity or notifications (depends on option)\n    so if doze not triggered by that, shake mode will stay disabled.\n\n<!------------------------------------------------------------>\n\nChange-Id: I6e1d634c9c8b1c3d3ac938c572d9f79902e6e9e5","distinct":true,"url":"https://api.github.com/repos/omnirom/android_frameworks_base/commits/db1a7e60e2106eb2be57bf1aaf00ef66edff4135"}]}