Skip to content

Commit d0bf6ef

Browse files
Merge pull request livecode#7179 from livecodepanos/bugfix-22388
[22388] Add support for merging activity attributes in manifest
2 parents f69fd55 + cf93eb6 commit d0bf6ef

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

docs/notes/bugfix-22388.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Add support for merging activity attributes in Android Manifest Merging mechanism

ide-support/revsaveasandroidstandalone.livecodescript

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1829,6 +1829,18 @@ command MergeManifestArray @xManifestArrayA, pAdditionalsA
18291829
put max(tExisting, tNew) into \
18301830
xManifestArrayA[tUsesSDKIndex]["@attributes"]["android:minSDKVersion"]
18311831
break
1832+
case "activity"
1833+
local tActivityIndex
1834+
put FindIndex(xManifestArrayA, "activity") into tActivityIndex
1835+
local tExistingA, tNewA
1836+
put xManifestArrayA[tActivityIndex]["@attributes"] \
1837+
into tExistingA
1838+
put tData["@attributes"] into tNewA
1839+
repeat for each line tKey in the keys of tNewA
1840+
put tNewA[tKey] after tExistingA[tKey]
1841+
end repeat
1842+
put tExistingA into xManifestArrayA[tActivityIndex]["@attributes"]
1843+
break
18321844
default
18331845
insertIntoList tData, xManifestArrayA, tEndOfBlock
18341846
add 1 to tEndOfBlock

0 commit comments

Comments
 (0)