summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--core/api/current.txt1
-rw-r--r--core/java/Android.bp5
-rw-r--r--core/java/android/os/Parcel.java2
-rw-r--r--libs/hwui/Readback.cpp16
-rw-r--r--tests/Camera2Tests/SmartCamera/SimpleCamera/.project33
-rw-r--r--tests/HwAccelerationTest/.project33
7 files changed, 18 insertions, 73 deletions
diff --git a/.gitignore b/.gitignore
index c47cc8bf2538..2dffb7a8697d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
.idea
+.project
*.iml
*.sw*
gen/ \ No newline at end of file
diff --git a/core/api/current.txt b/core/api/current.txt
index 93ef8f82093c..5c072541f974 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -29976,6 +29976,7 @@ package android.os {
method public boolean hasFileDescriptors();
method public byte[] marshall();
method @NonNull public static android.os.Parcel obtain();
+ method @NonNull public static android.os.Parcel obtain(@NonNull android.os.IBinder);
method @Nullable public Object[] readArray(@Nullable ClassLoader);
method @Nullable public java.util.ArrayList readArrayList(@Nullable ClassLoader);
method public void readBinderArray(@NonNull android.os.IBinder[]);
diff --git a/core/java/Android.bp b/core/java/Android.bp
index 949ba6ac419a..3b2d88318b76 100644
--- a/core/java/Android.bp
+++ b/core/java/Android.bp
@@ -332,12 +332,7 @@ filegroup {
filegroup {
name: "framework-cellbroadcast-shared-srcs",
srcs: [
- "android/os/HandlerExecutor.java",
"android/util/LocalLog.java",
- "com/android/internal/util/IState.java",
- "com/android/internal/util/Preconditions.java",
- "com/android/internal/util/State.java",
- "com/android/internal/util/StateMachine.java",
],
}
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java
index 243dfb3e04bc..358aa29eaea6 100644
--- a/core/java/android/os/Parcel.java
+++ b/core/java/android/os/Parcel.java
@@ -458,8 +458,6 @@ public final class Parcel {
* transaction on this specific binder object. Based on this, the format of the wire binder
* protocol may change. For future compatibility, it is recommended to use this for all
* Parcels.
- *
- * @hide
*/
@NonNull
public static Parcel obtain(@NonNull IBinder binder) {
diff --git a/libs/hwui/Readback.cpp b/libs/hwui/Readback.cpp
index e08b99d52cdb..d897e94f969f 100644
--- a/libs/hwui/Readback.cpp
+++ b/libs/hwui/Readback.cpp
@@ -32,6 +32,8 @@
using namespace android::uirenderer::renderthread;
+static constexpr bool sEnableExtraCropInset = true;
+
namespace android {
namespace uirenderer {
@@ -71,6 +73,20 @@ CopyResult Readback::copySurfaceInto(ANativeWindow* window, const Rect& inSrcRec
ALOGW("Surface doesn't have any previously queued frames, nothing to readback from");
return CopyResult::SourceEmpty;
}
+
+ if (sEnableExtraCropInset &&
+ (cropRect.right - cropRect.left != bitmap->width() ||
+ cropRect.bottom - cropRect.top != bitmap->height())) {
+ /*
+ * When we need use filtering, we should also make border shrink here like gui.
+ * But we could not check format for YUV or RGB here... Just use 1 pix.
+ */
+ cropRect.left += 0.5f;
+ cropRect.top += 0.5f;
+ cropRect.right -= 0.5f;
+ cropRect.bottom -= 0.5f;
+ }
+
UniqueAHardwareBuffer sourceBuffer{rawSourceBuffer};
AHardwareBuffer_Desc description;
AHardwareBuffer_describe(sourceBuffer.get(), &description);
diff --git a/tests/Camera2Tests/SmartCamera/SimpleCamera/.project b/tests/Camera2Tests/SmartCamera/SimpleCamera/.project
deleted file mode 100644
index 2517e2d4f93d..000000000000
--- a/tests/Camera2Tests/SmartCamera/SimpleCamera/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>CameraShoot</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.ApkBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/HwAccelerationTest/.project b/tests/HwAccelerationTest/.project
deleted file mode 100644
index 7c04d3cb6426..000000000000
--- a/tests/HwAccelerationTest/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>HwAccelerationTest</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.ApkBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>