Merge "Fix static analyzer complaints"
This commit is contained in:
@@ -1094,7 +1094,7 @@ void AndroidRuntime::start(const char* className, const Vector<String8>& options
|
|||||||
* Start VM. This thread becomes the main thread of the VM, and will
|
* Start VM. This thread becomes the main thread of the VM, and will
|
||||||
* not return until the VM exits.
|
* not return until the VM exits.
|
||||||
*/
|
*/
|
||||||
char* slashClassName = toSlashClassName(className);
|
char* slashClassName = toSlashClassName(className != NULL ? className : "");
|
||||||
jclass startClass = env->FindClass(slashClassName);
|
jclass startClass = env->FindClass(slashClassName);
|
||||||
if (startClass == NULL) {
|
if (startClass == NULL) {
|
||||||
ALOGE("JavaVM unable to locate class '%s'\n", slashClassName);
|
ALOGE("JavaVM unable to locate class '%s'\n", slashClassName);
|
||||||
|
|||||||
@@ -345,8 +345,10 @@ static jlong android_view_MotionEvent_nativeInitialize(JNIEnv* env, jclass clazz
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
MotionEvent* event = reinterpret_cast<MotionEvent*>(nativePtr);
|
MotionEvent* event;
|
||||||
if (!event) {
|
if (nativePtr) {
|
||||||
|
event = reinterpret_cast<MotionEvent*>(nativePtr);
|
||||||
|
} else {
|
||||||
event = new MotionEvent();
|
event = new MotionEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user