Skip to content

Commit

Permalink
Misc Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DHD2280 committed Apr 29, 2024
1 parent 779cd94 commit ee88258
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/crowdin_download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ jobs:
localization_branch_name: beta-localization
create_pull_request: true
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ private void initRamUsage() {
ActivityManager.MemoryInfo memoryInfo = new ActivityManager.MemoryInfo();
mActivityManager.getMemoryInfo(memoryInfo);
long usedMemory = memoryInfo.totalMem - memoryInfo.availMem;
if (memoryInfo.totalMem == 0) return;
int usedMemoryPercentage = (int) ((usedMemory * 100) / memoryInfo.totalMem);

if (mRamUsageArcProgress != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ public static BatteryManager BatteryManager() {
: instance.getBatteryManager();
}

@Nullable
@Contract(pure = true)
public static UserManager UserManager() {
return instance == null
? null
: instance.getUserManager();
}

private CameraManager getCameraManager() {
if(mCameraManager == null)
{
Expand Down Expand Up @@ -228,6 +236,19 @@ private BatteryManager getBatteryManager() {
return mBatteryManager;
}

private UserManager getUserManager() {
if (mUserManager == null) {
try {
mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
} catch (Throwable t) {
if (BuildConfig.DEBUG) {
log(t);
}
}
}
return mUserManager;
}

private VibratorManager getVibrationManager()
{
if(mVibrationManager == null)
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/xml/launcher_mods.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
android:key="launcher_intro"
app:iconSpaceReserved="false"
android:title="@string/launcher_intro_title"
android:layout="@layout/preference_clock_layout"
search:ignore="true"/>

<PreferenceCategory
Expand Down

0 comments on commit ee88258

Please sign in to comment.