Skip to content

Commit 3b1e244

Browse files
committed
Add ability to get download id for file progress tracking.
1 parent 7c80a09 commit 3b1e244

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

firebase-ml-modeldownloader/firebase-ml-modeldownloader.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ dependencies {
8080

8181
testImplementation 'androidx.test:core:1.3.0'
8282
testImplementation 'com.github.tomakehurst:wiremock-standalone:2.26.3'
83-
testImplementation "com.google.truth:truth:1.0.1"
83+
testImplementation "com.google.truth:truth:$googleTruthVersion"
8484
testImplementation "org.robolectric:robolectric:$robolectricVersion"
8585
testImplementation 'com.google.truth.extensions:truth-proto-extension:1.0'
8686
testImplementation 'com.google.protobuf:protobuf-java-util:3.11.0'

firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/internal/SharedPreferencesUtil.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,12 @@ public synchronized void setCustomModelStatsCollectionEnabled(boolean enable) {
274274
.apply();
275275
}
276276

277+
/**
278+
* Gets the start time (in ms) of the model download attempt.
279+
*
280+
* @param customModel model
281+
* @return time in ms
282+
*/
277283
public synchronized long getModelDownloadBeginTimeMs(@NonNull CustomModel customModel) {
278284
return getSharedPreferences()
279285
.getLong(

0 commit comments

Comments
 (0)