DiskUsage: fix 3.8.0 (3080)

Build scan5 from source.
Add sources of system.jar as aidl files.
This commit is contained in:
Julian Winkler 2017-08-28 13:54:19 +02:00 committed by Marcus Hoffmann
parent ab9f034ea1
commit f89bb6b1bd
3 changed files with 104 additions and 2 deletions

View file

@ -78,11 +78,13 @@ Build:3.7.1,3071
build=$$NDK$$/ndk-build
Build:3.8.0,3080
disable=jni
commit=471f435ef84b5a3a0c0d5d10d7c2d6ce012fe5a0
subdir=app
patch=scan5-recipe.patch,system-jar-sources.patch
gradle=yes
buildjni=yes
rm=jni/scan,app/src/main/assets/scan*,app/src/main/extra/system.jar
scanignore=app/src/main/res/raw/mimes
build=$$NDK$$/ndk-build
Maintainer Notes:
The system.jar is from AOSP - see extra/system.jar.README and

View file

@ -0,0 +1,32 @@
diff --git a/jni/Android.mk b/jni/Android.mk
index d48786c..4f1e2f2 100644
--- a/jni/Android.mk
+++ b/jni/Android.mk
@@ -13,6 +13,7 @@
# limitations under the License.
#
LOCAL_PATH := $(call my-dir)
+NDK_APP_DST_DIR := src/main/assets
include $(CLEAR_VARS)
@@ -20,3 +21,12 @@ LOCAL_MODULE := scan
LOCAL_SRC_FILES := scan.c
include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := scan5
+LOCAL_SRC_FILES := scan.c
+LOCAL_CFLAGS += -fPIE
+LOCAL_LDFLAGS += -fPIE -pie
+
+include $(BUILD_EXECUTABLE)
diff --git a/jni/Application.mk b/jni/Application.mk
index e69de29..7b5fd9c 100644
--- a/jni/Application.mk
+++ b/jni/Application.mk
@@ -0,0 +1,2 @@
+APP_ABI := armeabi
+APP_PIE := false

View file

@ -0,0 +1,68 @@
diff --git a/app/build.gradle b/app/build.gradle
index f21eb15..b336565 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -19,7 +19,3 @@ android {
}
}
}
-
-dependencies {
- compile files('src/main/extra/system.jar')
-}
diff --git a/app/src/main/aidl/android/content/pm/IPackageStatsObserver.aidl b/app/src/main/aidl/android/content/pm/IPackageStatsObserver.aidl
index e69de29..e282094 100644
--- a/app/src/main/aidl/android/content/pm/IPackageStatsObserver.aidl
+++ b/app/src/main/aidl/android/content/pm/IPackageStatsObserver.aidl
@@ -0,0 +1,28 @@
+/*
+**
+** Copyright 2007, 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 android.content.pm;
+import android.content.pm.PackageStats;
+/**
+ * API for package data change related callbacks from the Package Manager.
+ * Some usage scenarios include deletion of cache directory, generate
+ * statistics related to code, data, cache usage(TODO)
+ * {@hide}
+ */
+oneway interface IPackageStatsObserver {
+
+ void onGetStatsCompleted(in PackageStats pStats, boolean succeeded);
+}
diff --git a/app/src/main/aidl/android/content/pm/PackageStats.aidl b/app/src/main/aidl/android/content/pm/PackageStats.aidl
index e69de29..483a0d1 100644
--- a/app/src/main/aidl/android/content/pm/PackageStats.aidl
+++ b/app/src/main/aidl/android/content/pm/PackageStats.aidl
@@ -0,0 +1,18 @@
+/* //device/java/android/android/view/WindowManager.aidl
+**
+** Copyright 2007, 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 android.content.pm;
+parcelable PackageStats;