mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
Reuse previous tests from experimental
This commit is contained in:
24
java/ql/test/query-tests/security/CWE-749/IntentUtils.java
Normal file
24
java/ql/test/query-tests/security/CWE-749/IntentUtils.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package com.example.app;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
|
||||
/** A utility program for getting intent extra information from Android activity */
|
||||
public class IntentUtils {
|
||||
/** Get intent extra */
|
||||
public static String getIntentUrl(Activity a) {
|
||||
String thisUrl = a.getIntent().getStringExtra("url");
|
||||
return thisUrl;
|
||||
}
|
||||
|
||||
/** Get bundle extra */
|
||||
public static String getBundleUrl(Activity a) {
|
||||
String thisUrl = a.getIntent().getExtras().getString("url");
|
||||
return thisUrl;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user