Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doze mode through profiles #2

Open
wants to merge 10,000 commits into
base: donut
Choose a base branch
from
Open

doze mode through profiles #2

wants to merge 10,000 commits into from

Conversation

c3ph3us
Copy link

@c3ph3us c3ph3us commented Jan 31, 2016

@temasek temasek force-pushed the cm-13.0 branch 5 times, most recently from 961ae12 to b6ddd5c Compare February 5, 2016 02:37
@temasek temasek force-pushed the cm-13.0 branch 7 times, most recently from a41a41b to 07b24a9 Compare February 13, 2016 03:38
@temasek temasek force-pushed the cm-13.0 branch 2 times, most recently from 044b75c to 81b0777 Compare March 11, 2016 03:40
@temasek temasek force-pushed the cm-13.0 branch 6 times, most recently from b5b1c86 to 671688f Compare March 21, 2016 00:47
@temasek temasek force-pushed the cm-13.0 branch 4 times, most recently from 52fa1b4 to 3e7e92c Compare April 1, 2016 10:27
@temasek temasek force-pushed the cm-13.0 branch 4 times, most recently from 49c2807 to 1d95e68 Compare April 8, 2016 11:38
SpiritCroc and others added 6 commits August 3, 2016 08:15
- Add setting to disable sidebar without removing items
- Queue apps to launch on recents close by swiping icons left/right
- Add setting to not open simultaneously with recents in order to reduce recents lag when opening

Change-Id: I3ec2c740d0dc35eb58089c6ea000f35dc843c542
Ticket: CYNGNOS-3233

Change-Id: I40dae6b6fd1da497024965469fea0adc78a661c3
Signed-off-by: Roman Birg <[email protected]>
Change-Id: I659e6270058d02fdd894b8242a6375b1a13237df

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
Some devices can't keep up on a single thread trying
to decode & display the frames at a high frame rate. This is
observed if the sleep delay between frames is negative:

01-02 04:29:25.114   530   542 D BootAnimation: 63, -22
01-02 04:29:25.176   530   542 D BootAnimation: 61, -20
01-02 04:29:25.248   530   542 D BootAnimation: 72, -30
01-02 04:29:25.315   530   542 D BootAnimation: 66, -24
01-02 04:29:25.381   530   542 D BootAnimation: 66, -24

To mitigate this, take advantage of multiple cores by decoding on
n cores and caching up to m images.  This keeps the memory footprint
small(ish) while still giving the best chance to maintain a
constant frame rate.

I measured boot time and fps for each animation part before
and after the change on an msm8909 with 1.5 GB RAM:

single thread:
01-02 04:40:45.826   540   556 I BootAnimation: fps = 22.40
01-02 04:40:49.457   540   556 I BootAnimation: fps = 13.22
01-02 04:40:51.464   540   556 I BootAnimation: fps = 23.92
01-02 04:41:19.375   540   556 I BootAnimation: fps = 22.89
01-02 04:41:23.942   540   556 I BootAnimation: fps = 15.55

  boot time: 51.05s

multi thread:
01-02 04:38:55.148   526   551 I BootAnimation: fps = 22.56
01-02 04:38:57.205   526   551 I BootAnimation: fps = 23.39
01-02 04:38:59.249   526   551 I BootAnimation: fps = 23.92
01-02 04:39:29.196   526   551 I BootAnimation: fps = 23.16
01-02 04:39:32.186   526   551 I BootAnimation: fps = 23.79

  boot time: 50.50s

Need to test the affect on boot time with an animation that doesn't
cache the textures as much as this to see the real effect.

Change-Id: If7464dc063b08a0bc33ee3f094028247b39650c1
…modate mediasize_default"

CYNGNOS-3238, HAM-1384

This reverts commit 10a63e4.

Change-Id: Ic13bdd51e059b4e66674fdbe6e6da3c2779f6a38
google added security check when changing app permissions
to check for apps running with enabled draw over apps
(SYSTEM_ALERT_WINDOW) permission.

Since OmniSwitch is such an app it will always trigger this
and requires users to remove permissions before changing
app permissions. After that the permission must be added back.

Since this is a PITA add a config that will disable the check
This is reducing security against tapjacking so make it
clear to the user what it means to disable it

TODO: maybe add a even more prominent alert when
enabling the value

Change-Id: I7f1c047709a990e7b6f2aaafc9a25586f822ea92
- Breaks font theme service
This reverts commit 282c3a4294508a6cb21aee23779fb4173a4a5308.
romanbb and others added 10 commits August 9, 2016 08:18
TIcket: CYNGNOS-3242

Change-Id: I61ce295737471ca9bb59f45c616d626bbc4f7784
Signed-off-by: Roman Birg <[email protected]>
Change-Id: I2ffd5b1ee1b0a1645d07dd008b87cf13899adda8
Ticket: -
This reverts commit cdcd3e9c95a9aad8003c133de5b1dd31e45589d4.

Change-Id: I428848cbc95eac68fa656dd2ae81af33bf87be45
HWUI calculates the texture size as w*h*bpp. In some cases, the
calculated path cache is small, but the actual memory allocated
in driver is 4k/8k/16k, much bigger than HWUI calculates.

Example: a 5*65 alpha texture, HWUI think it is 5*65*1 = 325 bytes,
but driver allocates 8K. An app can allocates up to 32M path textures,
which actually consumes 32M*(8*1024/325) = 806M memory.

Here we add PROPERTY_TEXTURE_CACHE__ALIGNMENT to align HWUI cache
size with actual hardware allocated memory size. It can be changed
by property ro.hwui.texture_cache_alignment, defalut value is
16k. The number of path cache is limited by mMaxNum to avoid
occupying too much memory.

Change-Id: I890819b73bb0b7f63e96bc3d9d0ff9469c16838c
…pecified

After applying the theme which supports paletteback feature and if there is
no defaultSwatchColor specified then the background should go to the
original color. Instead in a particular FootballDemo theme the theme
would never get applied and just flood the logcat with null exceptions
for each and every app.

TICKET:CYNGNOS-2942

Change-Id: If2bd3d23ab5075dac1d8ff3f197cebc28c9c1f20
This reverts commit 94a4424.

Conflicts:
	services/core/java/com/android/server/policy/PhoneWindowManager.java
This lock isn't really needed because the proxy will return
false if the resolver package doesn't exist or throws a
remote exception.

Having this lock causes a deadlock between the PM and the app:

resolveIntent holds the PackageManagerService#mPackages lock and
then tries to lock on PackageMonitor#mLock.

Meanwhile, when packages change, LaodedApk holds onto the
PackageMonitor#mLock and then tries to query the intent services and
tries to lock on PackageManagerService#mPackages.

Relevant traces below:
"Binder_4" prio=5 tid=60 Blocked
  | group="main" sCount=1 dsCount=0 obj=0x136f00a0 self=0x7f743d2a00
  | sysTid=949 nice=0 cgrp=default sched=0/0 handle=0x7f74b93440
  | state=S schedstat=( 1032333944 663457790 2968 ) utm=74 stm=29 core=3 HZ=100
  | stack=0x7f74a97000-0x7f74a99000 stackSize=1013KB
  | held mutexes=
  at com.android.server.ServiceWatcher.getBinder(ServiceWatcher.java:368)
  - waiting to lock <0x083e77c9> (a java.lang.Object) held by thread 9
  at org.cyanogenmod.platform.internal.AppSuggestProviderProxy.getService(AppSuggestProviderProxy.java:68)
  at org.cyanogenmod.platform.internal.AppSuggestProviderProxy.handles(AppSuggestProviderProxy.java:73)
  at org.cyanogenmod.platform.internal.AppSuggestManagerService$1.handles(AppSuggestManagerService.java:50)
  at cyanogenmod.app.suggest.AppSuggestManager.handles(AppSuggestManager.java:101)
  at com.android.server.pm.PackageManagerService.shouldIncludeResolveActivity(PackageManagerService.java:4704)
  - locked <0x0183dd64> (a android.util.ArrayMap)
  at com.android.server.pm.PackageManagerService.chooseBestActivity(PackageManagerService.java:4430)
  at com.android.server.pm.PackageManagerService.resolveIntent(PackageManagerService.java:4353)
  at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:628)
  at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:2754)
  at android.os.Binder.execTransact(Binder.java:453)

