Proyectos de Subversion Android Microlearning

Rev

Rev 29 | Rev 33 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 29 Rev 30
Línea 124... Línea 124...
124
public class MainActivity extends  AppCompatActivity implements ITwoGetSkills,NavigationView.OnNavigationItemSelectedListener {
124
public class MainActivity extends  AppCompatActivity implements ITwoGetSkills,NavigationView.OnNavigationItemSelectedListener {
125
    private boolean isSyncDevice = false;
125
    private boolean isSyncDevice = false;
126
    private boolean isSyncToken = false;
126
    private boolean isSyncToken = false;
127
    private boolean isSyncBatch = false;
127
    private boolean isSyncBatch = false;
128
    private boolean isForeground = false;
128
    private boolean isForeground = false;
129
    private boolean issmartlockloginrun = false;
129
    private boolean isSmartLockLoginRun = false;
Línea 130... Línea 130...
130
 
130
 
131
    private final static String PREFIX_FRAG = "FRAG";
131
    private final static String PREFIX_FRAG = "FRAG";
Línea 132... Línea 132...
132
    private final static String TAG = "C2GS - MainActivity";
132
    private final static String TAG = "C2GS - MainActivity";
Línea 193... Línea 193...
193
        //mResolver = getContentResolver();
193
        //mResolver = getContentResolver();
Línea 194... Línea 194...
194
 
194
 
Línea 195... Línea 195...
195
        mAppDatabase = DatabaseHelper.getInstance(this).getAppDatabase();
195
        mAppDatabase = DatabaseHelper.getInstance(this).getAppDatabase();
-
 
196
 
Línea 196... Línea 197...
196
 
197
        preference = Preference.getInstance(getApplicationContext());
197
        preference = Preference.getInstance(getApplicationContext());
198
        preference.load();
198
 
199
 
199
        if(TextUtils.isEmpty(preference.getDeviceUuid())) {
200
        if(TextUtils.isEmpty(preference.getDeviceUuid())) {
Línea 271... Línea 272...
271
    protected void onResume() {
272
    protected void onResume() {
272
        super.onResume();
273
        super.onResume();
273
        isForeground = true;
274
        isForeground = true;
Línea 274... Línea 275...
274
 
275
 
-
 
276
        preference = Preference.getInstance(getApplicationContext());
-
 
277
        preference.load();
275
        preference = Preference.getInstance(getApplicationContext());
278
        
Línea 276... Línea 279...
276
        reloadNavHeader();
279
        reloadNavHeader();
Línea 277... Línea 280...
277
 
280
 
Línea 278... Línea 281...
278
        Log.e("Se ejecuta", "On resumen");
281
        Log.e("Se ejecuta", "On resumen");
279
 
282
 
280
        if(TextUtils.isEmpty(preference.getUserUuid())) {
283
        if(TextUtils.isEmpty(preference.getUserUuid())) {
281
 
284
 
282
            //Verifico que el teclado no vaya a relanzar el fragment de intro al usar Google Smartlock para traer
285
            //Verifico que el teclado no vaya a relanzar el fragment de intro al usar Google Smartlock para traer
283
            //Informacion de inicio de sesion almacenada en su cuenta personal de Google
286
            //Informacion de inicio de sesion almacenada en su cuenta personal de Google
Línea 284... Línea 287...
284
            if (!issmartlockloginrun) {
287
            if (!isSmartLockLoginRun) {
285
                invokeFragment(Constants.IDX_FRAGMENT_INTRO);
288
                invokeFragment(Constants.IDX_FRAGMENT_INTRO);
Línea 308... Línea 311...
308
    /*
311
    /*
309
    @Override
312
    @Override
310
    protected void onRestart() {
313
    protected void onRestart() {
311
        super.onRestart();
314
        super.onRestart();
312
        preference = Preference.getInstance(getApplicationContext());
315
        preference = Preference.getInstance(getApplicationContext());
-
 
316
        preference.load();
Línea 313... Línea 317...
313
 
317
 
Línea 314... Línea 318...
314
        if(TextUtils.isEmpty(preference.getUserUuid())) {
318
        if(TextUtils.isEmpty(preference.getUserUuid())) {
315
 
319
 
316
            //Verifico que el teclado no vaya a relanzar el fragment de intro al usar Google Smartlock para traer
320
            //Verifico que el teclado no vaya a relanzar el fragment de intro al usar Google Smartlock para traer
317
            //Informacion de inicio de sesion almacenada en su cuenta personal de Google
321
            //Informacion de inicio de sesion almacenada en su cuenta personal de Google
318
            if (!issmartlockloginrun) {
322
            if (!isSmartLockLoginRun) {
319
                invokeFragment(Constants.IDX_FRAGMENT_INTRO);
323
                invokeFragment(Constants.IDX_FRAGMENT_INTRO);
Línea 320... Línea 324...
320
                issmartlockloginrun= true;
324
                isSmartLockLoginRun= true;
321
            }
325
            }