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
package org.khanacademy.core.net.videodownloadmanager; | |
import org.khanacademy.core.net.downloadmanager.DownloadManager; | |
import org.khanacademy.core.net.downloadmanager.okhttp.OkHttpDownloadManager; | |
import org.khanacademy.core.net.downloadmanager.okhttp.OkHttpDownloadManager.ResourceFunctions; | |
import org.khanacademy.core.topictree.models.Video; | |
import org.khanacademy.core.topictree.models.Video.DownloadFormat; | |
import com.squareup.okhttp.OkHttpClient; |
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
package org.khanacademy.core.net.videodownloadmanager.okhttp; | |
import org.khanacademy.core.base.BaseTestCase; | |
import org.khanacademy.core.net.videodownloadmanager.OkHttpVideoDownloadManager; | |
import org.junit.Rule; | |
import org.junit.rules.TemporaryFolder; | |
/** | |
* Tests for {@link OkHttpVideoDownloadManager}. |
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
package org.khanacademy.core.net.downloadmanager; | |
import org.khanacademy.core.net.downloadmanager.persistence.database.VideoDownloadManagerDatabase; | |
import org.khanacademy.core.net.downloadmanager.persistence.models.VideoDownloadEntity; | |
import org.khanacademy.core.topictree.identifiers.ContentItemIdentifier; | |
import com.google.common.base.Optional; | |
import com.google.common.base.Preconditions; | |
import com.google.common.collect.Maps; |
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
DownloadEvent{ | |
type=ADDED, | |
download=DownloadGroup{ | |
resource=ContentItemIdentifier{ | |
itemKind=VIDEO, | |
contentId=xb19b2406 | |
}, | |
progress=Progress{ | |
completionPercentage=0 | |
numBytesTotal=0, |
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
package org.khanacademy.core.mylist; | |
import static com.google.common.base.Preconditions.checkNotNull; | |
import org.khanacademy.core.mylist.persistence.database.BookmarkDatabase; | |
import org.khanacademy.core.net.api.ApiBaseUrl; | |
import org.khanacademy.core.net.downloadmanager.FileDownloadManager; | |
import org.khanacademy.core.net.downloadmanager.KhanDownloadableResource; | |
import org.khanacademy.core.net.downloadmanager.KhanDownloadableResource.Key; | |
import org.khanacademy.core.net.downloadmanager.VideoDownloadManager; |
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
select GrandParentLevel.parent_id as parent_id, ParentLevel.child_id as child_id | |
from NodeToNode as ParentLevel | |
inner join NodeToNode as GrandParentLevel | |
on ParentLevel.parent_id = GrandParentLevel.child_id | |
where ParentLevel.child_id = 752; |
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
08-17 20:05:50.136 7391-7391/org.khanacademy.android.debug I/art﹕ Late-enabling -Xcheck:jni | |
08-17 20:05:50.161 7391-7400/org.khanacademy.android.debug E/art﹕ Failed sending reply to debugger: Broken pipe | |
08-17 20:05:50.161 7391-7400/org.khanacademy.android.debug I/art﹕ Debugger is no longer active | |
08-17 20:05:50.193 7391-7391/org.khanacademy.android.debug V/AndroidDatabase﹕ ⇢ <init>(path="/data/data/org.khanacademy.android.debug/databases/bookmarks.db") | |
08-17 20:05:50.229 7391-7391/org.khanacademy.android.debug V/AndroidDatabase﹕ ⇠ <init> [35ms] | |
08-17 20:05:50.229 7391-7391/org.khanacademy.android.debug V/AndroidDatabase﹕ ⇢ fetchObjectsAndLog(query=SELECT MAX(version) AS version FROM MigrationVersion, transformer=MigrationVersionEntityTransformer) | |
08-17 20:05:50.229 7391-7391/org.khanacademy.android.debug E/SQLiteLog﹕ (1) no such table: MigrationVersion | |
08-17 20:05:50.230 7391-7391/org.khanacademy.android.debug V/AndroidDatabase﹕ ⇢ update(query=CREATE TABLE MigrationVersion (version UN |
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
package org.khanacademy.android.prefs; | |
import org.khanacademy.core.util.ObservableUtils; | |
import rx.Observable; | |
import rx.subjects.PublishSubject; | |
import android.content.SharedPreferences; | |
/** |
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
public Toolbar(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { | |
super(context, attrs, defStyleAttr); | |
// Need to use getContext() here so that we use the themed context | |
final TintTypedArray a = TintTypedArray.obtainStyledAttributes(getContext(), attrs, | |
R.styleable.Toolbar, defStyleAttr, 0); | |
mTitleTextAppearance = a.getResourceId(R.styleable.Toolbar_titleTextAppearance, 0); | |
mSubtitleTextAppearance = a.getResourceId(R.styleable.Toolbar_subtitleTextAppearance, 0); | |
mGravity = a.getInteger(R.styleable.Toolbar_android_gravity, mGravity); |
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
<style name="Widget.Material.ActionButton" parent="Widget.ActionButton"> | |
<item name="minWidth">@dimen/action_button_min_width_material</item> | |
<item name="minHeight">@dimen/action_button_min_height_material</item> | |
<item name="gravity">center</item> | |
<item name="scaleType">center</item> | |
<item name="maxLines">2</item> | |
<item name="paddingStart">12dp</item> | |
<item name="paddingEnd">12dp</item> | |
</style> |