summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationNotificationPanelAction.java50
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationPrototypeController.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java18
-rw-r--r--packages/overlays/Android.mk31
-rw-r--r--packages/overlays/ExperimentNavigationBarLarge56Overlay/Android.mk (renamed from packages/overlays/ExperimentNavigationBarSlim24Overlay/Android.mk)4
-rw-r--r--packages/overlays/ExperimentNavigationBarLarge56Overlay/AndroidManifest.xml (renamed from packages/overlays/ExperimentNavigationBarSlim24Overlay/AndroidManifest.xml)4
-rw-r--r--packages/overlays/ExperimentNavigationBarLarge56Overlay/res/values/config.xml (renamed from packages/overlays/ExperimentNavigationBarSlim24Overlay/res/values/config.xml)8
-rw-r--r--packages/overlays/ExperimentNavigationBarLarge56Overlay/res/values/strings.xml (renamed from packages/overlays/ExperimentNavigationBarSlim24Overlay/res/values/strings.xml)2
-rw-r--r--packages/overlays/ExperimentNavigationBarLarge64Overlay/Android.mk30
-rw-r--r--packages/overlays/ExperimentNavigationBarLarge64Overlay/AndroidManifest.xml27
-rw-r--r--packages/overlays/ExperimentNavigationBarLarge64Overlay/res/values/config.xml28
-rw-r--r--packages/overlays/ExperimentNavigationBarLarge64Overlay/res/values/strings.xml22
-rw-r--r--packages/overlays/ExperimentNavigationBarSlim24Overlay/res/values-en-rXC/strings.xml23
14 files changed, 219 insertions, 38 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
index 8bf1c58df699..02683c16d935 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -158,6 +158,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
private NavigationBackAction mBackAction;
private QuickSwitchAction mQuickSwitchAction;
private NavigationAssistantAction mAssistantAction;
+ private NavigationNotificationPanelAction mNotificationPanelAction;
/**
* Helper that is responsible for showing the right toast when a disallowed activity operation
@@ -374,6 +375,10 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
mAssistantAction = new NavigationAssistantAction(this, mOverviewProxyService,
assistManager);
}
+ if (mNotificationPanelAction == null) {
+ mNotificationPanelAction = new NavigationNotificationPanelAction(this,
+ mOverviewProxyService, panel);
+ }
if (mGestureHelper instanceof QuickStepController) {
((QuickStepController) mGestureHelper).setComponents(this);
updateNavigationGestures();
@@ -406,6 +411,8 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
return mQuickSwitchAction;
case NavigationPrototypeController.ACTION_ASSISTANT:
return mAssistantAction;
+ case NavigationPrototypeController.ACTION_EXPAND_NOTIFICATION:
+ return mNotificationPanelAction;
case NavigationPrototypeController.ACTION_NOTHING:
return null;
default:
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationNotificationPanelAction.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationNotificationPanelAction.java
new file mode 100644
index 000000000000..6c7870dccd27
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationNotificationPanelAction.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * 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.
+ */
+
+package com.android.systemui.statusbar.phone;
+
+import android.annotation.NonNull;
+import android.view.MotionEvent;
+
+import com.android.systemui.recents.OverviewProxyService;
+
+/**
+ * Triggers notification panel to be expanded when executed
+ */
+public class NavigationNotificationPanelAction extends NavigationGestureAction {
+ private final NotificationPanelView mPanelView;
+
+ public NavigationNotificationPanelAction(@NonNull NavigationBarView navigationBarView,
+ @NonNull OverviewProxyService service, @NonNull NotificationPanelView panelView) {
+ super(navigationBarView, service);
+ mPanelView = panelView;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return true;
+ }
+
+ @Override
+ public boolean disableProxyEvents() {
+ return true;
+ }
+
+ @Override
+ public void onGestureStart(MotionEvent event) {
+ mPanelView.expand(true);
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationPrototypeController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationPrototypeController.java
index f762a6a68ad6..f4f86eb3e6eb 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationPrototypeController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationPrototypeController.java
@@ -41,7 +41,7 @@ public class NavigationPrototypeController extends ContentObserver {
@Retention(RetentionPolicy.SOURCE)
@IntDef({ACTION_DEFAULT, ACTION_QUICKSTEP, ACTION_QUICKSCRUB, ACTION_BACK,
- ACTION_QUICKSWITCH, ACTION_NOTHING, ACTION_ASSISTANT})
+ ACTION_QUICKSWITCH, ACTION_NOTHING, ACTION_ASSISTANT, ACTION_EXPAND_NOTIFICATION})
@interface GestureAction {}
static final int ACTION_DEFAULT = 0;
static final int ACTION_QUICKSTEP = 1;
@@ -50,6 +50,7 @@ public class NavigationPrototypeController extends ContentObserver {
static final int ACTION_QUICKSWITCH = 4;
static final int ACTION_NOTHING = 5;
static final int ACTION_ASSISTANT = 6;
+ static final int ACTION_EXPAND_NOTIFICATION = 7;
private OnPrototypeChangedListener mListener;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java
index 9e91ab70e3de..d5d283c46b0a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java
@@ -281,7 +281,8 @@ public class QuickStepController implements GestureHelper {
int xDiff = Math.abs(x - mTouchDownX);
int yDiff = Math.abs(y - mTouchDownY);
- boolean exceededSwipeHorizontalTouchSlop, exceededSwipeVerticalTouchSlop;
+ boolean exceededSwipeHorizontalTouchSlop, exceededSwipeVerticalTouchSlop,
+ exceededSwipeVerticalDragSlop;
int posH, touchDownH, posV, touchDownV;
if (isNavBarVertical()) {
@@ -289,6 +290,8 @@ public class QuickStepController implements GestureHelper {
yDiff > NavigationBarCompat.getQuickScrubTouchSlopPx() && yDiff > xDiff;
exceededSwipeVerticalTouchSlop =
xDiff > NavigationBarCompat.getQuickStepTouchSlopPx() && xDiff > yDiff;
+ exceededSwipeVerticalDragSlop =
+ xDiff > NavigationBarCompat.getQuickStepDragSlopPx() && xDiff > yDiff;
posH = y;
touchDownH = mTouchDownY;
posV = x;
@@ -298,6 +301,8 @@ public class QuickStepController implements GestureHelper {
xDiff > NavigationBarCompat.getQuickScrubTouchSlopPx() && xDiff > yDiff;
exceededSwipeVerticalTouchSlop =
yDiff > NavigationBarCompat.getQuickStepTouchSlopPx() && yDiff > xDiff;
+ exceededSwipeVerticalDragSlop =
+ yDiff > NavigationBarCompat.getQuickStepDragSlopPx() && yDiff > xDiff;
posH = x;
touchDownH = mTouchDownX;
posV = y;
@@ -309,11 +314,14 @@ public class QuickStepController implements GestureHelper {
mCurrentAction.onGestureMove(x, y);
} else {
// Detect gesture and try to execute an action, only one can run at a time
- if (exceededSwipeVerticalTouchSlop) {
+ if (exceededSwipeVerticalTouchSlop || exceededSwipeVerticalDragSlop) {
if (mDragVPositive ? (posV < touchDownV) : (posV > touchDownV)) {
- // Swiping up gesture
- tryToStartGesture(mGestureActions[ACTION_SWIPE_UP_INDEX],
- false /* alignedWithNavBar */, event);
+ // Swipe up gesture must use the larger slop
+ if (exceededSwipeVerticalTouchSlop) {
+ // Swiping up gesture
+ tryToStartGesture(mGestureActions[ACTION_SWIPE_UP_INDEX],
+ false /* alignedWithNavBar */, event);
+ }
} else {
// Swiping down gesture
tryToStartGesture(mGestureActions[ACTION_SWIPE_DOWN_INDEX],
diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk
new file mode 100644
index 000000000000..9fb330647d75
--- /dev/null
+++ b/packages/overlays/Android.mk
@@ -0,0 +1,31 @@
+# Copyright (C) 2019 The Android Open Source Project
+#
+# 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.
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := frameworks-base-overlays
+
+LOCAL_REQUIRED_MODULES := \
+ ExperimentNavigationBarFloatingOverlay \
+ ExperimentNavigationBarDefaultOverlay \
+ ExperimentNavigationBarSlimOverlay32 \
+ ExperimentNavigationBarSlimOverlay40 \
+ ExperimentNavigationBarLargeOverlay56 \
+ ExperimentNavigationBarLargeOverlay64 \
+ IconShapeSquareOverlay \
+
+include $(BUILD_PHONY_PACKAGE)
+
+include $(call first-makefiles-under,$(LOCAL_PATH))
diff --git a/packages/overlays/ExperimentNavigationBarSlim24Overlay/Android.mk b/packages/overlays/ExperimentNavigationBarLarge56Overlay/Android.mk
index 58cf134fd04d..3b3beab73520 100644
--- a/packages/overlays/ExperimentNavigationBarSlim24Overlay/Android.mk
+++ b/packages/overlays/ExperimentNavigationBarLarge56Overlay/Android.mk
@@ -17,14 +17,14 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_RRO_THEME := ExperimentNavigationBarSlim24
+LOCAL_RRO_THEME := ExperimentNavigationBarLarge56
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-LOCAL_PACKAGE_NAME := ExperimentNavigationBarSlimOverlay24
+LOCAL_PACKAGE_NAME := ExperimentNavigationBarLargeOverlay56
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE) \ No newline at end of file
diff --git a/packages/overlays/ExperimentNavigationBarSlim24Overlay/AndroidManifest.xml b/packages/overlays/ExperimentNavigationBarLarge56Overlay/AndroidManifest.xml
index aee543a0b23b..f1b64dfaf63e 100644
--- a/packages/overlays/ExperimentNavigationBarSlim24Overlay/AndroidManifest.xml
+++ b/packages/overlays/ExperimentNavigationBarLarge56Overlay/AndroidManifest.xml
@@ -16,11 +16,11 @@
*/
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.internal.experiment.navbar.slim24"
+ package="com.android.internal.experiment.navbar.large56"
android:versionCode="1"
android:versionName="1.0">
<overlay android:targetPackage="android"
- android:category="com.android.internal.experiment_navbar_slim24"
+ android:category="com.android.internal.experiment_navbar_larger56"
android:priority="1"/>
<application android:label="@string/experiment_navigationbar_overlay" android:hasCode="false"/>
diff --git a/packages/overlays/ExperimentNavigationBarSlim24Overlay/res/values/config.xml b/packages/overlays/ExperimentNavigationBarLarge56Overlay/res/values/config.xml
index 58c653d23e44..35b68dd5cc2d 100644
--- a/packages/overlays/ExperimentNavigationBarSlim24Overlay/res/values/config.xml
+++ b/packages/overlays/ExperimentNavigationBarLarge56Overlay/res/values/config.xml
@@ -18,11 +18,11 @@
-->
<resources>
<!-- Height of the bottom navigation / system bar. -->
- <dimen name="navigation_bar_height">24dp</dimen>
+ <dimen name="navigation_bar_height">56dp</dimen>
<!-- Width of the navigation bar when it is placed vertically on the screen -->
- <dimen name="navigation_bar_width">24dp</dimen>
+ <dimen name="navigation_bar_width">56dp</dimen>
<!-- Height of the bottom navigation / system bar frame; navigation buttons height. -->
- <dimen name="navigation_bar_frame_width">24dp</dimen>
+ <dimen name="navigation_bar_frame_width">56dp</dimen>
<!-- Width of the navigation bar frame when it is placed vertically on the screen -->
- <dimen name="navigation_bar_frame_height">24dp</dimen>
+ <dimen name="navigation_bar_frame_height">56dp</dimen>
</resources> \ No newline at end of file
diff --git a/packages/overlays/ExperimentNavigationBarSlim24Overlay/res/values/strings.xml b/packages/overlays/ExperimentNavigationBarLarge56Overlay/res/values/strings.xml
index 670bc5538474..80feb857d01b 100644
--- a/packages/overlays/ExperimentNavigationBarSlim24Overlay/res/values/strings.xml
+++ b/packages/overlays/ExperimentNavigationBarLarge56Overlay/res/values/strings.xml
@@ -18,5 +18,5 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Name of overlay [CHAR LIMIT=64] -->
- <string name="experiment_navigationbar_overlay">Slim Navigation Bar Experiment (24dp)</string>
+ <string name="experiment_navigationbar_overlay" translatable="false">Larger Navigation Bar Experiment (56dp)</string>
</resources> \ No newline at end of file
diff --git a/packages/overlays/ExperimentNavigationBarLarge64Overlay/Android.mk b/packages/overlays/ExperimentNavigationBarLarge64Overlay/Android.mk
new file mode 100644
index 000000000000..4898590071ac
--- /dev/null
+++ b/packages/overlays/ExperimentNavigationBarLarge64Overlay/Android.mk
@@ -0,0 +1,30 @@
+#
+# Copyright 2018, The Android Open Source Project
+#
+# 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := ExperimentNavigationBarLarge64
+LOCAL_CERTIFICATE := platform
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := ExperimentNavigationBarLargeOverlay64
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE) \ No newline at end of file
diff --git a/packages/overlays/ExperimentNavigationBarLarge64Overlay/AndroidManifest.xml b/packages/overlays/ExperimentNavigationBarLarge64Overlay/AndroidManifest.xml
new file mode 100644
index 000000000000..5437fe73b10a
--- /dev/null
+++ b/packages/overlays/ExperimentNavigationBarLarge64Overlay/AndroidManifest.xml
@@ -0,0 +1,27 @@
+<!--
+/**
+ * Copyright (c) 2018, The Android Open Source Project
+ *
+ * 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.
+ */
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.internal.experiment.navbar.large64"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android"
+ android:category="com.android.internal.experiment_navbar_larger64"
+ android:priority="1"/>
+
+ <application android:label="@string/experiment_navigationbar_overlay" android:hasCode="false"/>
+</manifest> \ No newline at end of file
diff --git a/packages/overlays/ExperimentNavigationBarLarge64Overlay/res/values/config.xml b/packages/overlays/ExperimentNavigationBarLarge64Overlay/res/values/config.xml
new file mode 100644
index 000000000000..24f813bb9d3d
--- /dev/null
+++ b/packages/overlays/ExperimentNavigationBarLarge64Overlay/res/values/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2018, The Android Open Source Project
+ *
+ * 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>
+ <!-- Height of the bottom navigation / system bar. -->
+ <dimen name="navigation_bar_height">64dp</dimen>
+ <!-- Width of the navigation bar when it is placed vertically on the screen -->
+ <dimen name="navigation_bar_width">64dp</dimen>
+ <!-- Height of the bottom navigation / system bar frame; navigation buttons height. -->
+ <dimen name="navigation_bar_frame_width">64dp</dimen>
+ <!-- Width of the navigation bar frame when it is placed vertically on the screen -->
+ <dimen name="navigation_bar_frame_height">64dp</dimen>
+</resources> \ No newline at end of file
diff --git a/packages/overlays/ExperimentNavigationBarLarge64Overlay/res/values/strings.xml b/packages/overlays/ExperimentNavigationBarLarge64Overlay/res/values/strings.xml
new file mode 100644
index 000000000000..015058996a74
--- /dev/null
+++ b/packages/overlays/ExperimentNavigationBarLarge64Overlay/res/values/strings.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2018, The Android Open Source Project
+ *
+ * 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Name of overlay [CHAR LIMIT=64] -->
+ <string name="experiment_navigationbar_overlay" translatable="false">Larger Navigation Bar Experiment (64dp)</string>
+</resources> \ No newline at end of file
diff --git a/packages/overlays/ExperimentNavigationBarSlim24Overlay/res/values-en-rXC/strings.xml b/packages/overlays/ExperimentNavigationBarSlim24Overlay/res/values-en-rXC/strings.xml
deleted file mode 100644
index 40d9fbca6ec9..000000000000
--- a/packages/overlays/ExperimentNavigationBarSlim24Overlay/res/values-en-rXC/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2018, The Android Open Source Project
- *
- * 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 xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="experiment_navigationbar_overlay" msgid="9207872199884142345">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‎‏‎‎‎‏‏‏‎‏‏‏‎‏‏‏‏‏‎‏‎‏‏‏‏‏‎‏‏‎‏‎‎‏‎‎‏‏‏‏‏‎‏‏‏‎‎‎‎‏‎‎‏‎Slim Navigation Bar Experiment (24dp)‎‏‎‎‏‎"</string>
-</resources>