Fixed
Status Update
Comments
ra...@google.com <ra...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 1dc8469381c79612a3d8f7ec138866c732506950
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Jun 16 16:00:41 2020
Add ActivityResult lint to update Fragment dependency
When using the ActivityResult APIs, you should update the
fragment dependency to at least 1.3.0-alpha06 to ensure that
FragmentActivity is compatible.
This change adds a lint check to notify the user that their dependency
should be updated. This is only a warning, the user must fix the
dependency manually. The quick fix will be in a later CL.
Test: added ActivityResultFragmentVersionDetectorTest
Bug: 152554847
Change-Id: Ie59c1e2d428ce473f4e57939a69616b9052936c5
A activity/activity-lint/src/main/java/androidx/activity/lint/ActivityIssueRegistry.kt
A activity/activity-lint/src/main/java/androidx/activity/lint/ActivityResultFragmentVersionDetector.kt
A activity/activity-lint/src/main/resources/META-INF/services/com.android.tools.lint.client.api.IssueRegistry
A activity/activity-lint/src/test/java/androidx/activity/lint/ActivityResultFragmentVersionDetectorTest.kt
A activity/activity-lint/src/test/java/androidx/activity/lint/ApiLintVersionsTest.kt
A activity/activity-lint/src/test/java/androidx/activity/lint/stubs/Stubs.kt
https://android-review.googlesource.com/1332135
Branch: androidx-master-dev
commit 1dc8469381c79612a3d8f7ec138866c732506950
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Jun 16 16:00:41 2020
Add ActivityResult lint to update Fragment dependency
When using the ActivityResult APIs, you should update the
fragment dependency to at least 1.3.0-alpha06 to ensure that
FragmentActivity is compatible.
This change adds a lint check to notify the user that their dependency
should be updated. This is only a warning, the user must fix the
dependency manually. The quick fix will be in a later CL.
Test: added ActivityResultFragmentVersionDetectorTest
Bug: 152554847
Change-Id: Ie59c1e2d428ce473f4e57939a69616b9052936c5
A activity/activity-lint/src/main/java/androidx/activity/lint/ActivityIssueRegistry.kt
A activity/activity-lint/src/main/java/androidx/activity/lint/ActivityResultFragmentVersionDetector.kt
A activity/activity-lint/src/main/resources/META-INF/services/com.android.tools.lint.client.api.IssueRegistry
A activity/activity-lint/src/test/java/androidx/activity/lint/ActivityResultFragmentVersionDetectorTest.kt
A activity/activity-lint/src/test/java/androidx/activity/lint/ApiLintVersionsTest.kt
A activity/activity-lint/src/test/java/androidx/activity/lint/stubs/Stubs.kt
dr...@gmail.com <dr...@gmail.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 88b606aa168d0131d366a790183453d52ed97d26
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Jun 11 11:27:35 2020
Create activity-lint module
Created module for custom activity lint checks.
Test: ./gradlew bOS
Bug: 152554847
Change-Id: Ice5a9794fcc769a82f1831cc10337d9b82fbbb71
A activity/activity-lint/build.gradle
M buildSrc/src/main/kotlin/androidx/build/PublishDocsRules.kt
M settings.gradle
https://android-review.googlesource.com/1332134
Branch: androidx-master-dev
commit 88b606aa168d0131d366a790183453d52ed97d26
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Jun 11 11:27:35 2020
Create activity-lint module
Created module for custom activity lint checks.
Test: ./gradlew bOS
Bug: 152554847
Change-Id: Ice5a9794fcc769a82f1831cc10337d9b82fbbb71
A activity/activity-lint/build.gradle
M buildSrc/src/main/kotlin/androidx/build/PublishDocsRules.kt
M settings.gradle
ap...@google.com <ap...@google.com> #4
This has been fixed internally and will be available in the Activity 1.2.0-alpha07 release.
Description
long interval = 900000; // 15 minutes
long flexInterval = (interval / 2);
workRequestBuilder = new PeriodicWorkRequest.Builder(MyWorker.class, interval, TimeUnit.MILLISECONDS, flexInterval, TimeUnit.MILLISECONDS);
When I enqueue this on my Android 7 device, the first periodic work does not fire immediately, but as expected only fires halfway through the interval, when the flex period starts.
But when this is enqueued on an Android 4 device (I'm using an Android 4.3 emulator but I noticed this first on a user's real Android 4.3 device), the first periodic work fires IMMEDIATELY.
Seems like flexInterval is not properly taken into account pre Android 5 (based on AlarmManager)??