Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
91ec4393
Unverified
Commit
91ec4393
authored
May 18, 2020
by
Jonah Williams
Committed by
GitHub
May 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] handle missing null check in manifest parser (#57400)
parent
70b889a9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
application_package.dart
packages/flutter_tools/lib/src/application_package.dart
+3
-1
application_package_test.dart
...er_tools/test/general.shard/application_package_test.dart
+26
-0
No files found.
packages/flutter_tools/lib/src/application_package.dart
View file @
91ec4393
...
...
@@ -565,7 +565,9 @@ class ApkManifestData {
}
final
_Element
application
=
manifest
.
firstElement
(
'application'
);
assert
(
application
!=
null
);
if
(
application
==
null
)
{
return
null
;
}
final
Iterable
<
_Element
>
activities
=
application
.
allElements
(
'activity'
);
...
...
packages/flutter_tools/test/general.shard/application_package_test.dart
View file @
91ec4393
...
...
@@ -206,6 +206,12 @@ void main() {
expect
(
data
.
packageName
,
'io.flutter.examples.hello_world'
);
expect
(
data
.
launchableActivityName
,
'io.flutter.examples.hello_world.MainActivity'
);
},
overrides:
noColorTerminalOverride
);
testUsingContext
(
'Parses manifest with missing application tag'
,
()
async
{
final
ApkManifestData
data
=
ApkManifestData
.
parseFromXmlDump
(
_aaptDataWithoutApplication
);
expect
(
data
,
isNull
);
});
});
group
(
'PrebuiltIOSApp'
,
()
{
...
...
@@ -644,6 +650,26 @@ N: android=http://schemas.android.com/apk/res/android
A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
'''
;
const
String
_aaptDataWithoutApplication
=
'''
N: android=http://schemas.android.com/apk/res/android
N: dist=http://schemas.android.com/apk/distribution
E: manifest (line=7)
A: android:versionCode(0x0101021b)=(type 0x10)0x1
A: android:versionName(0x0101021c)="1.0" (Raw: "1.0")
A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1c
A: android:compileSdkVersionCodename(0x01010573)="9" (Raw: "9")
A: package="io.flutter.examples.hello_world" (Raw: "io.flutter.examples.hello_world")
A: platformBuildVersionCode=(type 0x10)0x1
A: platformBuildVersionName=(type 0x4)0x3f800000
E: uses-sdk (line=13)
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1c
E: dist:module (line=17)
A: dist:instant=(type 0x12)0xffffffff
E: uses-permission (line=24)
A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
'''
;
class
MockPlistUtils
extends
Mock
implements
PlistParser
{
@override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment