Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
import android.os.ServiceManager;
import android.os.Looper;
import android.os.RemoteException;
import android.os.CellsManager;
import android.os.ICellsManager;
import android.os.ICellsService;
// import android.os.CellsManager;
// import android.os.ICellsManager;
import android.view.View;
import android.view.WindowManager;
import android.view.animation.Animation;
Expand Down
48 changes: 48 additions & 0 deletions frameworks/multidex/library/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Copyright (C) 2016 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.

genrule {
name: "android-support-multidex-version",
tools: [
"soong_zip",
],
// use srcs as dependencies, otherwise, this module won't be re-run
// during incremental build.
srcs: [
"src/**/*.java",
],
cmd: "echo \"git.version=`cd frameworks/multidex/library; git log --format=\"%H\" -n 1 || " +
"(echo git hash not available; exit 0)`\" > $(genDir)/android-support-multidex.version.txt",
out: [
"android-support-multidex.version.txt",
],
}

java_library_static {
name: "android-support-multidex",
sdk_version: "15",
min_sdk_version: "4",
srcs: [
"src/**/*.java",
],
java_resources: [
":android-support-multidex-version",
],
product_variables: {
unbundled_build: {
// Don't build the library in unbundled branches.
enabled: false,
},
},
}
18 changes: 18 additions & 0 deletions frameworks/multidex/library/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 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.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="androidx.multidex">
</manifest>
15 changes: 15 additions & 0 deletions frameworks/multidex/library/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Library Project including a multidex loader.

This can be used by an Android project to install multiple dexes
in the classloader of an application running on API 4+.

Note that multidexing will allow to go over the dex index limit.
It can also help with the linearalloc limit during installation but it
won't help with linearalloc at execution time. This means that
most applications requiring multidexing because of the dex index
limit won't execute on API below 14 because of linearalloc limit.

There is technically no source, but the src folder is necessary
to ensure that the build system works. The content is actually
located in libs/android-support-multidex.jar.

107 changes: 107 additions & 0 deletions frameworks/multidex/library/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/*
* Copyright (C) 2017 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.
*/

apply plugin: 'com.android.library'

def generatedResourceDir = project.file('generatedResource')
def versionFile = new File(generatedResourceDir, 'androidsupportmultidexversion.txt')

task makeVersionFile(type:Exec) {

doFirst {
versionFile.getParentFile().mkdirs()
}

outputs.files versionFile

commandLine 'sh', '-c', 'git log --format="%H" -n 1 || (echo git hash not available; exit 0)'
standardOutput = new ByteArrayOutputStream()

doLast {
versionFile.text = "git.version=" + standardOutput.toString()
}
}

android {
compileSdkVersion gradle.currentSdk

defaultConfig {
minSdkVersion 4
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}

sourceSets {
main {
java.srcDirs = ['src']
resources.srcDirs = ['res', makeVersionFile.outputs]
res.srcDirs = ['src']
manifest.srcFile 'AndroidManifest.xml'
}
}
}

android.libraryVariants.all { variant ->
variant.getJavaCompiler().dependsOn(makeVersionFile)

if (!name.equals(com.android.builder.core.BuilderConstants.RELEASE)) {
return // Skip non-release
}


def sourceJar = project.tasks.create(name: "sourceJarRelease", type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
artifacts.add("archives", sourceJar)
}

uploadArchives {
repositories {
mavenDeployer {
repository(url: uri(rootProject.ext.supportRepoOut)) {
}

pom.project {
name 'Android Multi-Dex Library'
description "Library for legacy multi-dex support"
url ''
inceptionYear '2013'

licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}

scm {
url "http://source.android.com"
connection "scm:git:https://android.googlesource.com/platform/frameworks/multidex"
}
developers {
developer {
name 'The Android Open Source Project'
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* Copyright (C) 2014 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.
*/

multidexInstanciable:
@@com.android.jack.annotations.MultiDexInstaller
class *
is {
public
}
extends {
class android.app.Instrumentation
| class android.app.Activity
| class android.app.Service
| class android.content.ContentProvider
| class android.content.BroadcastReceiver
| class android.app.backup.BackupAgent
| class android.app.Application
}
do {
@@com.android.jack.annotations.MultiDexInstaller
method void <init>();
}

multidexInstaller:
class *
is {
public
}
extends {
class android.app.Application
}
do {
@@com.android.jack.annotations.MultiDexInstaller
method void attachBaseContext(class android.content.Context)
;
}

instrumentationTestCase:
@@com.android.jack.annotations.ForceInMainDex
class *
extends {
class android.test.InstrumentationTestCase
}
Loading