From f1a0049a489c1877feb565ad26ec355dc3e149eb Mon Sep 17 00:00:00 2001 From: pjgowtham Date: Thu, 29 Aug 2024 18:21:04 +0530 Subject: [PATCH] Move oplus-fwk to hw/oplus --- oplus-fwk/Android.bp | 14 - .../src/android/app/OplusActivityManager.java | 25 - .../android/app/OplusWhiteListManager.java | 18 - .../src/android/app/job/IJobInfoExt.java | 43 - .../bluetooth/OplusBluetoothAdapter.java | 13 - .../android/common/IOplusCommonFeature.java | 14 - .../src/android/common/OplusFeatureList.java | 342 ------- .../android/common/OplusFrameworkFactory.java | 13 - .../content/res/OplusBaseConfiguration.java | 10 - .../hardware/camera2/IOplusCameraManager.java | 66 -- .../hardware/camera2/OplusCameraManager.java | 869 ------------------ .../src/android/os/OplusKeyEventManager.java | 10 - oplus-fwk/src/android/os/OplusManager.java | 8 - .../src/android/os/OplusSystemProperties.java | 20 - .../src/android/view/OplusWindowManager.java | 8 - .../animation/OplusBezierInterpolator.java | 31 - .../view/animation/OplusUnitBezier.java | 78 -- .../oplus/app/OPlusAccessControlManager.java | 25 - .../src/com/oplus/app/OplusAppEnterInfo.java | 6 - .../src/com/oplus/app/OplusAppExitInfo.java | 6 - oplus-fwk/src/com/oplus/app/OplusAppInfo.java | 6 - .../com/oplus/app/OplusAppSwitchConfig.java | 8 - .../com/oplus/app/OplusAppSwitchManager.java | 37 - .../content/OplusFeatureConfigManager.java | 31 - .../flexiblewindow/FlexibleTaskView.java | 38 - .../com/oplus/orms/OplusResourceManager.java | 19 - .../src/com/oplus/orms/info/OrmsSaParam.java | 8 - oplus-fwk/src/com/oplus/os/OplusBuild.java | 18 - .../src/com/oplus/os/OplusUsbEnvironment.java | 158 ---- .../src/com/oplus/os/WaveformEffect.java | 114 --- .../src/com/oplus/osense/OsenseResClient.java | 8 - .../oplus/osense/OsenseResEventClient.java | 13 - .../eventinfo/IOsenseEventCallback.java | 22 - .../osense/eventinfo/OsenseEventCallback.java | 6 - .../OplusLongshotCustomController.java | 6 - .../screenshot/OplusLongshotViewBase.java | 20 - .../screenshot/OplusLongshowViewInfo.java | 6 - .../oplus/uifirst/OplusUIFirstManager.java | 15 - .../com/oplus/util/OplusChangeTextUtil.java | 52 -- .../src/com/oplus/util/OplusNetworkUtil.java | 40 - .../com/oplus/wrapper/os/PowerManager.java | 14 - .../com/oplus/wrapper/os/ServiceManager.java | 18 - .../oplus/wrapper/os/SystemProperties.java | 24 - .../oplus/wrapper/view/IWindowManager.java | 86 -- .../zoomwindow/IOplusZoomWindowObserver.aidl | 11 - .../oplus/zoomwindow/OplusZoomWindowInfo.aidl | 3 - .../oplus/zoomwindow/OplusZoomWindowInfo.java | 37 - .../zoomwindow/OplusZoomWindowManager.java | 21 - .../oneplus/odm/OpDeviceManagerInjector.java | 19 - .../content/res/OplusExtraConfiguration.java | 6 - opluscamera.mk | 4 - 51 files changed, 2487 deletions(-) delete mode 100644 oplus-fwk/Android.bp delete mode 100644 oplus-fwk/src/android/app/OplusActivityManager.java delete mode 100644 oplus-fwk/src/android/app/OplusWhiteListManager.java delete mode 100644 oplus-fwk/src/android/app/job/IJobInfoExt.java delete mode 100644 oplus-fwk/src/android/bluetooth/OplusBluetoothAdapter.java delete mode 100644 oplus-fwk/src/android/common/IOplusCommonFeature.java delete mode 100644 oplus-fwk/src/android/common/OplusFeatureList.java delete mode 100644 oplus-fwk/src/android/common/OplusFrameworkFactory.java delete mode 100644 oplus-fwk/src/android/content/res/OplusBaseConfiguration.java delete mode 100644 oplus-fwk/src/android/hardware/camera2/IOplusCameraManager.java delete mode 100644 oplus-fwk/src/android/hardware/camera2/OplusCameraManager.java delete mode 100644 oplus-fwk/src/android/os/OplusKeyEventManager.java delete mode 100644 oplus-fwk/src/android/os/OplusManager.java delete mode 100644 oplus-fwk/src/android/os/OplusSystemProperties.java delete mode 100644 oplus-fwk/src/android/view/OplusWindowManager.java delete mode 100644 oplus-fwk/src/android/view/animation/OplusBezierInterpolator.java delete mode 100644 oplus-fwk/src/android/view/animation/OplusUnitBezier.java delete mode 100644 oplus-fwk/src/com/oplus/app/OPlusAccessControlManager.java delete mode 100644 oplus-fwk/src/com/oplus/app/OplusAppEnterInfo.java delete mode 100644 oplus-fwk/src/com/oplus/app/OplusAppExitInfo.java delete mode 100644 oplus-fwk/src/com/oplus/app/OplusAppInfo.java delete mode 100644 oplus-fwk/src/com/oplus/app/OplusAppSwitchConfig.java delete mode 100644 oplus-fwk/src/com/oplus/app/OplusAppSwitchManager.java delete mode 100644 oplus-fwk/src/com/oplus/content/OplusFeatureConfigManager.java delete mode 100644 oplus-fwk/src/com/oplus/flexiblewindow/FlexibleTaskView.java delete mode 100644 oplus-fwk/src/com/oplus/orms/OplusResourceManager.java delete mode 100644 oplus-fwk/src/com/oplus/orms/info/OrmsSaParam.java delete mode 100644 oplus-fwk/src/com/oplus/os/OplusBuild.java delete mode 100644 oplus-fwk/src/com/oplus/os/OplusUsbEnvironment.java delete mode 100644 oplus-fwk/src/com/oplus/os/WaveformEffect.java delete mode 100644 oplus-fwk/src/com/oplus/osense/OsenseResClient.java delete mode 100644 oplus-fwk/src/com/oplus/osense/OsenseResEventClient.java delete mode 100644 oplus-fwk/src/com/oplus/osense/eventinfo/IOsenseEventCallback.java delete mode 100644 oplus-fwk/src/com/oplus/osense/eventinfo/OsenseEventCallback.java delete mode 100644 oplus-fwk/src/com/oplus/screenshot/OplusLongshotCustomController.java delete mode 100644 oplus-fwk/src/com/oplus/screenshot/OplusLongshotViewBase.java delete mode 100644 oplus-fwk/src/com/oplus/screenshot/OplusLongshowViewInfo.java delete mode 100644 oplus-fwk/src/com/oplus/uifirst/OplusUIFirstManager.java delete mode 100644 oplus-fwk/src/com/oplus/util/OplusChangeTextUtil.java delete mode 100644 oplus-fwk/src/com/oplus/util/OplusNetworkUtil.java delete mode 100644 oplus-fwk/src/com/oplus/wrapper/os/PowerManager.java delete mode 100644 oplus-fwk/src/com/oplus/wrapper/os/ServiceManager.java delete mode 100644 oplus-fwk/src/com/oplus/wrapper/os/SystemProperties.java delete mode 100644 oplus-fwk/src/com/oplus/wrapper/view/IWindowManager.java delete mode 100644 oplus-fwk/src/com/oplus/zoomwindow/IOplusZoomWindowObserver.aidl delete mode 100644 oplus-fwk/src/com/oplus/zoomwindow/OplusZoomWindowInfo.aidl delete mode 100644 oplus-fwk/src/com/oplus/zoomwindow/OplusZoomWindowInfo.java delete mode 100644 oplus-fwk/src/com/oplus/zoomwindow/OplusZoomWindowManager.java delete mode 100644 oplus-fwk/src/net/oneplus/odm/OpDeviceManagerInjector.java delete mode 100644 oplus-fwk/src/oplus/content/res/OplusExtraConfiguration.java diff --git a/oplus-fwk/Android.bp b/oplus-fwk/Android.bp deleted file mode 100644 index c8c3c3b..0000000 --- a/oplus-fwk/Android.bp +++ /dev/null @@ -1,14 +0,0 @@ -// -// 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", - ], -} diff --git a/oplus-fwk/src/android/app/OplusActivityManager.java b/oplus-fwk/src/android/app/OplusActivityManager.java deleted file mode 100644 index 3d51afc..0000000 --- a/oplus-fwk/src/android/app/OplusActivityManager.java +++ /dev/null @@ -1,25 +0,0 @@ -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 sTopAppInfos = new ArrayList(); - - public static OplusActivityManager getInstance() { - if (sOplusActivityManager == null) { - sOplusActivityManager = new OplusActivityManager(); - } - return sOplusActivityManager; - } - - public List getAllTopAppInfos() throws RemoteException { - return (ArrayList) sTopAppInfos.clone(); - } -} diff --git a/oplus-fwk/src/android/app/OplusWhiteListManager.java b/oplus-fwk/src/android/app/OplusWhiteListManager.java deleted file mode 100644 index 6c6d1e5..0000000 --- a/oplus-fwk/src/android/app/OplusWhiteListManager.java +++ /dev/null @@ -1,18 +0,0 @@ -package android.app; - -import android.content.Context; - -import java.util.ArrayList; - -public class OplusWhiteListManager { - - public OplusWhiteListManager(Context context) {} - - public ArrayList getStageProtectListFromPkg(String calledPkg, int type) { - return new ArrayList<>(); - } - - public void addStageProtectInfo(String pkg, long timeout) {} - - public void removeStageProtectInfo(String pkg) {} -} diff --git a/oplus-fwk/src/android/app/job/IJobInfoExt.java b/oplus-fwk/src/android/app/job/IJobInfoExt.java deleted file mode 100644 index d8b96e9..0000000 --- a/oplus-fwk/src/android/app/job/IJobInfoExt.java +++ /dev/null @@ -1,43 +0,0 @@ -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) {} -} diff --git a/oplus-fwk/src/android/bluetooth/OplusBluetoothAdapter.java b/oplus-fwk/src/android/bluetooth/OplusBluetoothAdapter.java deleted file mode 100644 index c542d25..0000000 --- a/oplus-fwk/src/android/bluetooth/OplusBluetoothAdapter.java +++ /dev/null @@ -1,13 +0,0 @@ -package android.bluetooth; - -public class OplusBluetoothAdapter { - - private static OplusBluetoothAdapter sAdapter = null; - - public static OplusBluetoothAdapter getOplusBluetoothAdapter() { - if (sAdapter == null) { - sAdapter = new OplusBluetoothAdapter(); - } - return sAdapter; - } -} diff --git a/oplus-fwk/src/android/common/IOplusCommonFeature.java b/oplus-fwk/src/android/common/IOplusCommonFeature.java deleted file mode 100644 index 25b197e..0000000 --- a/oplus-fwk/src/android/common/IOplusCommonFeature.java +++ /dev/null @@ -1,14 +0,0 @@ -package android.common; - -import android.common.OplusFeatureList; - -/* loaded from: classes.dex */ -public interface IOplusCommonFeature { - default OplusFeatureList.OplusIndex index() { - return OplusFeatureList.OplusIndex.End; - } - - default IOplusCommonFeature getDefault() { - return null; - } -} diff --git a/oplus-fwk/src/android/common/OplusFeatureList.java b/oplus-fwk/src/android/common/OplusFeatureList.java deleted file mode 100644 index 1d0b909..0000000 --- a/oplus-fwk/src/android/common/OplusFeatureList.java +++ /dev/null @@ -1,342 +0,0 @@ -package android.common; - -/* loaded from: classes.dex */ -public class OplusFeatureList { - - /* loaded from: classes.dex */ - public enum OplusIndex { - StartOplusOsServiceFactory, - IOplusSystemServerEx, - ICommonPowerManagerServiceEx, - IOplusAlarmManagerServiceEx, - IOplusInputMethodManagerServiceEx, - IOplusDisplayManagerServiceEx, - IOplusNetworkPolicyManagerServiceEx, - IOplusDisplayPolicyEx, - IOplusDelayRestartServicesManager, - IOplusAppStartupManager, - IOplusAppSwitchManager, - IOplusJoystickManager, - IOplusAppConfigManager, - IOplusInstallAccelerateManager, - IOplusScreenOffOptimization, - IOplusSplitScreenManager, - IOplusMultiAppManager, - IOplusMultiApp, - IOplusMultiAppUserRestoreManager, - IOplusMultiUserStatisticsManager, - IOplusMultiSystemManager, - IOplusBatterySaveExtend, - IOplusGuardElfFeature, - IOplusAccessControlLocalManager, - IOplusInterceptLockScreenWindow, - IOplusLockTaskController, - IOplusRuntimePermGrantPolicyManager, - IOplusAlarmManagerHelper, - IOplusSensitivePermGrantPolicyManager, - IOplusBroadcastManager, - IOplusFastAppManager, - IOplusAlarmTempWhitelist, - IOplusDynamicLogManager, - IOplusLanguageManager, - IOplusLanguageEnableManager, - IOplusSilentRebootManager, - IOplusWakeLockCheck, - IOplusZoomWindowManager, - IOplusPerfManager, - IOplusAthenaAmManager, - IOplusAthenaManager, - IOplusGameRotationManager, - IOplusWatermarkManager, - IOplusFullScreenDisplayManager, - IOplusEapManager, - IBatteryIdleController, - IOplusStartingWindowManager, - IOplusDarkModeMaskManager, - IOplusDarkModeServiceManager, - IOplusEdgeTouchManager, - IOplusConfineModeManager, - IOplusKeyLayoutManager, - IOplusPmsSupportedFunctionManager, - IOplusStorageAllFileAccessManager, - IOplusSaveSurfaceManager, - IOplusKeyEventManager, - IOplusWindowAnimationManager, - IOplusTransitionController, - IOplusMergedProcessSplitManager, - IOplusMirageDisplayManager, - IOplusMirageWindowManager, - IOplusWindowContainerControl, - IOplusMultiSearchWindowManager, - IOplusSeamlessAnimationManager, - IOplusTouchNodeManager, - IOplusPuttManager, - IFoldScreenSwitchingManager, - IInterruptTransitionController, - IQuickBackInputPolicy, - IThreadPriorityBoosterController, - IOplusMiscNodeManager, - IOplusResourcePreloadManager, - IOplusLatencyOptimizerManager, - IOplusGlobalDragAndDropManager, - IOplusAppOpsManager, - IOplusVFXScreenEffectFeature, - IOplusDeepThinkerExService, - IOplusScreenFrozenManager, - IOplusBootPressureHolder, - IOplusAbnormalComponentManager, - IOplusVerificationCodeController, - IOplusVisionCorrectionManager, - IOplusCustomizePmsFeature, - IOplusCOTAFeature, - IOplusClipboardNotifyManager, - IOplusBootTraceManager, - IOplusScrollToTopSystemManager, - IOplusCarModeManager, - IOplusPinFileManager, - IOplusOsenseCommonManager, - IOplusBracketModeManager, - IOplusDisableWindowLayoutInfoManager, - IOplusQuickReplyManager, - IOplusCompactWindowManagerService, - IOplusEmbeddingManagerService, - IOplusAutoLayoutSystemServer, - IOplusRGBNormalizeSystemServer, - IOplusResourcesManagerSystemServer, - IOplusSquareDisplayOrientationManager, - IOplusFlipDisplayOrientationManager, - IOplusAlwaysAliveManager, - IOplusRecommendPermissionManager, - IOplusCompatModeManager, - IOplusActivityPreloadManager, - IOplusSlcDispatchManager, - IOplusShoulderKeyManager, - IOplusAppHeapSystemManager, - EndOplusOsServiceFactory, - StartOplusOsFrameworkFactory, - IOplusViewRootUtil, - IOplusFontManager, - IOplusFavoriteManager, - IOplusDarkModeManager, - IOplusDirectViewHelper, - IOplusCommonInjector, - IOplusTextViewRTLUtilForUG, - IOplusViewHooks, - IOplusScreenShotEuclidManager, - IOplusInputMethodServiceUtils, - IOplusResolverManager, - IOplusThemeManager, - IOplusAccidentallyTouchHelper, - IOplusOverScrollerHelper, - IOplusScrollOptimizationHelper, - IOplusListHooks, - IOplusGradientHooks, - ITextJustificationHooks, - IOplusMagnifierHooks, - IOplusNotificationUiManager, - IOplusDeepThinkerManager, - IOplusBurmeseZgHooks, - IOplusViewConfigHelper, - IOplusThemeStyle, - IOplusIconPackManager, - IOplusEyeProtectManager, - IOplusAppDynamicFeatureManager, - IOplusListManager, - IOplusFloatingToolbarUtil, - IOplusDragTextShadowHelper, - IOplusDailyBattProtoManager, - IOplusPermissionCheckInjector, - IOplusEnterpriseAndOperatorFeature, - IOplusCustomizeTextViewFeature, - IUxIconPackageManagerExt, - IOplusScrollToTopManager, - IOplusCursorFeedbackManager, - IOplusReorderActionMenuManager, - IOplusAutoLayoutManager, - IOplusRGBNormalizeManager, - IOplusViewDebugManager, - IOplusViewExtractManager, - IOplusCompactWindowAppManager, - IOplusClipboardController, - IOplusAppHeapManager, - EndOplusOsFrameworkFactory, - StartOplusServiceFactory, - IOplusLocationBlacklistUtil, - IOplusLocationStatistics, - IOplusLBSMainClass, - IOplusActivityManagerServiceEx, - IOplusActivityTaskManagerServiceEx, - IOplusPackageManagerServiceEx, - IOplusPackageManagerNativeEx, - IOplusWindowManagerServiceEx, - IOplusPowerManagerServiceEx, - IOplusBackupManagerServiceEx, - IOplusFeatureAOD, - IOplusHeadsetFadeIn, - IOplusAlertSliderManager, - IOplusCameraStartupOptimization, - IOplusDnsSelfrecoveryEngine, - IOplusConnectivityServiceHelperUtils, - IOplusWifiConnectRestriction, - IOplusVpnHelper, - IOplusNecManager, - IOplusNecConnectMonitor, - IOplusVpnManager, - IOplusShutdownFeature, - IOplusFeatureDCBacklight, - IOplusFeatureHDREnhanceBrightness, - IOplusFeatureMEMC, - IOplusFeatureMEMCGame, - IOplusFeatureBrightnessBarController, - IORBrightnessMarvelsDataCollector, - IOplusUsbDeviceFeature, - IOplusSkipDoframeFeature, - IOplusStorageManagerFeature, - IOplusBatteryServiceFeature, - IOplusNewNetworkTimeUpdateServiceFeature, - IOplusActivityManagerDynamicLogConfigFeature, - IOplusAppRunningControllerFeatrue, - IOplusAmsUtilsFeatrue, - IOplusWmsUtilsFeatrue, - IOplusResolutionManagerFeature, - IOplusDynamicVsyncManagerFeature, - ICompatibilityHelper, - IOplusPowerManagerServiceFeature, - IOplusFeatureConfigManagerInternal, - IOplusEngineerService, - IOplusScreenCastContentManager, - IOplusScreenFrozenBooster, - IOplusKeepAliveManager, - IOplusDualHeadPhoneFeature, - IOplusFloatingWindow, - IOplusDexOptimizeManager, - IOplusDexSceneManager, - IOplusThirdPartyAppSignCheckManager, - IOplusForbidUninstallAppManager, - IOplusAppInstallProgressManager, - IOplusPermSupportedFunctionManager, - IOplusRemovableAppManager, - IOplusAppQuickFreezeManager, - IOplusDisablePackageManager, - IOplusAppDetectManager, - IOplusAppListInterceptManager, - IOplusChildrenModeInstallManager, - IOplusClearDataProtectManager, - IOplusDataFreeManager, - IOplusDefaultAppPolicyManager, - IOplusDexMetadataManager, - IOplusDynamicFeatureManager, - IOplusFixupDataManager, - IOplusForbidHideOrDisableManager, - IOplusFullmodeManager, - IOplusIconCachesManager, - IOplusInstallThreadsControlManager, - IOplusPackageInstallInterceptManager, - IOplusPackageInstallStatisticManager, - IOplusPkgStartInfoManager, - IOplusSecurePayManager, - IOplusSellModeManager, - IOplusSystemAppProtectManager, - IOplusPermissionManagerServiceEx, - IOplusAppDataMigrateManager, - IOplusSecurityPermissionManager, - IOplusOptimizingProgressManager, - IOplusScreenOffTorchHelper, - IOplusBackgroundTaskManagerService, - IFreezeManagerHelp, - IFreezeManagerService, - IOplusSensorControlFeature, - IOplusSecurityAnalysisBroadCastSender, - IOplusPerformanceService, - IOplusFoldingAngleManager, - IOplusSysStateManager, - IOplusRefreshRatePolicy, - IOplusCarrierManager, - IOplusDataNormalizationManager, - IOplusPkgStateDetectFeature, - IOplusHansManager, - IOplusSceneManager, - IOplusCpuLimitManager, - IOGuardManager, - IOplusNewFeaturesDisplayingManager, - IOplusLooperStatsManager, - IOplusAppDetailsManager, - IOplusBackupManagerHelper, - IOplusBackupTaskManager, - EndOplusServiceFactory, - StartOplusFrameworkFactory, - IOplusZenModeFeature, - IOplusAutoResolutionFeature, - IOplusDynamicVsyncFeature, - IOplusRotationOptimization, - IOplusUIFirstManager, - IOplusResourceManager, - IJankManager, - IOAppNetControlManager, - IOplusPreLoadSplashManager, - IOplusPerformanceManager, - IOplusCameraUtils, - IOplusCameraStatisticsManager, - IOplusCamera2StatisticsManager, - IOplusCameraStateBroadcast, - IOplusCameraManager, - IOplusHiddenApiManagerExt, - EndOplusFrameworkFactory, - StartOplusJobSchedulerServiceFactory, - IOplusJobTest, - IOplusJobSchedulerSystemServerEx, - IOplusJobSchedulerServiceEx, - IJobCountPolicy, - IOplusJobScheduleManager, - IOplusDeviceIdleHelper, - IOplusGoogleDozeRestrict, - IOplusDeviceIdleControllerEx, - IOplusSmartDozeHelper, - IOplusAlarmWakeupDetection, - IOplusAlarmManagerServiceHelper, - IOplusAlarmAlignment, - IOplusGoogleAlarmRestrict, - IOplusDeepSleepHelper, - EndOplusJobSchedulerServiceFactory, - IOplusResolverStyle, - StartCustomizeFrameworkFactory, - ICustomizeTransformHelper, - EndCustomizeFrameworkFactory, - StartCustomizeServiceFactory, - ICustomizeTransformManager, - EndCustomizeServiceFactory, - IOplusGameSpaceToolBoxManager, - IOplusWLBManager, - IOplusSystemUIInjector, - IOplusAODScreenshotManager, - StartSpliceCustomizeFrameworkFactory, - ISpliceCustomizeTransformHelper, - EndSpliceCustomizeFrameworkFactory, - StartSpliceCustomizeServiceFactory, - ISpliceCustomizeTransformManager, - EndSpliceCustomizeServiceFactory, - StartAOSPExtensionPluginFactory, - ITypefaceExt, - IAdaptiveIconDrawableExt, - IAbsListViewExt, - IResourcesImplExt, - IResourcesManagerExt, - IResourcesExt, - IOplusWallpaperManagerEx, - IOplusWallpaperServiceExt, - IAlertControllerExt, - IAlertParamsExt, - IResolverActivityExt, - IResolverListAdapterExt, - ILoadIconTaskExt, - IResolverDrawerLayoutExt, - ILockSettingsExt, - IOverlayManagerServiceEx, - EndAOSPExtensionPluginFactory, - IOplusNetworkStatsEx, - IOplusNetworkManagement, - IOplusNetdEventListener, - IOplusCustomizeVpnManager, - End - } -} diff --git a/oplus-fwk/src/android/common/OplusFrameworkFactory.java b/oplus-fwk/src/android/common/OplusFrameworkFactory.java deleted file mode 100644 index 26687d5..0000000 --- a/oplus-fwk/src/android/common/OplusFrameworkFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -package android.common; - -public class OplusFrameworkFactory { - - private static OplusFrameworkFactory sOplusFrameworkFactory = null; - - public static OplusFrameworkFactory getInstance() { - if (sOplusFrameworkFactory == null) { - sOplusFrameworkFactory = new OplusFrameworkFactory(); - } - return sOplusFrameworkFactory; - } -} diff --git a/oplus-fwk/src/android/content/res/OplusBaseConfiguration.java b/oplus-fwk/src/android/content/res/OplusBaseConfiguration.java deleted file mode 100644 index 0f65fdd..0000000 --- a/oplus-fwk/src/android/content/res/OplusBaseConfiguration.java +++ /dev/null @@ -1,10 +0,0 @@ -package android.content.res; - -import oplus.content.res.OplusExtraConfiguration; - -public abstract class OplusBaseConfiguration { - - public OplusExtraConfiguration getOplusExtraConfiguration() { - return null; - } -} diff --git a/oplus-fwk/src/android/hardware/camera2/IOplusCameraManager.java b/oplus-fwk/src/android/hardware/camera2/IOplusCameraManager.java deleted file mode 100644 index f229522..0000000 --- a/oplus-fwk/src/android/hardware/camera2/IOplusCameraManager.java +++ /dev/null @@ -1,66 +0,0 @@ -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, - CMD_READ_MEM - } - - 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) { - } -} diff --git a/oplus-fwk/src/android/hardware/camera2/OplusCameraManager.java b/oplus-fwk/src/android/hardware/camera2/OplusCameraManager.java deleted file mode 100644 index 1dc7e1b..0000000 --- a/oplus-fwk/src/android/hardware/camera2/OplusCameraManager.java +++ /dev/null @@ -1,869 +0,0 @@ -package android.hardware.camera2; - -import android.content.Context; -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 PERMISSION_SATELLITE_COMMUNICATION = "com.oplus.permission.safe.SATELLITE_COMMUNICATION"; - public static final int READ_CAMERA_SERVER_MEMORY_INFO = 1; - public static final int READ_HAL_MEMORY_INFO = 0; - public static final int STATELLITE_CALL_STATUS_CALLING = 1; - public static final int STATELLITE_CALL_STATUS_IDLE = 0; - 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 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"}; - 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(); - } - } - - public void readMemoryInfo(IOplusCameraManager.Cmd cmd, StringBuilder result, int model) { - try { - OplusCameraManagerGlobal.get().readMemoryInfo(cmd, result, model); - } catch (CameraAccessException e) { - Log.e(TAG, "readOplusMemory, CameraAccessException: " + e); - } catch (RemoteException e2) { - Log.e(TAG, "readOplusMemory, RemoteException: " + e2); - } - } - - @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() { - 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(); - } - } - - public void unRegisterCameraDeviceCallback(Context context) throws CameraAccessException { - if (context == null) { - throw new IllegalArgumentException("context was null"); - } - Log.i(TAG, "unRegisterCameraDeviceCallback, packageName = " + context.getOpPackageName()); - try { - OplusCameraManagerGlobal.get().unRegisterCameraDeviceCallback(context.getOpPackageName()); - } catch (RemoteException e) { - e.printStackTrace(); - } - } - - public void setDeathRecipient(Context context, IBinder client) { - if (context == null) { - throw new IllegalArgumentException("context was null"); - } - if (client == null) { - throw new IllegalArgumentException("client was null"); - } - try { - OplusCameraManagerGlobal.get().setDeathRecipient(context.getOpPackageName(), client); - } catch (CameraAccessException e) { - e.printStackTrace(); - } catch (RemoteException e2) { - e2.printStackTrace(); - } - } - - public void setSatelliteCallStatus(Context context, int status) throws CameraAccessException { - if (context == null) { - throw new IllegalArgumentException("context was null"); - } - try { - OplusCameraManagerGlobal.get().setSatelliteCallStatus(context.getOpPackageName(), status); - } 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(); - } - } - - 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 READ_OPLUS_CAMERA_SERVER_MEMORY = 10018; - private static final int READ_OPLUS_HAL_MEMORY = 10017; - private static final int REGISTER_CAMERA_DEVICE_CALLBACK = 10019; - 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_DEATH_RECIPIENT_FOR_NAME = 10022; - 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_SATELLITE_CALL_STATE = 10021; - private static final int SET_TORCH_INTENSITY = 10008; - private static final String TAG = "OplusCameraManagerGlobal"; - private static final int UNREGISTER_CAMERA_DEVICE_CALLBACK = 10020; - 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 readMemoryInfo(IOplusCameraManager.Cmd cmd, StringBuilder result, int model) throws CameraAccessException, RemoteException { - Log.i(TAG, "readMemoryInfo, 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.writeInt(cmd.ordinal()); - this.mRemote.transact(model == 0 ? 10017 : 10018, data, reply, 0); - byte[] byteArray = reply.createByteArray(); - String res = new String(byteArray); - result.append(res); - data.recycle(); - reply.recycle(); - Log.i(TAG, "readMemoryInfo 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 unRegisterCameraDeviceCallback(String packageName) throws CameraAccessException, RemoteException { - Log.i(TAG, "unRegisterCameraDeviceCallback"); - 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(10020, data, reply, 0); - reply.readException(); - } finally { - data.recycle(); - reply.recycle(); - } - } - - public void setDeathRecipient(String packageName, IBinder client) throws CameraAccessException, RemoteException { - Log.i(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.writeString(packageName); - data.writeStrongBinder(client); - this.mRemote.transact(10022, data, reply, 0); - reply.readException(); - } finally { - data.recycle(); - reply.recycle(); - } - } - - public void setSatelliteCallStatus(String packageName, int status) throws CameraAccessException, RemoteException { - Log.i(TAG, "setSatelliteCallStatus, status: " + status); - 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(status); - remote.transact(10021, 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 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; - } - } -} diff --git a/oplus-fwk/src/android/os/OplusKeyEventManager.java b/oplus-fwk/src/android/os/OplusKeyEventManager.java deleted file mode 100644 index fe013a8..0000000 --- a/oplus-fwk/src/android/os/OplusKeyEventManager.java +++ /dev/null @@ -1,10 +0,0 @@ -package android.os; - -import android.view.KeyEvent; - -public class OplusKeyEventManager { - - public interface OnKeyEventObserver { - void onKeyEvent(KeyEvent event); - } -} diff --git a/oplus-fwk/src/android/os/OplusManager.java b/oplus-fwk/src/android/os/OplusManager.java deleted file mode 100644 index 49281dc..0000000 --- a/oplus-fwk/src/android/os/OplusManager.java +++ /dev/null @@ -1,8 +0,0 @@ -package android.os; - -import java.util.Map; - -public class OplusManager { - - public static void onStamp(String eventId, Map logMap) {} -} diff --git a/oplus-fwk/src/android/os/OplusSystemProperties.java b/oplus-fwk/src/android/os/OplusSystemProperties.java deleted file mode 100644 index f37593f..0000000 --- a/oplus-fwk/src/android/os/OplusSystemProperties.java +++ /dev/null @@ -1,20 +0,0 @@ -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); - } -} diff --git a/oplus-fwk/src/android/view/OplusWindowManager.java b/oplus-fwk/src/android/view/OplusWindowManager.java deleted file mode 100644 index d087364..0000000 --- a/oplus-fwk/src/android/view/OplusWindowManager.java +++ /dev/null @@ -1,8 +0,0 @@ -package android.view; - -public class OplusWindowManager { - - public OplusWindowManager() {} - - public void requestKeyguard(String command) {} -} diff --git a/oplus-fwk/src/android/view/animation/OplusBezierInterpolator.java b/oplus-fwk/src/android/view/animation/OplusBezierInterpolator.java deleted file mode 100644 index 69d39e3..0000000 --- a/oplus-fwk/src/android/view/animation/OplusBezierInterpolator.java +++ /dev/null @@ -1,31 +0,0 @@ -package android.view.animation; - -public class OplusBezierInterpolator extends BaseInterpolator { - - private static final float ABOVE_ZERO = 0.0001f; - private static final float BELOW_ONE = 0.9999f; - - private static final double ABOVE_ONE = 1.0d; - private static final double EPSILON = 0.0000625d; - - private OplusUnitBezier mOplusUnitBezier; - - private boolean mLimit; - - public OplusBezierInterpolator(double p1x, double p1y, double p2x, double p2y, boolean limit) { - mLimit = limit; - mOplusUnitBezier = new OplusUnitBezier(p1x, p1y, p2x, p2y); - } - - @Override - public float getInterpolation(float input) { - double interpolation = mOplusUnitBezier.solve(input, EPSILON); - if (mLimit) { - final boolean above = input >= ABOVE_ZERO && input <= BELOW_ONE; - if (interpolation > ABOVE_ONE && !above) { - interpolation = ABOVE_ONE; - } - } - return (float) interpolation; - } -} diff --git a/oplus-fwk/src/android/view/animation/OplusUnitBezier.java b/oplus-fwk/src/android/view/animation/OplusUnitBezier.java deleted file mode 100644 index a4bde91..0000000 --- a/oplus-fwk/src/android/view/animation/OplusUnitBezier.java +++ /dev/null @@ -1,78 +0,0 @@ -package android.view.animation; - -public class OplusUnitBezier { - - private double ax; - private double ay; - private double bx; - private double by; - private double cx; - private double cy; - - public OplusUnitBezier(double p1x, double p1y, double p2x, double p2y) { - final double d = p1x * 3.0d; - final double d2 = (p2x - p1x) * 3.0d - d; - final double d3 = p1y * 3.0d; - final double d4 = (p2y - p1y) * 3.0d - d3; - - ax = (1.0d - d) - d2; - ay = (1.0d - d3) - d4; - bx = d2; - by = d4; - cx = d; - cy = d3; - } - - public double sampleCurveX(double t) { - return ((ax * t + bx) * t + cx) * t; - } - - public double sampleCurveY(double t) { - return ((ay * t + by) * t + cy) * t; - } - - public double sampleCurveDerivativeX(double t) { - return (ax * 3.0d * t + bx * 2.0d) * t + cx; - } - - public double solveCurveX(double x, double epsilon) { - double t = x; - for (int i = 0; i < 8; i++) { - double x2 = sampleCurveX(t) - x; - if (Math.abs(x2) < epsilon) { - return t; - } - double d2 = sampleCurveDerivativeX(t); - if (Math.abs(d2) < 0.000001d) { - break; - } - t -= x2 / d2; - } - double t0 = 0.0d; - double t1 = 1.0d; - double t2 = x; - if (t2 < 0.0d) { - return 0.0d; - } - if (t2 > 1.0d) { - return 1.0d; - } - while (t0 < t1) { - double x2 = sampleCurveX(t2); - if (Math.abs(x2 - x) < epsilon) { - return t2; - } - if (x > x2) { - t0 = t2; - } else { - t1 = t2; - } - t2 = (t1 - t0) * 0.5d + t0; - } - return t2; - } - - public double solve(double x, double epsilon) { - return sampleCurveY(solveCurveX(x, epsilon)); - } -} diff --git a/oplus-fwk/src/com/oplus/app/OPlusAccessControlManager.java b/oplus-fwk/src/com/oplus/app/OPlusAccessControlManager.java deleted file mode 100644 index e167d5c..0000000 --- a/oplus-fwk/src/com/oplus/app/OPlusAccessControlManager.java +++ /dev/null @@ -1,25 +0,0 @@ -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; - } -} diff --git a/oplus-fwk/src/com/oplus/app/OplusAppEnterInfo.java b/oplus-fwk/src/com/oplus/app/OplusAppEnterInfo.java deleted file mode 100644 index b86bd9e..0000000 --- a/oplus-fwk/src/com/oplus/app/OplusAppEnterInfo.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.oplus.app; - -public class OplusAppEnterInfo { - - public OplusAppEnterInfo() {} -} diff --git a/oplus-fwk/src/com/oplus/app/OplusAppExitInfo.java b/oplus-fwk/src/com/oplus/app/OplusAppExitInfo.java deleted file mode 100644 index 7517a98..0000000 --- a/oplus-fwk/src/com/oplus/app/OplusAppExitInfo.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.oplus.app; - -public class OplusAppExitInfo { - - public OplusAppExitInfo() {} -} diff --git a/oplus-fwk/src/com/oplus/app/OplusAppInfo.java b/oplus-fwk/src/com/oplus/app/OplusAppInfo.java deleted file mode 100644 index e5f63af..0000000 --- a/oplus-fwk/src/com/oplus/app/OplusAppInfo.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.oplus.app; - -public class OplusAppInfo { - - public OplusAppInfo() {} -} diff --git a/oplus-fwk/src/com/oplus/app/OplusAppSwitchConfig.java b/oplus-fwk/src/com/oplus/app/OplusAppSwitchConfig.java deleted file mode 100644 index c7b5da0..0000000 --- a/oplus-fwk/src/com/oplus/app/OplusAppSwitchConfig.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.oplus.app; - -import java.util.List; - -public class OplusAppSwitchConfig { - - public void addAppConfig(int type, List list) {} -} diff --git a/oplus-fwk/src/com/oplus/app/OplusAppSwitchManager.java b/oplus-fwk/src/com/oplus/app/OplusAppSwitchManager.java deleted file mode 100644 index b120b85..0000000 --- a/oplus-fwk/src/com/oplus/app/OplusAppSwitchManager.java +++ /dev/null @@ -1,37 +0,0 @@ -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); - } -} diff --git a/oplus-fwk/src/com/oplus/content/OplusFeatureConfigManager.java b/oplus-fwk/src/com/oplus/content/OplusFeatureConfigManager.java deleted file mode 100644 index 53d0e7c..0000000 --- a/oplus-fwk/src/com/oplus/content/OplusFeatureConfigManager.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.oplus.content; - -import android.os.SystemProperties; -import android.text.TextUtils; - -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)) { - // OnePlus 7/8 series use old OnePlus base camera. Don't let this feature break haptic feedback. - if (useOnePlusBaseCamera()) { - return false; - } - return true; - } - return false; - } - - private static boolean useOnePlusBaseCamera() { - return !TextUtils.isEmpty(SystemProperties.get("ro.oplus.version.base")); - } -} diff --git a/oplus-fwk/src/com/oplus/flexiblewindow/FlexibleTaskView.java b/oplus-fwk/src/com/oplus/flexiblewindow/FlexibleTaskView.java deleted file mode 100644 index d865f8b..0000000 --- a/oplus-fwk/src/com/oplus/flexiblewindow/FlexibleTaskView.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.oplus.flexiblewindow; - -import android.content.ComponentName; -import android.content.Context; -import android.graphics.Rect; -import android.graphics.Region; -import android.util.AttributeSet; -import android.view.SurfaceView; - -public class FlexibleTaskView extends SurfaceView { - - public FlexibleTaskView(Context context) { - this(context, null); - } - - public FlexibleTaskView(Context context, AttributeSet attrs) { - this(context, attrs, 0); - } - - public FlexibleTaskView(Context context, AttributeSet attrs, int defStyleAttr) { - this(context, attrs, defStyleAttr, 0); - } - - public FlexibleTaskView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { - super(context, attrs, defStyleAttr, defStyleRes, true); - } - - public interface Listener { - default void onInitialized(boolean isStartSuccess) {} - default void onReleased() {} - default void onTaskCreated(int taskId, ComponentName name) {} - default void onTaskChanged(int taskId, ComponentName name, Rect rect) {} - default void onTaskVisbilityChanged(int taskId, boolean visible) {} - default void onTaskRemovalStarted(int taskId) {} - default void onBackPressedOnTaskRoot(int taskId) {} - default void updateTouchRegion(Region region) {} - } -} diff --git a/oplus-fwk/src/com/oplus/orms/OplusResourceManager.java b/oplus-fwk/src/com/oplus/orms/OplusResourceManager.java deleted file mode 100644 index 6c75b27..0000000 --- a/oplus-fwk/src/com/oplus/orms/OplusResourceManager.java +++ /dev/null @@ -1,19 +0,0 @@ -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; - } -} diff --git a/oplus-fwk/src/com/oplus/orms/info/OrmsSaParam.java b/oplus-fwk/src/com/oplus/orms/info/OrmsSaParam.java deleted file mode 100644 index ade8296..0000000 --- a/oplus-fwk/src/com/oplus/orms/info/OrmsSaParam.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.oplus.orms.info; - -public class OrmsSaParam { - - public OrmsSaParam() {} - - public OrmsSaParam(String scene, String action, int timeout) {} -} diff --git a/oplus-fwk/src/com/oplus/os/OplusBuild.java b/oplus-fwk/src/com/oplus/os/OplusBuild.java deleted file mode 100644 index f0f86ea..0000000 --- a/oplus-fwk/src/com/oplus/os/OplusBuild.java +++ /dev/null @@ -1,18 +0,0 @@ -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; - } - -} diff --git a/oplus-fwk/src/com/oplus/os/OplusUsbEnvironment.java b/oplus-fwk/src/com/oplus/os/OplusUsbEnvironment.java deleted file mode 100644 index 88dbb0e..0000000 --- a/oplus-fwk/src/com/oplus/os/OplusUsbEnvironment.java +++ /dev/null @@ -1,158 +0,0 @@ -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 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 = context.getSystemService(StorageManager.class); - 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 = context.getSystemService(StorageManager.class); - 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 getOtgPath(Context context) { - synchronized (sLock) { - update(context); - if (sOtgPathes == null) { - return null; - } - return (ArrayList) 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 = context.getSystemService(StorageManager.class); - if (path == null || sm == null) { - return false; - } - return "mounted".equals(sm.getVolumeState(path)); - } -} diff --git a/oplus-fwk/src/com/oplus/os/WaveformEffect.java b/oplus-fwk/src/com/oplus/os/WaveformEffect.java deleted file mode 100644 index acebf4f..0000000 --- a/oplus-fwk/src/com/oplus/os/WaveformEffect.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * 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 CREATOR = - new Parcelable.Creator() { - @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); - } -} diff --git a/oplus-fwk/src/com/oplus/osense/OsenseResClient.java b/oplus-fwk/src/com/oplus/osense/OsenseResClient.java deleted file mode 100644 index 5688051..0000000 --- a/oplus-fwk/src/com/oplus/osense/OsenseResClient.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.oplus.osense; - -public class OsenseResClient { - - public static OsenseResClient get(Class clazz) { - return null; - } -} diff --git a/oplus-fwk/src/com/oplus/osense/OsenseResEventClient.java b/oplus-fwk/src/com/oplus/osense/OsenseResEventClient.java deleted file mode 100644 index dbcd8fb..0000000 --- a/oplus-fwk/src/com/oplus/osense/OsenseResEventClient.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.oplus.osense; - -public class OsenseResEventClient { - - private static OsenseResEventClient sInstance; - - public static OsenseResEventClient getInstance() { - if (sInstance == null) { - sInstance = new OsenseResEventClient(); - } - return sInstance; - } -} diff --git a/oplus-fwk/src/com/oplus/osense/eventinfo/IOsenseEventCallback.java b/oplus-fwk/src/com/oplus/osense/eventinfo/IOsenseEventCallback.java deleted file mode 100644 index fd40641..0000000 --- a/oplus-fwk/src/com/oplus/osense/eventinfo/IOsenseEventCallback.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.oplus.osense.eventinfo; - -import android.os.Binder; -import android.os.IBinder; -import android.os.IInterface; - -public interface IOsenseEventCallback extends IInterface { - - public static class Default implements IOsenseEventCallback { - @Override - public IBinder asBinder() { - return null; - } - } - - public static abstract class Stub extends Binder implements IOsenseEventCallback { - @Override - public IBinder asBinder() { - return this; - } - } -} diff --git a/oplus-fwk/src/com/oplus/osense/eventinfo/OsenseEventCallback.java b/oplus-fwk/src/com/oplus/osense/eventinfo/OsenseEventCallback.java deleted file mode 100644 index 50e2072..0000000 --- a/oplus-fwk/src/com/oplus/osense/eventinfo/OsenseEventCallback.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.oplus.osense.eventinfo; - -import com.oplus.osense.eventinfo.IOsenseEventCallback; - -public class OsenseEventCallback extends IOsenseEventCallback.Stub { -} diff --git a/oplus-fwk/src/com/oplus/screenshot/OplusLongshotCustomController.java b/oplus-fwk/src/com/oplus/screenshot/OplusLongshotCustomController.java deleted file mode 100644 index c42eb2e..0000000 --- a/oplus-fwk/src/com/oplus/screenshot/OplusLongshotCustomController.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.oplus.screenshot; - -public class OplusLongshotCustomController { - - public OplusLongshotCustomController(OplusLongshotViewBase view, String source) {} -} diff --git a/oplus-fwk/src/com/oplus/screenshot/OplusLongshotViewBase.java b/oplus-fwk/src/com/oplus/screenshot/OplusLongshotViewBase.java deleted file mode 100644 index 24c276c..0000000 --- a/oplus-fwk/src/com/oplus/screenshot/OplusLongshotViewBase.java +++ /dev/null @@ -1,20 +0,0 @@ -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(); -} diff --git a/oplus-fwk/src/com/oplus/screenshot/OplusLongshowViewInfo.java b/oplus-fwk/src/com/oplus/screenshot/OplusLongshowViewInfo.java deleted file mode 100644 index 4c83c66..0000000 --- a/oplus-fwk/src/com/oplus/screenshot/OplusLongshowViewInfo.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.oplus.screenshot; - -public class OplusLongshowViewInfo { - - public OplusLongshowViewInfo() {} -} diff --git a/oplus-fwk/src/com/oplus/uifirst/OplusUIFirstManager.java b/oplus-fwk/src/com/oplus/uifirst/OplusUIFirstManager.java deleted file mode 100644 index 7aaf0ff..0000000 --- a/oplus-fwk/src/com/oplus/uifirst/OplusUIFirstManager.java +++ /dev/null @@ -1,15 +0,0 @@ -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) {} -} diff --git a/oplus-fwk/src/com/oplus/util/OplusChangeTextUtil.java b/oplus-fwk/src/com/oplus/util/OplusChangeTextUtil.java deleted file mode 100644 index fe8872a..0000000 --- a/oplus-fwk/src/com/oplus/util/OplusChangeTextUtil.java +++ /dev/null @@ -1,52 +0,0 @@ -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; - } - } -} diff --git a/oplus-fwk/src/com/oplus/util/OplusNetworkUtil.java b/oplus-fwk/src/com/oplus/util/OplusNetworkUtil.java deleted file mode 100644 index cd2ef59..0000000 --- a/oplus-fwk/src/com/oplus/util/OplusNetworkUtil.java +++ /dev/null @@ -1,40 +0,0 @@ -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 OplusNetworkUtil { - - private static final String DEFAULT_HTTP_URI = "http://connectivitycheck.gstatic.com/generate_204"; - - public static boolean isWifiConnected(Context context) { - final ConnectivityManager cm = context.getSystemService(ConnectivityManager.class); - if (cm != null) { - return cm.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState() - == NetworkInfo.State.CONNECTED; - } - return false; - } - - public static boolean isMobileDataConnected(Context context) { - final ConnectivityManager cm = context.getSystemService(ConnectivityManager.class); - if (cm != null) { - return cm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState() - == NetworkInfo.State.CONNECTED; - } - return false; - } - - public static void onClickLoginBtn(Context context) { - final 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; - } -} diff --git a/oplus-fwk/src/com/oplus/wrapper/os/PowerManager.java b/oplus-fwk/src/com/oplus/wrapper/os/PowerManager.java deleted file mode 100644 index 20b682c..0000000 --- a/oplus-fwk/src/com/oplus/wrapper/os/PowerManager.java +++ /dev/null @@ -1,14 +0,0 @@ -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(); - } -} diff --git a/oplus-fwk/src/com/oplus/wrapper/os/ServiceManager.java b/oplus-fwk/src/com/oplus/wrapper/os/ServiceManager.java deleted file mode 100644 index be895b0..0000000 --- a/oplus-fwk/src/com/oplus/wrapper/os/ServiceManager.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.oplus.wrapper.os; - -import android.os.IBinder; - -public class ServiceManager { - - public static IBinder checkService(String name) { - return android.os.ServiceManager.checkService(name); - } - - public static IBinder getService(String name) { - return android.os.ServiceManager.getService(name); - } - - public static void addService(String name, IBinder token) { - android.os.ServiceManager.addService(name, token); - } -} diff --git a/oplus-fwk/src/com/oplus/wrapper/os/SystemProperties.java b/oplus-fwk/src/com/oplus/wrapper/os/SystemProperties.java deleted file mode 100644 index 1235d65..0000000 --- a/oplus-fwk/src/com/oplus/wrapper/os/SystemProperties.java +++ /dev/null @@ -1,24 +0,0 @@ -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); - } -} diff --git a/oplus-fwk/src/com/oplus/wrapper/view/IWindowManager.java b/oplus-fwk/src/com/oplus/wrapper/view/IWindowManager.java deleted file mode 100644 index 9cbaa55..0000000 --- a/oplus-fwk/src/com/oplus/wrapper/view/IWindowManager.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.oplus.wrapper.view; - -import android.graphics.Point; -import android.os.IBinder; -import android.os.IInterface; -import android.os.RemoteException; -import android.view.IRotationWatcher; - -public interface IWindowManager { - - int getDockedStackSide() throws RemoteException; - int getInitialDisplayDensity(int displayId) throws RemoteException; - boolean hasNavigationBar(int displayId) throws RemoteException; - int watchRotation(IRotationWatcher watcher, int displayId) throws RemoteException; - void removeRotationWatcher(IRotationWatcher watcher) throws RemoteException; - void setForcedDisplayDensityForUser(int displayId, int density, int userId) throws RemoteException; - int getBaseDisplayDensity(int displayId) throws RemoteException; - void getBaseDisplaySize(int displayId, Point size) throws RemoteException; - - public static abstract class Stub implements IInterface, android.view.IWindowManager { - - private final android.view.IWindowManager mIWindowManager; - - public Stub(android.view.IWindowManager windowManager) { - mIWindowManager = windowManager; - } - - public static IWindowManager asInterface(IBinder obj) { - return new Proxy(android.view.IWindowManager.Stub.asInterface(obj)); - } - - @Override - public IBinder asBinder() { - return mIWindowManager.asBinder(); - } - - public static class Proxy implements IWindowManager { - - private final android.view.IWindowManager mIWindowManager; - - Proxy(android.view.IWindowManager windowManager) { - mIWindowManager = windowManager; - } - - @Override - public int getDockedStackSide() throws RemoteException { - return mIWindowManager.getDockedStackSide(); - } - - @Override - public int getInitialDisplayDensity(int displayId) throws RemoteException { - return mIWindowManager.getInitialDisplayDensity(displayId); - } - - @Override - public boolean hasNavigationBar(int displayId) throws RemoteException { - return mIWindowManager.hasNavigationBar(displayId); - } - - @Override - public int watchRotation(IRotationWatcher watcher, int displayId) throws RemoteException { - return mIWindowManager.watchRotation(watcher, displayId); - } - - @Override - public void removeRotationWatcher(IRotationWatcher watcher) throws RemoteException { - mIWindowManager.removeRotationWatcher(watcher); - } - - @Override - public void setForcedDisplayDensityForUser(int displayId, int density, int userId) throws RemoteException { - mIWindowManager.setForcedDisplayDensityForUser(displayId, density, userId); - } - - @Override - public int getBaseDisplayDensity(int displayId) throws RemoteException { - return mIWindowManager.getBaseDisplayDensity(displayId); - } - - @Override - public void getBaseDisplaySize(int displayId, Point size) throws RemoteException { - mIWindowManager.getBaseDisplaySize(displayId, size); - } - } - } -} diff --git a/oplus-fwk/src/com/oplus/zoomwindow/IOplusZoomWindowObserver.aidl b/oplus-fwk/src/com/oplus/zoomwindow/IOplusZoomWindowObserver.aidl deleted file mode 100644 index 57c3dcc..0000000 --- a/oplus-fwk/src/com/oplus/zoomwindow/IOplusZoomWindowObserver.aidl +++ /dev/null @@ -1,11 +0,0 @@ -package com.oplus.zoomwindow; - -import com.oplus.zoomwindow.OplusZoomWindowInfo; - -interface IOplusZoomWindowObserver { - - void onInputMethodChanged(boolean isShown); - void onZoomWindowDied(String appName); - void onZoomWindowHide(inout OplusZoomWindowInfo info); - void onZoomWindowShow(inout OplusZoomWindowInfo info); -} diff --git a/oplus-fwk/src/com/oplus/zoomwindow/OplusZoomWindowInfo.aidl b/oplus-fwk/src/com/oplus/zoomwindow/OplusZoomWindowInfo.aidl deleted file mode 100644 index 077f18d..0000000 --- a/oplus-fwk/src/com/oplus/zoomwindow/OplusZoomWindowInfo.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.oplus.zoomwindow; - -parcelable OplusZoomWindowInfo; diff --git a/oplus-fwk/src/com/oplus/zoomwindow/OplusZoomWindowInfo.java b/oplus-fwk/src/com/oplus/zoomwindow/OplusZoomWindowInfo.java deleted file mode 100644 index 682a8b6..0000000 --- a/oplus-fwk/src/com/oplus/zoomwindow/OplusZoomWindowInfo.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.oplus.zoomwindow; - -import android.os.Parcel; -import android.os.Parcelable; - -public class OplusZoomWindowInfo implements Parcelable { - - public static final Parcelable.Creator CREATOR = - new Parcelable.Creator() { - - @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) {} -} diff --git a/oplus-fwk/src/com/oplus/zoomwindow/OplusZoomWindowManager.java b/oplus-fwk/src/com/oplus/zoomwindow/OplusZoomWindowManager.java deleted file mode 100644 index 6075256..0000000 --- a/oplus-fwk/src/com/oplus/zoomwindow/OplusZoomWindowManager.java +++ /dev/null @@ -1,21 +0,0 @@ -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; - } -} diff --git a/oplus-fwk/src/net/oneplus/odm/OpDeviceManagerInjector.java b/oplus-fwk/src/net/oneplus/odm/OpDeviceManagerInjector.java deleted file mode 100644 index b03a3a2..0000000 --- a/oplus-fwk/src/net/oneplus/odm/OpDeviceManagerInjector.java +++ /dev/null @@ -1,19 +0,0 @@ -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; - } -} diff --git a/oplus-fwk/src/oplus/content/res/OplusExtraConfiguration.java b/oplus-fwk/src/oplus/content/res/OplusExtraConfiguration.java deleted file mode 100644 index d9206c3..0000000 --- a/oplus-fwk/src/oplus/content/res/OplusExtraConfiguration.java +++ /dev/null @@ -1,6 +0,0 @@ -package oplus.content.res; - -public class OplusExtraConfiguration { - - public OplusExtraConfiguration() {} -} diff --git a/opluscamera.mk b/opluscamera.mk index 4abc604..da4433d 100644 --- a/opluscamera.mk +++ b/opluscamera.mk @@ -3,11 +3,7 @@ PRODUCT_PACKAGES += \ android.hardware.graphics.common-V3-ndk.vendor # Framework -PRODUCT_PACKAGES += \ - oplus-fwk - PRODUCT_BOOT_JARS += \ - oplus-fwk \ oplus-support-wrapper # Init