Skip to content

Commit

Permalink
Replace files
Browse files Browse the repository at this point in the history
  • Loading branch information
songyiYu committed Jul 21, 2020
1 parent a5554f0 commit 3903af8
Show file tree
Hide file tree
Showing 92 changed files with 531 additions and 1,098 deletions.
10 changes: 10 additions & 0 deletions .metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
revision: 8af6b2f038c1172e61d418869363a28dffec3cb4
channel: stable

project_type: plugin
6 changes: 3 additions & 3 deletions CHANGELOG.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## 0.5.8+3
This plugin is forked from https://github.com/flutter/plugins/tree/master/packages/camera
* Initial release
## 0.0.1

* TODO: Describe initial release.
28 changes: 1 addition & 27 deletions LICENSE
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,27 +1 @@
// Copyright 2017 The Chromium Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
TODO: Add your license here.
66 changes: 10 additions & 56 deletions README.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,60 +1,14 @@
# Camera_ignore_kitkat Plugin
# camera_ignore_kitkat

This plugin is following [camera](https://pub.dartlang.org/packages/camera) plugin.
A new flutter plugin project.

But You don't have to change minimum Android sdk version.
## Getting Started

You can find more details about README.md ..
This project is a starting point for a Flutter
[plug-in package](https://flutter.dev/developing-packages/),
a specialized package that includes platform-specific implementation code for
Android and/or iOS.


```dart
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:camera/camera.dart';
List<CameraDescription> cameras;
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
cameras = await availableCameras();
runApp(CameraApp());
}
class CameraApp extends StatefulWidget {
@override
_CameraAppState createState() => _CameraAppState();
}
class _CameraAppState extends State<CameraApp> {
CameraController controller;
@override
void initState() {
super.initState();
controller = CameraController(cameras[0], ResolutionPreset.medium);
controller.initialize().then((_) {
if (!mounted) {
return;
}
setState(() {});
});
}
@override
void dispose() {
controller?.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
if (!controller.value.isInitialized) {
return Container();
}
return AspectRatio(
aspectRatio:
controller.value.aspectRatio,
child: CameraPreview(controller));
}
}
```
For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
10 changes: 0 additions & 10 deletions analysis_options.yaml

This file was deleted.

8 changes: 8 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
22 changes: 5 additions & 17 deletions android/build.gradle
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'io.flutter.plugins.camera'
version '1.0-SNAPSHOT'
group 'flutter.moum.camera_ignore_kitkat'
version '1.0'

buildscript {
repositories {
Expand All @@ -8,7 +8,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.android.tools.build:gradle:3.5.0'
}
}

Expand All @@ -26,24 +26,12 @@ android {

defaultConfig {
minSdkVersion 16
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
disable 'InvalidPackage'
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
dependencies {
implementation 'androidx.annotation:annotation:1.0.0'
implementation 'androidx.core:core:1.0.0'
}
testOptions {
unitTests.returnDefaultValues = true
}
}

dependencies {
testImplementation 'junit:junit:4.12'
}
3 changes: 3 additions & 0 deletions android/gradle.properties
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
2 changes: 1 addition & 1 deletion android/settings.gradle
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rootProject.name = 'camera_ignore_kitkiat'
rootProject.name = 'camera_ignore_kitkat'
4 changes: 2 additions & 2 deletions android/src/main/AndroidManifest.xml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.flutter.plugins.camera">
package="flutter.moum.camera_ignore_kitkat">
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
</manifest>
</manifest>
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package io.flutter.plugins.camera;

import static android.view.OrientationEventListener.ORIENTATION_UNKNOWN;
import static io.flutter.plugins.camera.CameraUtils.computeBestPreviewSize;
package flutter.moum.camera_ignore_kitkat;

import android.annotation.SuppressLint;
import android.app.Activity;
Expand All @@ -25,12 +22,10 @@
import android.util.Size;
import android.view.OrientationEventListener;
import android.view.Surface;

import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;

import io.flutter.plugin.common.EventChannel;
import io.flutter.plugin.common.MethodChannel.Result;
import io.flutter.view.TextureRegistry.SurfaceTextureEntry;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
Expand All @@ -41,6 +36,13 @@
import java.util.List;
import java.util.Map;

import io.flutter.plugin.common.EventChannel;
import io.flutter.plugin.common.MethodChannel.Result;
import io.flutter.view.TextureRegistry.SurfaceTextureEntry;

import static android.view.OrientationEventListener.ORIENTATION_UNKNOWN;
import static flutter.moum.camera_ignore_kitkat.CameraUtils.computeBestPreviewSize;

@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public class Camera {
private final SurfaceTextureEntry flutterTexture;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package io.flutter.plugins.camera;
package flutter.moum.camera_ignore_kitkat;

import android.Manifest;
import android.Manifest.permission;
import android.app.Activity;
import android.content.pm.PackageManager;

import androidx.annotation.VisibleForTesting;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;

import io.flutter.plugin.common.PluginRegistry;
import io.flutter.plugin.common.PluginRegistry.RequestPermissionsResultListener;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package io.flutter.plugins.camera;
package flutter.moum.camera_ignore_kitkat;

import android.app.Activity;
import android.os.Build;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
Expand All @@ -15,14 +16,14 @@
import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding;
import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.PluginRegistry.Registrar;
import io.flutter.plugins.camera.CameraPermissions.PermissionsRegistry;
import flutter.moum.camera_ignore_kitkat.CameraPermissions.PermissionsRegistry;
import io.flutter.view.TextureRegistry;

/**
* Platform implementation of the camera_plugin.
*
* <p>Instantiate this in an add to app scenario to gracefully handle activity and context changes.
* See {@code io.flutter.plugins.camera.MainActivity} for an example.
* See {@code flutter.moum.camera_ignore_kitkat.camera.MainActivity} for an example.
*
* <p>Call {@link #registerWith(Registrar)} to register an implementation of this that uses the
* stable {@code io.flutter.plugin.common} package.
Expand All @@ -37,7 +38,7 @@ public final class CameraPlugin implements FlutterPlugin, ActivityAware {
/**
* Initialize this within the {@code #configureFlutterEngine} of a Flutter activity or fragment.
*
* <p>See {@code io.flutter.plugins.camera.MainActivity} for an example.
* <p>See {@code flutter.moum.camera_ignore_kitkat.MainActivity} for an example.
*/
public CameraPlugin() {}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.flutter.plugins.camera;
package flutter.moum.camera_ignore_kitkat;

import android.app.Activity;
import android.content.Context;
Expand All @@ -14,7 +14,6 @@

import androidx.annotation.RequiresApi;

import io.flutter.plugins.camera.Camera.ResolutionPreset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
Expand All @@ -23,6 +22,8 @@
import java.util.List;
import java.util.Map;

import flutter.moum.camera_ignore_kitkat.Camera.ResolutionPreset;

/** Provides various utilities for camera. */
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public final class CameraUtils {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
package io.flutter.plugins.camera;
package flutter.moum.camera_ignore_kitkat;

import android.text.TextUtils;

import androidx.annotation.Nullable;
import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.EventChannel;

import java.util.HashMap;
import java.util.Map;

import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.EventChannel;

class DartMessenger {
@Nullable private EventChannel.EventSink eventSink;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.flutter.plugins.camera;
package flutter.moum.camera_ignore_kitkat;

import android.app.Activity;
import android.hardware.camera2.CameraAccessException;
Expand All @@ -13,7 +13,7 @@
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.MethodChannel.Result;
import io.flutter.plugins.camera.CameraPermissions.PermissionsRegistry;
import flutter.moum.camera_ignore_kitkat.CameraPermissions.PermissionsRegistry;
import io.flutter.view.TextureRegistry;

@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
Expand Down

This file was deleted.

Loading

0 comments on commit 3903af8

Please sign in to comment.