Add OPLUS Camera support
[pjgowtham] : Add missing classes for oneplus 12 camera app Co-authored-by: cjh1249131356 <cjh1249131356@gmail.com> Co-authored-by: Pranav Vashi <neobuddy89@gmail.com>
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<exceptions>
|
||||||
|
<exception package="com.oplus.camera" >
|
||||||
|
<permission name="android.permission.CAMERA"/>
|
||||||
|
<permission name="android.permission.RECORD_AUDIO"/>
|
||||||
|
<permission name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||||
|
<permission name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||||
|
<permission name="android.permission.READ_PHONE_STATE"/>
|
||||||
|
</exception>
|
||||||
|
</exceptions>
|
||||||
5
configs/permissions/oplus_google_lens_config.xml
Normal file
5
configs/permissions/oplus_google_lens_config.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<config>
|
||||||
|
<feature name="com.google.lens.feature.CAMERA_INTEGRATION" />
|
||||||
|
<feature name="com.google.lens.feature.IMAGE_INTEGRATION" />
|
||||||
|
</config>
|
||||||
60
configs/permissions/privapp-permissions-oplus.xml
Normal file
60
configs/permissions/privapp-permissions-oplus.xml
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<permissions>
|
||||||
|
<!-- OPLUS camera unit sdk adapter -->
|
||||||
|
<library name = "com.oplus.camera.unit.sdk.adapter"
|
||||||
|
file = "/system_ext/framework/com.oplus.camera.unit.sdk.adapter.jar" />
|
||||||
|
|
||||||
|
<!-- OPLUS camera unit sdk -->
|
||||||
|
<library name = "com.oplus.camera.unit.sdk"
|
||||||
|
file = "/system_ext/framework/com.oplus.camera.unit.sdk.jar" />
|
||||||
|
|
||||||
|
<!-- OPLUS appplatform -->
|
||||||
|
<privapp-permissions package="com.oplus.appplatform">
|
||||||
|
<permission name="android.permission.BLUETOOTH_PRIVILEGED"/>
|
||||||
|
<permission name="android.permission.CALL_PRIVILEGED"/>
|
||||||
|
<permission name="android.permission.DELETE_PACKAGES"/>
|
||||||
|
<permission name="android.permission.INTERACT_ACROSS_USERS"/>
|
||||||
|
<permission name="android.permission.MANAGE_FINGERPRINT"/>
|
||||||
|
<permission name="android.permission.MANAGE_USB"/>
|
||||||
|
<permission name="android.permission.MANAGE_USERS"/>
|
||||||
|
<permission name="android.permission.MODIFY_DAY_NIGHT_MODE"/>
|
||||||
|
<permission name="android.permission.MODIFY_PHONE_STATE"/>
|
||||||
|
<permission name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
|
||||||
|
<permission name="android.permission.READ_WALLPAPER_INTERNAL"/>
|
||||||
|
<permission name="android.permission.REAL_GET_TASKS"/>
|
||||||
|
<permission name="android.permission.READ_WIFI_CREDENTIAL"/>
|
||||||
|
<permission name="android.permission.UPDATE_APP_OPS_STATS"/>
|
||||||
|
<permission name="android.permission.WRITE_APN_SETTINGS"/>
|
||||||
|
<permission name="android.permission.WRITE_SECURE_SETTINGS"/>
|
||||||
|
</privapp-permissions>
|
||||||
|
|
||||||
|
<!-- OPLUS camera -->
|
||||||
|
<privapp-permissions package="com.oplus.camera">
|
||||||
|
<permission name="android.permission.INTERACT_ACROSS_USERS"/>
|
||||||
|
<permission name="android.permission.READ_LOGS"/>
|
||||||
|
<permission name="android.permission.SYSTEM_CAMERA"/>
|
||||||
|
<permission name="android.permission.TURN_SCREEN_ON"/>
|
||||||
|
<permission name="android.permission.UPDATE_DEVICE_STATS"/>
|
||||||
|
<permission name="android.permission.WRITE_MEDIA_STORAGE"/>
|
||||||
|
<permission name="android.permission.WRITE_SECURE_SETTINGS"/>
|
||||||
|
</privapp-permissions>
|
||||||
|
|
||||||
|
<!-- OPLUS gallery -->
|
||||||
|
<privapp-permissions package="com.oneplus.gallery">
|
||||||
|
<permission name="android.permission.SCHEDULE_EXACT_ALARM"/>
|
||||||
|
<permission name="android.permission.WRITE_MEDIA_STORAGE"/>
|
||||||
|
<permission name="android.permission.WRITE_SECURE_SETTINGS"/>
|
||||||
|
</privapp-permissions>
|
||||||
|
|
||||||
|
<!-- OPLUS exsystemservice -->
|
||||||
|
<privapp-permissions package="com.oplus.exsystemservice">
|
||||||
|
<permission name="android.permission.INTERACT_ACROSS_USERS" />
|
||||||
|
<permission name="android.permission.CONNECTIVITY_INTERNAL" />
|
||||||
|
<permission name="android.permission.WRITE_SECURE_SETTINGS"/>
|
||||||
|
<permission name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
|
||||||
|
<permission name="android.permission.REBOOT"/>
|
||||||
|
<permission name="android.permission.MODIFY_PHONE_STATE"/>
|
||||||
|
<permission name="android.permission.MANAGE_USERS"/>
|
||||||
|
<permission name="android.permission.INSTALL_PACKAGES"/>
|
||||||
|
</privapp-permissions>
|
||||||
|
</permissions>
|
||||||
16
configs/sysconfig/hiddenapi-package-oplus-whitelist.xml
Normal file
16
configs/sysconfig/hiddenapi-package-oplus-whitelist.xml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
This XML file declares which system apps should be exempted from the hidden API blacklisting, i.e.
|
||||||
|
which apps should be allowed to access the entire private API.
|
||||||
|
|
||||||
|
Only apps NOT signed with the platform cert need to be included, as apps signed with the platform
|
||||||
|
cert are exempted by default.
|
||||||
|
|
||||||
|
Do NOT include any apps that are updatable via Play Store!
|
||||||
|
-->
|
||||||
|
<config>
|
||||||
|
<hidden-api-whitelisted-app package="com.oplus.appplatform"/>
|
||||||
|
<hidden-api-whitelisted-app package="com.oplus.camera"/>
|
||||||
|
<hidden-api-whitelisted-app package="com.oplus.exsystemservice"/>
|
||||||
|
<hidden-api-whitelisted-app package="com.oneplus.gallery"/>
|
||||||
|
</config>
|
||||||
11
init/Android.bp
Normal file
11
init/Android.bp
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2024 The Nameless-AOSP Project
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
prebuilt_etc {
|
||||||
|
name: "init.oplus.camera.rc",
|
||||||
|
src: "init.oplus.camera.rc",
|
||||||
|
sub_dir: "init",
|
||||||
|
device_specific: true,
|
||||||
|
}
|
||||||
9
init/init.oplus.camera.rc
Normal file
9
init/init.oplus.camera.rc
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2024 The Nameless-AOSP Project
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
on boot
|
||||||
|
# OIS
|
||||||
|
chown cameraserver cameraserver /sys/kernel/ois_control/dump_registers
|
||||||
14
oplus-fwk/Android.bp
Normal file
14
oplus-fwk/Android.bp
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
//
|
||||||
|
// Copyright (C) 2022-2024 The Nameless-AOSP Project
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
//
|
||||||
|
|
||||||
|
java_library {
|
||||||
|
name: "oplus-fwk",
|
||||||
|
installable: true,
|
||||||
|
|
||||||
|
srcs: [
|
||||||
|
"src/**/*.aidl",
|
||||||
|
"src/**/*.java",
|
||||||
|
],
|
||||||
|
}
|
||||||
25
oplus-fwk/src/android/app/OplusActivityManager.java
Normal file
25
oplus-fwk/src/android/app/OplusActivityManager.java
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
package android.app;
|
||||||
|
|
||||||
|
import android.os.RemoteException;
|
||||||
|
|
||||||
|
import com.oplus.app.OplusAppInfo;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class OplusActivityManager {
|
||||||
|
|
||||||
|
private static OplusActivityManager sOplusActivityManager = null;
|
||||||
|
private static ArrayList<OplusAppInfo> sTopAppInfos = new ArrayList<OplusAppInfo>();
|
||||||
|
|
||||||
|
public static OplusActivityManager getInstance() {
|
||||||
|
if (sOplusActivityManager == null) {
|
||||||
|
sOplusActivityManager = new OplusActivityManager();
|
||||||
|
}
|
||||||
|
return sOplusActivityManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<OplusAppInfo> getAllTopAppInfos() throws RemoteException {
|
||||||
|
return (ArrayList<OplusAppInfo>) sTopAppInfos.clone();
|
||||||
|
}
|
||||||
|
}
|
||||||
84
oplus-fwk/src/android/app/OplusExSystemServiceHelper.java
Normal file
84
oplus-fwk/src/android/app/OplusExSystemServiceHelper.java
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
package android.app;
|
||||||
|
|
||||||
|
import android.content.ComponentName;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.util.Log;
|
||||||
|
//import com.oplus.multiapp.BaseOplusMultiAppManager;
|
||||||
|
|
||||||
|
/* loaded from: classes.dex */
|
||||||
|
public class OplusExSystemServiceHelper {
|
||||||
|
private static final String ATHENA_SYSTEM_SERVICE_CLASSNAME = "com.oplus.athena.systemservice.OplusAthenaSystemService";
|
||||||
|
public static final String COREAPPFEATURE_SYSTEM_SERVICE_CLASSNAME = "com.oplus.customize.coreapp.service.OplusCoreAppFeatureService";
|
||||||
|
public static final String EX_SYSTEM_SERVICE_CLASSNAME = "com.oplus.exsystemservice.OplusSharedSystemService";
|
||||||
|
public static final String EX_SYSTEM_SERVICE_PKGNAME = "com.oplus.exsystemservice";
|
||||||
|
private static final String TAG = OplusExSystemServiceHelper.class.getSimpleName();
|
||||||
|
private static volatile OplusExSystemServiceHelper sIntance;
|
||||||
|
|
||||||
|
public static OplusExSystemServiceHelper getInstance() {
|
||||||
|
if (sIntance == null) {
|
||||||
|
synchronized (OplusExSystemServiceHelper.class) {
|
||||||
|
if (sIntance == null) {
|
||||||
|
sIntance = new OplusExSystemServiceHelper();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sIntance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean checkOplusExSystemService(boolean systemThread, String className) {
|
||||||
|
if (TextUtils.isEmpty(className)) {
|
||||||
|
Log.w(TAG, "checkOplusExSystemService className is null or empty str");
|
||||||
|
return false;
|
||||||
|
} else if (!systemThread) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
if (!EX_SYSTEM_SERVICE_CLASSNAME.equals(className) && !COREAPPFEATURE_SYSTEM_SERVICE_CLASSNAME.equals(className)) {
|
||||||
|
if (!ATHENA_SYSTEM_SERVICE_CLASSNAME.equals(className)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e(TAG, "checkOplusExSystemService e = " + e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean checkOplusExSystemService(boolean systemThread, Intent intent) {
|
||||||
|
if (intent == null) {
|
||||||
|
Log.w(TAG, "checkOplusExSystemService intent is null");
|
||||||
|
return false;
|
||||||
|
} else if (intent.getComponent() == null) {
|
||||||
|
Log.w(TAG, "checkOplusExSystemService intent getComponent is null");
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return checkOplusExSystemService(systemThread, intent.getComponent().getClassName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean checkOplusExSystemService(Handler handler, String className) {
|
||||||
|
return checkOplusExSystemService(true, className);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ComponentName getComponentName() {
|
||||||
|
return new ComponentName(EX_SYSTEM_SERVICE_PKGNAME, EX_SYSTEM_SERVICE_CLASSNAME);
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
public void ensureMediaProviderPriority(Handler activityThread, ComponentName name, Runnable runConnection) {
|
||||||
|
if (name.getClassName().contains(BaseOplusMultiAppManager.MEDIA_PROVIDER_PACKAGE_NAME)) {
|
||||||
|
Log.i(TAG, "connected :" + name.getClassName());
|
||||||
|
}
|
||||||
|
if (checkOplusExSystemService(activityThread, name.getClassName())) {
|
||||||
|
runConnection.run();
|
||||||
|
} else if (name.getClassName().contains(BaseOplusMultiAppManager.MEDIA_PROVIDER_PACKAGE_NAME)) {
|
||||||
|
activityThread.postAtFrontOfQueue(runConnection);
|
||||||
|
} else {
|
||||||
|
activityThread.post(runConnection);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
18
oplus-fwk/src/android/app/OplusWhiteListManager.java
Normal file
18
oplus-fwk/src/android/app/OplusWhiteListManager.java
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
package android.app;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class OplusWhiteListManager {
|
||||||
|
|
||||||
|
public OplusWhiteListManager(Context context) {}
|
||||||
|
|
||||||
|
public ArrayList<String> getStageProtectListFromPkg(String pkg, int type) {
|
||||||
|
return new ArrayList<String>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addStageProtectInfo(String pkg, long timeout) {}
|
||||||
|
|
||||||
|
public void removeStageProtectInfo(String pkg) {}
|
||||||
|
}
|
||||||
43
oplus-fwk/src/android/app/job/IJobInfoExt.java
Normal file
43
oplus-fwk/src/android/app/job/IJobInfoExt.java
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
package android.app.job;
|
||||||
|
|
||||||
|
public interface IJobInfoExt {
|
||||||
|
|
||||||
|
public final class JobBuilderExt {
|
||||||
|
|
||||||
|
public boolean mIsOplusJob;
|
||||||
|
|
||||||
|
public JobBuilderExt setRequiresBattIdle(boolean requiresBattIdle, int extra) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
default boolean getBooleanConstraint(String type, boolean defValue) {
|
||||||
|
return defValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
default String getStringConstraint(String type, String defValue) {
|
||||||
|
return defValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
default int getIntConstraint(String type, int defValue) {
|
||||||
|
return defValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
default long getLongConstraint(String type, long defValue) {
|
||||||
|
return defValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
default void setBooleanConstraint(String type, boolean value) {}
|
||||||
|
|
||||||
|
default void setStringConstraint(String type, String value) {}
|
||||||
|
|
||||||
|
default void setIntConstraint(String type, int value) {}
|
||||||
|
|
||||||
|
default void setLongConstraint(JobInfo job, String type, long value) {}
|
||||||
|
|
||||||
|
default void initJobInfo(Object in) {}
|
||||||
|
|
||||||
|
default void initJobInfoPure(JobBuilderExt jobBuilderExt) {}
|
||||||
|
|
||||||
|
default void writeToParcelJobInfo(Object out, int flags) {}
|
||||||
|
}
|
||||||
13
oplus-fwk/src/android/bluetooth/OplusBluetoothAdapter.java
Normal file
13
oplus-fwk/src/android/bluetooth/OplusBluetoothAdapter.java
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
package android.bluetooth;
|
||||||
|
|
||||||
|
public class OplusBluetoothAdapter {
|
||||||
|
|
||||||
|
private static OplusBluetoothAdapter sAdapter;
|
||||||
|
|
||||||
|
public static OplusBluetoothAdapter getOplusBluetoothAdapter() {
|
||||||
|
if (sAdapter == null) {
|
||||||
|
sAdapter = new OplusBluetoothAdapter();
|
||||||
|
}
|
||||||
|
return sAdapter;
|
||||||
|
}
|
||||||
|
}
|
||||||
14
oplus-fwk/src/android/common/IOplusCommonFeature.java
Normal file
14
oplus-fwk/src/android/common/IOplusCommonFeature.java
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
package android.common;
|
||||||
|
|
||||||
|
import android.common.OplusFeatureList;
|
||||||
|
|
||||||
|
public interface IOplusCommonFeature {
|
||||||
|
|
||||||
|
default OplusFeatureList.OplusIndex index() {
|
||||||
|
return OplusFeatureList.OplusIndex.End;
|
||||||
|
}
|
||||||
|
|
||||||
|
default IOplusCommonFeature getDefault() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
8
oplus-fwk/src/android/common/OplusFeatureList.java
Normal file
8
oplus-fwk/src/android/common/OplusFeatureList.java
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
package android.common;
|
||||||
|
|
||||||
|
public class OplusFeatureList {
|
||||||
|
|
||||||
|
public enum OplusIndex {
|
||||||
|
End
|
||||||
|
}
|
||||||
|
}
|
||||||
13
oplus-fwk/src/android/common/OplusFrameworkFactory.java
Normal file
13
oplus-fwk/src/android/common/OplusFrameworkFactory.java
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
package android.common;
|
||||||
|
|
||||||
|
public class OplusFrameworkFactory {
|
||||||
|
|
||||||
|
private static OplusFrameworkFactory sOplusFrameworkFactory = null;
|
||||||
|
|
||||||
|
public static OplusFrameworkFactory getInstance() {
|
||||||
|
if (sOplusFrameworkFactory == null) {
|
||||||
|
sOplusFrameworkFactory = new OplusFrameworkFactory();
|
||||||
|
}
|
||||||
|
return sOplusFrameworkFactory;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package android.content.res;
|
||||||
|
|
||||||
|
import oplus.content.res.OplusExtraConfiguration;
|
||||||
|
|
||||||
|
public abstract class OplusBaseConfiguration {
|
||||||
|
|
||||||
|
public OplusExtraConfiguration mOplusExtraConfiguration = null;
|
||||||
|
|
||||||
|
public OplusExtraConfiguration getOplusExtraConfiguration() {
|
||||||
|
return mOplusExtraConfiguration;
|
||||||
|
}
|
||||||
|
}
|
||||||
195
oplus-fwk/src/android/hardware/IAONHECallbacks.java
Normal file
195
oplus-fwk/src/android/hardware/IAONHECallbacks.java
Normal file
@@ -0,0 +1,195 @@
|
|||||||
|
package android.hardware;
|
||||||
|
|
||||||
|
import android.os.Binder;
|
||||||
|
import android.os.IBinder;
|
||||||
|
import android.os.IInterface;
|
||||||
|
import android.os.Parcel;
|
||||||
|
import android.os.RemoteException;
|
||||||
|
|
||||||
|
/* loaded from: classes.dex */
|
||||||
|
public interface IAONHECallbacks extends IInterface {
|
||||||
|
public static final String DESCRIPTOR = "android.hardware.IAONHECallbacks";
|
||||||
|
public static final int ERROR_AON_DISABLED = 2;
|
||||||
|
public static final int ERROR_AON_FORCE_CLOSE = 3;
|
||||||
|
public static final int ERROR_AON_IN_CLOSED = 0;
|
||||||
|
public static final int ERROR_AON_IN_USE = 1;
|
||||||
|
public static final int ERROR_AON_NO_INDEX = -1;
|
||||||
|
|
||||||
|
void onClosed() throws RemoteException;
|
||||||
|
|
||||||
|
void onError(int i) throws RemoteException;
|
||||||
|
|
||||||
|
void onHEDetected() throws RemoteException;
|
||||||
|
|
||||||
|
void onOpened() throws RemoteException;
|
||||||
|
|
||||||
|
/* loaded from: classes.dex */
|
||||||
|
public static class Default implements IAONHECallbacks {
|
||||||
|
@Override // android.hardware.IAONHECallbacks
|
||||||
|
public void onOpened() throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.hardware.IAONHECallbacks
|
||||||
|
public void onClosed() throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.hardware.IAONHECallbacks
|
||||||
|
public void onError(int errorCode) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.hardware.IAONHECallbacks
|
||||||
|
public void onHEDetected() throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.os.IInterface
|
||||||
|
public IBinder asBinder() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* loaded from: classes.dex */
|
||||||
|
public static abstract class Stub extends Binder implements IAONHECallbacks {
|
||||||
|
static final int TRANSACTION_onClosed = 2;
|
||||||
|
static final int TRANSACTION_onError = 3;
|
||||||
|
static final int TRANSACTION_onHEDetected = 4;
|
||||||
|
static final int TRANSACTION_onOpened = 1;
|
||||||
|
|
||||||
|
public Stub() {
|
||||||
|
attachInterface(this, IAONHECallbacks.DESCRIPTOR);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAONHECallbacks asInterface(IBinder obj) {
|
||||||
|
if (obj == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
IInterface iin = obj.queryLocalInterface(IAONHECallbacks.DESCRIPTOR);
|
||||||
|
if (iin != null && (iin instanceof IAONHECallbacks)) {
|
||||||
|
return (IAONHECallbacks) iin;
|
||||||
|
}
|
||||||
|
return new Proxy(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.os.IInterface
|
||||||
|
public IBinder asBinder() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getDefaultTransactionName(int transactionCode) {
|
||||||
|
switch (transactionCode) {
|
||||||
|
case 1:
|
||||||
|
return "onOpened";
|
||||||
|
case 2:
|
||||||
|
return "onClosed";
|
||||||
|
case 3:
|
||||||
|
return "onError";
|
||||||
|
case 4:
|
||||||
|
return "onHEDetected";
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTransactionName(int transactionCode) {
|
||||||
|
return getDefaultTransactionName(transactionCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.os.Binder
|
||||||
|
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
|
||||||
|
if (code >= 1 && code <= 16777215) {
|
||||||
|
data.enforceInterface(IAONHECallbacks.DESCRIPTOR);
|
||||||
|
}
|
||||||
|
switch (code) {
|
||||||
|
case 1598968902:
|
||||||
|
reply.writeString(IAONHECallbacks.DESCRIPTOR);
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
switch (code) {
|
||||||
|
case 1:
|
||||||
|
onOpened();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
onClosed();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
int _arg0 = data.readInt();
|
||||||
|
data.enforceNoDataAvail();
|
||||||
|
onError(_arg0);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
onHEDetected();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return super.onTransact(code, data, reply, flags);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* loaded from: classes.dex */
|
||||||
|
private static class Proxy implements IAONHECallbacks {
|
||||||
|
private IBinder mRemote;
|
||||||
|
|
||||||
|
Proxy(IBinder remote) {
|
||||||
|
this.mRemote = remote;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.os.IInterface
|
||||||
|
public IBinder asBinder() {
|
||||||
|
return this.mRemote;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInterfaceDescriptor() {
|
||||||
|
return IAONHECallbacks.DESCRIPTOR;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.hardware.IAONHECallbacks
|
||||||
|
public void onOpened() throws RemoteException {
|
||||||
|
Parcel _data = Parcel.obtain(asBinder());
|
||||||
|
try {
|
||||||
|
_data.writeInterfaceToken(IAONHECallbacks.DESCRIPTOR);
|
||||||
|
this.mRemote.transact(1, _data, null, 1);
|
||||||
|
} finally {
|
||||||
|
_data.recycle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.hardware.IAONHECallbacks
|
||||||
|
public void onClosed() throws RemoteException {
|
||||||
|
Parcel _data = Parcel.obtain(asBinder());
|
||||||
|
try {
|
||||||
|
_data.writeInterfaceToken(IAONHECallbacks.DESCRIPTOR);
|
||||||
|
this.mRemote.transact(2, _data, null, 1);
|
||||||
|
} finally {
|
||||||
|
_data.recycle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.hardware.IAONHECallbacks
|
||||||
|
public void onError(int errorCode) throws RemoteException {
|
||||||
|
Parcel _data = Parcel.obtain(asBinder());
|
||||||
|
try {
|
||||||
|
_data.writeInterfaceToken(IAONHECallbacks.DESCRIPTOR);
|
||||||
|
_data.writeInt(errorCode);
|
||||||
|
this.mRemote.transact(3, _data, null, 1);
|
||||||
|
} finally {
|
||||||
|
_data.recycle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.hardware.IAONHECallbacks
|
||||||
|
public void onHEDetected() throws RemoteException {
|
||||||
|
Parcel _data = Parcel.obtain(asBinder());
|
||||||
|
try {
|
||||||
|
_data.writeInterfaceToken(IAONHECallbacks.DESCRIPTOR);
|
||||||
|
this.mRemote.transact(4, _data, null, 1);
|
||||||
|
} finally {
|
||||||
|
_data.recycle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMaxTransactionId() {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package android.hardware.camera2;
|
||||||
|
|
||||||
|
import android.common.IOplusCommonFeature;
|
||||||
|
import android.common.OplusFeatureList;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.IBinder;
|
||||||
|
|
||||||
|
/* loaded from: classes.dex */
|
||||||
|
public interface IOplusCameraManager extends IOplusCommonFeature {
|
||||||
|
public static final IOplusCameraManager DEFAULT = new IOplusCameraManager() { // from class: android.hardware.camera2.IOplusCameraManager.1
|
||||||
|
};
|
||||||
|
public static final String NAME = "IOplusCameraManager";
|
||||||
|
|
||||||
|
/* loaded from: classes.dex */
|
||||||
|
public enum Cmd {
|
||||||
|
CMD_NONE,
|
||||||
|
CMD_PRE_CAPTURE,
|
||||||
|
CMD_PRE_OPEN,
|
||||||
|
CMD_PRE_EVLIST
|
||||||
|
}
|
||||||
|
|
||||||
|
//default OplusFeatureList.OplusIndex index() {
|
||||||
|
// return OplusFeatureList.OplusIndex.IOplusCameraManager;
|
||||||
|
//}
|
||||||
|
|
||||||
|
default IOplusCommonFeature getDefault() {
|
||||||
|
return DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
|
default void addAuthResultInfo(Context context, int uid, int pid, int permBits, String packageName) {
|
||||||
|
}
|
||||||
|
|
||||||
|
default void setDeathRecipient(IBinder client) {
|
||||||
|
}
|
||||||
|
|
||||||
|
default boolean isAuthedClient(Context context) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
default void preOpenCamera(Context context) {
|
||||||
|
}
|
||||||
|
|
||||||
|
default void sendOplusExtCamCmd(Context context, Cmd cmd, int[] param) {
|
||||||
|
}
|
||||||
|
|
||||||
|
default void setCallInfo() {
|
||||||
|
}
|
||||||
|
|
||||||
|
default void saveOpPackageName(String packageName) {
|
||||||
|
}
|
||||||
|
|
||||||
|
default void setPackageName() {
|
||||||
|
}
|
||||||
|
|
||||||
|
default boolean isPrivilegedApp(String packageName) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
default boolean isCameraUnitSession() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
default void parseSessionParameters(CaptureRequest sessionParams) {
|
||||||
|
}
|
||||||
|
}
|
||||||
757
oplus-fwk/src/android/hardware/camera2/OplusCameraManager.java
Normal file
757
oplus-fwk/src/android/hardware/camera2/OplusCameraManager.java
Normal file
@@ -0,0 +1,757 @@
|
|||||||
|
package android.hardware.camera2;
|
||||||
|
|
||||||
|
import android.app.OplusExSystemServiceHelper;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.hardware.IAONHECallbacks;
|
||||||
|
import android.hardware.camera2.CaptureRequest;
|
||||||
|
import android.hardware.camera2.IOplusCameraManager;
|
||||||
|
import android.hardware.camera2.impl.CameraMetadataNative;
|
||||||
|
import android.media.Image;
|
||||||
|
import android.media.ImageReader;
|
||||||
|
import android.os.Binder;
|
||||||
|
import android.os.IBinder;
|
||||||
|
import android.os.Parcel;
|
||||||
|
import android.os.RemoteException;
|
||||||
|
import android.os.ServiceManager;
|
||||||
|
import android.os.SystemProperties;
|
||||||
|
import android.util.Log;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
|
/* loaded from: classes.dex */
|
||||||
|
public final class OplusCameraManager implements IOplusCameraManager {
|
||||||
|
private static final String PERMISSION_SAFE_CAMERA = "com.oplus.permission.safe.CAMERA";
|
||||||
|
private static final String TAG = "OplusCameraManager";
|
||||||
|
private static final String SYSTEM_CAMERA_PACKNAME = SystemProperties.get("ro.oplus.system.camera.name");
|
||||||
|
private static final CaptureRequest.Key<byte[]> KEY_OPLUS_PACKAGE = new CaptureRequest.Key<>("com.oplus.is.sdk.camera.package", byte[].class);
|
||||||
|
private static OplusCameraManager mInstance = new OplusCameraManager();
|
||||||
|
private static String[] SET_PACKAGE_BLACK_LIST = {"com.oplus.battery", "com.oplus.onetrace", "com.android.systemui", "com.oplus.obrain", OplusExSystemServiceHelper.EX_SYSTEM_SERVICE_PKGNAME};
|
||||||
|
private String mOpPackageName = "";
|
||||||
|
private boolean mIsCameraUnitSession = false;
|
||||||
|
private boolean mbLoad = false;
|
||||||
|
|
||||||
|
public native int nativeSendToAttachHWBufToBufQEvent(long j);
|
||||||
|
|
||||||
|
public native int nativeSendToBufQAllocEnableEvent(long j);
|
||||||
|
|
||||||
|
public native int nativeSendToExchgHWBufBtwBufQEvent(long j);
|
||||||
|
|
||||||
|
public native void nativtSendToProcessHeif(long j);
|
||||||
|
|
||||||
|
private OplusCameraManager() {
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkLoadLibrary() {
|
||||||
|
Log.i(TAG, "checkLoadHeifLibbrary, mbLoad: " + this.mbLoad);
|
||||||
|
if (this.mbLoad) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
System.loadLibrary("HeifWinBufExchg-jni");
|
||||||
|
this.mbLoad = true;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
Log.e(TAG, "checkLoadHeifLibbrary, error");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendToProcessHeif(long ptr) {
|
||||||
|
checkLoadLibrary();
|
||||||
|
nativtSendToProcessHeif(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int sendToBufQAllocEnableEvent(long ptr) {
|
||||||
|
checkLoadLibrary();
|
||||||
|
return nativeSendToBufQAllocEnableEvent(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int sendToExchgHWBufBtwBufQEvent(long ptr) {
|
||||||
|
checkLoadLibrary();
|
||||||
|
return nativeSendToExchgHWBufBtwBufQEvent(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int sendToAttachHWBufToBufQEvent(long ptr) {
|
||||||
|
checkLoadLibrary();
|
||||||
|
return nativeSendToAttachHWBufToBufQEvent(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static synchronized OplusCameraManager getInstance() {
|
||||||
|
OplusCameraManager oplusCameraManager;
|
||||||
|
synchronized (OplusCameraManager.class) {
|
||||||
|
oplusCameraManager = mInstance;
|
||||||
|
}
|
||||||
|
return oplusCameraManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Object getEmptyCameraMetadataNative(long[] metadataPtr) {
|
||||||
|
CameraMetadataNative meta = new CameraMetadataNative();
|
||||||
|
if (metadataPtr != null && metadataPtr.length > 0) {
|
||||||
|
metadataPtr[0] = meta.getMetadataPtr();
|
||||||
|
}
|
||||||
|
return meta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static TotalCaptureResult generateTotalCaptureResult(Object meta, long frameId) {
|
||||||
|
if (meta == null || !(meta instanceof CameraMetadataNative)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
TotalCaptureResult r = new TotalCaptureResult((CameraMetadataNative) meta, 0);
|
||||||
|
try {
|
||||||
|
Field numField = CaptureResult.class.getDeclaredField("mFrameNumber");
|
||||||
|
numField.setAccessible(true);
|
||||||
|
numField.setLong(r, frameId);
|
||||||
|
} catch (IllegalAccessException | NoSuchFieldException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.hardware.camera2.IOplusCameraManager
|
||||||
|
public void addAuthResultInfo(Context context, int uid, int pid, int permBits, String packageName) {
|
||||||
|
context.enforceCallingOrSelfPermission(PERMISSION_SAFE_CAMERA, TAG);
|
||||||
|
if (uid == 0) {
|
||||||
|
throw new IllegalArgumentException("uid was 0, which is illegal.");
|
||||||
|
}
|
||||||
|
if (pid == 0) {
|
||||||
|
throw new IllegalArgumentException("pid was 0, which is illegal.");
|
||||||
|
}
|
||||||
|
if (packageName == null) {
|
||||||
|
throw new IllegalArgumentException("packageName was null, which is illegal.");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
OplusCameraManagerGlobal.get().addAuthResultInfo(uid, pid, permBits, packageName);
|
||||||
|
} catch (CameraAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (RemoteException e2) {
|
||||||
|
e2.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.hardware.camera2.IOplusCameraManager
|
||||||
|
public void setDeathRecipient(IBinder client) {
|
||||||
|
if (client == null) {
|
||||||
|
throw new IllegalArgumentException("client was null");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
OplusCameraManagerGlobal.get().setDeathRecipient(client);
|
||||||
|
} catch (CameraAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (RemoteException e2) {
|
||||||
|
e2.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.hardware.camera2.IOplusCameraManager
|
||||||
|
public boolean isAuthedClient(Context context) {
|
||||||
|
if (context == null) {
|
||||||
|
throw new IllegalArgumentException("context was null");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return OplusCameraManagerGlobal.get().isAuthedClient(context.getOpPackageName());
|
||||||
|
} catch (CameraAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return false;
|
||||||
|
} catch (RemoteException e2) {
|
||||||
|
e2.printStackTrace();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.hardware.camera2.IOplusCameraManager
|
||||||
|
public void preOpenCamera(Context context) {
|
||||||
|
if (context == null) {
|
||||||
|
throw new IllegalArgumentException("context was null");
|
||||||
|
}
|
||||||
|
context.enforceCallingOrSelfPermission(PERMISSION_SAFE_CAMERA, TAG);
|
||||||
|
try {
|
||||||
|
OplusCameraManagerGlobal.get().preOpenCamera(context.getOpPackageName());
|
||||||
|
} catch (CameraAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (RemoteException e2) {
|
||||||
|
e2.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.hardware.camera2.IOplusCameraManager
|
||||||
|
public void sendOplusExtCamCmd(Context context, IOplusCameraManager.Cmd cmd, int[] param) {
|
||||||
|
if (context == null) {
|
||||||
|
throw new IllegalArgumentException("context was null");
|
||||||
|
}
|
||||||
|
context.enforceCallingOrSelfPermission(PERMISSION_SAFE_CAMERA, TAG);
|
||||||
|
try {
|
||||||
|
OplusCameraManagerGlobal.get().sendOplusExtCamCmd(context.getOpPackageName(), cmd, param);
|
||||||
|
} catch (CameraAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (RemoteException e2) {
|
||||||
|
e2.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.hardware.camera2.IOplusCameraManager
|
||||||
|
public void setCallInfo() {
|
||||||
|
try {
|
||||||
|
OplusCameraManagerGlobal.get().setCallInfo();
|
||||||
|
} catch (CameraAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (RemoteException e2) {
|
||||||
|
e2.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.hardware.camera2.IOplusCameraManager
|
||||||
|
public void saveOpPackageName(String packageName) {
|
||||||
|
this.mOpPackageName = packageName;
|
||||||
|
Log.i(TAG, "saveOpPackageName, mOpPackageName: " + this.mOpPackageName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.hardware.camera2.IOplusCameraManager
|
||||||
|
public void setPackageName() {
|
||||||
|
String[] strArr;
|
||||||
|
for (String packageName : SET_PACKAGE_BLACK_LIST) {
|
||||||
|
if (packageName.equals(this.mOpPackageName)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
OplusCameraManagerGlobal.get().setClientInfo(this.mOpPackageName, Binder.getCallingUid(), Binder.getCallingPid());
|
||||||
|
} catch (CameraAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (RemoteException e2) {
|
||||||
|
e2.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRIOClientInfo() throws CameraAccessException {
|
||||||
|
Log.i(TAG, "uid = " + Binder.getCallingUid() + ", pid = " + Binder.getCallingPid());
|
||||||
|
try {
|
||||||
|
OplusCameraManagerGlobal.get().setRIOClientInfo(Binder.getCallingUid(), Binder.getCallingPid());
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.hardware.camera2.IOplusCameraManager
|
||||||
|
public boolean isPrivilegedApp(String packageName) {
|
||||||
|
String str;
|
||||||
|
if (packageName == null || (str = SYSTEM_CAMERA_PACKNAME) == null || !str.equals(packageName)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTorchIntensity(int torchIntensity) {
|
||||||
|
if (torchIntensity < 0) {
|
||||||
|
throw new IllegalArgumentException("torchIntensity was less than 0, which is illegal.");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
OplusCameraManagerGlobal.get().setTorchIntensity(torchIntensity);
|
||||||
|
} catch (CameraAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (RemoteException e2) {
|
||||||
|
e2.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void disconnectClients() {
|
||||||
|
try {
|
||||||
|
OplusCameraManagerGlobal.get().disconnectClients();
|
||||||
|
} catch (CameraAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (RemoteException e2) {
|
||||||
|
e2.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isClientConnected() {
|
||||||
|
try {
|
||||||
|
return OplusCameraManagerGlobal.get().isClientConnected();
|
||||||
|
} catch (CameraAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return false;
|
||||||
|
} catch (RemoteException e2) {
|
||||||
|
e2.printStackTrace();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.hardware.camera2.IOplusCameraManager
|
||||||
|
public boolean isCameraUnitSession() {
|
||||||
|
return this.mIsCameraUnitSession;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.hardware.camera2.IOplusCameraManager
|
||||||
|
public void parseSessionParameters(CaptureRequest sessionParams) {
|
||||||
|
if (sessionParams == null) {
|
||||||
|
setIsCameraUnitSession(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
byte[] result = (byte[]) sessionParams.get(KEY_OPLUS_PACKAGE);
|
||||||
|
if (result == null || result.length == 0) {
|
||||||
|
setIsCameraUnitSession(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (1 == result[0]) {
|
||||||
|
setIsCameraUnitSession(true);
|
||||||
|
}
|
||||||
|
Log.i(TAG, "parseSessionParameters mIsCameraUnitSession: " + this.mIsCameraUnitSession);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void oplusDetachImage(Image image, ImageReader imgreader) {
|
||||||
|
try {
|
||||||
|
Method method = ImageReader.class.getDeclaredMethod("detachImage", Image.class);
|
||||||
|
method.setAccessible(true);
|
||||||
|
method.invoke(imgreader, image);
|
||||||
|
} catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
Log.i(TAG, "using reflection to visit detachImage method in ImageReader");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setOmojiJson(String jsonInfo) {
|
||||||
|
Log.i(TAG, "setOmojiJson called.");
|
||||||
|
if (jsonInfo == null || "".equals(jsonInfo)) {
|
||||||
|
Log.i(TAG, "jsonInfo is null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
OplusCameraManagerGlobal.get().setOmojiJson(jsonInfo);
|
||||||
|
} catch (CameraAccessException e) {
|
||||||
|
Log.i(TAG, "setOmojiJson :" + e.getMessage());
|
||||||
|
} catch (RemoteException e2) {
|
||||||
|
Log.i(TAG, "setOmojiJson :" + e2.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void closeAON() throws CameraAccessException {
|
||||||
|
Log.i(TAG, "uid = " + Binder.getCallingUid() + ", pid = " + Binder.getCallingPid());
|
||||||
|
try {
|
||||||
|
OplusCameraManagerGlobal.get().closeAON();
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void openAON(IAONHECallbacks callback) throws CameraAccessException {
|
||||||
|
Log.i(TAG, "uid = " + Binder.getCallingUid() + ", pid = " + Binder.getCallingPid());
|
||||||
|
try {
|
||||||
|
OplusCameraManagerGlobal.get().openAON(callback);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setIsCameraUnitSession(boolean isCameraUnitSession) {
|
||||||
|
this.mIsCameraUnitSession = isCameraUnitSession;
|
||||||
|
try {
|
||||||
|
OplusCameraManagerGlobal.get().setIsCameraUnitSession(this.mIsCameraUnitSession);
|
||||||
|
} catch (CameraAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (RemoteException e2) {
|
||||||
|
e2.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* JADX INFO: Access modifiers changed from: private */
|
||||||
|
/* loaded from: classes.dex */
|
||||||
|
public static final class OplusCameraManagerGlobal implements IBinder.DeathRecipient {
|
||||||
|
private static final int ADD_AUTH_RESULT = 10001;
|
||||||
|
private static final String CAMERA_SERVICE_BINDER_NAME = "media.camera";
|
||||||
|
private static final int CLIENT_IS_AUTHED = 10004;
|
||||||
|
private static final int CLOSE_AON = 10013;
|
||||||
|
private static final int CONNECT_STATUS = 10011;
|
||||||
|
private static final String DESCRIPTOR = "android.hardware.camera";
|
||||||
|
private static final int DISCONNECT_CLIENTS = 10009;
|
||||||
|
private static final int OPEN_AON = 10012;
|
||||||
|
private static final int OPLUS_CAMERA_FIRST_CALL_TRANSACTION = 10000;
|
||||||
|
private static final int PRE_OPEN_CAMERA = 10014;
|
||||||
|
private static final int SEND_OPLUS_EXT_CAM_CMD = 10015;
|
||||||
|
private static final int SET_CALL_INFO = 10006;
|
||||||
|
private static final int SET_CLIENT_INFO = 10005;
|
||||||
|
private static final int SET_DEATH_RECIPIENT = 10002;
|
||||||
|
private static final int SET_IS_CAMERA_UNIT_SESSION = 10016;
|
||||||
|
private static final int SET_OMOJI_JSON = 10010;
|
||||||
|
private static final int SET_PACKAGE_NAME = 10003;
|
||||||
|
private static final int SET_RIO_CLIENT_INFO = 10007;
|
||||||
|
private static final int SET_TORCH_INTENSITY = 10008;
|
||||||
|
private static final String TAG = "OplusCameraManagerGlobal";
|
||||||
|
private static final OplusCameraManagerGlobal gCameraManager = new OplusCameraManagerGlobal();
|
||||||
|
public static final boolean sCameraServiceDisabled = SystemProperties.getBoolean("config.disable_cameraservice", false);
|
||||||
|
private final boolean DEBUG = false;
|
||||||
|
private final Object mLock = new Object();
|
||||||
|
private IBinder mRemote = null;
|
||||||
|
|
||||||
|
private OplusCameraManagerGlobal() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static OplusCameraManagerGlobal get() {
|
||||||
|
return gCameraManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void connectCameraServiceLocked() {
|
||||||
|
if (this.mRemote != null || sCameraServiceDisabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Log.i(TAG, "Connecting to camera service");
|
||||||
|
IBinder service = ServiceManager.getService(CAMERA_SERVICE_BINDER_NAME);
|
||||||
|
this.mRemote = service;
|
||||||
|
if (service == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
service.linkToDeath(this, 0);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public IBinder getCameraServiceRemote() {
|
||||||
|
IBinder iBinder;
|
||||||
|
synchronized (this.mLock) {
|
||||||
|
connectCameraServiceLocked();
|
||||||
|
if (this.mRemote == null && !sCameraServiceDisabled) {
|
||||||
|
Log.e(TAG, "Camera service is unavailable");
|
||||||
|
}
|
||||||
|
iBinder = this.mRemote;
|
||||||
|
}
|
||||||
|
return iBinder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addAuthResultInfo(int uid, int pid, int permBits, String packageName) throws CameraAccessException, RemoteException {
|
||||||
|
Log.e(TAG, "addAuthResultInfo");
|
||||||
|
IBinder remote = getCameraServiceRemote();
|
||||||
|
if (remote == null) {
|
||||||
|
throw new CameraAccessException(2, "Camera service is currently unavailable");
|
||||||
|
}
|
||||||
|
Parcel data = Parcel.obtain();
|
||||||
|
Parcel reply = Parcel.obtain();
|
||||||
|
try {
|
||||||
|
data.writeInterfaceToken(DESCRIPTOR);
|
||||||
|
data.writeInt(uid);
|
||||||
|
data.writeInt(pid);
|
||||||
|
data.writeInt(permBits);
|
||||||
|
data.writeString(packageName);
|
||||||
|
this.mRemote.transact(10001, data, reply, 0);
|
||||||
|
reply.readException();
|
||||||
|
} finally {
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeathRecipient(IBinder client) throws CameraAccessException, RemoteException {
|
||||||
|
Log.e(TAG, "setDeathRecipient");
|
||||||
|
IBinder remote = getCameraServiceRemote();
|
||||||
|
if (remote == null) {
|
||||||
|
throw new CameraAccessException(2, "Camera service is currently unavailable");
|
||||||
|
}
|
||||||
|
Parcel data = Parcel.obtain();
|
||||||
|
Parcel reply = Parcel.obtain();
|
||||||
|
try {
|
||||||
|
data.writeInterfaceToken(DESCRIPTOR);
|
||||||
|
data.writeStrongBinder(client);
|
||||||
|
this.mRemote.transact(10002, data, reply, 0);
|
||||||
|
reply.readException();
|
||||||
|
} finally {
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAuthedClient(String packageName) throws CameraAccessException, RemoteException {
|
||||||
|
Log.e(TAG, "isAuthedClient, need check packageName: " + packageName);
|
||||||
|
IBinder remote = getCameraServiceRemote();
|
||||||
|
if (remote == null) {
|
||||||
|
throw new CameraAccessException(2, "Camera service is currently unavailable");
|
||||||
|
}
|
||||||
|
Parcel data = Parcel.obtain();
|
||||||
|
Parcel reply = Parcel.obtain();
|
||||||
|
try {
|
||||||
|
data.writeInterfaceToken(DESCRIPTOR);
|
||||||
|
data.writeString(packageName);
|
||||||
|
this.mRemote.transact(10004, data, reply, 0);
|
||||||
|
reply.readException();
|
||||||
|
boolean isAuthed = reply.readBoolean();
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
Log.e(TAG, "isAuthedClient, the " + packageName + " is Authed " + isAuthed);
|
||||||
|
return isAuthed;
|
||||||
|
} catch (Throwable th) {
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
throw th;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void preOpenCamera(String packageName) throws CameraAccessException, RemoteException {
|
||||||
|
Log.e(TAG, "preOpenCamera, need check packageName: " + packageName);
|
||||||
|
IBinder remote = getCameraServiceRemote();
|
||||||
|
if (remote == null) {
|
||||||
|
throw new CameraAccessException(2, "Camera service is currently unavailable");
|
||||||
|
}
|
||||||
|
Parcel data = Parcel.obtain();
|
||||||
|
Parcel reply = Parcel.obtain();
|
||||||
|
try {
|
||||||
|
data.writeInterfaceToken(DESCRIPTOR);
|
||||||
|
data.writeInt(1);
|
||||||
|
this.mRemote.transact(10014, data, reply, 0);
|
||||||
|
reply.readException();
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
Log.e(TAG, "preOpenCamera, the " + packageName + " preOpenSend ");
|
||||||
|
} catch (Throwable th) {
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
throw th;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendOplusExtCamCmd(String packageName, IOplusCameraManager.Cmd cmd, int[] param) throws CameraAccessException, RemoteException {
|
||||||
|
Log.e(TAG, "sendOplusExtCamCmd, packageName: " + packageName + ", cmd: " + cmd);
|
||||||
|
IBinder remote = getCameraServiceRemote();
|
||||||
|
if (remote == null) {
|
||||||
|
throw new CameraAccessException(2, "Camera service is currently unavailable");
|
||||||
|
}
|
||||||
|
Parcel data = Parcel.obtain();
|
||||||
|
Parcel reply = Parcel.obtain();
|
||||||
|
try {
|
||||||
|
data.writeInterfaceToken(DESCRIPTOR);
|
||||||
|
data.writeInt(cmd.ordinal());
|
||||||
|
data.writeIntArray(param);
|
||||||
|
this.mRemote.transact(10015, data, reply, 1);
|
||||||
|
reply.readException();
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
Log.e(TAG, "sendOplusExtCamCmd complete ");
|
||||||
|
} catch (Throwable th) {
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
throw th;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCallInfo() throws CameraAccessException, RemoteException {
|
||||||
|
Log.e(TAG, "setCallInfo");
|
||||||
|
IBinder remote = getCameraServiceRemote();
|
||||||
|
if (remote == null) {
|
||||||
|
throw new CameraAccessException(2, "Camera service is currently unavailable");
|
||||||
|
}
|
||||||
|
Parcel data = Parcel.obtain();
|
||||||
|
Parcel reply = Parcel.obtain();
|
||||||
|
try {
|
||||||
|
data.writeInterfaceToken(DESCRIPTOR);
|
||||||
|
this.mRemote.transact(10006, data, reply, 0);
|
||||||
|
reply.readException();
|
||||||
|
} finally {
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPackageName(String packageName) throws CameraAccessException, RemoteException {
|
||||||
|
Log.i(TAG, "setPackageName");
|
||||||
|
IBinder remote = getCameraServiceRemote();
|
||||||
|
if (remote == null) {
|
||||||
|
throw new CameraAccessException(2, "Camera service is currently unavailable");
|
||||||
|
}
|
||||||
|
Parcel data = Parcel.obtain();
|
||||||
|
Parcel reply = Parcel.obtain();
|
||||||
|
try {
|
||||||
|
data.writeInterfaceToken(DESCRIPTOR);
|
||||||
|
data.writeString(packageName);
|
||||||
|
remote.transact(10003, data, reply, 0);
|
||||||
|
reply.readException();
|
||||||
|
} finally {
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientInfo(String packageName, int uid, int pid) throws CameraAccessException, RemoteException {
|
||||||
|
Log.i(TAG, "setClientInfo, packageName: " + packageName + ", uid: " + uid + ", pid: " + pid);
|
||||||
|
IBinder remote = getCameraServiceRemote();
|
||||||
|
if (remote == null) {
|
||||||
|
throw new CameraAccessException(2, "Camera service is currently unavailable");
|
||||||
|
}
|
||||||
|
Parcel data = Parcel.obtain();
|
||||||
|
Parcel reply = Parcel.obtain();
|
||||||
|
try {
|
||||||
|
data.writeInterfaceToken(DESCRIPTOR);
|
||||||
|
data.writeString(packageName);
|
||||||
|
data.writeInt(uid);
|
||||||
|
data.writeInt(pid);
|
||||||
|
remote.transact(10005, data, reply, 0);
|
||||||
|
reply.readException();
|
||||||
|
} finally {
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRIOClientInfo(int uid, int pid) throws CameraAccessException, RemoteException {
|
||||||
|
Log.i(TAG, "uid: " + uid + ", pid: " + pid);
|
||||||
|
IBinder remote = getCameraServiceRemote();
|
||||||
|
if (remote == null) {
|
||||||
|
throw new CameraAccessException(2, "Camera service is currently unavailable");
|
||||||
|
}
|
||||||
|
Parcel data = Parcel.obtain();
|
||||||
|
Parcel reply = Parcel.obtain();
|
||||||
|
try {
|
||||||
|
data.writeInterfaceToken(DESCRIPTOR);
|
||||||
|
data.writeInt(uid);
|
||||||
|
data.writeInt(pid);
|
||||||
|
remote.transact(10007, data, reply, 0);
|
||||||
|
reply.readException();
|
||||||
|
} finally {
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOmojiJson(String atavatarInfo) throws CameraAccessException, RemoteException {
|
||||||
|
Log.i(TAG, "setOmojiJson E");
|
||||||
|
IBinder remote = getCameraServiceRemote();
|
||||||
|
if (remote == null) {
|
||||||
|
throw new CameraAccessException(2, "Camera service is currently unavailable");
|
||||||
|
}
|
||||||
|
Parcel data = Parcel.obtain();
|
||||||
|
Parcel reply = Parcel.obtain();
|
||||||
|
try {
|
||||||
|
data.writeInterfaceToken(DESCRIPTOR);
|
||||||
|
data.writeString(atavatarInfo);
|
||||||
|
Log.i(TAG, "setOmojiJson process E");
|
||||||
|
this.mRemote.transact(10010, data, reply, 0);
|
||||||
|
Log.i(TAG, "setOmojiJson process X");
|
||||||
|
reply.readException();
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
Log.i(TAG, "setOmojiJson X");
|
||||||
|
} catch (Throwable th) {
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
throw th;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTorchIntensity(int torchIntensity) throws CameraAccessException, RemoteException {
|
||||||
|
Log.d(TAG, "setTorchIntensity: " + torchIntensity);
|
||||||
|
IBinder remote = getCameraServiceRemote();
|
||||||
|
if (remote == null) {
|
||||||
|
throw new CameraAccessException(2, "Camera service is currently unavailable");
|
||||||
|
}
|
||||||
|
Parcel data = Parcel.obtain();
|
||||||
|
Parcel reply = Parcel.obtain();
|
||||||
|
try {
|
||||||
|
data.writeInterfaceToken(DESCRIPTOR);
|
||||||
|
data.writeInt(torchIntensity);
|
||||||
|
remote.transact(10008, data, reply, 0);
|
||||||
|
reply.readException();
|
||||||
|
} finally {
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void disconnectClients() throws CameraAccessException, RemoteException {
|
||||||
|
Log.e(TAG, "disconnectClients");
|
||||||
|
IBinder remote = getCameraServiceRemote();
|
||||||
|
if (remote == null) {
|
||||||
|
throw new CameraAccessException(2, "Camera service is currently unavailable");
|
||||||
|
}
|
||||||
|
Parcel data = Parcel.obtain();
|
||||||
|
Parcel reply = Parcel.obtain();
|
||||||
|
try {
|
||||||
|
data.writeInterfaceToken(DESCRIPTOR);
|
||||||
|
this.mRemote.transact(10009, data, reply, 0);
|
||||||
|
reply.readException();
|
||||||
|
} finally {
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isClientConnected() throws CameraAccessException, RemoteException {
|
||||||
|
Log.e(TAG, "isClientConnected");
|
||||||
|
IBinder remote = getCameraServiceRemote();
|
||||||
|
if (remote == null) {
|
||||||
|
throw new CameraAccessException(2, "Camera service is currently unavailable");
|
||||||
|
}
|
||||||
|
Parcel data = Parcel.obtain();
|
||||||
|
Parcel reply = Parcel.obtain();
|
||||||
|
try {
|
||||||
|
data.writeInterfaceToken(DESCRIPTOR);
|
||||||
|
this.mRemote.transact(10011, data, reply, 0);
|
||||||
|
reply.readException();
|
||||||
|
boolean isConnected = reply.readBoolean();
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
Log.e(TAG, "isClientConnected: " + isConnected);
|
||||||
|
return isConnected;
|
||||||
|
} catch (Throwable th) {
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
throw th;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void openAON(IAONHECallbacks callback) throws CameraAccessException, RemoteException {
|
||||||
|
Log.i(TAG, "openAON E");
|
||||||
|
IBinder remote = getCameraServiceRemote();
|
||||||
|
if (remote == null) {
|
||||||
|
throw new CameraAccessException(2, "Camera service is currently unavailable");
|
||||||
|
}
|
||||||
|
Parcel data = Parcel.obtain();
|
||||||
|
Parcel reply = Parcel.obtain();
|
||||||
|
try {
|
||||||
|
data.writeInterfaceToken(DESCRIPTOR);
|
||||||
|
data.writeStrongBinder(callback.asBinder());
|
||||||
|
remote.transact(10012, data, reply, 0);
|
||||||
|
reply.readException();
|
||||||
|
} finally {
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void closeAON() throws CameraAccessException, RemoteException {
|
||||||
|
Log.i(TAG, "closeAON E");
|
||||||
|
IBinder remote = getCameraServiceRemote();
|
||||||
|
if (remote == null) {
|
||||||
|
throw new CameraAccessException(2, "Camera service is currently unavailable");
|
||||||
|
}
|
||||||
|
Parcel data = Parcel.obtain();
|
||||||
|
Parcel reply = Parcel.obtain();
|
||||||
|
try {
|
||||||
|
data.writeInterfaceToken(DESCRIPTOR);
|
||||||
|
remote.transact(10013, data, reply, 0);
|
||||||
|
reply.readException();
|
||||||
|
} finally {
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsCameraUnitSession(boolean isCameraUnitSession) throws CameraAccessException, RemoteException {
|
||||||
|
Log.i(TAG, "setIsCameraUnitSession E");
|
||||||
|
IBinder remote = getCameraServiceRemote();
|
||||||
|
if (remote == null) {
|
||||||
|
throw new CameraAccessException(2, "Camera service is currently unavailable");
|
||||||
|
}
|
||||||
|
Parcel data = Parcel.obtain();
|
||||||
|
Parcel reply = Parcel.obtain();
|
||||||
|
try {
|
||||||
|
data.writeInterfaceToken(DESCRIPTOR);
|
||||||
|
data.writeBoolean(isCameraUnitSession);
|
||||||
|
remote.transact(10016, data, reply, 0);
|
||||||
|
reply.readException();
|
||||||
|
} finally {
|
||||||
|
data.recycle();
|
||||||
|
reply.recycle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.os.IBinder.DeathRecipient
|
||||||
|
public void binderDied() {
|
||||||
|
this.mRemote = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
10
oplus-fwk/src/android/os/OplusKeyEventManager.java
Normal file
10
oplus-fwk/src/android/os/OplusKeyEventManager.java
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
package android.os;
|
||||||
|
|
||||||
|
import android.view.KeyEvent;
|
||||||
|
|
||||||
|
public class OplusKeyEventManager {
|
||||||
|
|
||||||
|
public interface OnKeyEventObserver {
|
||||||
|
void onKeyEvent(KeyEvent event);
|
||||||
|
}
|
||||||
|
}
|
||||||
8
oplus-fwk/src/android/os/OplusManager.java
Normal file
8
oplus-fwk/src/android/os/OplusManager.java
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
package android.os;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class OplusManager {
|
||||||
|
|
||||||
|
public static void onStamp(String eventId, Map<String, String> logMap) {}
|
||||||
|
}
|
||||||
20
oplus-fwk/src/android/os/OplusSystemProperties.java
Normal file
20
oplus-fwk/src/android/os/OplusSystemProperties.java
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
package android.os;
|
||||||
|
|
||||||
|
public class OplusSystemProperties {
|
||||||
|
|
||||||
|
public static String get(String key) {
|
||||||
|
return SystemProperties.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String get(String key, String def) {
|
||||||
|
return SystemProperties.get(key, def);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getInt(String key, int def) {
|
||||||
|
return SystemProperties.getInt(key, def);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean getBoolean(String key, boolean def) {
|
||||||
|
return SystemProperties.getBoolean(key, def);
|
||||||
|
}
|
||||||
|
}
|
||||||
6
oplus-fwk/src/android/view/OplusWindowManager.java
Normal file
6
oplus-fwk/src/android/view/OplusWindowManager.java
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
package android.view;
|
||||||
|
|
||||||
|
public class OplusWindowManager {
|
||||||
|
|
||||||
|
public OplusWindowManager() {}
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package android.view.animation;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.res.Resources;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
|
||||||
|
public class OplusBezierInterpolator extends BaseInterpolator {
|
||||||
|
private final float ABOVE_ONE;
|
||||||
|
private final float ABOVE_ZERO;
|
||||||
|
private final float BELOW_ONE;
|
||||||
|
private final boolean DEBUG;
|
||||||
|
private final double EPSILON;
|
||||||
|
private final String TAG;
|
||||||
|
private boolean mAbove;
|
||||||
|
private boolean mLimit;
|
||||||
|
private OplusUnitBezier mOplusUnitBezier;
|
||||||
|
|
||||||
|
public OplusBezierInterpolator(Context context, AttributeSet attrs) {
|
||||||
|
this(context.getResources(), context.getTheme(), attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
public OplusBezierInterpolator(Resources res, Resources.Theme theme, AttributeSet attrs) {
|
||||||
|
this.TAG = "OplusBezierInterpolator";
|
||||||
|
this.DEBUG = false;
|
||||||
|
this.EPSILON = 6.25E-5d;
|
||||||
|
this.ABOVE_ONE = 1.0f;
|
||||||
|
this.BELOW_ONE = 0.9999f;
|
||||||
|
this.ABOVE_ZERO = 1.0E-4f;
|
||||||
|
this.mAbove = false;
|
||||||
|
this.mLimit = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OplusBezierInterpolator(double p1x, double p1y, double p2x, double p2y, boolean limit) {
|
||||||
|
this.TAG = "OplusBezierInterpolator";
|
||||||
|
this.DEBUG = false;
|
||||||
|
this.EPSILON = 6.25E-5d;
|
||||||
|
this.ABOVE_ONE = 1.0f;
|
||||||
|
this.BELOW_ONE = 0.9999f;
|
||||||
|
this.ABOVE_ZERO = 1.0E-4f;
|
||||||
|
this.mAbove = false;
|
||||||
|
this.mLimit = false;
|
||||||
|
this.mLimit = limit;
|
||||||
|
this.mOplusUnitBezier = new OplusUnitBezier(p1x, p1y, p2x, p2y);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getInterpolation(float input) {
|
||||||
|
double interpolation = this.mOplusUnitBezier.solve(input, 6.25E-5d);
|
||||||
|
if (this.mLimit) {
|
||||||
|
if (input < 1.0E-4f || input > 0.9999f) {
|
||||||
|
this.mAbove = false;
|
||||||
|
}
|
||||||
|
if (interpolation > 1.0d && !this.mAbove) {
|
||||||
|
interpolation = 1.0d;
|
||||||
|
this.mAbove = true;
|
||||||
|
}
|
||||||
|
if (this.mAbove) {
|
||||||
|
interpolation = 1.0d;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (float) interpolation;
|
||||||
|
}
|
||||||
|
}
|
||||||
77
oplus-fwk/src/android/view/animation/OplusUnitBezier.java
Normal file
77
oplus-fwk/src/android/view/animation/OplusUnitBezier.java
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
package android.view.animation;
|
||||||
|
|
||||||
|
public class OplusUnitBezier {
|
||||||
|
|
||||||
|
private double f5ax;
|
||||||
|
private double f6ay;
|
||||||
|
private double f7bx;
|
||||||
|
private double f8by;
|
||||||
|
private double f9cx;
|
||||||
|
private double f10cy;
|
||||||
|
|
||||||
|
public OplusUnitBezier(double p1x, double p1y, double p2x, double p2y) {
|
||||||
|
double d = p1x * 3.0d;
|
||||||
|
this.f9cx = d;
|
||||||
|
double d2 = ((p2x - p1x) * 3.0d) - d;
|
||||||
|
this.f7bx = d2;
|
||||||
|
this.f5ax = (1.0d - d) - d2;
|
||||||
|
double d3 = p1y * 3.0d;
|
||||||
|
this.f10cy = d3;
|
||||||
|
double d4 = ((p2y - p1y) * 3.0d) - d3;
|
||||||
|
this.f8by = d4;
|
||||||
|
this.f6ay = (1.0d - d3) - d4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double sampleCurveX(double t) {
|
||||||
|
return ((((this.f5ax * t) + this.f7bx) * t) + this.f9cx) * t;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double sampleCurveY(double t) {
|
||||||
|
return ((((this.f6ay * t) + this.f8by) * t) + this.f10cy) * t;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double sampleCurveDerivativeX(double t) {
|
||||||
|
return (((this.f5ax * 3.0d * t) + (this.f7bx * 2.0d)) * t) + this.f9cx;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double solveCurveX(double x, double epsilon) {
|
||||||
|
double t2 = x;
|
||||||
|
for (int i = 0; i < 8; i++) {
|
||||||
|
double x2 = sampleCurveX(t2) - x;
|
||||||
|
if (Math.abs(x2) < epsilon) {
|
||||||
|
return t2;
|
||||||
|
}
|
||||||
|
double d2 = sampleCurveDerivativeX(t2);
|
||||||
|
if (Math.abs(d2) < 1.0E-6d) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
t2 -= x2 / d2;
|
||||||
|
}
|
||||||
|
double t0 = 0.0d;
|
||||||
|
double t1 = 1.0d;
|
||||||
|
double t22 = x;
|
||||||
|
if (t22 < 0.0d) {
|
||||||
|
return 0.0d;
|
||||||
|
}
|
||||||
|
if (t22 > 1.0d) {
|
||||||
|
return 1.0d;
|
||||||
|
}
|
||||||
|
while (t0 < t1) {
|
||||||
|
double x22 = sampleCurveX(t22);
|
||||||
|
if (Math.abs(x22 - x) < epsilon) {
|
||||||
|
return t22;
|
||||||
|
}
|
||||||
|
if (x > x22) {
|
||||||
|
t0 = t22;
|
||||||
|
} else {
|
||||||
|
t1 = t22;
|
||||||
|
}
|
||||||
|
t22 = ((t1 - t0) * 0.5d) + t0;
|
||||||
|
}
|
||||||
|
return t22;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double solve(double x, double epsilon) {
|
||||||
|
return sampleCurveY(solveCurveX(x, epsilon));
|
||||||
|
}
|
||||||
|
}
|
||||||
25
oplus-fwk/src/com/oplus/app/OPlusAccessControlManager.java
Normal file
25
oplus-fwk/src/com/oplus/app/OPlusAccessControlManager.java
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
package com.oplus.app;
|
||||||
|
|
||||||
|
import android.os.UserHandle;
|
||||||
|
|
||||||
|
public class OPlusAccessControlManager {
|
||||||
|
|
||||||
|
private static OPlusAccessControlManager sOPlusAccessControlManager = null;
|
||||||
|
|
||||||
|
public static final int USER_CURRENT = UserHandle.myUserId();
|
||||||
|
|
||||||
|
public static OPlusAccessControlManager getInstance() {
|
||||||
|
if (sOPlusAccessControlManager == null) {
|
||||||
|
sOPlusAccessControlManager = new OPlusAccessControlManager();
|
||||||
|
}
|
||||||
|
return sOPlusAccessControlManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isEncryptPass(String packageName, int userId) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isEncryptedPackage(String packageName, int userId) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
6
oplus-fwk/src/com/oplus/app/OplusAppEnterInfo.java
Normal file
6
oplus-fwk/src/com/oplus/app/OplusAppEnterInfo.java
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
package com.oplus.app;
|
||||||
|
|
||||||
|
public class OplusAppEnterInfo {
|
||||||
|
|
||||||
|
public OplusAppEnterInfo() {}
|
||||||
|
}
|
||||||
6
oplus-fwk/src/com/oplus/app/OplusAppExitInfo.java
Normal file
6
oplus-fwk/src/com/oplus/app/OplusAppExitInfo.java
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
package com.oplus.app;
|
||||||
|
|
||||||
|
public class OplusAppExitInfo {
|
||||||
|
|
||||||
|
public OplusAppExitInfo() {}
|
||||||
|
}
|
||||||
6
oplus-fwk/src/com/oplus/app/OplusAppInfo.java
Normal file
6
oplus-fwk/src/com/oplus/app/OplusAppInfo.java
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
package com.oplus.app;
|
||||||
|
|
||||||
|
public class OplusAppInfo {
|
||||||
|
|
||||||
|
public OplusAppInfo() {}
|
||||||
|
}
|
||||||
8
oplus-fwk/src/com/oplus/app/OplusAppSwitchConfig.java
Normal file
8
oplus-fwk/src/com/oplus/app/OplusAppSwitchConfig.java
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
package com.oplus.app;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class OplusAppSwitchConfig {
|
||||||
|
|
||||||
|
public void addAppConfig(int type, List<String> list) {}
|
||||||
|
}
|
||||||
37
oplus-fwk/src/com/oplus/app/OplusAppSwitchManager.java
Normal file
37
oplus-fwk/src/com/oplus/app/OplusAppSwitchManager.java
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
package com.oplus.app;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
public class OplusAppSwitchManager {
|
||||||
|
|
||||||
|
private static OplusAppSwitchManager sOplusAppSwitchManager = null;
|
||||||
|
|
||||||
|
public static int APP_SWITCH_VERSION = 1;
|
||||||
|
|
||||||
|
public static OplusAppSwitchManager getInstance() {
|
||||||
|
if (sOplusAppSwitchManager == null) {
|
||||||
|
sOplusAppSwitchManager = new OplusAppSwitchManager();
|
||||||
|
}
|
||||||
|
return sOplusAppSwitchManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean registerAppSwitchObserver(Context context,
|
||||||
|
OnAppSwitchObserver observer, OplusAppSwitchConfig config) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean unregisterAppSwitchObserver(Context context, OnAppSwitchObserver observer) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnAppSwitchObserver {
|
||||||
|
|
||||||
|
void onActivityEnter(OplusAppEnterInfo oplusAppEnterInfo);
|
||||||
|
|
||||||
|
void onActivityExit(OplusAppExitInfo oplusAppExitInfo);
|
||||||
|
|
||||||
|
void onAppEnter(OplusAppEnterInfo oplusAppEnterInfo);
|
||||||
|
|
||||||
|
void onAppExit(OplusAppExitInfo oplusAppExitInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.oplus.content;
|
||||||
|
|
||||||
|
public class OplusFeatureConfigManager {
|
||||||
|
|
||||||
|
public static OplusFeatureConfigManager sOplusFeatureConfigManager = null;
|
||||||
|
|
||||||
|
public static OplusFeatureConfigManager getInstance() {
|
||||||
|
if (sOplusFeatureConfigManager == null) {
|
||||||
|
sOplusFeatureConfigManager = new OplusFeatureConfigManager();
|
||||||
|
}
|
||||||
|
return sOplusFeatureConfigManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasFeature(String name) {
|
||||||
|
if ("oplus.software.vibrator_lmvibrator".equals(name)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
19
oplus-fwk/src/com/oplus/orms/OplusResourceManager.java
Normal file
19
oplus-fwk/src/com/oplus/orms/OplusResourceManager.java
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
package com.oplus.orms;
|
||||||
|
|
||||||
|
import com.oplus.orms.info.OrmsSaParam;
|
||||||
|
|
||||||
|
public class OplusResourceManager {
|
||||||
|
|
||||||
|
private static OplusResourceManager sOplusResourceManager = null;
|
||||||
|
|
||||||
|
public static OplusResourceManager getInstance(Class clazz) {
|
||||||
|
if (sOplusResourceManager == null) {
|
||||||
|
sOplusResourceManager = new OplusResourceManager();
|
||||||
|
}
|
||||||
|
return sOplusResourceManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long ormsSetSceneAction(OrmsSaParam ormsSaParam) {
|
||||||
|
return -1L;
|
||||||
|
}
|
||||||
|
}
|
||||||
8
oplus-fwk/src/com/oplus/orms/info/OrmsSaParam.java
Normal file
8
oplus-fwk/src/com/oplus/orms/info/OrmsSaParam.java
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
package com.oplus.orms.info;
|
||||||
|
|
||||||
|
public class OrmsSaParam {
|
||||||
|
|
||||||
|
public OrmsSaParam() {}
|
||||||
|
|
||||||
|
public OrmsSaParam(String scene, String action, int timeout) {}
|
||||||
|
}
|
||||||
15
oplus-fwk/src/com/oplus/os/OplusBuild.java
Normal file
15
oplus-fwk/src/com/oplus/os/OplusBuild.java
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
package com.oplus.os;
|
||||||
|
|
||||||
|
public class OplusBuild {
|
||||||
|
public static final int OplusOS_11_3 = 22;
|
||||||
|
|
||||||
|
public static int getOplusOSVERSION() {
|
||||||
|
return 23;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class VERSION {
|
||||||
|
public static final String RELEASE = "unknown";
|
||||||
|
public static final int SDK_VERSION = getOplusOSVERSION();
|
||||||
|
public static final int SDK_SUB_VERSION = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
156
oplus-fwk/src/com/oplus/os/OplusUsbEnvironment.java
Normal file
156
oplus-fwk/src/com/oplus/os/OplusUsbEnvironment.java
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
package com.oplus.os;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Environment;
|
||||||
|
import android.os.RemoteException;
|
||||||
|
import android.os.ServiceManager;
|
||||||
|
import android.os.UserHandle;
|
||||||
|
import android.os.storage.DiskInfo;
|
||||||
|
import android.os.storage.IStorageManager;
|
||||||
|
import android.os.storage.StorageManager;
|
||||||
|
import android.os.storage.VolumeInfo;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class OplusUsbEnvironment extends Environment {
|
||||||
|
|
||||||
|
private static final String TAG = "OplusUsbEnvironment";
|
||||||
|
private static final String DEFAULT_INTERNAL_PATH = "/storage/emulated/0";
|
||||||
|
|
||||||
|
private static IStorageManager sMountService = null;
|
||||||
|
private static Object sLock = new Object();
|
||||||
|
private static String sExternalSdDir = null;
|
||||||
|
private static String sInternalSdDir = DEFAULT_INTERNAL_PATH;
|
||||||
|
private static ArrayList<String> sOtgPathes = new ArrayList<>();
|
||||||
|
|
||||||
|
private static void update(Context context) {
|
||||||
|
if (sMountService == null) {
|
||||||
|
sMountService = IStorageManager.Stub.asInterface(ServiceManager.getService("mount"));
|
||||||
|
}
|
||||||
|
getVolumes();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static File getExternalSdDirectory(Context context) {
|
||||||
|
String path;
|
||||||
|
synchronized (sLock) {
|
||||||
|
update(context);
|
||||||
|
path = sExternalSdDir;
|
||||||
|
}
|
||||||
|
if (path == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return new File(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getExternalSdState(Context context) {
|
||||||
|
String path;
|
||||||
|
final StorageManager sm = (StorageManager) context.getSystemService("storage");
|
||||||
|
synchronized (sLock) {
|
||||||
|
update(context);
|
||||||
|
path = sExternalSdDir;
|
||||||
|
}
|
||||||
|
if (path == null || sm == null) {
|
||||||
|
return "unknown";
|
||||||
|
}
|
||||||
|
return sm.getVolumeState(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getExternalPath(Context context) {
|
||||||
|
String path;
|
||||||
|
synchronized (sLock) {
|
||||||
|
update(context);
|
||||||
|
path = sExternalSdDir;
|
||||||
|
}
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static File getInternalSdDirectory(Context context) {
|
||||||
|
String path;
|
||||||
|
synchronized (sLock) {
|
||||||
|
update(context);
|
||||||
|
path = sInternalSdDir;
|
||||||
|
}
|
||||||
|
if (path == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return new File(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getInternalSdState(Context context) {
|
||||||
|
String path;
|
||||||
|
final StorageManager sm = (StorageManager) context.getSystemService("storage");
|
||||||
|
synchronized (sLock) {
|
||||||
|
update(context);
|
||||||
|
path = sInternalSdDir;
|
||||||
|
}
|
||||||
|
if (path == null || sm == null) {
|
||||||
|
return "unknown";
|
||||||
|
}
|
||||||
|
return sm.getVolumeState(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getInternalPath(Context context) {
|
||||||
|
String path;
|
||||||
|
synchronized (sLock) {
|
||||||
|
update(context);
|
||||||
|
path = sInternalSdDir;
|
||||||
|
}
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<String> getOtgPath(Context context) {
|
||||||
|
synchronized (sLock) {
|
||||||
|
update(context);
|
||||||
|
if (sOtgPathes == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return (ArrayList<String>) sOtgPathes.clone();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void getVolumes() {
|
||||||
|
if (sMountService == null) {
|
||||||
|
Log.e(TAG, "getVolumes: sMountService is null!!!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
final VolumeInfo[] vols = sMountService.getVolumes(0);
|
||||||
|
sExternalSdDir = null;
|
||||||
|
sOtgPathes.clear();
|
||||||
|
for (VolumeInfo vol : vols) {
|
||||||
|
final String path = vol.path;
|
||||||
|
if (vol.type == 2) {
|
||||||
|
final int userId = UserHandle.myUserId();
|
||||||
|
if (path != null) {
|
||||||
|
sInternalSdDir = path.concat("/").concat(Integer.toString(userId));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
final DiskInfo diskInfo = vol.getDisk();
|
||||||
|
if (diskInfo != null) {
|
||||||
|
if (diskInfo.isSd() && path != null) {
|
||||||
|
sExternalSdDir = path;
|
||||||
|
}
|
||||||
|
if (diskInfo.isUsb() && path != null && !sOtgPathes.contains(path)) {
|
||||||
|
sOtgPathes.add(path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isVolumeMounted(Context context, String path) {
|
||||||
|
synchronized (sLock) {
|
||||||
|
update(context);
|
||||||
|
}
|
||||||
|
final StorageManager sm = (StorageManager) context.getSystemService("storage");
|
||||||
|
if (path == null || sm == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return "mounted".equals(sm.getVolumeState(path));
|
||||||
|
}
|
||||||
|
}
|
||||||
114
oplus-fwk/src/com/oplus/os/WaveformEffect.java
Normal file
114
oplus-fwk/src/com/oplus/os/WaveformEffect.java
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2022 The Nameless-AOSP Project
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.oplus.os;
|
||||||
|
|
||||||
|
import android.os.Parcel;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.util.Slog;
|
||||||
|
|
||||||
|
public class WaveformEffect implements Parcelable {
|
||||||
|
|
||||||
|
private static final String TAG = "WaveformEffect";
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<WaveformEffect> CREATOR =
|
||||||
|
new Parcelable.Creator<WaveformEffect>() {
|
||||||
|
@Override
|
||||||
|
public WaveformEffect createFromParcel(Parcel in) {
|
||||||
|
return new WaveformEffect(in);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WaveformEffect[] newArray(int size) {
|
||||||
|
return new WaveformEffect[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
private int mEffectType;
|
||||||
|
private boolean mEffectLoop;
|
||||||
|
private boolean mStrengthSettingEnabled;
|
||||||
|
|
||||||
|
private WaveformEffect() {
|
||||||
|
mEffectType = -1;
|
||||||
|
mEffectLoop = false;
|
||||||
|
mStrengthSettingEnabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getEffectType() {
|
||||||
|
return mEffectType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getEffectLoop() {
|
||||||
|
return mEffectLoop;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getStrengthSettingEnabled() {
|
||||||
|
return mStrengthSettingEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Builder {
|
||||||
|
private int mEffectType;
|
||||||
|
private boolean mEffectLoop;
|
||||||
|
private boolean mStrengthSettingEnabled;
|
||||||
|
|
||||||
|
public Builder() {
|
||||||
|
mEffectType = -1;
|
||||||
|
mEffectLoop = false;
|
||||||
|
mStrengthSettingEnabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder(WaveformEffect effect) {
|
||||||
|
mEffectType = -1;
|
||||||
|
mEffectLoop = false;
|
||||||
|
mStrengthSettingEnabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public WaveformEffect build() {
|
||||||
|
WaveformEffect effect = new WaveformEffect();
|
||||||
|
effect.mEffectType = mEffectType;
|
||||||
|
effect.mEffectLoop = mEffectLoop;
|
||||||
|
effect.mStrengthSettingEnabled = mStrengthSettingEnabled;
|
||||||
|
return effect;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder setEffectType(int type) {
|
||||||
|
mEffectType = type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder setEffectLoop(boolean loop) {
|
||||||
|
mEffectLoop = loop;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder setStrengthSettingEnabled(boolean enabled) {
|
||||||
|
mStrengthSettingEnabled = enabled;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeToParcel(Parcel dest, int flags) {
|
||||||
|
dest.writeInt(mEffectType);
|
||||||
|
dest.writeBoolean(mEffectLoop);
|
||||||
|
dest.writeBoolean(mStrengthSettingEnabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
private WaveformEffect(Parcel in) {
|
||||||
|
mEffectType = in.readInt();
|
||||||
|
mEffectLoop = in.readBoolean();
|
||||||
|
mStrengthSettingEnabled = in.readBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return String.valueOf(mEffectType);
|
||||||
|
}
|
||||||
|
}
|
||||||
8
oplus-fwk/src/com/oplus/osense/OsenseResClient.java
Normal file
8
oplus-fwk/src/com/oplus/osense/OsenseResClient.java
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
package com.oplus.osense;
|
||||||
|
|
||||||
|
public class OsenseResClient {
|
||||||
|
|
||||||
|
public static OsenseResClient get(Class clazz) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
20
oplus-fwk/src/com/oplus/osense/OsenseResEventClient.java
Normal file
20
oplus-fwk/src/com/oplus/osense/OsenseResEventClient.java
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
package com.oplus.osense;
|
||||||
|
|
||||||
|
public class OsenseResEventClient {
|
||||||
|
|
||||||
|
private static volatile OsenseResEventClient sInstance;
|
||||||
|
|
||||||
|
private OsenseResEventClient() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static OsenseResEventClient getInstance() {
|
||||||
|
if (sInstance == null) {
|
||||||
|
synchronized (OsenseResEventClient.class) {
|
||||||
|
if (sInstance == null) {
|
||||||
|
sInstance = new OsenseResEventClient();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.oplus.osense.eventinfo;
|
||||||
|
|
||||||
|
import android.os.Binder;
|
||||||
|
import android.os.IBinder;
|
||||||
|
import android.os.IInterface;
|
||||||
|
import android.os.Parcel;
|
||||||
|
import android.os.RemoteException;
|
||||||
|
|
||||||
|
/* loaded from: classes.dex */
|
||||||
|
public interface IOsenseEventCallback extends IInterface {
|
||||||
|
|
||||||
|
public static class Default implements IOsenseEventCallback {
|
||||||
|
@Override // android.os.IInterface
|
||||||
|
public IBinder asBinder() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static abstract class Stub extends Binder implements IOsenseEventCallback {
|
||||||
|
@Override // android.os.IInterface
|
||||||
|
public IBinder asBinder() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.oplus.osense.eventinfo;
|
||||||
|
|
||||||
|
import com.oplus.osense.eventinfo.IOsenseEventCallback;
|
||||||
|
|
||||||
|
public class OsenseEventCallback extends IOsenseEventCallback.Stub {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package com.oplus.screenshot;
|
||||||
|
|
||||||
|
public class OplusLongshotCustomController {
|
||||||
|
|
||||||
|
public OplusLongshotCustomController(OplusLongshotViewBase view, String source) {}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.oplus.screenshot;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
public interface OplusLongshotViewBase {
|
||||||
|
|
||||||
|
boolean canLongScroll();
|
||||||
|
|
||||||
|
int computeLongScrollExtent();
|
||||||
|
|
||||||
|
int computeLongScrollOffset();
|
||||||
|
|
||||||
|
int computeLongScrollRange();
|
||||||
|
|
||||||
|
boolean findViewsLongshotInfo(OplusLongshowViewInfo oplusLongshowViewInfo);
|
||||||
|
|
||||||
|
Context getContext();
|
||||||
|
|
||||||
|
boolean isLongshotVisibleToUser();
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package com.oplus.screenshot;
|
||||||
|
|
||||||
|
public class OplusLongshowViewInfo {
|
||||||
|
|
||||||
|
public OplusLongshowViewInfo() {}
|
||||||
|
}
|
||||||
16
oplus-fwk/src/com/oplus/uifirst/OplusUIFirstManager.java
Normal file
16
oplus-fwk/src/com/oplus/uifirst/OplusUIFirstManager.java
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
package com.oplus.uifirst;
|
||||||
|
|
||||||
|
public class OplusUIFirstManager {
|
||||||
|
|
||||||
|
private static OplusUIFirstManager sOplusUIFirstManager = null;
|
||||||
|
|
||||||
|
public static OplusUIFirstManager getInstance() {
|
||||||
|
if (sOplusUIFirstManager == null) {
|
||||||
|
sOplusUIFirstManager = new OplusUIFirstManager();
|
||||||
|
}
|
||||||
|
return sOplusUIFirstManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUxThreadValue(int pid, int tid, String value) {
|
||||||
|
}
|
||||||
|
}
|
||||||
52
oplus-fwk/src/com/oplus/util/OplusChangeTextUtil.java
Normal file
52
oplus-fwk/src/com/oplus/util/OplusChangeTextUtil.java
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
package com.oplus.util;
|
||||||
|
|
||||||
|
public class OplusChangeTextUtil {
|
||||||
|
|
||||||
|
private static final String TAG = "OplusChangeTextUtil";
|
||||||
|
|
||||||
|
private static final float H1 = 0.9f;
|
||||||
|
private static final float H2 = 1.0f;
|
||||||
|
private static final float H3 = 1.1f;
|
||||||
|
private static final float H4 = 1.25f;
|
||||||
|
private static final float H5 = 1.45f;
|
||||||
|
private static final float H6 = 1.65f;
|
||||||
|
|
||||||
|
public static final int G1 = 1;
|
||||||
|
public static final int G2 = 2;
|
||||||
|
public static final int G3 = 3;
|
||||||
|
public static final int G4 = 4;
|
||||||
|
public static final int G5 = 5;
|
||||||
|
public static final int G6 = 6;
|
||||||
|
|
||||||
|
public static final float[] SCALE_LEVEL = {H1, H2, H3, H4, H5, H6};
|
||||||
|
|
||||||
|
public static float getSuitableFontSize(float textSize, float scale, int level) {
|
||||||
|
if (level < 2) {
|
||||||
|
return textSize;
|
||||||
|
}
|
||||||
|
if (level > SCALE_LEVEL.length) {
|
||||||
|
level = SCALE_LEVEL.length;
|
||||||
|
}
|
||||||
|
final float textSizeNoScale = textSize / scale;
|
||||||
|
switch (level) {
|
||||||
|
case G2:
|
||||||
|
if (scale < H3) {
|
||||||
|
return H2 * textSizeNoScale;
|
||||||
|
}
|
||||||
|
return H3 * textSizeNoScale;
|
||||||
|
case G3:
|
||||||
|
if (scale < H3) {
|
||||||
|
return H2 * textSizeNoScale;
|
||||||
|
}
|
||||||
|
if (scale < H5) {
|
||||||
|
return H3 * textSizeNoScale;
|
||||||
|
}
|
||||||
|
return H4 * textSizeNoScale;
|
||||||
|
default:
|
||||||
|
if (scale > SCALE_LEVEL[level - 1]) {
|
||||||
|
return SCALE_LEVEL[level - 1] * textSizeNoScale;
|
||||||
|
}
|
||||||
|
return textSizeNoScale * scale;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
40
oplus-fwk/src/com/oplus/util/OplusNetworkUtils.java
Normal file
40
oplus-fwk/src/com/oplus/util/OplusNetworkUtils.java
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
package com.oplus.util;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.net.ConnectivityManager;
|
||||||
|
import android.net.NetworkInfo;
|
||||||
|
import android.net.Uri;
|
||||||
|
|
||||||
|
public class OplusNetworkUtils {
|
||||||
|
|
||||||
|
private static final String DEFAULT_HTTP_URI = "http://connectivitycheck.gstatic.com/generate_204";
|
||||||
|
|
||||||
|
public static boolean isWifiConnected(Context context) {
|
||||||
|
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||||
|
if (cm != null) {
|
||||||
|
return cm.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState()
|
||||||
|
== NetworkInfo.State.CONNECTED;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isMobileDataConnected(Context context) {
|
||||||
|
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||||
|
if (cm != null) {
|
||||||
|
return cm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState()
|
||||||
|
== NetworkInfo.State.CONNECTED;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void onClickLoginBtn(Context context) {
|
||||||
|
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(DEFAULT_HTTP_URI));
|
||||||
|
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
|
||||||
|
context.startActivity(intent);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getErrorString(Context context, String url) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
6
oplus-fwk/src/com/oplus/util/OplusTypeCastingHelper.java
Normal file
6
oplus-fwk/src/com/oplus/util/OplusTypeCastingHelper.java
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
package com.oplus.util;
|
||||||
|
|
||||||
|
public class OplusTypeCastingHelper {
|
||||||
|
|
||||||
|
public OplusTypeCastingHelper() {}
|
||||||
|
}
|
||||||
14
oplus-fwk/src/com/oplus/wrapper/os/PowerManager.java
Normal file
14
oplus-fwk/src/com/oplus/wrapper/os/PowerManager.java
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
package com.oplus.wrapper.os;
|
||||||
|
|
||||||
|
public class PowerManager {
|
||||||
|
|
||||||
|
private final android.os.PowerManager mPowerManager;
|
||||||
|
|
||||||
|
public PowerManager(android.os.PowerManager powerManager) {
|
||||||
|
mPowerManager = powerManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMaximumScreenBrightnessSetting() {
|
||||||
|
return mPowerManager.getMaximumScreenBrightnessSetting();
|
||||||
|
}
|
||||||
|
}
|
||||||
17
oplus-fwk/src/com/oplus/wrapper/os/ServiceManager.java
Normal file
17
oplus-fwk/src/com/oplus/wrapper/os/ServiceManager.java
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
package com.oplus.wrapper.os;
|
||||||
|
|
||||||
|
import android.os.IBinder;
|
||||||
|
|
||||||
|
public class ServiceManager {
|
||||||
|
public static void addService(String paramString, IBinder paramIBinder) {
|
||||||
|
android.os.ServiceManager.addService(paramString, paramIBinder);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IBinder checkService(String paramString) {
|
||||||
|
return android.os.ServiceManager.checkService(paramString);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IBinder getService(String paramString) {
|
||||||
|
return android.os.ServiceManager.getService(paramString);
|
||||||
|
}
|
||||||
|
}
|
||||||
24
oplus-fwk/src/com/oplus/wrapper/os/SystemProperties.java
Normal file
24
oplus-fwk/src/com/oplus/wrapper/os/SystemProperties.java
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
package com.oplus.wrapper.os;
|
||||||
|
|
||||||
|
public class SystemProperties {
|
||||||
|
|
||||||
|
public static String get(String key) {
|
||||||
|
return android.os.SystemProperties.get(key, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String get(String key, String def) {
|
||||||
|
return android.os.SystemProperties.get(key, def);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getInt(String key, int def) {
|
||||||
|
return android.os.SystemProperties.getInt(key, def);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean getBoolean(String key, boolean def) {
|
||||||
|
return android.os.SystemProperties.getBoolean(key, def);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void set(String key, String val) {
|
||||||
|
android.os.SystemProperties.set(key, val);
|
||||||
|
}
|
||||||
|
}
|
||||||
658
oplus-fwk/src/com/oplus/wrapper/view/IWindowManager.java
Normal file
658
oplus-fwk/src/com/oplus/wrapper/view/IWindowManager.java
Normal file
@@ -0,0 +1,658 @@
|
|||||||
|
package com.oplus.wrapper.view;
|
||||||
|
|
||||||
|
import android.app.IAssistDataReceiver;
|
||||||
|
import android.content.ComponentName;
|
||||||
|
import android.content.res.Configuration;
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.Point;
|
||||||
|
import android.graphics.Rect;
|
||||||
|
import android.graphics.Region;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.IBinder;
|
||||||
|
import android.os.IInterface;
|
||||||
|
import android.os.IRemoteCallback;
|
||||||
|
import android.os.RemoteException;
|
||||||
|
import android.view.IAppTransitionAnimationSpecsFuture;
|
||||||
|
import android.view.ICrossWindowBlurEnabledListener;
|
||||||
|
import android.view.IDisplayChangeWindowController;
|
||||||
|
import android.view.IDisplayFoldListener;
|
||||||
|
import android.view.IDisplayWindowInsetsController;
|
||||||
|
import android.view.IDisplayWindowListener;
|
||||||
|
import android.view.IOnKeyguardExitResult;
|
||||||
|
import android.view.IPinnedTaskListener;
|
||||||
|
import android.view.IRotationWatcher;
|
||||||
|
import android.view.IScrollCaptureResponseListener;
|
||||||
|
import android.view.ISystemGestureExclusionListener;
|
||||||
|
import android.view.IWallpaperVisibilityListener;
|
||||||
|
import android.view.IWindow;
|
||||||
|
import android.view.IWindowSession;
|
||||||
|
import android.view.IWindowSessionCallback;
|
||||||
|
import android.view.InputChannel;
|
||||||
|
import android.view.InsetsState;
|
||||||
|
import android.view.TaskTransitionSpec;
|
||||||
|
import android.view.WindowContentFrameStats;
|
||||||
|
import android.view.displayhash.DisplayHash;
|
||||||
|
import android.view.displayhash.VerifiedDisplayHash;
|
||||||
|
import android.window.AddToSurfaceSyncGroupResult;
|
||||||
|
import android.window.ISurfaceSyncGroupCompletedListener;
|
||||||
|
import android.window.ITaskFpsCallback;
|
||||||
|
import android.window.ScreenCapture;
|
||||||
|
import com.android.internal.os.IResultReceiver;
|
||||||
|
import com.android.internal.policy.IKeyguardDismissCallback;
|
||||||
|
import com.android.internal.policy.IKeyguardLockedStateListener;
|
||||||
|
import com.android.internal.policy.IShortcutService;
|
||||||
|
import com.oplus.wrapper.view.IWindowManager;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
|
/* loaded from: classes.dex */
|
||||||
|
public interface IWindowManager {
|
||||||
|
int getBaseDisplayDensity(int i) throws RemoteException;
|
||||||
|
|
||||||
|
void getBaseDisplaySize(int i, Point point) throws RemoteException;
|
||||||
|
|
||||||
|
int getDockedStackSide() throws RemoteException;
|
||||||
|
|
||||||
|
int getInitialDisplayDensity(int i) throws RemoteException;
|
||||||
|
|
||||||
|
boolean hasNavigationBar(int i) throws RemoteException;
|
||||||
|
|
||||||
|
void removeRotationWatcher(IRotationWatcher iRotationWatcher) throws RemoteException;
|
||||||
|
|
||||||
|
void setForcedDisplayDensityForUser(int i, int i2, int i3) throws RemoteException;
|
||||||
|
|
||||||
|
int watchRotation(IRotationWatcher iRotationWatcher, int i) throws RemoteException;
|
||||||
|
|
||||||
|
/* loaded from: classes.dex */
|
||||||
|
public static abstract class Stub implements android.os.IInterface, android.view.IWindowManager {
|
||||||
|
private final android.view.IWindowManager mIWindowManager = new android.view.IWindowManager.Stub() { // from class: com.oplus.wrapper.view.IWindowManager.Stub.1
|
||||||
|
public boolean startViewServer(int i) throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean stopViewServer() throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isViewServerRunning() throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IWindowSession openSession(IWindowSessionCallback iWindowSessionCallback) throws RemoteException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean useBLAST() throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getInitialDisplaySize(int i, Point point) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getBaseDisplaySize(int displayId, Point size) throws RemoteException {
|
||||||
|
getBaseDisplaySize(displayId, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setForcedDisplaySize(int i, int i1, int i2) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clearForcedDisplaySize(int i) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getInitialDisplayDensity(int displayId) throws RemoteException {
|
||||||
|
return getInitialDisplayDensity(displayId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBaseDisplayDensity(int displayId) throws RemoteException {
|
||||||
|
return getBaseDisplayDensity(displayId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setForcedDisplayDensityForUser(int i, int i1, int i2) throws RemoteException {
|
||||||
|
setForcedDisplayDensityForUser(i, i1, i2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clearForcedDisplayDensityForUser(int i, int i1) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setForcedDisplayScalingMode(int i, int i1) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEventDispatching(boolean b) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isWindowToken(IBinder iBinder) throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addWindowToken(IBinder iBinder, int i, int i1, Bundle bundle) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeWindowToken(IBinder iBinder, int i) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDisplayChangeWindowController(IDisplayChangeWindowController controller) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public android.view.SurfaceControl addShellRoot(int i, IWindow iWindow, int i1) throws RemoteException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShellRootAccessibilityWindow(int i, int i1, IWindow iWindow) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void overridePendingAppTransitionMultiThumbFuture(IAppTransitionAnimationSpecsFuture iAppTransitionAnimationSpecsFuture, IRemoteCallback iRemoteCallback, boolean b, int i) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void overridePendingAppTransitionRemote(android.view.RemoteAnimationAdapter remoteAnimationAdapter, int i) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void endProlongedAnimations() throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void startFreezingScreen(int i, int i1) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void stopFreezingScreen() throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void disableKeyguard(IBinder iBinder, String s, int i) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reenableKeyguard(IBinder iBinder, int i) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void exitKeyguardSecurely(IOnKeyguardExitResult iOnKeyguardExitResult) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isKeyguardLocked() throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isKeyguardSecure(int i) throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void dismissKeyguard(IKeyguardDismissCallback iKeyguardDismissCallback, CharSequence charSequence) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addKeyguardLockedStateListener(IKeyguardLockedStateListener iKeyguardLockedStateListener) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeKeyguardLockedStateListener(IKeyguardLockedStateListener iKeyguardLockedStateListener) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSwitchingUser(boolean b) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void closeSystemDialogs(String s) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getAnimationScale(int i) throws RemoteException {
|
||||||
|
return 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float[] getAnimationScales() throws RemoteException {
|
||||||
|
return new float[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAnimationScale(int i, float v) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAnimationScales(float[] floats) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getCurrentAnimatorScale() throws RemoteException {
|
||||||
|
return 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInTouchMode(boolean b, int displayId) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInTouchModeOnAllDisplays(boolean inTouch) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isInTouchMode(int displayId) throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void showStrictModeViolation(boolean b) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStrictModeVisualIndicatorPreference(String s) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void refreshScreenCaptureDisabled() throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDefaultDisplayRotation() throws RemoteException {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int watchRotation(final android.view.IRotationWatcher watcher, int displayId) throws RemoteException {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeRotationWatcher(android.view.IRotationWatcher iRotationWatcher) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public int registerProposedRotationListener(IBinder contextToken, android.view.IRotationWatcher listener) throws RemoteException {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPreferredOptionsPanelGravity(int i) throws RemoteException {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void freezeRotation(int i) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void thawRotation() throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isRotationFrozen() throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void freezeDisplayRotation(int i, int i1) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void thawDisplayRotation(int i) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDisplayRotationFrozen(int i) throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFixedToUserRotation(int i, int i1) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIgnoreOrientationRequest(int i, boolean b) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Bitmap screenshotWallpaper() throws RemoteException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public android.view.SurfaceControl mirrorWallpaperSurface(int i) throws RemoteException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean registerWallpaperVisibilityListener(IWallpaperVisibilityListener iWallpaperVisibilityListener, int i) throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unregisterWallpaperVisibilityListener(IWallpaperVisibilityListener iWallpaperVisibilityListener, int i) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void registerSystemGestureExclusionListener(ISystemGestureExclusionListener iSystemGestureExclusionListener, int i) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unregisterSystemGestureExclusionListener(ISystemGestureExclusionListener iSystemGestureExclusionListener, int i) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean requestAssistScreenshot(IAssistDataReceiver iAssistDataReceiver) throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void hideTransientBars(int i) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecentsVisibility(boolean b) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateStaticPrivacyIndicatorBounds(int i, Rect[] rects) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNavBarVirtualKeyHapticFeedbackEnabled(boolean b) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasNavigationBar(int displayId) throws RemoteException {
|
||||||
|
return hasNavigationBar(displayId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void lockNow(Bundle bundle) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSafeModeEnabled() throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean clearWindowContentFrameStats(IBinder iBinder) throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public WindowContentFrameStats getWindowContentFrameStats(IBinder iBinder) throws RemoteException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDockedStackSide() throws RemoteException {
|
||||||
|
return getDockedStackSide();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void registerPinnedTaskListener(int i, IPinnedTaskListener iPinnedTaskListener) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void requestAppKeyboardShortcuts(IResultReceiver iResultReceiver, int i) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void requestImeKeyboardShortcuts(IResultReceiver iRsultReceiver, int i) throws RemoteException {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getStableInsets(int i, Rect rect) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void registerShortcutKey(long l, IShortcutService iShortcutService) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void createInputConsumer(IBinder iBinder, String s, int i, InputChannel inputChannel) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean destroyInputConsumer(String s, int i) throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Region getCurrentImeTouchRegion() throws RemoteException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void registerDisplayFoldListener(IDisplayFoldListener iDisplayFoldListener) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unregisterDisplayFoldListener(IDisplayFoldListener iDisplayFoldListener) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[] registerDisplayWindowListener(IDisplayWindowListener iDisplayWindowListener) throws RemoteException {
|
||||||
|
return new int[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unregisterDisplayWindowListener(IDisplayWindowListener iDisplayWindowListener) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void startWindowTrace() throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void stopWindowTrace() throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void saveWindowTraceToFile() throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void startTransitionTrace() throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void stopTransitionTrace() throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isWindowTraceEnabled() throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isTransitionTraceEnabled() throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getWindowingMode(int i) throws RemoteException {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWindowingMode(int i, int i1) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getRemoveContentMode(int i) throws RemoteException {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemoveContentMode(int i, int i1) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean shouldShowWithInsecureKeyguard(int i) throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShouldShowWithInsecureKeyguard(int i, boolean b) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean shouldShowSystemDecors(int i) throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShouldShowSystemDecors(int i, boolean b) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDisplayImePolicy(int i) throws RemoteException {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDisplayImePolicy(int i, int i1) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void syncInputTransactions(boolean b) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isLayerTracing() throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLayerTracing(boolean b) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean mirrorDisplay(int i, android.view.SurfaceControl surfaceControl) throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDisplayWindowInsetsController(int i, IDisplayWindowInsetsController iDisplayWindowInsetsController) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateDisplayWindowRequestedVisibleTypes(int displayId, int requestedVisibleTypes) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getWindowInsets(int displayId, IBinder token, InsetsState insetsState) throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<android.view.DisplayInfo> getPossibleDisplayInfo(int displayId) throws RemoteException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDisplayIdByUniqueId(String uniqueId) throws RemoteException {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void showGlobalActions() throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLayerTracingFlags(int i) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActiveTransactionTracing(boolean active) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void requestScrollCapture(int i, IBinder iBinder, int i1, IScrollCaptureResponseListener iScrollCaptureResponseListener) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void holdLock(IBinder iBinder, int i) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String[] getSupportedDisplayHashAlgorithms() throws RemoteException {
|
||||||
|
return new String[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
public VerifiedDisplayHash verifyDisplayHash(DisplayHash displayHash) throws RemoteException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDisplayHashThrottlingEnabled(boolean b) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Configuration attachWindowContextToDisplayArea(IBinder iBinder, int i, int i1, Bundle bundle) throws RemoteException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void attachWindowContextToWindowToken(IBinder iBinder, IBinder iBinder1) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Configuration attachToDisplayContent(IBinder iBinder, int i) throws RemoteException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void detachWindowContextFromWindowContainer(IBinder iBinder) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean registerCrossWindowBlurEnabledListener(ICrossWindowBlurEnabledListener iCrossWindowBlurEnabledListener) throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unregisterCrossWindowBlurEnabledListener(ICrossWindowBlurEnabledListener iCrossWindowBlurEnabledListener) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isTaskSnapshotSupported() throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getImeDisplayId() throws RemoteException {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskSnapshotEnabled(boolean b) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskTransitionSpec(TaskTransitionSpec taskTransitionSpec) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clearTaskTransitionSpec() throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void registerTaskFpsCallback(int i, ITaskFpsCallback iTaskFpsCallback) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unregisterTaskFpsCallback(ITaskFpsCallback iTaskFpsCallback) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Bitmap snapshotTaskForRecents(int i) throws RemoteException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecentsAppBehindSystemBars(boolean b) throws RemoteException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLetterboxBackgroundColorInArgb() {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isLetterboxBackgroundMultiColored() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void captureDisplay(int displayId, ScreenCapture.CaptureArgs captureArgs, ScreenCapture.ScreenCaptureListener listener) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isGlobalKey(int keyCode) throws RemoteException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean addToSurfaceSyncGroup(IBinder syncGroupToken, boolean parentSyncGroupMerge, ISurfaceSyncGroupCompletedListener completedListener, AddToSurfaceSyncGroupResult addToSurfaceSyncGroupResult) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void markSurfaceSyncGroupReady(IBinder syncGroupToken) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ComponentName> notifyScreenshotListeners(int displayId) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void takeScreenshotExt(boolean capturePhysicalDisplay) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onOverlayChanged() {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static IWindowManager asInterface(IBinder obj) {
|
||||||
|
return new Proxy(android.view.IWindowManager.Stub.asInterface(obj));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // android.os.IInterface
|
||||||
|
public IBinder asBinder() {
|
||||||
|
return this.mIWindowManager.asBinder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* JADX INFO: Access modifiers changed from: private */
|
||||||
|
/* loaded from: classes.dex */
|
||||||
|
public static class Proxy implements IWindowManager {
|
||||||
|
private static Map<IRotationWatcher, android.view.IRotationWatcher> sRotationWatcherMap = new ConcurrentHashMap();
|
||||||
|
private final android.view.IWindowManager mIWindowManager;
|
||||||
|
|
||||||
|
Proxy(android.view.IWindowManager iWindowManager) {
|
||||||
|
this.mIWindowManager = iWindowManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // com.oplus.wrapper.view.IWindowManager
|
||||||
|
public int getDockedStackSide() throws RemoteException {
|
||||||
|
return this.mIWindowManager.getDockedStackSide();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // com.oplus.wrapper.view.IWindowManager
|
||||||
|
public int getInitialDisplayDensity(int displayId) throws RemoteException {
|
||||||
|
return this.mIWindowManager.getInitialDisplayDensity(displayId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // com.oplus.wrapper.view.IWindowManager
|
||||||
|
public boolean hasNavigationBar(int displayId) throws RemoteException {
|
||||||
|
return this.mIWindowManager.hasNavigationBar(displayId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // com.oplus.wrapper.view.IWindowManager
|
||||||
|
public int watchRotation(IRotationWatcher watcher, int displayId) throws RemoteException {
|
||||||
|
android.view.IRotationWatcher rotationWatcher = sRotationWatcherMap.computeIfAbsent(watcher, new Function() { // from class: com.oplus.wrapper.view.IWindowManager$Stub$Proxy$$ExternalSyntheticLambda0
|
||||||
|
@Override // java.util.function.Function
|
||||||
|
public final Object apply(Object obj) {
|
||||||
|
android.view.IRotationWatcher lambda$watchRotation$0;
|
||||||
|
lambda$watchRotation$0 = IWindowManager.Stub.Proxy.this.lambda$watchRotation$0((IRotationWatcher) obj);
|
||||||
|
return lambda$watchRotation$0;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return this.mIWindowManager.watchRotation(rotationWatcher, displayId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* JADX INFO: Access modifiers changed from: private */
|
||||||
|
public /* synthetic */ android.view.IRotationWatcher lambda$watchRotation$0(final IRotationWatcher observer) {
|
||||||
|
return new IRotationWatcher.Stub() { // from class: com.oplus.wrapper.view.IWindowManager.Stub.Proxy.1
|
||||||
|
public void onRotationChanged(int rotation) throws RemoteException {
|
||||||
|
observer.onRotationChanged(rotation);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // com.oplus.wrapper.view.IWindowManager
|
||||||
|
public void removeRotationWatcher(IRotationWatcher watcher) throws RemoteException {
|
||||||
|
android.view.IRotationWatcher rotationWatcher = sRotationWatcherMap.get(watcher);
|
||||||
|
if (rotationWatcher == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sRotationWatcherMap.remove(watcher);
|
||||||
|
this.mIWindowManager.removeRotationWatcher(rotationWatcher);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // com.oplus.wrapper.view.IWindowManager
|
||||||
|
public void setForcedDisplayDensityForUser(int displayId, int density, int userId) throws RemoteException {
|
||||||
|
this.mIWindowManager.setForcedDisplayDensityForUser(displayId, density, userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // com.oplus.wrapper.view.IWindowManager
|
||||||
|
public int getBaseDisplayDensity(int displayId) throws RemoteException {
|
||||||
|
return this.mIWindowManager.getBaseDisplayDensity(displayId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // com.oplus.wrapper.view.IWindowManager
|
||||||
|
public void getBaseDisplaySize(int displayId, Point size) throws RemoteException {
|
||||||
|
this.mIWindowManager.getBaseDisplaySize(displayId, size);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.oplus.zoomwindow;
|
||||||
|
|
||||||
|
import com.oplus.zoomwindow.OplusZoomWindowInfo;
|
||||||
|
|
||||||
|
interface IOplusZoomWindowObserver {
|
||||||
|
|
||||||
|
void onInputMethodChanged(boolean z);
|
||||||
|
void onZoomWindowDied(String str);
|
||||||
|
void onZoomWindowHide(inout OplusZoomWindowInfo oplusZoomWindowInfo);
|
||||||
|
void onZoomWindowShow(inout OplusZoomWindowInfo oplusZoomWindowInfo);
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
package com.oplus.zoomwindow;
|
||||||
|
|
||||||
|
parcelable OplusZoomWindowInfo;
|
||||||
37
oplus-fwk/src/com/oplus/zoomwindow/OplusZoomWindowInfo.java
Normal file
37
oplus-fwk/src/com/oplus/zoomwindow/OplusZoomWindowInfo.java
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
package com.oplus.zoomwindow;
|
||||||
|
|
||||||
|
import android.os.Parcel;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
|
||||||
|
public class OplusZoomWindowInfo implements Parcelable {
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<OplusZoomWindowInfo> CREATOR =
|
||||||
|
new Parcelable.Creator<OplusZoomWindowInfo>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OplusZoomWindowInfo createFromParcel(Parcel source) {
|
||||||
|
return new OplusZoomWindowInfo(source);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OplusZoomWindowInfo[] newArray(int size) {
|
||||||
|
return new OplusZoomWindowInfo[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public OplusZoomWindowInfo() {}
|
||||||
|
|
||||||
|
public OplusZoomWindowInfo(Parcel in) {}
|
||||||
|
|
||||||
|
public OplusZoomWindowInfo(OplusZoomWindowInfo in) {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeToParcel(Parcel dest, int flags) {}
|
||||||
|
|
||||||
|
public void readFromParcel(Parcel in) {}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.oplus.zoomwindow;
|
||||||
|
|
||||||
|
public class OplusZoomWindowManager {
|
||||||
|
|
||||||
|
public static OplusZoomWindowManager sOplusZoomWindowManager = null;
|
||||||
|
|
||||||
|
public static OplusZoomWindowManager getInstance() {
|
||||||
|
if (sOplusZoomWindowManager == null) {
|
||||||
|
sOplusZoomWindowManager = new OplusZoomWindowManager();
|
||||||
|
}
|
||||||
|
return sOplusZoomWindowManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean registerZoomWindowObserver(IOplusZoomWindowObserver observer) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean unregisterZoomWindowObserver(IOplusZoomWindowObserver observer) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
19
oplus-fwk/src/net/oneplus/odm/OpDeviceManagerInjector.java
Normal file
19
oplus-fwk/src/net/oneplus/odm/OpDeviceManagerInjector.java
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
package net.oneplus.odm;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class OpDeviceManagerInjector {
|
||||||
|
|
||||||
|
private static OpDeviceManagerInjector sOpDeviceManagerInjector = null;
|
||||||
|
|
||||||
|
public void preserveAppData(Context a, String b, Map c, Map d) {}
|
||||||
|
|
||||||
|
public static OpDeviceManagerInjector getInstance() {
|
||||||
|
if (sOpDeviceManagerInjector == null) {
|
||||||
|
sOpDeviceManagerInjector = new OpDeviceManagerInjector();
|
||||||
|
}
|
||||||
|
return sOpDeviceManagerInjector;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package oplus.content.res;
|
||||||
|
|
||||||
|
public class OplusExtraConfiguration {
|
||||||
|
|
||||||
|
public OplusExtraConfiguration() {}
|
||||||
|
}
|
||||||
32
opluscamera.mk
Normal file
32
opluscamera.mk
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Framework
|
||||||
|
PRODUCT_PACKAGES += \
|
||||||
|
oplus-fwk
|
||||||
|
|
||||||
|
PRODUCT_BOOT_JARS += \
|
||||||
|
oplus-fwk \
|
||||||
|
oplus-support-wrapper
|
||||||
|
|
||||||
|
# Init
|
||||||
|
PRODUCT_PACKAGES += \
|
||||||
|
init.oplus.camera.rc
|
||||||
|
|
||||||
|
# Permissions
|
||||||
|
PRODUCT_COPY_FILES += \
|
||||||
|
$(LOCAL_PATH)/configs/permissions/oplus_google_lens_config.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/permissions/oplus_google_lens_config.xml \
|
||||||
|
$(LOCAL_PATH)/configs/permissions/privapp-permissions-oplus.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/permissions/privapp-permissions-oplus.xml \
|
||||||
|
$(LOCAL_PATH)/configs/sysconfig/hiddenapi-package-oplus-whitelist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/hiddenapi-package-oplus-whitelist.xml
|
||||||
|
|
||||||
|
# Properties
|
||||||
|
PRODUCT_PRODUCT_PROPERTIES += \
|
||||||
|
persist.vendor.camera.privapp.list=com.oplus.camera \
|
||||||
|
ro.com.google.lens.oem_camera_package=com.oplus.camera \
|
||||||
|
ro.com.google.lens.oem_image_package=com.oneplus.gallery
|
||||||
|
|
||||||
|
# Photo
|
||||||
|
TARGET_USES_OPLUS_CAMERA := true
|
||||||
|
|
||||||
|
# Video
|
||||||
|
TARGET_CAMERA_OVERRIDE_FORMAT_FROM_RESERVED := true
|
||||||
|
|
||||||
|
# Inherit from camera-vendor.mk
|
||||||
|
$(call inherit-product, vendor/oplus/camera/camera-vendor.mk)
|
||||||
Reference in New Issue
Block a user