package org.bbs.apklauncher.emb.auto_gen; import org.bbs.apklauncher.AndroidUtil; import org.bbs.apklauncher.TargetContext; import android.annotation.SuppressLint; import android.app.IntentService; import android.app.Service; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.res.Configuration; import android.os.IBinder; import android.util.Log; @SuppressLint("NewApi") public abstract class StubBase_IntentService extends IntentService { //do NOT edit this file, auto-generated from StubBase_Service.java.template private static final String TAG = StubBase_IntentService.class.getSimpleName(); public static boolean DEBUG_LIEFT_CYCLE = true; protected static boolean DEBUG_MEMORY = true; private static boolean DEBUG = true; Target_IntentService mTargetService; private boolean mCreated; // tag_start:IntentService public StubBase_IntentService(String name) { super(name); } // tag_end:IntentService abstract protected void onPrepareServiceStub(Intent intent) ; @Override //do NOT edit this file, auto-generated from StubBase_Service.java.template public IBinder onBind(Intent intent) { if (DEBUG) { Log.d(TAG, "onBind(). intent: " + intent); } prepareServiceStub(intent); return mTargetService.onBind(intent); } @Override public void onCreate() { if (DEBUG_LIEFT_CYCLE) { Log.d(TAG, "onCreate(). "); } super.onCreate(); if (null != mTargetService) { mTargetService.onCreate(); } //do NOT edit this file, auto-generated from StubBase_Service.java.template } @Override @Deprecated public void onStart(Intent intent, int startId) { if (DEBUG_LIEFT_CYCLE) { Log.d(TAG, "onStart(). "); } prepareServiceStub(intent); super.onStart(intent, startId); if (null != mTargetService) { mTargetService.onStart(intent, startId); } } @Override public int onStartCommand(Intent intent, int flags, int startId) { //do NOT edit this file, auto-generated from StubBase_Service.java.template if (DEBUG_LIEFT_CYCLE) { Log.d(TAG, "onStartCommand(). intent: " + intent + " flags: " + flags + " startId: " + startId); } prepareServiceStub(intent); // return super.onStartCommand(intent, flags, startId); return mTargetService.onStartCommand(intent, flags, startId); } @Override public void onDestroy() { if (DEBUG_LIEFT_CYCLE) { Log.d(TAG, "onDestroy(). "); } super.onDestroy(); if (null != mTargetService) { mTargetService.onDestroy(); } //do NOT edit this file, auto-generated from StubBase_Service.java.template } @Override public void onConfigurationChanged(Configuration newConfig) { if (DEBUG) { Log.d(TAG, "onConfigurationChanged(). newConfig: " + newConfig); } super.onConfigurationChanged(newConfig); if (null != mTargetService) { mTargetService.onConfigurationChanged(newConfig); } } @Override public void onLowMemory() { if (DEBUG_MEMORY) { Log.d(TAG, "onLowMemory(). "); //do NOT edit this file, auto-generated from StubBase_Service.java.template } super.onLowMemory(); if (null != mTargetService) { mTargetService.onLowMemory(); } } @Override public void onTrimMemory(int level) { if (DEBUG_MEMORY) { Log.d(TAG, "onTrimMemory(). level: " + AndroidUtil.toMemoryLevel(level)); } super.onTrimMemory(level); if (null != mTargetService) { mTargetService.onTrimMemory(level); } } //do NOT edit this file, auto-generated from StubBase_Service.java.template @Override public boolean onUnbind(Intent intent) { // return super.onUnbind(intent); if (DEBUG || DEBUG_LIEFT_CYCLE) { Log.d(TAG, "onUnbind(). intent: " + intent); } if (null != mTargetService) { return mTargetService.onUnbind(intent); } else { return false; } } @Override public void onRebind(Intent intent) { if (DEBUG || DEBUG_LIEFT_CYCLE) { //do NOT edit this file, auto-generated from StubBase_Service.java.template Log.d(TAG, "onRebind(). intent: " + intent); } super.onRebind(intent); if (null != mTargetService) { mTargetService.onRebind(intent); } } @Override public void onTaskRemoved(Intent rootIntent) { super.onTaskRemoved(rootIntent); if (null != mTargetService) { mTargetService.onTaskRemoved(rootIntent); } } private void prepareServiceStub(Intent intent) { //do NOT edit this file, auto-generated from StubBase_Service.java.template if (!mCreated) { onPrepareServiceStub(intent);; mCreated = true; } } // tag_start:IntentService @Override public void setIntentRedelivery(boolean enabled) { super.setIntentRedelivery(enabled); } @Override protected void onHandleIntent(Intent intent) { if (null != mTargetService) { mTargetService.onHandleIntent(intent); } //do NOT edit this file, auto-generated from StubBase_Service.java.template } // tag_end:IntentService }