summaryrefslogtreecommitdiffstats
path: root/quickstep
diff options
context:
space:
mode:
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/AndroidManifest.xml1
-rw-r--r--quickstep/src/com/android/launcher3/uioverrides/SwipeDownListener.java81
-rw-r--r--quickstep/src/com/android/launcher3/uioverrides/UiFactory.java9
3 files changed, 3 insertions, 88 deletions
diff --git a/quickstep/AndroidManifest.xml b/quickstep/AndroidManifest.xml
index 1dbabbc0a..412ec5a88 100644
--- a/quickstep/AndroidManifest.xml
+++ b/quickstep/AndroidManifest.xml
@@ -25,7 +25,6 @@
<uses-sdk android:targetSdkVersion="28" android:minSdkVersion="28"/>
<uses-permission android:name="android.permission.CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS" />
<uses-permission android:name="android.permission.MANAGE_ACTIVITY_STACKS" />
- <uses-permission android:name="android.permission.STATUS_BAR" />
<application
android:backupAgent="com.android.launcher3.LauncherBackupAgent"
android:fullBackupOnly="true"
diff --git a/quickstep/src/com/android/launcher3/uioverrides/SwipeDownListener.java b/quickstep/src/com/android/launcher3/uioverrides/SwipeDownListener.java
deleted file mode 100644
index f4dd99caa..000000000
--- a/quickstep/src/com/android/launcher3/uioverrides/SwipeDownListener.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2016 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.launcher3.uioverrides;
-
-import static com.android.launcher3.LauncherState.NORMAL;
-
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.util.Log;
-import android.view.GestureDetector;
-import android.view.MotionEvent;
-
-import com.android.launcher3.Launcher;
-import com.android.launcher3.Utilities;
-import com.android.launcher3.util.TouchController;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-public class SwipeDownListener implements TouchController {
- private static final String PREF_STATUSBAR_EXPAND = "pref_expand_statusbar";
-
- private GestureDetector mGestureDetector;
- private Launcher mLauncher;
-
- public SwipeDownListener(Launcher launcher) {
- SharedPreferences prefs = Utilities.getPrefs(launcher.getApplicationContext());
-
- mLauncher = launcher;
- mGestureDetector = new GestureDetector(launcher,
- new GestureDetector.SimpleOnGestureListener() {
- @Override
- public boolean onFling(MotionEvent e1, MotionEvent e2, float vX, float vy) {
- if (prefs.getBoolean(PREF_STATUSBAR_EXPAND, true) && e1.getY() < e2.getY()) {
- expandStatusBar(launcher);
- }
- return true;
- }
- });
- }
-
- @Override
- public boolean onControllerInterceptTouchEvent(MotionEvent ev) {
- if (mLauncher.isInState(NORMAL)) {
- mGestureDetector.onTouchEvent(ev);
- }
- return false;
- }
-
- @Override
- public boolean onControllerTouchEvent(MotionEvent ev) {
- return false;
- }
-
- private void expandStatusBar(Context context) {
- try {
- Object service = context.getSystemService("statusbar");
- Class<?> manager = Class.forName("android.app.StatusBarManager");
- Method expand = manager.getMethod("expandNotificationsPanel");
- expand.invoke(service);
- } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException |
- InvocationTargetException e) {
- Log.w("Reflection",
- "Can't to invoke android.app.StatusBarManager$expandNotificationsPanel");
- }
- }
-} \ No newline at end of file
diff --git a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
index a893dafd0..ac9f8634e 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
@@ -63,22 +63,19 @@ public class UiFactory {
return new TouchController[] {
launcher.getDragController(),
new OverviewToAllAppsTouchController(launcher),
- new LauncherTaskViewController(launcher),
- new SwipeDownListener(launcher)};
+ new LauncherTaskViewController(launcher)};
}
if (launcher.getDeviceProfile().isVerticalBarLayout()) {
return new TouchController[] {
launcher.getDragController(),
new OverviewToAllAppsTouchController(launcher),
new LandscapeEdgeSwipeController(launcher),
- new LauncherTaskViewController(launcher),
- new SwipeDownListener(launcher)};
+ new LauncherTaskViewController(launcher)};
} else {
return new TouchController[] {
launcher.getDragController(),
new PortraitStatesTouchController(launcher),
- new LauncherTaskViewController(launcher),
- new SwipeDownListener(launcher)};
+ new LauncherTaskViewController(launcher)};
}
}