mirror of
https://github.com/oplus-giulia-dev/android_hardware_oplus
synced 2025-11-09 01:26:44 +08:00
Introduce oplus-fwk
Co-authored-by: LuK1337 <priv.luk@gmail.com> Signed-off-by: chandu078 <chandudyavanapelli03@gmail.com> Change-Id: I9190d506e25501e18ac4edc4fd4c9a2d9d9145cd
This commit is contained in:
committed by
Bruno Martins
parent
48e0747631
commit
5847521167
15
oplus-fwk/Android.bp
Normal file
15
oplus-fwk/Android.bp
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
//
|
||||||
|
// Copyright (C) 2024 The LineageOS Project
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
//
|
||||||
|
|
||||||
|
java_library {
|
||||||
|
name: "oplus-fwk",
|
||||||
|
installable: true,
|
||||||
|
|
||||||
|
srcs: [
|
||||||
|
"src/**/*.aidl",
|
||||||
|
"src/**/*.java",
|
||||||
|
],
|
||||||
|
}
|
||||||
8
oplus-fwk/oplus-fwk.mk
Normal file
8
oplus-fwk/oplus-fwk.mk
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2024 The LineageOS Project
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
PRODUCT_PACKAGES += oplus-fwk
|
||||||
|
PRODUCT_BOOT_JARS += oplus-fwk
|
||||||
35
oplus-fwk/src/android/common/IOplusCommonFactory.java
Normal file
35
oplus-fwk/src/android/common/IOplusCommonFactory.java
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
package android.common;
|
||||||
|
|
||||||
|
public interface IOplusCommonFactory {
|
||||||
|
boolean isValid(int i);
|
||||||
|
|
||||||
|
default <T extends IOplusCommonFeature> T getFeature(T def, Object... vars) {
|
||||||
|
verityParams(def);
|
||||||
|
return def;
|
||||||
|
}
|
||||||
|
|
||||||
|
default <T extends IOplusCommonFeature> void verityParams(T def) {
|
||||||
|
if (def == null) {
|
||||||
|
throw new IllegalArgumentException("def can not be null");
|
||||||
|
}
|
||||||
|
if (def.index() == OplusFeatureList.OplusIndex.End) {
|
||||||
|
throw new IllegalArgumentException(def + "must override index() method");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
default void verityParamsType(String key, Object[] vars, int num, Class... types) {
|
||||||
|
if (vars == null || types == null || vars.length != num || types.length != num) {
|
||||||
|
throw new IllegalArgumentException(key + " need +" + num + " params");
|
||||||
|
}
|
||||||
|
for (int i = 0; i < num; i++) {
|
||||||
|
if (vars[i] != null && !types[i].isInstance(vars[i])) {
|
||||||
|
throw new IllegalArgumentException(types[i].getName() + " is not instance " + vars[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
16
oplus-fwk/src/android/common/IOplusCommonFeature.java
Normal file
16
oplus-fwk/src/android/common/IOplusCommonFeature.java
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
package android.common;
|
||||||
|
|
||||||
|
public interface IOplusCommonFeature {
|
||||||
|
default OplusFeatureList.OplusIndex index() {
|
||||||
|
return OplusFeatureList.OplusIndex.End;
|
||||||
|
}
|
||||||
|
|
||||||
|
default IOplusCommonFeature getDefault() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
337
oplus-fwk/src/android/common/OplusFeatureList.java
Normal file
337
oplus-fwk/src/android/common/OplusFeatureList.java
Normal file
@@ -0,0 +1,337 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
package android.common;
|
||||||
|
|
||||||
|
public class OplusFeatureList {
|
||||||
|
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,
|
||||||
|
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,
|
||||||
|
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,
|
||||||
|
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,
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
28
oplus-fwk/src/android/common/OplusFrameworkFactory.java
Normal file
28
oplus-fwk/src/android/common/OplusFrameworkFactory.java
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
package android.common;
|
||||||
|
|
||||||
|
public class OplusFrameworkFactory implements IOplusCommonFactory {
|
||||||
|
public static OplusFrameworkFactory sInstance = null;
|
||||||
|
|
||||||
|
public static OplusFrameworkFactory getInstance() {
|
||||||
|
if (sInstance == null) {
|
||||||
|
sInstance = new OplusFrameworkFactory();
|
||||||
|
}
|
||||||
|
return sInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid(int index) {
|
||||||
|
boolean validOplus =
|
||||||
|
index < OplusFeatureList.OplusIndex.EndOplusFrameworkFactory.ordinal() &&
|
||||||
|
index > OplusFeatureList.OplusIndex.StartOplusFrameworkFactory.ordinal();
|
||||||
|
boolean vaildOplusOs =
|
||||||
|
index < OplusFeatureList.OplusIndex.EndOplusOsFrameworkFactory.ordinal() &&
|
||||||
|
index > OplusFeatureList.OplusIndex.StartOplusOsFrameworkFactory.ordinal();
|
||||||
|
return vaildOplusOs || validOplus;
|
||||||
|
}
|
||||||
|
}
|
||||||
25
oplus-fwk/src/android/telephony/OplusTelephonyManager.java
Normal file
25
oplus-fwk/src/android/telephony/OplusTelephonyManager.java
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
package android.telephony;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
public class OplusTelephonyManager {
|
||||||
|
private static OplusTelephonyManager sInstance = null;
|
||||||
|
|
||||||
|
public OplusTelephonyManager(Context context) {}
|
||||||
|
|
||||||
|
public static OplusTelephonyManager getInstance(Context context) {
|
||||||
|
if (sInstance == null) {
|
||||||
|
sInstance = new OplusTelephonyManager(context);
|
||||||
|
}
|
||||||
|
return sInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImsType(int slotId) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.android.ims;
|
||||||
|
|
||||||
|
public interface IImsCallSessionImplWrapper {
|
||||||
|
default void unMuteStateReporting() {}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.android.internal.telephony;
|
||||||
|
|
||||||
|
public class OplusFeature {
|
||||||
|
public static final boolean OPLUS_FEATURE_CALL_RECOVERY_DISABLED = false;
|
||||||
|
public static final boolean OPLUS_FEATURE_RADIO_VIRTUALMODEM = false;
|
||||||
|
public static final boolean OPLUS_FEATURE_UST_CARRIER_CONFIG = false;
|
||||||
|
public static final boolean OPLUS_FEATURE_UST_TOAST = false;
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.android.internal.telephony;
|
||||||
|
|
||||||
|
import com.oplus.content.OplusFeatureConfigManager;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class OplusFeatureHelper {
|
||||||
|
private static OplusFeatureHelper sInstance = null;
|
||||||
|
|
||||||
|
public static OplusFeatureHelper getInstance() {
|
||||||
|
if (sInstance == null) {
|
||||||
|
sInstance = new OplusFeatureHelper();
|
||||||
|
}
|
||||||
|
return sInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasFeature(String featureName) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean enableFeature(String featureName) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean disableFeature(String featureName) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void notifyFeaturesUpdate(String action, String actionValue) {}
|
||||||
|
|
||||||
|
public boolean registerFeatureObserver(List<String> features, FeatureObserver observer) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean unregisterFeatureObserver(FeatureObserver observer) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class FeatureObserver implements OplusFeatureConfigManager.OnFeatureObserver {}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
package android.telephony.ims.aidl;
|
||||||
|
|
||||||
|
interface IImsRil {
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.oplus.content;
|
||||||
|
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class OplusFeatureConfigManager {
|
||||||
|
public static OplusFeatureConfigManager sInstance = null;
|
||||||
|
|
||||||
|
public static OplusFeatureConfigManager getInstance() {
|
||||||
|
if (sInstance == null) {
|
||||||
|
sInstance = new OplusFeatureConfigManager();
|
||||||
|
}
|
||||||
|
return sInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnFeatureObserver {
|
||||||
|
default void onFeatureUpdate(List<String> features) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
oplus-fwk/src/com/oplus/ims/IImsExt.aidl
Normal file
9
oplus-fwk/src/com/oplus/ims/IImsExt.aidl
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.oplus.ims;
|
||||||
|
|
||||||
|
interface IImsExt {
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.oplus.ims.stub;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import com.oplus.ims.IImsExt;
|
||||||
|
|
||||||
|
import java.util.concurrent.Executor;
|
||||||
|
|
||||||
|
public class ImsServiceControllerExt {
|
||||||
|
private final ImsExtStub mImsExtStub;
|
||||||
|
|
||||||
|
public ImsServiceControllerExt(Context context, Executor executor) {
|
||||||
|
mImsExtStub = new ImsExtStub();
|
||||||
|
}
|
||||||
|
|
||||||
|
public IImsExt getIImsExt() {
|
||||||
|
return mImsExtStub;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ImsExtStub extends IImsExt.Stub {}
|
||||||
|
}
|
||||||
56
oplus-fwk/src/com/oplus/nec/IOplusNecManager.java
Normal file
56
oplus-fwk/src/com/oplus/nec/IOplusNecManager.java
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.oplus.nec;
|
||||||
|
|
||||||
|
import android.common.IOplusCommonFeature;
|
||||||
|
import android.common.OplusFeatureList;
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
public interface IOplusNecManager extends IOplusCommonFeature {
|
||||||
|
public static final IOplusNecManager DEFAULT = new IOplusNecManager() {};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
default OplusFeatureList.OplusIndex index() {
|
||||||
|
return OplusFeatureList.OplusIndex.IOplusNecManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
default IOplusCommonFeature getDefault() {
|
||||||
|
return DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
|
default void notifyNwDiagnoseInitComplete() {}
|
||||||
|
default void broadcastNecEvent(int slotId, int eventId, Bundle data) {}
|
||||||
|
default void broadcastServiceStateChanged(boolean oos, int slotId) {}
|
||||||
|
default void broadcastDataConnect(int slotId, String type) {}
|
||||||
|
default void broadcastDataConnectResult(int slotId, String type, boolean success) {}
|
||||||
|
default void broadcastVolteVopsOrSettingChanged(int slotId, int event, boolean isVolteEnabled) {}
|
||||||
|
default void broadcastDataDisconnect(int slotId, String type) {}
|
||||||
|
default void broadcastDataDisconnectComplete(int slotId, String type) {}
|
||||||
|
default void broadcastDataCallInternetProtocolType(int slotId, int protocol) {}
|
||||||
|
default void broadcastNoDataIconError(int slotId, int errorcode, int protocol, String cause) {}
|
||||||
|
default void broadcastNoDataFlowError(int slotId, int errorcode, String mNoDataFlowReason) {}
|
||||||
|
default void broadcastNoDataFlowRecoveryError(int slotId, int errorcode, String recovery) {}
|
||||||
|
default void broadcastSlowDataFlowError(int slotId, int errorcode, String score) {}
|
||||||
|
default void broadcastSlowDataFlowRecovery(int slotId, int errorcode, String score) {}
|
||||||
|
default void broadcastGameLargeDelayError(int slotId, int errorcode, String gameError) {}
|
||||||
|
default void broadcastLimitState(int slotId, boolean limitState) {}
|
||||||
|
default void broadcastPreferredNetworkMode(int slotId, int preferredMode) {}
|
||||||
|
default void broadcastDataEnabledChanged(int slotId, boolean enabled) {}
|
||||||
|
default void broadcastLostConnectionReason(int slotId, int errorcode, int lostReason) {}
|
||||||
|
default void broadcastHangUpDelayTimer(int slotId, long millis, int csOrIms) {}
|
||||||
|
default void broadcastCdmaResetActiveTimer(int slotId, int networkType) {}
|
||||||
|
default void broadcastPreciseCallStateChanged(int slotId, int ring, int foreground, int background, int cause, int preciseCause, int disconnectState) {}
|
||||||
|
default void broadcastSrvccStateChanged(int slotId, int srvccState) {}
|
||||||
|
default void broadcastCallError(int slotId, int event, int cause, int preciseCause, String desc, boolean isImsCall, boolean isIncoming) {}
|
||||||
|
default void broadcastVolteCallKeylog(int slotId, int event, String desc) {}
|
||||||
|
default void broadcastImsRegisterState(int slotId, boolean imsRegisterState) {}
|
||||||
|
default void broadcastRegInfoChanged(int voiceRegState, int voiceNetworkType, int dataRegState, int dataNetworkType, int slotId) {}
|
||||||
|
default void broadcastImsNetworkStateChanged(int phoneId, int errorCode, String errorMessage, int regState, int imsRat) {}
|
||||||
|
default void broadcastOnlineMeeting(int slotId, int errorcode, String record) {}
|
||||||
|
default void broadcastDispatchedSmsId(int slotId, int errorCode, long messageId, boolean isWapPush, boolean isClass0, String mPackageName) {}
|
||||||
|
default void broadcastDispatchedMoSmsId(int slotId, int eventId, String networkType, int rat, int errorType, int errorCode, String success) {}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user