Commit 51884902 authored by vince-bourgmayer's avatar vince-bourgmayer
Browse files

fix generation of multiple file

parent ea172591
......@@ -68,7 +68,12 @@ public class InitializerService extends Service implements OnRemoteOperationList
@Override
public int onStartCommand( Intent intent, int flags, int startId ) {
Log.i(TAG, "onStartCommand(...)");
Thread.setDefaultUncaughtExceptionHandler(new ServiceExceptionHandler(this));
if(Thread.getDefaultUncaughtExceptionHandler().getClass().getSimpleName().equals(ServiceExceptionHandler.class.getSimpleName())){
Log.d("ObserverService", "ServiceExceptionHandler already set!");
}else{
Thread.setDefaultUncaughtExceptionHandler(new ServiceExceptionHandler(this));
}
//Get account
SharedPreferences prefs = this.getSharedPreferences( AppConstants.SHARED_PREFERENCE_NAME, Context.MODE_PRIVATE );
......
......@@ -80,8 +80,11 @@ public class ObserverService extends Service implements OnRemoteOperationListene
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Log.i(TAG, "onStartCommand("+startId+")");
Thread.setDefaultUncaughtExceptionHandler(new ServiceExceptionHandler(this));
if(Thread.getDefaultUncaughtExceptionHandler().getClass().getSimpleName().equals(ServiceExceptionHandler.class.getSimpleName())){
Log.d("ObserverService", "ServiceExceptionHandler already set!");
}else{
Thread.setDefaultUncaughtExceptionHandler(new ServiceExceptionHandler(this));
}
SharedPreferences prefs = this.getSharedPreferences(AppConstants.SHARED_PREFERENCE_NAME, Context.MODE_PRIVATE);
String accountName = prefs.getString(AccountManager.KEY_ACCOUNT_NAME, "");
String accountType = prefs.getString(AccountManager.KEY_ACCOUNT_TYPE, "");
......
......@@ -63,15 +63,6 @@ public class OperationManagerService extends Service implements OnRemoteOperatio
@Override
public void onDestroy() {
Log.i(TAG, "onDestroy()");
/*this.mOperationsQueue.clear();
for(int i =-1, size = mThreadPool.length;++i < size;){
try{
if(mThreadPool[i] != null)
mThreadPool[i].interrupt();}
catch(Exception e){
Log.e(TAG, e.toString());
}
}*/
super.onDestroy();
}
......@@ -248,8 +239,11 @@ public class OperationManagerService extends Service implements OnRemoteOperatio
public int onStartCommand(Intent intent, int flags, int startId) {
Log.i(TAG, "onStartCommand()");
Thread.setDefaultUncaughtExceptionHandler(new ServiceExceptionHandler(this));
if(Thread.getDefaultUncaughtExceptionHandler().getClass().getSimpleName().equals(ServiceExceptionHandler.class.getSimpleName())){
Log.d("ObserverService", "ServiceExceptionHandler already set!");
}else{
Thread.setDefaultUncaughtExceptionHandler(new ServiceExceptionHandler(this));
}
Bundle extras = intent.getExtras();
Log.d(TAG, "OperationManagerService recieved "+(extras == null ? "null extras": extras.size()+" operations to perform") );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment