Messaging: Fix modifiers
We either have too few or too many Change-Id: I09a9a38b859c68526fcbcdbc7862afe1d693f6c0
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,9 +21,9 @@ import android.os.Looper;
|
||||
import java.util.Arrays;
|
||||
|
||||
public final class Assert {
|
||||
public static @interface RunsOnMainThread {}
|
||||
public static @interface DoesNotRunOnMainThread {}
|
||||
public static @interface RunsOnAnyThread {}
|
||||
public @interface RunsOnMainThread {}
|
||||
public @interface DoesNotRunOnMainThread {}
|
||||
public @interface RunsOnAnyThread {}
|
||||
|
||||
private static final String TEST_THREAD_SUBSTRING = "test";
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,7 +26,7 @@ package com.android.messaging.util;
|
||||
public class CircularArray<E> {
|
||||
private int mNextWriter;
|
||||
private boolean mHasWrapped;
|
||||
private int mMaxCount;
|
||||
private final int mMaxCount;
|
||||
Object mList[];
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ConnectivityUtil {
|
||||
private ConnectivityListener mListener;
|
||||
|
||||
public interface ConnectivityListener {
|
||||
public void onPhoneStateChanged(int serviceState);
|
||||
void onPhoneStateChanged(int serviceState);
|
||||
}
|
||||
|
||||
public ConnectivityUtil(final Context context, final int subId) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2007-2008 Esmertec AG.
|
||||
* Copyright (C) 2007-2008 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,10 +21,10 @@ package com.android.messaging.util;
|
||||
import android.webkit.MimeTypeMap;
|
||||
|
||||
public final class ContentType {
|
||||
public static String THREE_GPP_EXTENSION = "3gp";
|
||||
public static String VIDEO_MP4_EXTENSION = "mp4";
|
||||
public static final String THREE_GPP_EXTENSION = "3gp";
|
||||
public static final String VIDEO_MP4_EXTENSION = "mp4";
|
||||
// Default extension used when we don't know one.
|
||||
public static String DEFAULT_EXTENSION = "dat";
|
||||
public static final String DEFAULT_EXTENSION = "dat";
|
||||
|
||||
public static final int TYPE_IMAGE = 0;
|
||||
public static final int TYPE_VIDEO = 1;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -95,7 +96,7 @@ public class DebugUtils {
|
||||
}
|
||||
|
||||
public abstract static class DebugAction {
|
||||
String mTitle;
|
||||
final String mTitle;
|
||||
public DebugAction(final String title) {
|
||||
mTitle = title;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,8 +34,8 @@ import java.util.concurrent.TimeUnit;
|
||||
public class GifTranscoder {
|
||||
private static final String TAG = LogUtil.BUGLE_TAG;
|
||||
|
||||
private static int MIN_HEIGHT = 100;
|
||||
private static int MIN_WIDTH = 100;
|
||||
private static final int MIN_HEIGHT = 100;
|
||||
private static final int MIN_WIDTH = 100;
|
||||
|
||||
static {
|
||||
System.loadLibrary("giftranscode");
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,8 +21,8 @@ import android.content.Context;
|
||||
import com.android.messaging.Factory;
|
||||
|
||||
public abstract class MediaUtil {
|
||||
public static interface OnCompletionListener {
|
||||
public void onCompletion();
|
||||
public interface OnCompletionListener {
|
||||
void onCompletion();
|
||||
}
|
||||
|
||||
public static MediaUtil get() {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -71,7 +72,7 @@ public class NotificationPlayer implements OnCompletionListener {
|
||||
* be created with a looper running so its event handler is not null.
|
||||
*/
|
||||
private final class CreationAndCompletionThread extends Thread {
|
||||
public Command mCmd;
|
||||
public final Command mCmd;
|
||||
public CreationAndCompletionThread(final Command cmd) {
|
||||
super();
|
||||
mCmd = cmd;
|
||||
@@ -235,7 +236,7 @@ public class NotificationPlayer implements OnCompletionListener {
|
||||
}
|
||||
}
|
||||
|
||||
private String mTag;
|
||||
private final String mTag;
|
||||
private CmdThread mThread;
|
||||
private CreationAndCompletionThread mCompletionThread;
|
||||
private final Object mCompletionHandlingLock = new Object();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -76,7 +77,7 @@ public class OsUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
private static Hashtable<String, Integer> sPermissions = new Hashtable<String, Integer>();
|
||||
private static final Hashtable<String, Integer> sPermissions = new Hashtable<String, Integer>();
|
||||
|
||||
/**
|
||||
* Check if the app has the specified permission. If it does not, the app needs to use
|
||||
@@ -150,7 +151,7 @@ public class OsUtil {
|
||||
return missingArray;
|
||||
}
|
||||
|
||||
private static String[] sRequiredPermissions = new String[] {
|
||||
private static final String[] sRequiredPermissions = new String[] {
|
||||
// Required to read existing SMS threads
|
||||
Manifest.permission.READ_SMS,
|
||||
// Required for knowing the phone number, number of SIMs, etc.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,7 +43,7 @@ public abstract class SafeAsyncTask<Params, Progress, Result>
|
||||
|
||||
private static final String WAKELOCK_ID = "bugle_safe_async_task_wakelock";
|
||||
protected static final int WAKELOCK_OP = 1000;
|
||||
private static WakeLockHelper sWakeLock = new WakeLockHelper(WAKELOCK_ID);
|
||||
private static final WakeLockHelper sWakeLock = new WakeLockHelper(WAKELOCK_ID);
|
||||
|
||||
private final long mMaxExecutionTimeMillis;
|
||||
private final boolean mCancelExecutionOnTimeout;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2013 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -322,7 +323,7 @@ public class ExifInterface {
|
||||
* Tags that contain offset markers. These are included in the banned
|
||||
* defines.
|
||||
*/
|
||||
private static HashSet<Short> sOffsetTags = new HashSet<Short>();
|
||||
private static final HashSet<Short> sOffsetTags = new HashSet<Short>();
|
||||
static {
|
||||
sOffsetTags.add(getTrueTagKey(TAG_GPS_IFD));
|
||||
sOffsetTags.add(getTrueTagKey(TAG_EXIF_IFD));
|
||||
@@ -334,7 +335,7 @@ public class ExifInterface {
|
||||
/**
|
||||
* Tags with definitions that cannot be overridden (banned defines).
|
||||
*/
|
||||
protected static HashSet<Short> sBannedDefines = new HashSet<Short>(sOffsetTags);
|
||||
protected static final HashSet<Short> sBannedDefines = new HashSet<Short>(sOffsetTags);
|
||||
static {
|
||||
sBannedDefines.add(getTrueTagKey(TAG_NULL));
|
||||
sBannedDefines.add(getTrueTagKey(TAG_JPEG_INTERCHANGE_FORMAT_LENGTH));
|
||||
@@ -377,84 +378,84 @@ public class ExifInterface {
|
||||
* <li>RIGHT_BOTTOM is a 270 degree clockwise rotation.</li>
|
||||
* </ul>
|
||||
*/
|
||||
public static interface Orientation {
|
||||
public static final short TOP_LEFT = 1;
|
||||
public static final short TOP_RIGHT = 2;
|
||||
public static final short BOTTOM_LEFT = 3;
|
||||
public static final short BOTTOM_RIGHT = 4;
|
||||
public static final short LEFT_TOP = 5;
|
||||
public static final short RIGHT_TOP = 6;
|
||||
public static final short LEFT_BOTTOM = 7;
|
||||
public static final short RIGHT_BOTTOM = 8;
|
||||
public interface Orientation {
|
||||
short TOP_LEFT = 1;
|
||||
short TOP_RIGHT = 2;
|
||||
short BOTTOM_LEFT = 3;
|
||||
short BOTTOM_RIGHT = 4;
|
||||
short LEFT_TOP = 5;
|
||||
short RIGHT_TOP = 6;
|
||||
short LEFT_BOTTOM = 7;
|
||||
short RIGHT_BOTTOM = 8;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_Y_CB_CR_POSITIONING}
|
||||
*/
|
||||
public static interface YCbCrPositioning {
|
||||
public static final short CENTERED = 1;
|
||||
public static final short CO_SITED = 2;
|
||||
public interface YCbCrPositioning {
|
||||
short CENTERED = 1;
|
||||
short CO_SITED = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_COMPRESSION}
|
||||
*/
|
||||
public static interface Compression {
|
||||
public static final short UNCOMPRESSION = 1;
|
||||
public static final short JPEG = 6;
|
||||
public interface Compression {
|
||||
short UNCOMPRESSION = 1;
|
||||
short JPEG = 6;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_RESOLUTION_UNIT}
|
||||
*/
|
||||
public static interface ResolutionUnit {
|
||||
public static final short INCHES = 2;
|
||||
public static final short CENTIMETERS = 3;
|
||||
public interface ResolutionUnit {
|
||||
short INCHES = 2;
|
||||
short CENTIMETERS = 3;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_PHOTOMETRIC_INTERPRETATION}
|
||||
*/
|
||||
public static interface PhotometricInterpretation {
|
||||
public static final short RGB = 2;
|
||||
public static final short YCBCR = 6;
|
||||
public interface PhotometricInterpretation {
|
||||
short RGB = 2;
|
||||
short YCBCR = 6;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_PLANAR_CONFIGURATION}
|
||||
*/
|
||||
public static interface PlanarConfiguration {
|
||||
public static final short CHUNKY = 1;
|
||||
public static final short PLANAR = 2;
|
||||
public interface PlanarConfiguration {
|
||||
short CHUNKY = 1;
|
||||
short PLANAR = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_EXPOSURE_PROGRAM}
|
||||
*/
|
||||
public static interface ExposureProgram {
|
||||
public static final short NOT_DEFINED = 0;
|
||||
public static final short MANUAL = 1;
|
||||
public static final short NORMAL_PROGRAM = 2;
|
||||
public static final short APERTURE_PRIORITY = 3;
|
||||
public static final short SHUTTER_PRIORITY = 4;
|
||||
public static final short CREATIVE_PROGRAM = 5;
|
||||
public static final short ACTION_PROGRAM = 6;
|
||||
public static final short PROTRAIT_MODE = 7;
|
||||
public static final short LANDSCAPE_MODE = 8;
|
||||
public interface ExposureProgram {
|
||||
short NOT_DEFINED = 0;
|
||||
short MANUAL = 1;
|
||||
short NORMAL_PROGRAM = 2;
|
||||
short APERTURE_PRIORITY = 3;
|
||||
short SHUTTER_PRIORITY = 4;
|
||||
short CREATIVE_PROGRAM = 5;
|
||||
short ACTION_PROGRAM = 6;
|
||||
short PROTRAIT_MODE = 7;
|
||||
short LANDSCAPE_MODE = 8;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_METERING_MODE}
|
||||
*/
|
||||
public static interface MeteringMode {
|
||||
public static final short UNKNOWN = 0;
|
||||
public static final short AVERAGE = 1;
|
||||
public static final short CENTER_WEIGHTED_AVERAGE = 2;
|
||||
public static final short SPOT = 3;
|
||||
public static final short MULTISPOT = 4;
|
||||
public static final short PATTERN = 5;
|
||||
public static final short PARTAIL = 6;
|
||||
public static final short OTHER = 255;
|
||||
public interface MeteringMode {
|
||||
short UNKNOWN = 0;
|
||||
short AVERAGE = 1;
|
||||
short CENTER_WEIGHTED_AVERAGE = 2;
|
||||
short SPOT = 3;
|
||||
short MULTISPOT = 4;
|
||||
short PATTERN = 5;
|
||||
short PARTAIL = 6;
|
||||
short OTHER = 255;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -466,244 +467,244 @@ public class ExifInterface {
|
||||
* short flash = FIRED | RETURN_STROBE_RETURN_LIGHT_DETECTED |
|
||||
* MODE_AUTO_MODE
|
||||
*/
|
||||
public static interface Flash {
|
||||
public interface Flash {
|
||||
// LSB
|
||||
public static final short DID_NOT_FIRED = 0;
|
||||
public static final short FIRED = 1;
|
||||
short DID_NOT_FIRED = 0;
|
||||
short FIRED = 1;
|
||||
// 1st~2nd bits
|
||||
public static final short RETURN_NO_STROBE_RETURN_DETECTION_FUNCTION = 0 << 1;
|
||||
public static final short RETURN_STROBE_RETURN_LIGHT_NOT_DETECTED = 2 << 1;
|
||||
public static final short RETURN_STROBE_RETURN_LIGHT_DETECTED = 3 << 1;
|
||||
short RETURN_NO_STROBE_RETURN_DETECTION_FUNCTION = 0 << 1;
|
||||
short RETURN_STROBE_RETURN_LIGHT_NOT_DETECTED = 2 << 1;
|
||||
short RETURN_STROBE_RETURN_LIGHT_DETECTED = 3 << 1;
|
||||
// 3rd~4th bits
|
||||
public static final short MODE_UNKNOWN = 0 << 3;
|
||||
public static final short MODE_COMPULSORY_FLASH_FIRING = 1 << 3;
|
||||
public static final short MODE_COMPULSORY_FLASH_SUPPRESSION = 2 << 3;
|
||||
public static final short MODE_AUTO_MODE = 3 << 3;
|
||||
short MODE_UNKNOWN = 0 << 3;
|
||||
short MODE_COMPULSORY_FLASH_FIRING = 1 << 3;
|
||||
short MODE_COMPULSORY_FLASH_SUPPRESSION = 2 << 3;
|
||||
short MODE_AUTO_MODE = 3 << 3;
|
||||
// 5th bit
|
||||
public static final short FUNCTION_PRESENT = 0 << 5;
|
||||
public static final short FUNCTION_NO_FUNCTION = 1 << 5;
|
||||
short FUNCTION_PRESENT = 0 << 5;
|
||||
short FUNCTION_NO_FUNCTION = 1 << 5;
|
||||
// 6th bit
|
||||
public static final short RED_EYE_REDUCTION_NO_OR_UNKNOWN = 0 << 6;
|
||||
public static final short RED_EYE_REDUCTION_SUPPORT = 1 << 6;
|
||||
short RED_EYE_REDUCTION_NO_OR_UNKNOWN = 0 << 6;
|
||||
short RED_EYE_REDUCTION_SUPPORT = 1 << 6;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_COLOR_SPACE}
|
||||
*/
|
||||
public static interface ColorSpace {
|
||||
public static final short SRGB = 1;
|
||||
public static final short UNCALIBRATED = (short) 0xFFFF;
|
||||
public interface ColorSpace {
|
||||
short SRGB = 1;
|
||||
short UNCALIBRATED = (short) 0xFFFF;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_EXPOSURE_MODE}
|
||||
*/
|
||||
public static interface ExposureMode {
|
||||
public static final short AUTO_EXPOSURE = 0;
|
||||
public static final short MANUAL_EXPOSURE = 1;
|
||||
public static final short AUTO_BRACKET = 2;
|
||||
public interface ExposureMode {
|
||||
short AUTO_EXPOSURE = 0;
|
||||
short MANUAL_EXPOSURE = 1;
|
||||
short AUTO_BRACKET = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_WHITE_BALANCE}
|
||||
*/
|
||||
public static interface WhiteBalance {
|
||||
public static final short AUTO = 0;
|
||||
public static final short MANUAL = 1;
|
||||
public interface WhiteBalance {
|
||||
short AUTO = 0;
|
||||
short MANUAL = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_SCENE_CAPTURE_TYPE}
|
||||
*/
|
||||
public static interface SceneCapture {
|
||||
public static final short STANDARD = 0;
|
||||
public static final short LANDSCAPE = 1;
|
||||
public static final short PROTRAIT = 2;
|
||||
public static final short NIGHT_SCENE = 3;
|
||||
public interface SceneCapture {
|
||||
short STANDARD = 0;
|
||||
short LANDSCAPE = 1;
|
||||
short PROTRAIT = 2;
|
||||
short NIGHT_SCENE = 3;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_COMPONENTS_CONFIGURATION}
|
||||
*/
|
||||
public static interface ComponentsConfiguration {
|
||||
public static final short NOT_EXIST = 0;
|
||||
public static final short Y = 1;
|
||||
public static final short CB = 2;
|
||||
public static final short CR = 3;
|
||||
public static final short R = 4;
|
||||
public static final short G = 5;
|
||||
public static final short B = 6;
|
||||
public interface ComponentsConfiguration {
|
||||
short NOT_EXIST = 0;
|
||||
short Y = 1;
|
||||
short CB = 2;
|
||||
short CR = 3;
|
||||
short R = 4;
|
||||
short G = 5;
|
||||
short B = 6;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_LIGHT_SOURCE}
|
||||
*/
|
||||
public static interface LightSource {
|
||||
public static final short UNKNOWN = 0;
|
||||
public static final short DAYLIGHT = 1;
|
||||
public static final short FLUORESCENT = 2;
|
||||
public static final short TUNGSTEN = 3;
|
||||
public static final short FLASH = 4;
|
||||
public static final short FINE_WEATHER = 9;
|
||||
public static final short CLOUDY_WEATHER = 10;
|
||||
public static final short SHADE = 11;
|
||||
public static final short DAYLIGHT_FLUORESCENT = 12;
|
||||
public static final short DAY_WHITE_FLUORESCENT = 13;
|
||||
public static final short COOL_WHITE_FLUORESCENT = 14;
|
||||
public static final short WHITE_FLUORESCENT = 15;
|
||||
public static final short STANDARD_LIGHT_A = 17;
|
||||
public static final short STANDARD_LIGHT_B = 18;
|
||||
public static final short STANDARD_LIGHT_C = 19;
|
||||
public static final short D55 = 20;
|
||||
public static final short D65 = 21;
|
||||
public static final short D75 = 22;
|
||||
public static final short D50 = 23;
|
||||
public static final short ISO_STUDIO_TUNGSTEN = 24;
|
||||
public static final short OTHER = 255;
|
||||
public interface LightSource {
|
||||
short UNKNOWN = 0;
|
||||
short DAYLIGHT = 1;
|
||||
short FLUORESCENT = 2;
|
||||
short TUNGSTEN = 3;
|
||||
short FLASH = 4;
|
||||
short FINE_WEATHER = 9;
|
||||
short CLOUDY_WEATHER = 10;
|
||||
short SHADE = 11;
|
||||
short DAYLIGHT_FLUORESCENT = 12;
|
||||
short DAY_WHITE_FLUORESCENT = 13;
|
||||
short COOL_WHITE_FLUORESCENT = 14;
|
||||
short WHITE_FLUORESCENT = 15;
|
||||
short STANDARD_LIGHT_A = 17;
|
||||
short STANDARD_LIGHT_B = 18;
|
||||
short STANDARD_LIGHT_C = 19;
|
||||
short D55 = 20;
|
||||
short D65 = 21;
|
||||
short D75 = 22;
|
||||
short D50 = 23;
|
||||
short ISO_STUDIO_TUNGSTEN = 24;
|
||||
short OTHER = 255;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_SENSING_METHOD}
|
||||
*/
|
||||
public static interface SensingMethod {
|
||||
public static final short NOT_DEFINED = 1;
|
||||
public static final short ONE_CHIP_COLOR = 2;
|
||||
public static final short TWO_CHIP_COLOR = 3;
|
||||
public static final short THREE_CHIP_COLOR = 4;
|
||||
public static final short COLOR_SEQUENTIAL_AREA = 5;
|
||||
public static final short TRILINEAR = 7;
|
||||
public static final short COLOR_SEQUENTIAL_LINEAR = 8;
|
||||
public interface SensingMethod {
|
||||
short NOT_DEFINED = 1;
|
||||
short ONE_CHIP_COLOR = 2;
|
||||
short TWO_CHIP_COLOR = 3;
|
||||
short THREE_CHIP_COLOR = 4;
|
||||
short COLOR_SEQUENTIAL_AREA = 5;
|
||||
short TRILINEAR = 7;
|
||||
short COLOR_SEQUENTIAL_LINEAR = 8;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_FILE_SOURCE}
|
||||
*/
|
||||
public static interface FileSource {
|
||||
public static final short DSC = 3;
|
||||
public interface FileSource {
|
||||
short DSC = 3;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_SCENE_TYPE}
|
||||
*/
|
||||
public static interface SceneType {
|
||||
public static final short DIRECT_PHOTOGRAPHED = 1;
|
||||
public interface SceneType {
|
||||
short DIRECT_PHOTOGRAPHED = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_GAIN_CONTROL}
|
||||
*/
|
||||
public static interface GainControl {
|
||||
public static final short NONE = 0;
|
||||
public static final short LOW_UP = 1;
|
||||
public static final short HIGH_UP = 2;
|
||||
public static final short LOW_DOWN = 3;
|
||||
public static final short HIGH_DOWN = 4;
|
||||
public interface GainControl {
|
||||
short NONE = 0;
|
||||
short LOW_UP = 1;
|
||||
short HIGH_UP = 2;
|
||||
short LOW_DOWN = 3;
|
||||
short HIGH_DOWN = 4;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_CONTRAST}
|
||||
*/
|
||||
public static interface Contrast {
|
||||
public static final short NORMAL = 0;
|
||||
public static final short SOFT = 1;
|
||||
public static final short HARD = 2;
|
||||
public interface Contrast {
|
||||
short NORMAL = 0;
|
||||
short SOFT = 1;
|
||||
short HARD = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_SATURATION}
|
||||
*/
|
||||
public static interface Saturation {
|
||||
public static final short NORMAL = 0;
|
||||
public static final short LOW = 1;
|
||||
public static final short HIGH = 2;
|
||||
public interface Saturation {
|
||||
short NORMAL = 0;
|
||||
short LOW = 1;
|
||||
short HIGH = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_SHARPNESS}
|
||||
*/
|
||||
public static interface Sharpness {
|
||||
public static final short NORMAL = 0;
|
||||
public static final short SOFT = 1;
|
||||
public static final short HARD = 2;
|
||||
public interface Sharpness {
|
||||
short NORMAL = 0;
|
||||
short SOFT = 1;
|
||||
short HARD = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_SUBJECT_DISTANCE}
|
||||
*/
|
||||
public static interface SubjectDistance {
|
||||
public static final short UNKNOWN = 0;
|
||||
public static final short MACRO = 1;
|
||||
public static final short CLOSE_VIEW = 2;
|
||||
public static final short DISTANT_VIEW = 3;
|
||||
public interface SubjectDistance {
|
||||
short UNKNOWN = 0;
|
||||
short MACRO = 1;
|
||||
short CLOSE_VIEW = 2;
|
||||
short DISTANT_VIEW = 3;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_GPS_LATITUDE_REF},
|
||||
* {@link TAG_GPS_DEST_LATITUDE_REF}
|
||||
*/
|
||||
public static interface GpsLatitudeRef {
|
||||
public static final String NORTH = "N";
|
||||
public static final String SOUTH = "S";
|
||||
public interface GpsLatitudeRef {
|
||||
String NORTH = "N";
|
||||
String SOUTH = "S";
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_GPS_LONGITUDE_REF},
|
||||
* {@link TAG_GPS_DEST_LONGITUDE_REF}
|
||||
*/
|
||||
public static interface GpsLongitudeRef {
|
||||
public static final String EAST = "E";
|
||||
public static final String WEST = "W";
|
||||
public interface GpsLongitudeRef {
|
||||
String EAST = "E";
|
||||
String WEST = "W";
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_GPS_ALTITUDE_REF}
|
||||
*/
|
||||
public static interface GpsAltitudeRef {
|
||||
public static final short SEA_LEVEL = 0;
|
||||
public static final short SEA_LEVEL_NEGATIVE = 1;
|
||||
public interface GpsAltitudeRef {
|
||||
short SEA_LEVEL = 0;
|
||||
short SEA_LEVEL_NEGATIVE = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_GPS_STATUS}
|
||||
*/
|
||||
public static interface GpsStatus {
|
||||
public static final String IN_PROGRESS = "A";
|
||||
public static final String INTEROPERABILITY = "V";
|
||||
public interface GpsStatus {
|
||||
String IN_PROGRESS = "A";
|
||||
String INTEROPERABILITY = "V";
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_GPS_MEASURE_MODE}
|
||||
*/
|
||||
public static interface GpsMeasureMode {
|
||||
public static final String MODE_2_DIMENSIONAL = "2";
|
||||
public static final String MODE_3_DIMENSIONAL = "3";
|
||||
public interface GpsMeasureMode {
|
||||
String MODE_2_DIMENSIONAL = "2";
|
||||
String MODE_3_DIMENSIONAL = "3";
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_GPS_SPEED_REF},
|
||||
* {@link TAG_GPS_DEST_DISTANCE_REF}
|
||||
*/
|
||||
public static interface GpsSpeedRef {
|
||||
public static final String KILOMETERS = "K";
|
||||
public static final String MILES = "M";
|
||||
public static final String KNOTS = "N";
|
||||
public interface GpsSpeedRef {
|
||||
String KILOMETERS = "K";
|
||||
String MILES = "M";
|
||||
String KNOTS = "N";
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_GPS_TRACK_REF},
|
||||
* {@link TAG_GPS_IMG_DIRECTION_REF}, {@link TAG_GPS_DEST_BEARING_REF}
|
||||
*/
|
||||
public static interface GpsTrackRef {
|
||||
public static final String TRUE_DIRECTION = "T";
|
||||
public static final String MAGNETIC_DIRECTION = "M";
|
||||
public interface GpsTrackRef {
|
||||
String TRUE_DIRECTION = "T";
|
||||
String MAGNETIC_DIRECTION = "M";
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for {@link TAG_GPS_DIFFERENTIAL}
|
||||
*/
|
||||
public static interface GpsDifferential {
|
||||
public static final short WITHOUT_DIFFERENTIAL_CORRECTION = 0;
|
||||
public static final short DIFFERENTIAL_CORRECTION_APPLIED = 1;
|
||||
public interface GpsDifferential {
|
||||
short WITHOUT_DIFFERENTIAL_CORRECTION = 0;
|
||||
short DIFFERENTIAL_CORRECTION_APPLIED = 1;
|
||||
}
|
||||
|
||||
private static final String NULL_ARGUMENT_STRING = "Argument is null";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2012 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -877,8 +878,8 @@ public class ExifParser {
|
||||
}
|
||||
|
||||
private static class ImageEvent {
|
||||
int stripIndex;
|
||||
int type;
|
||||
final int stripIndex;
|
||||
final int type;
|
||||
|
||||
ImageEvent(int type) {
|
||||
this.stripIndex = 0;
|
||||
@@ -892,8 +893,8 @@ public class ExifParser {
|
||||
}
|
||||
|
||||
private static class IfdEvent {
|
||||
int ifd;
|
||||
boolean isRequested;
|
||||
final int ifd;
|
||||
final boolean isRequested;
|
||||
|
||||
IfdEvent(int ifd, boolean isInterestedIfd) {
|
||||
this.ifd = ifd;
|
||||
@@ -902,8 +903,8 @@ public class ExifParser {
|
||||
}
|
||||
|
||||
private static class ExifTagEvent {
|
||||
ExifTag tag;
|
||||
boolean isRequested;
|
||||
final ExifTag tag;
|
||||
final boolean isRequested;
|
||||
|
||||
ExifTagEvent(ExifTag tag, boolean isRequireByUser) {
|
||||
this.tag = tag;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2012 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -67,7 +68,7 @@ public class ExifTag {
|
||||
*/
|
||||
public static final short TYPE_RATIONAL = 10;
|
||||
|
||||
private static Charset US_ASCII = Charset.forName("US-ASCII");
|
||||
private static final Charset US_ASCII = Charset.forName("US-ASCII");
|
||||
private static final int TYPE_TO_SIZE_MAP[] = new int[11];
|
||||
private static final int UNSIGNED_SHORT_MAX = 65535;
|
||||
private static final long UNSIGNED_LONG_MAX = 4294967295L;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2012 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,12 +21,12 @@ package com.android.messaging.util.exif;
|
||||
* The constants of the IFD ID defined in EXIF spec.
|
||||
*/
|
||||
public interface IfdId {
|
||||
public static final int TYPE_IFD_0 = 0;
|
||||
public static final int TYPE_IFD_1 = 1;
|
||||
public static final int TYPE_IFD_EXIF = 2;
|
||||
public static final int TYPE_IFD_INTEROPERABILITY = 3;
|
||||
public static final int TYPE_IFD_GPS = 4;
|
||||
int TYPE_IFD_0 = 0;
|
||||
int TYPE_IFD_1 = 1;
|
||||
int TYPE_IFD_EXIF = 2;
|
||||
int TYPE_IFD_INTEROPERABILITY = 3;
|
||||
int TYPE_IFD_GPS = 4;
|
||||
/* This is used in ExifData to allocate enough IfdData */
|
||||
static final int TYPE_IFD_COUNT = 5;
|
||||
int TYPE_IFD_COUNT = 5;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2012 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,7 +33,7 @@ class JpegHeader {
|
||||
public static final short JPG = (short) 0xFFC8;
|
||||
public static final short DAC = (short) 0xFFCC;
|
||||
|
||||
public static final boolean isSofMarker(short marker) {
|
||||
public static boolean isSofMarker(short marker) {
|
||||
return marker >= SOF0 && marker <= SOF15 && marker != DHT && marker != JPG
|
||||
&& marker != DAC;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user