summaryrefslogtreecommitdiffstats
path: root/pre_boot_listener
diff options
context:
space:
mode:
authoremancebo <emancebo@cyngn.com>2015-07-08 13:15:05 -0700
committeremancebo <emancebo@cyngn.com>2015-07-09 14:27:28 -0700
commit5040ee674c50350eea91e97d7043c8cbed7d4113 (patch)
treec361702c7e2d22182f637d594cbbd145f7f08464 /pre_boot_listener
parentd3e0766d0a9fa0c2682883a89c575ee878a7e799 (diff)
downloadandroid_packages_apps_PackageInstaller-5040ee674c50350eea91e97d7043c8cbed7d4113.tar.gz
android_packages_apps_PackageInstaller-5040ee674c50350eea91e97d7043c8cbed7d4113.tar.bz2
android_packages_apps_PackageInstaller-5040ee674c50350eea91e97d7043c8cbed7d4113.zip
PackageInstaller: add hook to manage packages via PRE_BOOT_COMPLETED event
Change-Id: I797fd93eedd3c440bfd906c685bb6b11acb1c9c9
Diffstat (limited to 'pre_boot_listener')
-rw-r--r--pre_boot_listener/preboot.mk15
-rw-r--r--pre_boot_listener/src/com/android/packageinstaller/PackageInstallerPreBootListener.java27
2 files changed, 42 insertions, 0 deletions
diff --git a/pre_boot_listener/preboot.mk b/pre_boot_listener/preboot.mk
new file mode 100644
index 00000000..d25f7146
--- /dev/null
+++ b/pre_boot_listener/preboot.mk
@@ -0,0 +1,15 @@
+# Copyright (C) 2015 The CyanogenMod 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_SRC_FILES += $(call all-java-files-under, pre_boot_listener/src)
diff --git a/pre_boot_listener/src/com/android/packageinstaller/PackageInstallerPreBootListener.java b/pre_boot_listener/src/com/android/packageinstaller/PackageInstallerPreBootListener.java
new file mode 100644
index 00000000..bbc39ca2
--- /dev/null
+++ b/pre_boot_listener/src/com/android/packageinstaller/PackageInstallerPreBootListener.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2015 The CyanogenMod 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.packageinstaller;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+
+// stub receiver
+public class PackageInstallerPreBootListener extends BroadcastReceiver {
+ @Override
+ public void onReceive(Context context, Intent broadcast) {}
+}