Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f10d3ff authored by vince-bourgmayer's avatar vince-bourgmayer
Browse files

use method from commonUtils to set the UEH

parent dbcfd22f
Loading
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -66,11 +66,7 @@ public class InitializerService extends Service implements OnRemoteOperationList
    public int onStartCommand( Intent intent, int flags, int startId ) {
        Log.i(TAG, "onStartCommand(...)");

        if(Thread.getDefaultUncaughtExceptionHandler().getClass().getSimpleName().equals(ServiceExceptionHandler.class.getSimpleName())){
            Log.d("ObserverService", "ServiceExceptionHandler already set!");
        }else{
            Thread.setDefaultUncaughtExceptionHandler(new ServiceExceptionHandler(this));
        }
        CommonUtils.setServiceUnCaughtExceptionHandler(this);
        //Get account
        SharedPreferences prefs = this.getSharedPreferences( AppConstants.SHARED_PREFERENCE_NAME, Context.MODE_PRIVATE );

+2 −5
Original line number Diff line number Diff line
@@ -80,11 +80,8 @@ public class ObserverService extends Service implements OnRemoteOperationListene
    public int onStartCommand(Intent intent, int flags, int startId) {
        Log.i(TAG, "onStartCommand("+startId+")");

        if(Thread.getDefaultUncaughtExceptionHandler().getClass().getSimpleName().equals(ServiceExceptionHandler.class.getSimpleName())){
            Log.d("ObserverService", "ServiceExceptionHandler already set!");
        }else{
            Thread.setDefaultUncaughtExceptionHandler(new ServiceExceptionHandler(this));
        }
        CommonUtils.setServiceUnCaughtExceptionHandler(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, "");
+3 −7
Original line number Diff line number Diff line
@@ -227,11 +227,9 @@ public class OperationManagerService extends Service implements OnRemoteOperatio
    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        Log.i(TAG, "onStartCommand()");
        if(Thread.getDefaultUncaughtExceptionHandler().getClass().getSimpleName().equals(ServiceExceptionHandler.class.getSimpleName())){
            Log.d("ObserverService", "ServiceExceptionHandler already set!");
        }else{
            Thread.setDefaultUncaughtExceptionHandler(new ServiceExceptionHandler(this));
        }

        CommonUtils.setServiceUnCaughtExceptionHandler(this);

        Bundle extras = intent.getExtras();
        Log.d(TAG, "OperationManagerService recieved "+(extras == null ? "null extras": extras.size()+" operations to perform") );

@@ -284,11 +282,9 @@ public class OperationManagerService extends Service implements OnRemoteOperatio
        }else{
            Log.w(TAG, "Intent's extras is null.");
        }

        return super.onStartCommand(intent, flags, startId);
    }


    @Nullable
    @Override
    public IBinder onBind(Intent intent) {