"android.bg" prio=5 tid=9 Blocked
  | group="main" sCount=1 dsCount=0 obj=0x12c04b80 self=0x7f84a7d800
  | sysTid=766 nice=10 cgrp=bg_non_interactive sched=0/0 handle=0x7f89b3f440
  | state=S schedstat=( 1237112536 3291977271 2848 ) utm=62 stm=61 core=2 HZ=100
  | stack=0x7f89a3d000-0x7f89a3f000 stackSize=1037KB
  | held mutexes=
  at com.android.server.pm.PackageManagerService.queryIntentServices(PackageManagerService.java:5405)
  - waiting to lock <0x0183dd64> (a android.util.ArrayMap) held by thread 60
  at android.app.ApplicationPackageManager.queryIntentServicesAsUser(ApplicationPackageManager.java:731)
  at com.android.server.ServiceWatcher.bindBestPackageLocked(ServiceWatcher.java:167)
  at com.android.server.ServiceWatcher.-wrap0(ServiceWatcher.java:-1)
  at com.android.server.ServiceWatcher$1.onPackageChanged(ServiceWatcher.java:321)
  - locked <0x083e77c9> (a java.lang.Object)
  at com.android.internal.content.PackageMonitor.onReceive(PackageMonitor.java:352)
  at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:882)
  at android.os.Handler.handleCallback(Handler.java:739)
  at android.os.Handler.dispatchMessage(Handler.java:95)
  at android.os.Looper.loop(Looper.java:148)
  at android.os.HandlerThread.run(HandlerThread.java:61)

Change-Id: Id4775ca4d12b6cf42bea97bd74e4c38d591a1cf3
* Pass app info and number of installed packages to boot message UI
* Ui by Asher and Joey, based on Alexander's previous work

Change-Id: I9ec9d0cb0e20a9bac73e126f6b6f3965400f05e7

Conflicts:
	services/core/java/com/android/server/policy/PhoneWindowManager.java
temasek and others added 9 commits August 12, 2016 16:11
When using a custom launcher, like Nova, it is possible to set a
gesture to open the status bar pulldown. It does not open at the
same speed as when using a finder to pull down from the top
of the screen at the status bar. This fixes that.

Change-Id: If3f14f14ef5ed4f14495472d0335cb11d743a5a1
Change-Id: I599894bfd30ff9d78253482981737fc8a440a826
Ticket: -
[Procedures]
1. Go to Settings->Date&Time
   Set time backwards, eg. 2016.6.15 -> 2016.6.10

2. Tap recent apps button to show recent activities.
   There will be no activities shown.

Change-Id: Ifd860c0d08fac49f9d3c8eac590b6db9e6afb09d
Change-Id: Ie2249610e3a46c57e0d2bef629d5d4eaeb26fcdb
The proxy MidiReceiver in the USB device was not forwarding the flush
command to the event scheduler.

Bug: 25511696
Change-Id: I6a4759b71bc8f9ae3e20aed1238f62a2ed405e24
Signed-off-by: Phil Burk <[email protected]>
commit efa6f355b06675aa4d0879fd279e22c16d5c046c
Author: Mikhail Naganov <[email protected]>
Date:   Wed Aug 10 12:25:13 2016 -0700

    MIDI: Use server-side socket in blocking mode for virtual devices

    Since virtual MIDI servers may misbehave, blocking mode will throttle
    them if clients are not coping with their sending speed.

    Bug: 29413812
    Change-Id: I9c4a2a7a7ea3ea060c93fedc7d0f033427c557c9

