Skip to content

Commit

Permalink
Fix null pointer issue for setPreviewCallback/WithBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
DaisukeHohjoh committed Mar 10, 2023
1 parent f839b9a commit c71d79e
Show file tree
Hide file tree
Showing 17 changed files with 60 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions .idea/runConfigurations.xml

This file was deleted.

11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# RICOH THETA Plug-in Library

Version: 3.0.4
Version: 3.0.5

## Contents

Expand Down Expand Up @@ -57,13 +57,14 @@ This Library has been confirmed to operate under the following conditions.

#### Operating System

* Windows 10 Version 21H1
* Windows 10 Version 21H2
* macOS Monterey Version 12.2

#### Development environment

* Android™ Studio 4.2.2
* gradle 3.5.3
* Android™ Studio Chipmunk | 2021.2.1 Patch 2
* Android Gradle Plugin Version 3.6.4
* Gradle Version 5.6.4
* Android™ SDK (API Level 29)
* compileSdkVersion 29
* minSdkVersion 25
Expand Down Expand Up @@ -103,7 +104,7 @@ allprojects {

```
dependencies {
implementation 'com.theta360:pluginlibrary:3.0.4'
implementation 'com.theta360:pluginlibrary:3.0.5'
}
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.android.tools.build:gradle:3.6.4'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Jan 22 15:04:31 JST 2019
#Fri Mar 10 22:50:24 JST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
zipStoreBase=GRADLE_USER_HOME
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apply plugin: 'com.android.library'
apply plugin: 'maven'

def version = '3.0.4'
def version = '3.0.5'
def repo = new File(rootDir, "repository")

android {
compileSdkVersion 29
defaultConfig {
minSdkVersion 25
targetSdkVersion 29
versionCode 12
versionCode 13
versionName "${version}"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,13 @@ public void setPreviewTexture(SurfaceTexture var1) throws IOException {

@Override
public void setOneShotPreviewCallback(PreviewCallback cb) {
prCallback = cb;
mCamera.setOneShotPreviewCallback(previewCallback);
}

@Override
public void setPreviewCallbackWithBuffer(PreviewCallback cb) {
prCallback = cb;
mCamera.setPreviewCallbackWithBuffer(previewCallback);
}

Expand Down Expand Up @@ -438,7 +440,8 @@ public void stopPreview() {

@Override
public void setPreviewCallback(PreviewCallback cb) {
mCamera.setPreviewCallback(null);
prCallback = cb;
mCamera.setPreviewCallback(previewCallback);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,13 @@ public void setPreviewTexture(SurfaceTexture var1) throws IOException {

@Override
public void setOneShotPreviewCallback(PreviewCallback cb) {
prCallback = cb;
mCamera.setOneShotPreviewCallback(previewCallback);
}

@Override
public void setPreviewCallbackWithBuffer(PreviewCallback cb) {
prCallback = cb;
mCamera.setPreviewCallbackWithBuffer(previewCallback);
}

Expand Down Expand Up @@ -404,7 +406,8 @@ public void stopPreview() {

@Override
public void setPreviewCallback(PreviewCallback cb) {
mCamera.setPreviewCallback(null);
prCallback = cb;
mCamera.setPreviewCallback(previewCallback);
}

@Override
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
476c92d786208c53d22bfc8b422e9303
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0592ed097f0677f7651865da798e51d393bb2e34
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.theta360</groupId>
<artifactId>pluginlibrary</artifactId>
<version>3.0.5</version>
<packaging>aar</packaging>
<dependencies>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>appcompat-v7</artifactId>
<version>25.4.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.sanselan</groupId>
<artifactId>sanselan</artifactId>
<version>0.97-incubator</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.danlew</groupId>
<artifactId>android.joda</artifactId>
<version>2.9.9.4</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8aae43e056f1809ad78bc406e718fccd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
63ece3d93197a7f8489ec5cdea02ba0e1b8f8ae9
5 changes: 3 additions & 2 deletions repository/com/theta360/pluginlibrary/maven-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<groupId>com.theta360</groupId>
<artifactId>pluginlibrary</artifactId>
<versioning>
<release>3.0.4</release>
<release>3.0.5</release>
<versions>
<version>2.0.0</version>
<version>2.1.0</version>
Expand All @@ -12,7 +12,8 @@
<version>3.0.2</version>
<version>3.0.3</version>
<version>3.0.4</version>
<version>3.0.5</version>
</versions>
<lastUpdated>20220623070909</lastUpdated>
<lastUpdated>20230310163550</lastUpdated>
</versioning>
</metadata>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
aaa7050f20251396cd983c067b43879a
4afd37fade043c4c14059265aa49f3a8
Original file line number Diff line number Diff line change
@@ -1 +1 @@
915b7fe59dd441dec36cceed95e332c4c588e0c9
fd05867a8adb7f7dbe847b3be0abe9ce18a85118

0 comments on commit c71d79e

Please sign in to comment.