1 // Copyright 2011 Google Inc. All Rights Reserved. 2 3 package com.android.vending.sectool.v1; 4 5 import android.content.BroadcastReceiver; 6 import android.content.Context; 7 import android.content.Intent; 8 import android.util.Log; 9 10 public class GoogleSecurityToolReceiver extends BroadcastReceiver { 11 12 @Override 13 public void onReceive(Context context, Intent intent) { 14 if (GoogleSecurityToolActivity.DEBUG) 15 Log.d(GoogleSecurityToolActivity.TAG, 16 "Got an intent, starting service" + intent.getAction()); 17 intent = new Intent(intent); 18 intent.setClass(context, GoogleSecurityToolActivity.class); 19 if (context.startService(intent) == null) { 20 if (GoogleSecurityToolActivity.DEBUG) 21 Log.e(GoogleSecurityToolActivity.TAG, "Can't start service"); 22 } 23 } 24 } 25