commit 755dfb5f83749d3963c63d98d692307f8271c804
Author: Mikhail Naganov <[email protected]>
Date:   Fri Jul 8 13:26:19 2016 -0700

    Protect MIDI framework against client blocks in MidiReceiver.onSend

    Make the server-side socket non-blocking when creating MidiOutputPort
    for clients. Thus if a client ceases to read from its side of the
    socket pair, the server will just fail to write instead of blocking.

    One drawback is that the MidiOutputPort on the client can't indicate
    that it has become dysfunctional, but it's not possible without
    changing the API.

    Bug: 29413812
    Change-Id: I9dfcbdd214a815cea8fd1365324fd78ca459268a

commit c740b13953761f58233ac651a0b5227733b1bdcc
Author: Mikhail Naganov <[email protected]>
Date:   Fri Jun 17 04:11:25 2016 -0700

    UsbMidiDevice: Clean up terminology and fix comments

    When working with physical MIDI devices, an *input* stream is used
    for reading from *output* port of the device, and vice versa. Thus,
    using "input" and "output" without specifying whether it's a stream
    or a port is confusing.

    Clarify names of counter variables, and fix a couple of comments
    that were incorrect due to this confusion. No functional changes.

    Change-Id: If561eaca4bade94e9296d2c703c9fcebc91296e2

commit 4269c6417287737624f6165a8bbeb5aa427de9a0
Author: Glenn Kasten <[email protected]>
Date:   Thu May 5 18:49:16 2016 -0700

    Update MIDI package summary

    Bug: 28625060
    Change-Id: If552ca8e1a0666d402b5f536699bf3fb09c1e324

commit 862d40b73168bde7d0be5280d997985c18061014
Author: Phil Burk <[email protected]>
Date:   Tue Apr 19 15:56:24 2016 -0700

    MidiDevice: do not open ports on closed device

    Fix involves client side mIsDeviceClosed flag.

    Bug: 24949216
    Change-Id: I666284a787fbb9a710d2372fb424e8e54f6a2825
    Signed-off-by: Phil Burk <[email protected]>

commit 6f1de358b9f2616e03f4655f01454770915ddd66
Author: Phil Burk <[email protected]>
Date:   Mon Apr 18 16:05:28 2016 -0700

    MidiService: fix resource leak

    The proxy object was being used to match when adding or removing objects.
    But they are different each time. So now we use an asBinder() object.

    Bug: 28153736
    Change-Id: I1bccebf1e9464668db757ff08b41902d0cf0e3a7
    Signed-off-by: Phil Burk <[email protected]>

commit f7386bd535bb8a1d7f8df8f44a1748ab770c991a
Author: Phil Burk <[email protected]>
Date:   Tue Apr 5 14:19:53 2016 -0700

    MidiDevice: fix connectPorts for same Process

    If connectPorts() was called for a device in the same process then
    the connection would die when the ParcelFileDescriptor was closed.

    Bug: 26406775
    Change-Id: Id0538452593b4761ac2a93d366ade76d2e35ce73
    Signed-off-by: Phil Burk <[email protected]>

Change-Id: I4dfc2a2cbaf04bf1a790ae2cb39bf74fb5bb16ac
When system comes back from idle state, GpsLocationProvider
invokes startNavigating() even when GPS is turned off in
settings.

Change-Id: Ie6dbf60a743cce429ab83876a3cb80f7e4b0e0f6
CRs-Fixed: 1022372

Patchset: 1
http://review.cyanogenmod.org/#/c/157438/
XXMrHyde added a commit to DarkKat-Rom/android_frameworks_base that referenced this pull request Mar 9, 2017
Included:

Commit zsol#1:
Add SlimRoms Recents app screen, (wip) (1/2):
22f78a4

Based on SlimRoms:
Pulled out from "Slim framework":
https://github.com/SlimRoms/frameworks_opt_slim

Included additions by SlimRoms:
- Option to use Slim- or Android recents
- Option to show running tasks only
- Option to show the panel on the left edge of the sreen,
  (on the right edge on rtl languages)
- Panel scale
- Favorites
- Card expanded mode
- Option to show the topmost task, too
- Panel background color
- Card background color
- App title text color

DarkKat additions/changes:
- Header icon color, (disabled for now)
- Disable panel background color for now
- Disable card background color for now
- Disable app title text color for now
- Fixed default header icon colors,
  (colors are related to the header background,
  light colored icons on dark colored backgrounds
  dark colored icons on light colored backgrounds)

TO-DO:
- Enable custom colors
- Add day/night theme support

Commit zsol#2:
SlimRoms Recents app screen part 2, (wip) (1/2):
(day/night themes support, custom colors)
ad91d5d

- Add day/night theme support
- Option to use theme or custom colors
- Change card background color to the app activity primary color,
  (when available)
- Enable custom panel background color
- Add custom panel empty icon color
- Enable custom card background color
- Add custom card header background color
- Add custom card header activated background color
- Enable custom card header text color
- Enable custom card header icon color

Default colors (Use theme colors enabled):
- Panel background color:
  - 0x80000000 (translucent black)
- Panel empty icon color:
  - 0xbffffff, "secondary text material dark", (default for "normal icon state")
- Card background color:
  - Uses the app activity primary color when available,
    otherwise the "background floating material" color of the current general theme
- Card header background color:
  - Uses the app activity primary color when available,
    otherwise the "background floating material" color of the current general theme
- Card header activated background color:
  - Uses a darker/lighter version of the Card header background color
- Card header text color:
  - Uses the matching "primary text material" color,
    (related to the Card header background color)
- Card header icon color:
  - Uses the matching "secondary text material" color, (default for "normal icon state")
    (related to the Card header background color)

Default colors (Use theme colors disabled):
- Panel background color:
  - 0x80000000 (translucent black)
- Panel empty icon color:
  - 0xbffffff, "secondary text material dark", (default for "normal icon state")
- Card background color:
  - Uses the "background floating material" color of the current general theme
- Card header background color:
  - Uses the "background floating material" color of the current general theme
- Card header activated background color:
  - Uses a darker/lighter version of the Card header background color
- Card header text color:
  - Uses the "primary text material" color, of the current general theme
- Card header icon color:
  - Uses the "secondary text material" color of the current general theme,
    (default for "normal icon state")

TO-DO:
- Use "real cards", (these cards are something between cards and tiles):
  - Use rounded corners
  - Overwork the "header only" layout
    - Use collapsed cards
- Add a frame to the expanded card thumbnail,
  (the thumbnail should be always visible as an additional element)
- Use the CardView class from the support library for the cards

Commit zsol#3:
SlimRoms Recents app screen part 3, (wip) (1/2):
74f6c3a

- Change day theme panel background color:
  - Translucent white (#80ffffff)
- Change day theme panel empty icon color:
  - Text color secondary, (default for dark icons on light backgrounds) (#8a000000)
- Remove header background color
- Remove header activated background color
- Remove header icon color
- Add action icon color
- Add action ripple color

- Remove scale factor
- Add thumbnail aspect ratio:
  - 1 : 1
  - 5 : 4
  - 4 : 3
  - 16 : 9
- Use Support CardView library instead of Cards library
- Place actions in an action bar at the card bottom instead of the header reached via long click
  (the action bar will be shown even when the card is collapsed)
- Add a frame to the expanded card thumbnail
- Add Settings changes (colors, theme, options, ...) directly, instead of rebuilding the recents screen

TO-DO:
- Add an option to hide the action bar when the card is collapsed,
  (possibly also a header long click action to show/hide the action bar)
- Add an option to use the app activity primary color for the card background in general,
  to have the same behavior when using theme or custom colors

Commit #4:
SlimRoms Recents app screen part 4, (wip) (1/2):
61ecac7

- Add an general option to auto colorize the cards,
  when enabled and the related activity contains a primary color, this color will
  be used as the card background color,
  all other card colors, (text, icon and ripple) will be set,
  related to the card background, automatically,
  (dark text, - icons and - ripple on light backgrounds and vise versa)
  this is the same behavior which was used before, when "use theme colors" for recents whas enabled.

- Show/hide the card actions when the card is collapsed,
  the actions are always be visible when the card is expanded,
  when the card is collapsed, the actions can be shown/hidden on header long click,
  the actions visibility states will be stored per card during the session,
  (similar to the card expanded states)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.