Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pixel Navbar, reverse engineered from smali.
Notes: - This is forcing the Pixel Home button on people, and it looks ugly with the other nav buttons being hollow - There MAY still be a few fixes yet to be found in this code because it WAS a big file to RE from smali. I have yet to find any, but time is the best tester. - Shoutout to @bigrushdog for providing a decompiled form used to verify the smali and as a guideline for the more obsure smali sections. It was a big help. - Tagging myself here to see adoption rate. @USA-RedDragon CarbonROM Edits: Strip out the different Navbar Icons. We use the AOSP ones, but add the Pixel features. Adjusted for R33s smaller navbar buttons. Fix landscape pixel animation view Cleanup pixel navbar code *cleaned up alot of leftovers from jadx and some else statements CarbonROM Edits: Strip out the different Navbar Icons. We use the AOSP ones, but add the Pixel features. fwb: Pixel Navbar: Hide opa when not pressed, also remove halo Since we use the AOSP Navbar Icon, that is transparent in the middle, we don't want the opa to always show. Instead, only show them when a press is getting executed (when they need to be shown for the animation). fadeInButton and fadeOutButton are based on this Stackoverflow answer: http://stackoverflow.com/a/22669115 Pixel navbar: allow disabling based on config Create new config_allowOpaLayout bool to allow themers to disable the Pixel Navbar Fixes the dreaded "yellow" home button...that doesn't exist for CarbonROM. Oh well, still useful! Pixel Navbar animation toggle [1/2] *made to work with the exposure for themers to disable navbar animation [1/2] Reload Pixel Home Animation without reboot @beanstown104 this shit hot fwb: Pixel Navbar: hide OPA after initialisation This fixes a certain case where the OPAs are not hidden in idle-state OpaLayout: setLandscape -> setVertical OpaLayout: fix logic behind setVertical PixelNavbar: Fixed to work with oreo PixelNavbar: Fix colors for light colored navbar OpaLayout: Evaluate intensity correctly - R.color.dark_mode_icon_color_single_tone already has reduced intensity. Calculating intensity from dark_mode_icon_color_single_tone and light_mode_icon_color_single_tone results in a much lighter shade on the home button. - Instead, evaluate color from intensity using black and white to have all icons display the same shade. Before: https://i.imgur.com/SwBjxYt.jpg After: https://i.imgur.com/tjFPEz0.jpg PixelNavbar: layout: Fix home button size - On 8.1, the home button appears larger than the other buttons in the navigation bar, with OpaLayout. - To the home button ImageView, Add top and bottom padding to fix size in portrait mode Add left and right padding to fix size in landscape mode - Also clean up while we're at it. Before: https://i.imgur.com/D1WB41o.jpg After: https://i.imgur.com/toAHDpS.jpg
- Loading branch information
1 parent
0ef8698
commit 29b2606
Showing
12 changed files
with
827 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape android:shape="ring" android:useLevel="false" android:innerRadius="@dimen/halo_inner_radius" android:thickness="@dimen/halo_thickness" | ||
xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<solid android:color="#ffffffff" /> | ||
<size android:height="@dimen/halo_diameter" android:width="@dimen/halo_diameter" /> | ||
</shape> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape android:shape="oval" | ||
xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<size android:height="@dimen/opa_dot_diam" android:width="@dimen/opa_dot_diam" /> | ||
<solid android:color="#ff4285f4" /> | ||
</shape> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape android:shape="oval" | ||
xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<size android:height="@dimen/opa_dot_diam" android:width="@dimen/opa_dot_diam" /> | ||
<solid android:color="#ff34a853" /> | ||
</shape> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape android:shape="oval" | ||
xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<size android:height="@dimen/opa_dot_diam" android:width="@dimen/opa_dot_diam" /> | ||
<solid android:color="#ffea4335" /> | ||
</shape> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape android:shape="oval" | ||
xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<size android:height="@dimen/opa_dot_diam" android:width="@dimen/opa_dot_diam" /> | ||
<solid android:color="#fffbbc05" /> | ||
</shape> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright (C) 2017 CarbonROM | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<resources> | ||
<!-- Allow Opa (Pixel navbar) layout --> | ||
<bool name="config_allowOpaLayout">true</bool> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
packages/SystemUI/src/com/google/android/systemui/Constants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.google.android.systemui; | ||
|
||
public class Constants { | ||
|
||
public static final String OPA_COMPONENT_NAME = "com.google.android.googlequicksearchbox/com.google.android.voiceinteraction.GsaVoiceInteractionService"; | ||
public static final String OPA_ENABLED = "OPA_ENABLED"; | ||
public static final String OPA_ENABLE_ACTION = "com.google.android.systemui.OPA_ENABLED"; | ||
|
||
} |
Oops, something went wrong.