-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop support for KITKAT SDK and associated dead code cleanup. #9020
Conversation
nativeruntime/src/test/java/org/robolectric/nativeruntime/DefaultNativeRuntimeLazyLoadTest.java
Outdated
Show resolved
Hide resolved
shadows/framework/src/main/java/org/robolectric/shadows/ShadowICU.java
Outdated
Show resolved
Hide resolved
shadows/framework/src/main/java/org/robolectric/shadows/ShadowPausedMessageQueue.java
Outdated
Show resolved
Hide resolved
sorry for distraction this isn't ready for review yet |
464df7f
to
67239e6
Compare
...sts/androidx_test/src/sharedTest/java/org/robolectric/integrationtests/axt/EspressoTest.java
Outdated
Show resolved
Hide resolved
shadows/framework/src/main/java/org/robolectric/shadows/ShadowPaint.java
Outdated
Show resolved
Hide resolved
67239e6
to
979289c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple more comments related to your changes, then it looks good to me.
I've checkout the branch locally, and I noticed that there are still some declarations that may be removed?
- many
@Implementation(maxSdk = JELLY_BEAN
- many places are still checking for API level >= LOLLIPOP
ShadowPackageParser.callParsePackage(Path)
checks forRuntimeEnvironment.getApiLevel() >= Build.VERSION_CODES.LOLLIPOP
ShadowLocaleData.setEnUsLocaleData(LocaleData)
checks forgetApiLevel() >= LOLLIPOP
ShadowLocationManager.getLegacyLocationRequests(String)
's comment still reference KitKatShadowLocationManager.RoboLocationRequest
's comment still reference KitKat
Not sure if it's the scope of this PR, but AndroidManifest.getMinSdkVersion()
and AndroidManifest.getTargetSdkVersion()
still return 19 by default.
Since Robolectric min SDK version is still 19, this may be expected for now.
@@ -403,90 +339,48 @@ private static void throwsIfOutOfBounds(int len, int offset, int count) { | |||
} | |||
|
|||
// nativeWriteBlob was introduced in lollipop, thus no need for a int nativePtr variant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment still needed?
} | ||
|
||
@Implementation(minSdk = LOLLIPOP) | ||
@Implementation | ||
protected static byte[] nativeCreateByteArray(long nativePtr) { | ||
return NATIVE_BYTE_BUFFER_REGISTRY.getNativeObject(nativePtr).createByteArray(); | ||
} | ||
|
||
// nativeReadBlob was introduced in lollipop, thus no need for a int nativePtr variant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
979289c
to
fa34d5b
Compare
fa34d5b
to
c577257
Compare
oops sorry auto submittal of this PR was in progress already. Good comments, will address in a followup |
Drop support for KITKAT SDK and associated dead code cleanup.
The android ecosystem is moving to support a minimum of minSdkVersion L,
and thus Robolectric is following suit and dropping support for running on
SDKs < L (21).
This change does the following:
run explicitly on KitKat (e.g Config(sdk = 19) will now fail with
'unsupported sdk' errors.
such as removing @implementation or unit tests with a maxSdk of < L.
@config references.