-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
修复移动数据的重复监听问题 && 修复 dexkit 无写入缓存的问题 (#1016)
Co-authored-by: 铃柒柒 <[email protected]>
- Loading branch information
1 parent
c980690
commit be515fe
Showing
4 changed files
with
129 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
app/src/main/java/com/sevtinge/hyperceiler/utils/devicesdk/SubscriptionManagerProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.sevtinge.hyperceiler.utils.devicesdk; | ||
|
||
import android.content.Context; | ||
|
||
import com.sevtinge.hyperceiler.utils.InvokeUtils; | ||
|
||
public class SubscriptionManagerProvider { | ||
private static final String CLASS = "android.telephony.SubscriptionManager"; | ||
|
||
private final Object subscriptionManager; | ||
|
||
public SubscriptionManagerProvider(Context context) { | ||
subscriptionManager = context.getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE); | ||
} | ||
|
||
public int[] getActiveSubscriptionIdList(boolean visibleOnly) { | ||
return InvokeUtils.callMethod(CLASS, subscriptionManager, "getActiveSubscriptionIdList", new Class[]{boolean.class}, visibleOnly); | ||
} | ||
} |