diff --git a/vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/navigationbar/ b/vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/navigationbar/
index 59bb227..ed9e3fc 100644
--- a/vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/navigationbar/
+++ b/vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/navigationbar/
@@ -68,6 +68,8 @@ public class NavigationBarInflaterView extends FrameLayout
public static final String RIGHT = "right";
public static final String CONTEXTUAL = "contextual";
public static final String IME_SWITCHER = "ime_switcher";
+ public static final String POWER = "power";
+ public static final String VOLUME = "volume";
public static final String GRAVITY_SEPARATOR = ";";
public static final String BUTTON_SEPARATOR = ",";
@@ -387,6 +389,10 @@ public class NavigationBarInflaterView extends FrameLayout
v = (.home_handle, parent, false);
} else if (IME_SWITCHER.equals(button)) {
v = (.ime_switcher, parent, false);
+ } else if((button)) {
+ v = (, parent, false);
+ } else if((button)) {
+ v = (, parent, false);
} else if ((KEY)) {
String uri = extractImage(button);
int code = extractKeycode(button);
diff --git a/vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/navigationbar/ b/vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/navigationbar/
index 3fc9afe..11d9e7f 100644
--- a/vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/navigationbar/
+++ b/vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/navigationbar/
@@ -92,7 +92,7 @@ import ;
/** */
public class NavigationBarView extends FrameLayout {
- final static boolean DEBUG = false;
+ final static boolean DEBUG = true;
final static String TAG = "NavBarView";
final static boolean ALTERNATE_CAR_MODE_UI = false;
@@ -119,6 +119,9 @@ public class NavigationBarView extends FrameLayout {
private Context mLightContext;
private int mLightIconColor;
private int mDarkIconColor;
+ private KeyButtonDrawable mPowerIcon;
+ private KeyButtonDrawable mVolumeIcon;
+
private EdgeBackGestureHandler mEdgeBackGestureHandler;
private final DeadZone mDeadZone;
@@ -316,6 +319,8 @@ public class NavigationBarView extends FrameLayout {
(.ime_switcher, imeSwitcherButton);
(.accessibility_button, accessibilityButton);
(.menu_container, mContextualButtonGroup);
+ (, new ButtonDispatcher());
+ (, new ButtonDispatcher());
mDeadZone = new DeadZone(this);
}
@@ -412,6 +417,14 @@ public class NavigationBarView extends FrameLayout {
return (.accessibility_button);
}
+ public ButtonDispatcher getPowerButton() {
+ return ();
+ }
+
+ public ButtonDispatcher getVolumeButton() {
+ return ();
+ }
+
public RotationContextButton getRotateSuggestionButton() {
return (RotationContextButton) (.rotate_suggestion);
}
@@ -456,6 +469,8 @@ public class NavigationBarView extends FrameLayout {
if (orientationChange || densityChange || dirChange) {
mBackIcon = getBackDrawable();
}
+ mPowerIcon = getDrawable(.ic_power);
+ mVolumeIcon = getDrawable(.ic_volume);
}
/**
@@ -594,11 +609,15 @@ public class NavigationBarView extends FrameLayout {
KeyButtonDrawable backIcon = mBackIcon;
orientBackButton(backIcon);
KeyButtonDrawable homeIcon = mHomeDefaultIcon;
+ KeyButtonDrawable powerIcon = mPowerIcon;
+ KeyButtonDrawable volumeIcon = mVolumeIcon;
if (!mUseCarModeUi) {
orientHomeButton(homeIcon);
}
getHomeButton().setImageDrawable(homeIcon);
getBackButton().setImageDrawable(backIcon);
+ getPowerButton().setImageDrawable(powerIcon);
+ getVolumeButton().setImageDrawable(volumeIcon);
updateRecentsIcon();
@@ -652,6 +671,8 @@ public class NavigationBarView extends FrameLayout {
getHomeButton().setVisibility(disableHome ? : );
getRecentsButton().setVisibility(disableRecent ? : );
getHomeHandle().setVisibility(disableHomeHandle ? : );
+ getPowerButton().setVisibility(false ? : );
+ getVolumeButton().setVisibility(false ? : );
notifyActiveTouchRegions();
}
@@ -1122,6 +1143,8 @@ public class NavigationBarView extends FrameLayout {
dumpButton(pw, "back", getBackButton());
dumpButton(pw, "home", getHomeButton());
+ dumpButton(pw, "volume", getVolumeButton());
+ dumpButton(pw, "power", getPowerButton());
dumpButton(pw, "handle", getHomeHandle());
dumpButton(pw, "rcnt", getRecentsButton());
dumpButton(pw, "rota", getRotateSuggestionButton());
diff --git a/vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/navigationbar/ b/vendor/mediatek/proprietary/packages/apps/Syst
emUI/src/com/android/systemui/navigationbar/
index 91b01ef..9634cb0 100644
--- a/vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/navigationbar/
+++ b/vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/navigationbar/
@@ -1787,11 +1787,15 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
Region region = new Region();
Map<View, Rect> touchRegionCache = ();
updateButtonLocation(
+ region, touchRegionCache, (), inScreenSpace, useNearestRegion);
+ updateButtonLocation(
region, touchRegionCache, (), inScreenSpace, useNearestRegion);
updateButtonLocation(
region, touchRegionCache, (), inScreenSpace, useNearestRegion);
updateButtonLocation(region, touchRegionCache, (), inScreenSpace,
useNearestRegion);
+ updateButtonLocation(
+ region, touchRegionCache, (), inScreenSpace, useNearestRegion);
updateButtonLocation(region, touchRegionCache, (), inScreenSpace,
useNearestRegion);
updateButtonLocation(