Java Code Examples for android.app.Application#getDir()
The following examples show how to use
android.app.Application#getDir() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExoHelper.java From buck with Apache License 2.0 | 5 votes |
/** * Enable hotswapping on an application instance. This call is not necessary if using {@link * ExopackageApplication}. If enabling manually, make sure the app is set up to support the * "modules" exopackage mode, and the initial call to {@link * ExopackageDexLoader#loadExopackageJars(Context, boolean)} passed true as the second arg */ public static synchronized void setupHotswap(Application application) { if (!sIsHotswapSetup) { final File dexOptDir = application.getDir("exopackage_modular_dex_opt", Context.MODE_PRIVATE); DelegatingClassLoader.getInstance().setDexOptDir(dexOptDir); application.registerReceiver( new ModularDexChangedReceiver(), ModularDexChangedReceiver.getIntentFilter(application.getPackageName())); sIsHotswapSetup = true; } }
Example 2
Source File: MemorizingTrustManager.java From tapchat-android with Apache License 2.0 | 4 votes |
private File getKeyStoreFile() { Application app = getApplication(mContext); File dir = app.getDir(KEYSTORE_DIR, Context.MODE_PRIVATE); return new File(dir, KEYSTORE_FILE); }