Loading app/src/main/java/foundation/e/drive/receivers/BootCompleteReceiver.java +16 −18 Original line number Diff line number Diff line Loading @@ -23,12 +23,10 @@ public class BootCompleteReceiver extends BroadcastReceiver { Log.i(TAG, "onReceive"); String intentAction = intent.getAction(); SharedPreferences prefs = context.getSharedPreferences(AppConstants.SHARED_PREFERENCE_NAME, Context.MODE_PRIVATE); if (intentAction == null) { Log.e(TAG, "intent Action is null"); } else if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) { SharedPreferences prefs = context.getSharedPreferences(AppConstants.SHARED_PREFERENCE_NAME, Context.MODE_PRIVATE); if (prefs.getString(AccountManager.KEY_ACCOUNT_NAME, null) != null) { //If user account is registered prefs.edit().putBoolean(AppConstants.KEY_OMS_IS_WORKING, false).commit(); Loading @@ -37,13 +35,12 @@ public class BootCompleteReceiver extends BroadcastReceiver { //scanner job isn't registered then register it JobUtils.scheduleScannerJob(context); } } } else { Account mAccount = CommonUtils.getAccount(context.getString(R.string.eelo_account_type), AccountManager.get(context)); if (mAccount != null) { String accountName = mAccount.name; String accountType = mAccount.type; Loading @@ -61,3 +58,4 @@ public class BootCompleteReceiver extends BroadcastReceiver { } } } } Loading
app/src/main/java/foundation/e/drive/receivers/BootCompleteReceiver.java +16 −18 Original line number Diff line number Diff line Loading @@ -23,12 +23,10 @@ public class BootCompleteReceiver extends BroadcastReceiver { Log.i(TAG, "onReceive"); String intentAction = intent.getAction(); SharedPreferences prefs = context.getSharedPreferences(AppConstants.SHARED_PREFERENCE_NAME, Context.MODE_PRIVATE); if (intentAction == null) { Log.e(TAG, "intent Action is null"); } else if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) { SharedPreferences prefs = context.getSharedPreferences(AppConstants.SHARED_PREFERENCE_NAME, Context.MODE_PRIVATE); if (prefs.getString(AccountManager.KEY_ACCOUNT_NAME, null) != null) { //If user account is registered prefs.edit().putBoolean(AppConstants.KEY_OMS_IS_WORKING, false).commit(); Loading @@ -37,13 +35,12 @@ public class BootCompleteReceiver extends BroadcastReceiver { //scanner job isn't registered then register it JobUtils.scheduleScannerJob(context); } } } else { Account mAccount = CommonUtils.getAccount(context.getString(R.string.eelo_account_type), AccountManager.get(context)); if (mAccount != null) { String accountName = mAccount.name; String accountType = mAccount.type; Loading @@ -61,3 +58,4 @@ public class BootCompleteReceiver extends BroadcastReceiver { } } } }