Code example for File

Methods: delete, exists, lastModified

0
        installNewsRobDefaultExceptionHandler(this);
 
        enableStrictMode(); 
 
        // remove old heap dump after one week 
        final File f = new File(HEAP_DUMP_FILE_NAME);
        if (f.exists() && f.lastModified() < (System.currentTimeMillis() - (7 * 24 * 60 * 60 * 1000)))
            f.delete();
 
        // setTheme(getEntryManager().getThemeResourceId()); 
 
        // re-schedule syncs after app has been (re-)installed 
        final EntryManager entryManager = EntryManager.getInstance(this);
        entryManager.getScheduler().ensureSchedulingIsEnabled();
        entryManager.maintainBootReceiverStateAndScheduler();
        entryManager.maintainPremiumDependencies();
        entryManager.maintainFirstInstalledVersion();
        entryManager.migrateSyncType();
 
    }