@@ -91,9 +91,8 @@ public class AndroidEntryPointCreator extends AbstractAndroidEntryPointCreator i
91
91
* registers a list of classes to be automatically scanned for Android lifecycle
92
92
* methods
93
93
*
94
- * @param components
95
- * The list of classes to be automatically scanned for Android
96
- * lifecycle methods
94
+ * @param components The list of classes to be automatically scanned for Android
95
+ * lifecycle methods
97
96
*/
98
97
public AndroidEntryPointCreator (ProcessManifest manifest , Collection <SootClass > components ) {
99
98
this .manifest = manifest ;
@@ -325,8 +324,8 @@ private void initializeApplicationClass() {
325
324
for (SootMethod smCallback : callbacks ) {
326
325
// Is this a special callback class? We have callbacks that model activity
327
326
// lifecycle events and ones that model generic events (e.g., low memory)
328
- if (Scene .v ().getOrMakeFastHierarchy (). canStoreType ( smCallback . getDeclaringClass (). getType (),
329
- scActCallbacks .getType ()))
327
+ if (scActCallbacks != null && Scene .v ().getOrMakeFastHierarchy ()
328
+ . canStoreType ( smCallback . getDeclaringClass (). getType (), scActCallbacks .getType ()))
330
329
activityLifecycleCallbacks .put (smCallback .getDeclaringClass (), smCallback .getSignature ());
331
330
else
332
331
applicationCallbackClasses .put (smCallback .getDeclaringClass (), smCallback .getSignature ());
@@ -357,8 +356,7 @@ private void initializeApplicationClass() {
357
356
/**
358
357
* Removes if statements that jump to the fall-through successor
359
358
*
360
- * @param body
361
- * The body from which to remove unnecessary if statements
359
+ * @param body The body from which to remove unnecessary if statements
362
360
*/
363
361
private void eliminateFallthroughIfs (Body body ) {
364
362
boolean changed = false ;
@@ -382,10 +380,10 @@ private void eliminateFallthroughIfs(Body body) {
382
380
/**
383
381
* Adds calls to the callback methods defined in the application class
384
382
*
385
- * @param applicationClass
386
- * The class in which the user-defined application is implemented
387
- * @param applicationLocal
388
- * The local containing the instance of the user-defined application
383
+ * @param applicationClass The class in which the user-defined application is
384
+ * implemented
385
+ * @param applicationLocal The local containing the instance of the user-defined
386
+ * application
389
387
*/
390
388
private void addApplicationCallbackMethods () {
391
389
if (!this .callbackFunctions .containsKey (applicationClass ))
@@ -473,11 +471,10 @@ public ComponentEntryPointCollection getComponentToEntryPointInfo() {
473
471
* Sets the list of callback functions to be integrated into the Android
474
472
* lifecycle
475
473
*
476
- * @param callbackFunctions
477
- * The list of callback functions to be integrated into the Android
478
- * lifecycle. This is a mapping from the Android element class
479
- * (activity, service, etc.) to the list of callback methods for that
480
- * element.
474
+ * @param callbackFunctions The list of callback functions to be integrated into
475
+ * the Android lifecycle. This is a mapping from the
476
+ * Android element class (activity, service, etc.) to
477
+ * the list of callback methods for that element.
481
478
*/
482
479
public void setCallbackFunctions (MultiMap <SootClass , SootMethod > callbackFunctions ) {
483
480
this .callbackFunctions = callbackFunctions ;
@@ -522,9 +519,8 @@ public void reset() {
522
519
/**
523
520
* Sets the Android components for which a dummy main method shall be created
524
521
*
525
- * @param components
526
- * The Android components for which a dummy main method shall be
527
- * created
522
+ * @param components The Android components for which a dummy main method shall
523
+ * be created
528
524
*/
529
525
public void setComponents (Collection <SootClass > components ) {
530
526
this .components = components ;
@@ -533,9 +529,8 @@ public void setComponents(Collection<SootClass> components) {
533
529
/**
534
530
* Removes all methods that have been generated by this entry point creator
535
531
*
536
- * @param removeClass
537
- * True if the generated class shall also be removed. False to only
538
- * remove the methods, but keep the class
532
+ * @param removeClass True if the generated class shall also be removed. False
533
+ * to only remove the methods, but keep the class
539
534
*/
540
535
public void removeGeneratedMethods (boolean removeClass ) {
541
536
// Remove the dummy main method itself
0 commit comments