Skip to content

Commit

Permalink
Tweak style
Browse files Browse the repository at this point in the history
  • Loading branch information
oleavr committed Jul 12, 2024
1 parent f59496b commit 9ce4d83
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/android.js
Original file line number Diff line number Diff line change
Expand Up @@ -1885,19 +1885,19 @@ function ensureArtKnowsHowToHandleReplacementMethods (vm) {
const apiLevel = getAndroidApiLevel();

let exportName = null;

if (apiLevel > 28) {
exportName = '_ZN3art2gc9collector17ConcurrentCopying12CopyingPhaseEv';
} else if (apiLevel > 22) {
exportName = '_ZN3art2gc9collector17ConcurrentCopying12MarkingPhaseEv';
}

if (exportName !== null) {
let collectorCMC = Module.getExportByName('libart.so', '_ZN3art2gc9collector11MarkCompact15CompactionPhaseEv');
if(collectorCMC !== null){
Interceptor.attach(Module.getExportByName('libart.so', exportName), artController.hooks.Gc.copyingPhase);

const collectorCMC = Module.findExportByName('libart.so', '_ZN3art2gc9collector11MarkCompact15CompactionPhaseEv');
if (collectorCMC !== null) {
Interceptor.attach(collectorCMC, artController.hooks.Gc.copyingPhase);
}
Interceptor.attach(Module.getExportByName('libart.so', exportName), artController.hooks.Gc.copyingPhase);
}
}

Expand Down

0 comments on commit 9ce4d83

Please sign in to comment.