This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private fun pinWidget(context: Context) { | |
| val appWidgetManager = context.getSystemService(AppWidgetManager::class.java) ?: return | |
| val myProvider = ComponentName(context.applicationContext, TaskListWidget::class.java) | |
| if (!appWidgetManager.isRequestPinAppWidgetSupported) { | |
| Timber.d("Widgets not supported") | |
| return | |
| } | |
| // Create the PendingIntent object only if your app needs to be notified |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private fun <T> withPrefs(context: Context, callback: SharedPreferences.() -> T): T { | |
| val oldPolicy = StrictMode.allowThreadDiskWrites() | |
| val output = context.applicationContext | |
| .getSharedPreferences(BILLING_STORAGE_NAME, Context.MODE_PRIVATE) | |
| .callback() | |
| StrictMode.setThreadPolicy(oldPolicy) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class GraphDetails { | |
| LinkedHashSet<Project> projects | |
| LinkedHashMap<Tuple2<Project, Project>, List<String>> dependencies | |
| ArrayList<Project> multiplatformProjects | |
| ArrayList<Project> androidProjects | |
| ArrayList<Project> javaProjects | |
| ArrayList<Project> rootProjects | |
| // Used for excluding module from graph | |
| public static final SystemTestName = "system-test" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Target(AnnotationTarget.TYPE) | |
| @DslMarker | |
| annotation class PreferenceDsl | |
| @DslMarker | |
| annotation class PreferenceBuilderDsl | |
| @PreferenceBuilderDsl | |
| interface BaseBuilder<out T> { | |
| fun build(): T |
OlderNewer