summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2016-02-11 10:11:22 -0800
committercretin45 <cretin45@gmail.com>2016-02-11 10:11:44 -0800
commit6a173a6c38239918892dd307465afc633288bf32 (patch)
treea25eb2433ea40a2d95f2d1df185c2b6b332b3c04 /src
parent6d81d82d9a8a1eae4b7221d77b0252b28a134b48 (diff)
downloadandroid_packages_apps_Trebuchet-6a173a6c38239918892dd307465afc633288bf32.zip
android_packages_apps_Trebuchet-6a173a6c38239918892dd307465afc633288bf32.tar.gz
android_packages_apps_Trebuchet-6a173a6c38239918892dd307465afc633288bf32.tar.bz2
Trebuchet: Open settings panel when clicking settings
Issue-id: CYNGNOS-2002 Change-Id: I4fc2ffd17febc8f1e5fa804e6a26feaa51a29c4b
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/Launcher.java37
1 files changed, 16 insertions, 21 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 929e393..186ebee 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -284,7 +284,7 @@ public class Launcher extends Activity
private boolean mHiddenFolderAuth = false;
@Thunk Hotseat mHotseat;
- private ViewGroup mOverviewPanel;
+ private VerticalSlidingPanel mOverviewPanel;
private View mDarkPanel;
OverviewSettingsPanel mOverviewSettingsPanel;
@@ -1351,17 +1351,6 @@ public class Launcher extends Activity
}
}
- protected void startSettings() {
- Intent settings;
- settings = new Intent(android.provider.Settings.ACTION_SETTINGS);
- startActivity(settings);
- LauncherApplication.getLauncherStats().sendSettingsOpenedEvent(
- LauncherStats.ORIGIN_TREB_LONGPRESS);
- if (mWorkspace.isInOverviewMode()) {
- mWorkspace.exitOverviewMode();
- }
- }
-
public void addToCustomContentPage(View customContent,
CustomContentCallbacks callbacks, String description) {
mWorkspace.addToCustomContentPage(customContent, callbacks, description);
@@ -1526,7 +1515,7 @@ public class Launcher extends Activity
}
// Setup the overview panel
- mOverviewPanel = (ViewGroup) findViewById(R.id.overview_panel);
+ mOverviewPanel = (VerticalSlidingPanel) findViewById(R.id.overview_panel);
mOverviewSettingsPanel = new OverviewSettingsPanel(this);
mOverviewSettingsPanel.initializeAdapter();
@@ -1580,20 +1569,19 @@ public class Launcher extends Activity
});
defaultScreenButton.setOnTouchListener(getHapticFeedbackTouchListener());
- final VerticalSlidingPanel verticalSlidingPanel = ((VerticalSlidingPanel) mOverviewPanel);
- verticalSlidingPanel.setPanelSlideListener(new SettingsPanelSlideListener());
- verticalSlidingPanel.setEnableDragViewTouchEvents(true);
+ mOverviewPanel.setPanelSlideListener(new SettingsPanelSlideListener());
+ mOverviewPanel.setEnableDragViewTouchEvents(true);
View settingsPaneHeader = mOverviewPanel.findViewById(R.id.settings_pane_header);
if (settingsPaneHeader != null) {
- verticalSlidingPanel.setDragView(settingsPaneHeader);
+ mOverviewPanel.setDragView(settingsPaneHeader);
settingsPaneHeader.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
- if (verticalSlidingPanel.isExpanded()) {
- verticalSlidingPanel.collapsePane();
+ if (mOverviewPanel.isExpanded()) {
+ mOverviewPanel.collapsePane();
} else {
- verticalSlidingPanel.expandPane();
+ mOverviewPanel.expandPane();
}
}
});
@@ -3186,7 +3174,11 @@ public class Launcher extends Activity
if (mLauncherCallbacks != null) {
mLauncherCallbacks.onClickSettingsButton(v);
} else {
- startSettings();
+ if (mOverviewPanel.isExpanded()) {
+ mOverviewPanel.collapsePane();
+ } else {
+ mOverviewPanel.expandPane();
+ }
}
}
@@ -5277,6 +5269,9 @@ public class Launcher extends Activity
AnimationDrawable frameAnimation = (AnimationDrawable) mAnimatedArrow.getBackground();
frameAnimation.start();
+
+ LauncherApplication.getLauncherStats().sendSettingsOpenedEvent(
+ LauncherStats.ORIGIN_TREB_LONGPRESS);
}
@Override