summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoey <joey@lineageos.org>2018-07-31 12:59:41 (GMT)
committerBruno Martins <bgcngm@gmail.com>2019-10-20 13:00:37 (GMT)
commit510a31bc483cc2098210fd83bf2ca2b721e7818a (patch)
tree0944b72adca52d2a17c3cf0bef6afecf73b3b067
parent0a73a037186bbbd0411bfa7348dc4e30d5a45bb2 (diff)
downloadandroid_packages_apps_Trebuchet-510a31bc483cc2098210fd83bf2ca2b721e7818a.zip
android_packages_apps_Trebuchet-510a31bc483cc2098210fd83bf2ca2b721e7818a.tar.gz
android_packages_apps_Trebuchet-510a31bc483cc2098210fd83bf2ca2b721e7818a.tar.bz2
Create LineageLauncher
Extends Launcher, will hold our customizations Change-Id: I4a398b624ac60edfed78e4db8e56eb767ffb753e Signed-off-by: Joey <joey@lineageos.org>
-rw-r--r--AndroidManifest.xml2
-rw-r--r--src/com/android/launcher3/lineage/LineageLauncher.java25
-rw-r--r--src/com/android/launcher3/lineage/LineageLauncherCallbacks.java128
3 files changed, 154 insertions, 1 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 47422f8..765eb0e 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -45,7 +45,7 @@
attributes and intent filters the same
-->
<activity
- android:name="com.android.launcher3.Launcher"
+ android:name="com.android.launcher3.lineage.LineageLauncher"
android:launchMode="singleTask"
android:clearTaskOnLaunch="true"
android:stateNotNeeded="true"
diff --git a/src/com/android/launcher3/lineage/LineageLauncher.java b/src/com/android/launcher3/lineage/LineageLauncher.java
new file mode 100644
index 0000000..37150d8
--- /dev/null
+++ b/src/com/android/launcher3/lineage/LineageLauncher.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2018 The LineageOS 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.lineage;
+
+import com.android.launcher3.Launcher;
+
+public class LineageLauncher extends Launcher {
+
+ public LineageLauncher() {
+ setLauncherCallbacks(new LineageLauncherCallbacks(this));
+ }
+}
diff --git a/src/com/android/launcher3/lineage/LineageLauncherCallbacks.java b/src/com/android/launcher3/lineage/LineageLauncherCallbacks.java
new file mode 100644
index 0000000..f71ad72
--- /dev/null
+++ b/src/com/android/launcher3/lineage/LineageLauncherCallbacks.java
@@ -0,0 +1,128 @@
+/*
+ * Copyright (C) 2018 The LineageOS 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.lineage;
+
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+
+import com.android.launcher3.AppInfo;
+import com.android.launcher3.LauncherCallbacks;
+
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+
+public class LineageLauncherCallbacks implements LauncherCallbacks,
+ SharedPreferences.OnSharedPreferenceChangeListener {
+
+ private final LineageLauncher mLauncher;
+
+
+ public LineageLauncherCallbacks(LineageLauncher launcher) {
+ mLauncher = launcher;
+ }
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+
+ }
+
+ @Override
+ public void onResume() {
+
+ }
+
+ @Override
+ public void onStart() {
+
+ }
+
+ @Override
+ public void onStop() {
+
+ }
+
+ @Override
+ public void onPause() {
+
+ }
+
+ @Override
+ public void onDestroy() {
+
+ }
+
+ @Override
+ public void onSaveInstanceState(Bundle outState) {
+
+ }
+
+ @Override
+ public void onActivityResult(int requestCode, int resultCode, Intent data) {
+
+ }
+
+ @Override
+ public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
+
+ }
+
+ @Override
+ public void onAttachedToWindow() {
+
+ }
+
+ @Override
+ public void onDetachedFromWindow() {
+
+ }
+
+ @Override
+ public void dump(String prefix, FileDescriptor fd, PrintWriter w, String[] args) {
+
+ }
+
+ @Override
+ public void onHomeIntent(boolean internalStateHandled) {
+
+ }
+
+ @Override
+ public boolean handleBackPressed() {
+ return false;
+ }
+
+ @Override
+ public void onTrimMemory(int level) {
+
+ }
+
+ @Override
+ public void onLauncherProviderChange() {
+
+ }
+
+ @Override
+ public boolean startSearch(String initialQuery, boolean selectInitialQuery, Bundle appSearchData) {
+ return false;
+ }
+
+ @Override
+ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
+
+ }
+}