You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
Context: handle getTargetSdkVersion() returning null
This commit is contained in:
@@ -88,7 +88,9 @@ public class Context extends Object {
|
||||
InputStream inStream = ClassLoader.getSystemClassLoader().getResourceAsStream("AndroidManifest.xml");
|
||||
try {
|
||||
manifest = AndroidManifestBlock.load(inStream);
|
||||
application_info.targetSdkVersion = manifest.getTargetSdkVersion();
|
||||
Integer targetSdkVersion = manifest.getTargetSdkVersion();
|
||||
if (targetSdkVersion != null)
|
||||
application_info.targetSdkVersion = targetSdkVersion;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user