Revision d572d209 app/src/info/guardianproject/notepadbot/NoteCipher.java

View differences:

app/src/info/guardianproject/notepadbot/NoteCipher.java
68 68
    private static final int LOCK_ID = Menu.FIRST + 5;
69 69
    private static final int SETTINGS_ID = Menu.FIRST + 6;
70 70

  
71
    public static final String TAG = "notecipher";
72

  
73 71
    private NotesDbAdapter mDbHelper;
74 72

  
75 73
    private Uri dataStream;
76 74

  
77
    private final static int MAX_SIZE = 1000000;
78

  
79 75
    private CacheWordActivityHandler mCacheWord;
80 76

  
81 77
    private ListView notesListView;
......
408 404

  
409 405
            byte[] data = NoteUtils.readBytesAndClose(is);
410 406

  
411
            if (data.length > MAX_SIZE){
407
            if (data.length > NConstants.MAX_STREAM_SIZE) {
412 408
                Toast.makeText(this, R.string.err_size, Toast.LENGTH_LONG).show();
413 409
            } else {
414 410
                String title = dataStream.getLastPathSegment();
......
431 427
            }
432 428

  
433 429
        } catch (FileNotFoundException e) {
434
            Log.e(TAG, e.getMessage(), e);
430
            Log.e(NConstants.TAG, e.getMessage(), e);
435 431

  
436 432
        } catch (IOException e) {
437
            Log.e(TAG, e.getMessage(), e);
433
            Log.e(NConstants.TAG, e.getMessage(), e);
438 434

  
439 435
        } catch (OutOfMemoryError e) {
440 436
            Toast.makeText(this, R.string.err_size, Toast.LENGTH_LONG).show();
......
494 490

  
495 491
    @Override
496 492
    public void onCacheWordUninitialized() {
497
        Log.d(TAG, "onCacheWordUninitialized");
493
        Log.d(NConstants.TAG, "onCacheWordUninitialized");
498 494
        clearViewsAndLock();
499 495
    }
500 496

  
501 497
    @Override
502 498
    public void onCacheWordLocked() {
503
        Log.d(TAG, "onCacheWordLocked");
499
        Log.d(NConstants.TAG, "onCacheWordLocked");
504 500
        clearViewsAndLock();
505 501
    }
506 502

  
507 503
    @Override
508 504
    public void onCacheWordOpened() {
509
        Log.d(TAG, "onCacheWordOpened");
505
        Log.d(NConstants.TAG, "onCacheWordOpened");
510 506
        unlockDatabase();
511 507

  
512 508
        if (mDbHelper.isOpen()) {

Also available in: Unified diff