summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2015-07-02 11:28:40 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-02 11:28:40 +0000
commit4da086ee7f4eba64265b28cdc5df9f690d97a7ac (patch)
tree398b7cf21d1298d6ca2ec024396a17fa81c433ff /core/java
parentbba9d27e0c2d59e77bf51872b8773b962ea4b4c1 (diff)
parent6bcdf90e49ca8ed1ac7a9074d5f6b79889451001 (diff)
am 6bcdf90e: Merge "Delete unused testing scripts and WithFramework."
* commit '6bcdf90e49ca8ed1ac7a9074d5f6b79889451001': Delete unused testing scripts and WithFramework.
Diffstat (limited to 'core/java')
-rw-r--r--core/java/com/android/internal/util/WithFramework.java58
1 files changed, 0 insertions, 58 deletions
diff --git a/core/java/com/android/internal/util/WithFramework.java b/core/java/com/android/internal/util/WithFramework.java
deleted file mode 100644
index 7d8596ff1363..000000000000
--- a/core/java/com/android/internal/util/WithFramework.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.internal.util;
-
-import java.lang.reflect.Method;
-
-/**
- * Binds native framework methods and then invokes a main class with the
- * remaining arguments.
- */
-class WithFramework {
-
- /**
- * Invokes main(String[]) method on class in args[0] with args[1..n].
- */
- public static void main(String[] args) throws Exception {
- if (args.length == 0) {
- printUsage();
- return;
- }
-
- Class<?> mainClass = Class.forName(args[0]);
-
- System.loadLibrary("android_runtime");
- if (registerNatives() < 0) {
- throw new RuntimeException("Error registering natives.");
- }
-
- String[] newArgs = new String[args.length - 1];
- System.arraycopy(args, 1, newArgs, 0, newArgs.length);
- Method mainMethod = mainClass.getMethod("main", String[].class);
- mainMethod.invoke(null, new Object[] { newArgs });
- }
-
- private static void printUsage() {
- System.err.println("Usage: dalvikvm " + WithFramework.class.getName()
- + " [main class] [args]");
- }
-
- /**
- * Registers native functions. See AndroidRuntime.cpp.
- */
- static native int registerNatives();
-}