summaryrefslogtreecommitdiff
path: root/src/com/android/onetimeinitializer/OneTimeInitializerReceiver.java
diff options
context:
space:
mode:
authorChiao Cheng <chiaocheng@google.com>2012-08-28 18:34:45 -0700
committerChiao Cheng <chiaocheng@google.com>2012-08-28 18:34:45 -0700
commitc23fe93bfc61357f2977d9a6449e6975b58fd4e4 (patch)
tree6e7de3fc4959eef98019b36584ddbc2d4428651f /src/com/android/onetimeinitializer/OneTimeInitializerReceiver.java
parent7ad11b34aa9b7be1ce42b46c8c1422e33ee99616 (diff)
downloadOneTimeInitializer-c23fe93bfc61357f2977d9a6449e6975b58fd4e4.tar.gz
Add upgrade step for phone launcher. Bug: 6993891 Change-Id: I9599c21ccdeb7ccec2dbbd89ea720e636a48ca98
Diffstat (limited to 'src/com/android/onetimeinitializer/OneTimeInitializerReceiver.java')
-rw-r--r--src/com/android/onetimeinitializer/OneTimeInitializerReceiver.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/com/android/onetimeinitializer/OneTimeInitializerReceiver.java b/src/com/android/onetimeinitializer/OneTimeInitializerReceiver.java
new file mode 100644
index 0000000..0f99a2b
--- /dev/null
+++ b/src/com/android/onetimeinitializer/OneTimeInitializerReceiver.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2012 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.onetimeinitializer;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.util.Log;
+
+/**
+ * BroadcastReceiver that starts the service to performs one time initialization
+ * at bootup time.
+ */
+public class OneTimeInitializerReceiver extends BroadcastReceiver {
+
+ private static final String TAG = OneTimeInitializerReceiver.class.getSimpleName()
+ .substring(0, 22);
+
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ Log.v(TAG, "OneTimeInitializerReceiver.onReceive");
+ context.startService(new Intent(context, OneTimeInitializerService.class));
+ }
+}