fix: 系统性修复类继承冲突 + 补全36+缺失导出
类继承冲突修复 (7个文件, 8组冲突): - view_ext.py: 16个类继承view.py基础版本 (ViewOutlineProvider, ViewPropertyAnimator, ViewTreeObserver, ViewConfiguration, ViewParent, WindowInsets, Display, DragEvent, GestureDetector, ScaleGestureDetector, SoundEffectConstants, Surface, SurfaceView, TextureView, VelocityTracker, WindowInsetsController) - hardware_sensor_ext.py: 3个类继承hardware.py (Sensor, SensorEvent, SensorEventListener) - app_fragment.py: 3个类继承app.py (Fragment, FragmentManager, FragmentTransaction) - content_intent.py: 3个类继承content.py/app.py (Intent, PendingIntent, IntentFilter) - widget_ext.py: 29个类继承widget.py (18个单继承+11个多继承, 修复super()链) - os_power.py: 2个类继承os.py (BatteryManager, PowerManager) - net_ext.py: 12个类继承net.py (11个单继承+1个多继承) __all__导出补全 (36个类): - java.net: InterfaceAddress - android.database: MatrixCursor, SQLiteStatement - android.view: GestureDetector, ScaleGestureDetector, SurfaceHolder, Surface, SurfaceView, TextureView, ViewOutlineProvider, WindowManager, Window, LayoutInflater, Menu, MenuItem, ContextMenu, Display, DisplayMetrics - android.graphics: Region, PathMeasure, NinePatch, Picture, PictureDrawable, Camera, PorterDuff, PorterDuffXfermode, Shader, LinearGradient, RadialGradient, SweepGradient, BitmapShader, ComposeShader, CornerPathEffect, DashPathEffect, PathDashPathEffect, SumPathEffect - android.widget: LinearLayout, FrameLayout, RelativeLayout, TableLayout, TableRow, BaseAdapter, ArrayAdapter, SimpleAdapter, CursorAdapter, ImageButton, ToggleButton, RadioButton, SeekBar, RatingBar, ViewSwitcher, TextSwitcher, ImageSwitcher, SearchView, NumberPicker, Chronometer, TabHost, TabWidget, ViewAnimator, ZoomControls, DigitalClock, AnalogClock 统计: 221模块, 3666类, 31005方法, 183629行
This commit is contained in:
1 parent
fbb8263b13
commit
97d8b277d5
8 files changed
+205
-105
No files matched your search
@@ -14,6 +14,18 @@ import time
|
||||
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union
|
||||
|
||||
from .._core import Stub, AndroidOnlyError
|
||||
from .net import ConnectivityManager as _BaseConnectivityManager
|
||||
from .net import DhcpInfo as _BaseDhcpInfo
|
||||
from .net import LinkAddress as _BaseLinkAddress
|
||||
from .net import LinkProperties as _BaseLinkProperties
|
||||
from .net import Network as _BaseNetwork
|
||||
from .net import NetworkCapabilities as _BaseNetworkCapabilities
|
||||
from .net import NetworkInfo as _BaseNetworkInfo
|
||||
from .net import NetworkRequest as _BaseNetworkRequest
|
||||
from .net import NetworkSpecifier as _BaseNetworkSpecifier
|
||||
from .net import ProxyInfo as _BaseProxyInfo
|
||||
from .net import TrafficStats as _BaseTrafficStats
|
||||
from .net import MatchAllNetworkSpecifier as _BaseMatchAllNetworkSpecifier
|
||||
|
||||
# Linux 真实实现导入
|
||||
try:
|
||||
@@ -37,7 +49,7 @@ __all__ = [
|
||||
# Network
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
|
||||
class Network(Stub):
|
||||
class Network(_BaseNetwork):
|
||||
"""Network — 网络"""
|
||||
|
||||
def __init__(self, netId: int = 0):
|
||||
@@ -81,7 +93,7 @@ class Network(Stub):
|
||||
# NetworkCapabilities
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
|
||||
class NetworkCapabilities(Stub):
|
||||
class NetworkCapabilities(_BaseNetworkCapabilities):
|
||||
"""NetworkCapabilities — 网络能力"""
|
||||
|
||||
TRANSPORT_CELLULAR = 0
|
||||
@@ -243,7 +255,7 @@ class NetworkCapabilities(Stub):
|
||||
# NetworkSpecifier / MatchAllNetworkSpecifier
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
|
||||
class NetworkSpecifier(Stub):
|
||||
class NetworkSpecifier(_BaseNetworkSpecifier):
|
||||
"""NetworkSpecifier — 网络指定器"""
|
||||
|
||||
def satisfiedBy(self, other: Optional["NetworkSpecifier"]) -> bool:
|
||||
@@ -259,7 +271,7 @@ class NetworkSpecifier(Stub):
|
||||
return id(self) & 0x7FFFFFFF
|
||||
|
||||
|
||||
class MatchAllNetworkSpecifier(NetworkSpecifier):
|
||||
class MatchAllNetworkSpecifier(_BaseMatchAllNetworkSpecifier, NetworkSpecifier):
|
||||
"""MatchAllNetworkSpecifier — 匹配所有网络"""
|
||||
|
||||
def satisfiedBy(self, other: Optional["NetworkSpecifier"]) -> bool:
|
||||
@@ -273,7 +285,7 @@ class MatchAllNetworkSpecifier(NetworkSpecifier):
|
||||
# NetworkRequest
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
|
||||
class NetworkRequest(Stub):
|
||||
class NetworkRequest(_BaseNetworkRequest):
|
||||
"""NetworkRequest — 网络请求"""
|
||||
|
||||
def __init__(self, capabilities: Optional[NetworkCapabilities] = None,
|
||||
@@ -437,7 +449,7 @@ class NetworkAgent(Stub):
|
||||
# NetworkInfo (扩展)
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
|
||||
class NetworkInfo(Stub):
|
||||
class NetworkInfo(_BaseNetworkInfo):
|
||||
"""NetworkInfo — 网络信息 (完整版)"""
|
||||
|
||||
TYPE_NONE = -1
|
||||
@@ -565,7 +577,7 @@ class NetworkInfo(Stub):
|
||||
# LinkAddress
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
|
||||
class LinkAddress(Stub):
|
||||
class LinkAddress(_BaseLinkAddress):
|
||||
"""LinkAddress — 链路地址"""
|
||||
|
||||
def __init__(self, address: str = "0.0.0.0", prefixLength: int = 24,
|
||||
@@ -607,7 +619,7 @@ class LinkAddress(Stub):
|
||||
# LinkProperties
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
|
||||
class LinkProperties(Stub):
|
||||
class LinkProperties(_BaseLinkProperties):
|
||||
"""LinkProperties — 链路属性"""
|
||||
|
||||
def __init__(self):
|
||||
@@ -881,7 +893,7 @@ class MobileLinkQualityInfo(LinkQualityInfo):
|
||||
# TrafficStats
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
|
||||
class TrafficStats(Stub):
|
||||
class TrafficStats(_BaseTrafficStats):
|
||||
"""TrafficStats — 流量统计"""
|
||||
|
||||
UID_REMOVED = -4
|
||||
@@ -976,7 +988,7 @@ class TrafficStats(Stub):
|
||||
# ProxyInfo
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
|
||||
class ProxyInfo(Stub):
|
||||
class ProxyInfo(_BaseProxyInfo):
|
||||
"""ProxyInfo — 代理信息"""
|
||||
|
||||
def __init__(self, host: str = "", port: int = 0,
|
||||
@@ -1019,7 +1031,7 @@ class ProxyInfo(Stub):
|
||||
# DhcpInfo / DhcpInfoInternal
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
|
||||
class DhcpInfo(Stub):
|
||||
class DhcpInfo(_BaseDhcpInfo):
|
||||
"""DhcpInfo — DHCP 信息"""
|
||||
|
||||
def __init__(self):
|
||||
@@ -1252,7 +1264,7 @@ class ConnectivityDiagnosticsManager(Stub):
|
||||
# ConnectivityManager (扩展)
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
|
||||
class ConnectivityManager(Stub):
|
||||
class ConnectivityManager(_BaseConnectivityManager):
|
||||
"""ConnectivityManager — 连接管理器 (扩展版)"""
|
||||
|
||||
TYPE_NONE = -1
|
||||
|
||||
Reference in new issue
Block a user