Android P 屏保和休眠相关知识

news2024/11/17 13:28:22

Android P添加屏保功能,如果休眠时间设定大于屏保时间,则先进入屏保,达到休眠时间后再进入休眠

需求:

  1. 添加屏幕互保开关,默认关闭。
  2. 只保留时钟,可设定指针和数字、夜间模式。
  3. 启用时间改多长时间无操作进入屏保,可设定1、5、10、15、30分钟。
  4. 如果休眠时间设定小于屏保时间,则优先进入休眠,如果休眠时间设定大于屏保时间,则先进入屏保,达到休眠时间后再进入休眠

修改后的屏保:

 

 分析与实现:

1.修改进入屏保的条件

由于Android原生系统默认进入屏保的条件是充电或插入基座时,但到达休眠时才进入屏保。所以需要把进入屏保的条件修改为任何时候都能进入。

frameworks\base\core\res\res\values\config.xml
把"config_dreamsEnabledOnBattery"修改为true即实现任何时候都能进入屏保

<!-- Are we allowed to dream while not plugged in? -->
    <bool name="config_dreamsEnabledOnBattery">true</bool>

2.在设置–>显示–>屏保中添加“屏幕互保”选项开关

2.1添加系统自定义全局变量,用来保存“屏幕互保”选项开关的状态值

frameworks/base/core/java/android/provider/Settings.java

+        /** @hide */
+        public static final String SCREENSAVER_SWITCH= "seewo.screensavers.switch";
public static final class Secure extends NameValueTable {
/** @hide */
public static final String SCREENSAVER_TIMEOUT= “seewo.screensavers.timeout”;

2.2 vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values-zh-rCN/strings.xml

<string name="screensaver_switch_title">屏幕互保</string>

2.3 vendor/mediatek/proprietary/packages/apps/MtkSettings/res/xml/dream_fragment_overview.xml

<PreferenceScreen
     xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:settings="http://schemas.android.com/apk/res-auto"
     android:key="dream_overview_screen"
<SwitchPreference
        android:key="screensaver_switch"
        android:title="@string/screensaver_switch_title"/>

2.4添加vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/dream/ScreenSaverSwitchPreferenceController.java文件

/*
 * Copyright (C) 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
 * except in compliance with the License. You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the
 * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */
package com.android.settings.dream;

import static android.provider.Settings.Secure.SCREENSAVER_SWITCH;

import android.content.Context;
import android.provider.Settings;
import android.support.v14.preference.SwitchPreference;
import android.support.v7.preference.Preference;

import com.android.settings.R;
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settingslib.core.AbstractPreferenceController;

public class ScreenSaverSwitchPreferenceController extends AbstractPreferenceController
        implements PreferenceControllerMixin, Preference.OnPreferenceChangeListener {

    private static final String KEY_SCREENSAVER_SWITCH_NAME = "screensaver_switch";

    public ScreenSaverSwitchPreferenceController(Context context) {
        super(context);
    }

    @Override
    public boolean isAvailable() {
        return true;
    }

    @Override
    public String getPreferenceKey() {
        return KEY_SCREENSAVER_SWITCH_NAME;
    }

    @Override
    public boolean onPreferenceChange(Preference preference, Object newValue) {
        boolean value = (Boolean) newValue;
        Settings.Secure.putInt(mContext.getContentResolver(),
                KEY_SCREENSAVER_SWITCH_NAME, value ? 1 : 0);
        if (value) {
            Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.SCREENSAVER_SWITCH,
                    1);
        } else {
            Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.SCREENSAVER_SWITCH,
                    0);
        }
        return true;
    }

    @Override
    public void updateState(Preference preference) {
        int value = Settings.Secure.getInt(mContext.getContentResolver(),
                KEY_SCREENSAVER_SWITCH_NAME, 0);
        ((SwitchPreference) preference).setChecked(value == 1);
    }
}

2.5 vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/dream/DreamSettings.java

@@ -132,6 +132,7 @@ public class DreamSettings extends DashboardFragment {
         controllers.add(new StartNowPreferenceController(context));
+        controllers.add(new ScreenSaverSwitchPreferenceController(context));
         return controllers;

3.隐藏“启动时间”

--- a/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/dream/StartNowPreferenceController.java
+++ b/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/dream/StartNowPreferenceController.java
@@ -40,7 +40,7 @@ public class StartNowPreferenceController extends AbstractPreferenceController i
 
     @Override
     public boolean isAvailable() {
-        return true;
+        return false;
     }

4.添加选择无操作多少分钟后进入屏保的ListPreference

4.1添加系统自定义全局变量,用来保存无操作多少分钟后进入屏保的时间。
frameworks/base/core/java/android/provider/Settings.java

 public static final class Secure extends NameValueTable {
		 /** @hide */
        public static final String SCREENSAVER_TIMEOUT= "seewo.screensavers.timeout";

4.2设置–>显示–>屏保中添加ListPreference
vendor/mediatek/proprietary/packages/apps/MtkSettings/res/xml/dream_fragment_overview.xml

+    <ListPreference
+        android:key="screensaver_timeout"
+        android:title="@string/screensaver_timeout"
+        android:entries="@array/screensaver_timeout_entries"
+        android:entryValues="@array/screensaver_timeout_values"
+        settings:controller="com.android.settings.dream.ScreenSaverTimeoutPreferenceController" />

vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values/arrays.xml

+    <!--  Titles for screensaver preference. -->
+    <string-array name="screensaver_timeout_entries" >
+        <item>@string/screensaver_timeout_1min</item>
+        <item>@string/screensaver_timeout_5mins</item>
+        <item>@string/screensaver_timeout_10mins</item>
+        <item>@string/screensaver_timeout_15mins</item>
+        <item>@string/screensaver_timeout_30mins</item>
+    </string-array>
+
+    <!--  Values for screensaver preference. -->
+    <string-array name="screensaver_timeout_values" translatable="false" >
+        <item>60000</item>
+        <item>300000</item>
+        <item>600000</item>
+        <item>900000</item>
+        <item>1800000</item>
+    </string-array>

vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values-zh-rCN/strings.xml

+    <string name="screensaver_timeout">屏保</string>
+    <string name="screensaver_timeout_1min">1 分钟</string>
+    <string name="screensaver_timeout_5mins">5 分钟</string>
+    <string name="screensaver_timeout_10mins">10 分钟</string>
+    <string name="screensaver_timeout_15mins">15 分钟</string>
+    <string name="screensaver_timeout_30mins">30 分钟</string>
+    <string name="screensaver_timeout_summary">"无操作<xliff:g id="TIMEOUT_DESCRIPTION">%1$s</xliff:g>后"</string>
+    <string name="screensaver_switch_title">屏幕互保</string>

4.3添加vendor\mediatek\proprietary\packages\apps\MtkSettings\src\com\android\settings\dream\ScreenSaverTimeoutPreferenceController.java

/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License
 */

package com.android.settings.dream;

import static android.provider.Settings.Secure.SCREENSAVER_TIMEOUT;

import android.content.Context;
import android.provider.Settings;
import android.support.v7.preference.ListPreference;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceScreen;
import android.util.FeatureFlagUtils;
import com.android.settings.R;
import com.android.settings.core.BasePreferenceController;
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settingslib.core.AbstractPreferenceController;
/**
 * Setting where user can pick if SystemUI will be light, dark or try to match
 * the wallpaper colors.
 */
public class ScreenSaverTimeoutPreferenceController extends BasePreferenceController
        implements Preference.OnPreferenceChangeListener {

    private ListPreference mScreenSaverTimeoutPref;

    public ScreenSaverTimeoutPreferenceController(Context context, String preferenceKey) {
        super(context, preferenceKey);
    }

    @Override
    public int getAvailabilityStatus() {
        return AVAILABLE;
    }

    @Override
    public void displayPreference(PreferenceScreen screen) {
        super.displayPreference(screen);
        mScreenSaverTimeoutPref = (ListPreference) screen.findPreference(getPreferenceKey());
        int value = Settings.Secure.getInt(mContext.getContentResolver(), SCREENSAVER_TIMEOUT, 60000);
        mScreenSaverTimeoutPref.setValue(Integer.toString(value));
    }

    @Override
    public boolean onPreferenceChange(Preference preference, Object newValue) {
        int value = Integer.parseInt((String) newValue);
        Settings.Secure.putInt(mContext.getContentResolver(), SCREENSAVER_TIMEOUT, value);
        refreshSummary(preference);
        return true;
    }

    @Override
    public CharSequence getSummary() {
        int value = Settings.Secure.getInt(mContext.getContentResolver(), SCREENSAVER_TIMEOUT, 60000);
        int index = mScreenSaverTimeoutPref.findIndexOfValue(Integer.toString(value));
        
        return mContext.getString(R.string.screensaver_timeout_summary, mScreenSaverTimeoutPref.getEntries()[index]);
    }
}

5.屏保默认为原生时钟,移除“万花筒”

5.1 原生屏保默认是使用Google GMS中的时钟,因此修改为默认使用原生的时钟。
frameworks/base/core/res/res/values/config.xml

-    <string name="config_dreamsDefaultComponent" translatable="false">com.google.android.deskclock/com.android.deskclock.Screensaver</string>
+    <string name="config_dreamsDefaultComponent" translatable="false">com.android.deskclock/com.android.deskclock.Screensaver</string>

5.2移除“万花筒”
vendor/mediatek/proprietary/packages/apps/SettingsLib/src/com/android/settingslib/dream/DreamBackend.java

     public List<DreamInfo> getDreamInfos() {
         logd("getDreamInfos()");
+        String componentName;//del basic.Colors
         ComponentName activeDream = getActiveDream();
         PackageManager pm = mContext.getPackageManager();
         Intent dreamIntent = new Intent(DreamService.SERVICE_INTERFACE);
@@ -124,6 +125,12 @@ public class DreamBackend {
             dreamInfo.caption = resolveInfo.loadLabel(pm);
             dreamInfo.icon = resolveInfo.loadIcon(pm);
             dreamInfo.componentName = getDreamComponentName(resolveInfo);
+            componentName = dreamInfo.componentName.toString();
+            if(componentName.contains("com.android.dreams.basic.Colors")){
+                continue;
+            }
             dreamInfo.isActive = dreamInfo.componentName.equals(activeDream);

6.定制屏保时间

如果休眠时间设定小于屏保时间,则优先进入休眠,如果休眠时间设定大于屏保时间,则先进入屏保,达到休眠时间后再进入休眠的实现
frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java

6.1修改进入屏保的条件由Setting中的“屏幕互保”选项的开或关来决定

 private boolean updateWakefulnessLocked(int dirty) {
        boolean changed = false;
        if ((dirty & (DIRTY_WAKE_LOCKS | DIRTY_USER_ACTIVITY | DIRTY_BOOT_COMPLETED
                | DIRTY_WAKEFULNESS | DIRTY_STAY_ON | DIRTY_PROXIMITY_POSITIVE
                | DIRTY_DOCK_STATE)) != 0) {
            if (mWakefulness == WAKEFULNESS_AWAKE && isItBedTimeYetLocked()) {
                if (DEBUG_SPEW) {
                    Slog.d(TAG, "updateWakefulnessLocked: Bed time...");
                }
                final long time = SystemClock.uptimeMillis();
                if (shouldNapAtBedTimeLocked()) {//此处为进入屏保的条件
                    changed = napNoUpdateLocked(time, Process.SYSTEM_UID);
                } else {
                    changed = goToSleepNoUpdateLocked(time,
                            PowerManager.GO_TO_SLEEP_REASON_TIMEOUT, 0, Process.SYSTEM_UID);
                }
            }
        }
        return changed;
    }

shouldNapAtBedTimeLocked()为进入屏保的条件,所以需要修改shouldNapAtBedTimeLocked()的返回值。

    private boolean shouldNapAtBedTimeLocked() {
-        return mDreamsActivateOnSleepSetting
-                || (mDreamsActivateOnDockSetting
-                        && mDockState != Intent.EXTRA_DOCK_STATE_UNDOCKED);
+        return Settings.Secure.getInt(mContext.getContentResolver(),Settings.Secure.SCREENSAVER_SWITCH,0) == 1;
+        //return mDreamsActivateOnSleepSetting
+        //        || (mDreamsActivateOnDockSetting
+        //                && mDockState != Intent.EXTRA_DOCK_STATE_UNDOCKED);

     }

Settings.Secure.getInt(mContext.getContentResolver(),Settings.Secure.SCREENSAVER_SWITCH,0)是获取“屏幕互保”的状态值,1表示打开,0表示关闭。

6.2修改取决于什么时候进入屏保的逻辑。

 private void updateUserActivitySummaryLocked(long now, int dirty) {
        // Update the status of the user activity timeout timer.
        if ((dirty & (DIRTY_WAKE_LOCKS | DIRTY_USER_ACTIVITY
                | DIRTY_WAKEFULNESS | DIRTY_SETTINGS)) != 0) {
            mHandler.removeMessages(MSG_USER_ACTIVITY_TIMEOUT);

            long nextTimeout = 0;
            long screenSaverNextTimeout = 0;//添加计算下次进入屏保的时间
            boolean isScreenSaverEnabled = Settings.Secure.getInt(mContext.getContentResolver(),Settings.Secure.SCREENSAVER_SWITCH,0) == 1;//获取“屏幕互保”是否打开
            if (mWakefulness == WAKEFULNESS_AWAKE
                    || mWakefulness == WAKEFULNESS_DREAMING
                    || mWakefulness == WAKEFULNESS_DOZING) {
                final long sleepTimeout = getSleepTimeoutLocked();
                final long screenOffTimeout = getScreenOffTimeoutLocked(sleepTimeout);//无操作多少分钟后进入休眠的时间
                final long screenDimDuration = getScreenDimDurationLocked(screenOffTimeout);
                final boolean userInactiveOverride = mUserInactiveOverrideFromWindowManager;
                final long nextProfileTimeout = getNextProfileTimeoutLocked(now);
                final long screenSaverTimeout = Settings.Secure.getInt(mContext.getContentResolver(),Settings.Secure.SCREENSAVER_TIMEOUT,60000);//无操作多少分钟后进入屏保的时间
                mUserActivitySummary = 0;
                if (mLastUserActivityTime >= mLastWakeTime) {
                    nextTimeout = mLastUserActivityTime
                            + screenOffTimeout - screenDimDuration;
                    screenSaverNextTimeout = mLastUserActivityTime + screenSaverTimeout;//无操作后下次进入屏保的时间
                    if (now < nextTimeout) {
						//当“屏幕互保”是打开的,并且无操作后进入休眠的时间 大于 无操作后进入屏保的时间,
						//而且当前的时间 大于 无操作后下次进入屏保的时间则进入屏保
                        if(isScreenSaverEnabled && screenOffTimeout > screenSaverTimeout && now > screenSaverNextTimeout ){
                            mUserActivitySummary = USER_ACTIVITY_SCREEN_DREAM;
                        }else{//否则保持屏保亮屏
                            mUserActivitySummary = USER_ACTIVITY_SCREEN_BRIGHT;
                        }
						//Neostra dangziming end screensaver
                    } else {
                        nextTimeout = mLastUserActivityTime + screenOffTimeout;
                        if (now < nextTimeout) {
                            mUserActivitySummary = USER_ACTIVITY_SCREEN_DIM;
                        }
                    }
                }
                if (mUserActivitySummary == 0
                        && mLastUserActivityTimeNoChangeLights >= mLastWakeTime) {
                    nextTimeout = mLastUserActivityTimeNoChangeLights + screenOffTimeout;
                    if (now < nextTimeout) {
                        if (mDisplayPowerRequest.policy == DisplayPowerRequest.POLICY_BRIGHT
                                || mDisplayPowerRequest.policy == DisplayPowerRequest.POLICY_VR) {
                            mUserActivitySummary = USER_ACTIVITY_SCREEN_BRIGHT;
                        } else if (mDisplayPowerRequest.policy == DisplayPowerRequest.POLICY_DIM) {
                            mUserActivitySummary = USER_ACTIVITY_SCREEN_DIM;
                        }
                    }
                }

                if (mUserActivitySummary == 0) {
                    if (sleepTimeout >= 0) {
                        final long anyUserActivity = Math.max(mLastUserActivityTime,
                                mLastUserActivityTimeNoChangeLights);
                        if (anyUserActivity >= mLastWakeTime) {
                            nextTimeout = anyUserActivity + sleepTimeout;
                            if (now < nextTimeout) {
                                mUserActivitySummary = USER_ACTIVITY_SCREEN_DREAM;
                            }
                        }
                    } else {
                        //mUserActivitySummary = USER_ACTIVITY_SCREEN_DREAM;//删除系统进入休眠后才进入屏保的逻辑
                        nextTimeout = -1;
                    }
                }

                if (mUserActivitySummary != USER_ACTIVITY_SCREEN_DREAM && userInactiveOverride) {
                    if ((mUserActivitySummary &
                            (USER_ACTIVITY_SCREEN_BRIGHT | USER_ACTIVITY_SCREEN_DIM)) != 0) {
                        // Device is being kept awake by recent user activity
                        if (nextTimeout >= now && mOverriddenTimeout == -1) {
                            // Save when the next timeout would have occurred
                            mOverriddenTimeout = nextTimeout;
                        }
                    }
                    mUserActivitySummary = USER_ACTIVITY_SCREEN_DREAM;
                    nextTimeout = -1;
                }

                if (nextProfileTimeout > 0) {
                    nextTimeout = Math.min(nextTimeout, nextProfileTimeout);
                }

                if (mUserActivitySummary != 0 && nextTimeout >= 0) {
				//当“屏幕互保”是打开的,并且无操作后进入休眠的时间 大于 无操作后进入屏保的时间,
						//而且当前的时间 大于 无操作后下次进入屏保的时间则发送信息进入屏保
                    if(isScreenSaverEnabled && screenOffTimeout > screenSaverTimeout && now <= screenSaverNextTimeout ){
                        scheduleUserInactivityTimeout(screenSaverNextTimeout);
                    }else{//否则发送进入休眠的信息
                        scheduleUserInactivityTimeout(nextTimeout);
                    }
					//Neostra dangziming end screensaver
                }
            } else {
                mUserActivitySummary = 0;
            }

            if (DEBUG_SPEW) {
                Slog.d(TAG, "updateUserActivitySummaryLocked: mWakefulness="
                        + PowerManagerInternal.wakefulnessToString(mWakefulness)
                        + ", mUserActivitySummary=0x" + Integer.toHexString(mUserActivitySummary)
                        + ", nextTimeout=" + TimeUtils.formatUptime(nextTimeout));
            }
        }
    }

updateUserActivitySummaryLocked()的逻辑分析可以参考Android 8.1 PowerManagerService分析(二) ——updatePowerStateLocked()方法

如果此文章解答了您的相关疑惑,节约了您的宝贵时间,可以赏小编鸡腿哟!

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1423407.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

LeetCode —— 137. 只出现一次的数字 II

&#x1f636;‍&#x1f32b;️&#x1f636;‍&#x1f32b;️&#x1f636;‍&#x1f32b;️&#x1f636;‍&#x1f32b;️Take your time ! &#x1f636;‍&#x1f32b;️&#x1f636;‍&#x1f32b;️&#x1f636;‍&#x1f32b;️&#x1f636;‍&#x1f32b;️…

互联网加竞赛 基于深度学习的人脸表情识别

文章目录 0 前言1 技术介绍1.1 技术概括1.2 目前表情识别实现技术 2 实现效果3 深度学习表情识别实现过程3.1 网络架构3.2 数据3.3 实现流程3.4 部分实现代码 4 最后 0 前言 &#x1f525; 优质竞赛项目系列&#xff0c;今天要分享的是 基于深度学习的人脸表情识别 该项目较…

angular 表单FormGroup笔记

一、校验 1、校验提示 <nz-form-item><nz-form-label>手机号码</nz-form-label><nz-form-control [nzErrorTip]"mobileTemplate"><input nz-input formControlName"mobile" placeholder"请输入" /><ng-templ…

springboot mybatis-plus 项目分层笔记

整体定义 config: 配置项&#xff0c;包含configuration注解 constants: 常量类enums: 枚举 exceptions: 全局异常处理&#xff0c;自定义异常&#xff0c;RestControllerAdvice 注解 fia3: 三大器依据执行顺序&#xff1a;过滤器filter、拦截器interceptor、切面aop 简称 fia…

Flutter canvas 画一条波浪线 进度条

之前用 Flutter Canvas 画过一个三角三角形&#xff0c;html 的 Canvas 也画过一次类似的&#xff0c; 今天用 Flutter Canvas 试了下 感觉差不多&#xff1a; html 版本 大致效果如下&#xff1a; 思路和 html 实现的类似&#xff1a; 也就是找出点的位置&#xff0c;使用二阶…

Python实现avif图片转jpg格式并识别图片中的文字

文章目录 一、图片识别文字1、导包2、代码实现3、运行效果 二、avif格式图片转jpg格式1、导包2、代码实现3、运行效果4、注意事项 三、Python实现avif图片转jpg格式并识别文字全部代码 在做数据分析的时候有些数据是从图片上去获取的&#xff0c;这就需要去识别图片上的文字。P…

Buffer缓冲区类设计实现

目录 类设计理念 类设计接口函数 类设计函数实现 测试 正常读取与写入 相同类型拷贝 扩容测试 按行读取 类设计理念 类设计接口函数 #include <vector> #include <cstdint>#define BUFFER_DEFAULT_SIZE 1024 // Buffer 默认起始大小 class Buffer { pr…

Redis -- String 字符串, 计数命令,字符串操作

"学如逆水行舟&#xff0c;不进则退。" 目录 Redis的String字符串 常见命令 set get mget mset setnx setex psetex 计数命令 incr incrby decr decrby incrbyfloat 字符串操作 append getrange setrange strlen 小结 string内部编码 Redis…

全方面解析msvcp110.dll文件的修复教程,六个修复msvcp110.dll文件丢失问题的详细方法

msvcp110.dll是一个动态链接库文件&#xff0c;它是Microsoft Visual C 2012 Redistributable Package&#xff08;微软视觉C 2012重新分配包&#xff09;的一部分。这个文件主要包含了C标准库中的一些函数&#xff0c;特别是与内存管理、异常处理、字符串处理和数学计算相关的…

部署YUM仓库服务

一、yum仓库 1. yum简介 yum是一个基于RPM包&#xff08;是Red-Hat Package Manager红帽软件包管理器的缩写&#xff09;构建的软件更新机制&#xff0c;能够自动解决软件包之间的依赖关系。 为什么会有依赖关系的发生 因为linux本身就是以系统简洁为自身优势&#xff0c;所以…

动态gif制作方法是什么?一个网站在线制作

一般我们说的gif动图就是动态图片是一种图片格式。Gif动图就是由一帧一帧的静态画面合成一张有动态效果的图片。接下来。给大家讲一讲gif生成&#xff08;https://www.gif.cn/&#xff09;的方法吧&#xff01;很简单不需要下载软件&#xff0c;手机、pc均可操作&#xff0c;只…

Unity触发检测Trigger踩坑合集

正常状态 绿色方块&#xff1a;刚体碰撞盒检测触发碰撞脚本 蓝色方块&#xff1a;碰撞盒 检测脚本&#xff1a; 正常进出&#xff1a; 踩坑1 绿色方块&#xff1a;刚体碰撞盒检测触发碰撞脚本 蓝色方块&#xff1a;碰撞盒 保持绿色和蓝色方块的接触 对蓝色方块&#xff1a…

87.网游逆向分析与插件开发-物品使用-物品交换的逆向分析与C++封装

内容参考于&#xff1a;易道云信息技术研究院VIP课 上一个内容&#xff1a;物品丢弃的逆向分析与C代码的封装-CSDN博客 码云地址&#xff08;ui显示角色数据 分支&#xff09;&#xff1a;https://gitee.com/dye_your_fingers/sro_-ex.git 码云版本号&#xff1a;5222a6b1e5…

程序员的新风口,来了?

过去几年逐渐沉寂的程序员培训行业&#xff0c;现在重新热闹了起来。 作为一家IT培训机构的课程顾问&#xff0c;小娜发现&#xff0c;最近一段时间&#xff0c;咨询鸿蒙开发课程的人越来越多了&#xff0c;为了能够及时回复&#xff0c;我整理了一份话术&#xff0c;以便快速摸…

Qt Excel读写 - QXlsx的安装配置以及测试

Qt Excel读写 - QXlsx的安装配置以及测试 引言一、安装配置二、简单测试 引言 Qt无自带的库处理Excel 文件&#xff0c;但可通过QAxObject 借助COM接口进行Excel的读写1。亦可使用免费的开源第三方库&#xff1a;QXlsx&#xff0c;一个基于Qt库开发的用于读写Microsoft Excel文…

存储监控工具:监控存储区域网络(SAN)

从托管应用程序到提供大型多媒体服务&#xff0c;组织都依靠其 IT 基础架构来提供无与伦比的最终用户体验。为了提供这种卓越的体验&#xff0c;必须大大提高应用程序的可用性和性能。在许多其他挑战中&#xff0c;存储区域网络 &#xff08;SAN&#xff09; 正好用于应对这些挑…

Fiddler-02使用

文章目录 一、Fiddler的作用二、Fiddler抓取https请求三、Fiddler过滤请求1、案例一2、案例二3、过滤页面介绍4、总结 四、Fiddler删除数据五、Fiddler接口基础概述六、Fiddler请求响应报文详解1、请求2、响应 七、Fiddler定位前后端的问题八、Fiddler弱网测试方式一&#xff1…

(十六)串口UART

文章目录 UART简介传输数据帧和波特率定时器1作为串口1波特率发生器串口部分相关寄存器TMODAUXRPCONSCONSBUF 串口1工作模式1&#xff1a;8位UART&#xff0c;波特率可变总体工作原理如何简单接收一个字符和发送数据一步之遥的设置现象演示 UART简介 通用异步收发传输器(Unive…

程序员每天会阅读哪些技术网站来提升自己?

我有一个很特别的习惯……每周会固定一天去看一下接单网站上的高薪单子&#xff0c;不完全是为了接单&#xff0c;而是看现在稀缺的岗位是什么…… 其实很多程序员对外包接单都有误解&#xff0c;觉得外包接单平台上的项目都是一些边缘的、没人愿意干的项目&#xff0c;虽然这类…

好用的制造业项目管理工具推荐:提升生产效率与项目成功的关键利器

有什么好用的制造业项目管理工具&#xff1f;制造业作为传统行业&#xff0c;经常会采用项目制管理模式&#xff0c;项目管理对制造业的重要性不言而喻。2024年制造业企业面对国内依然激烈的竞争&#xff0c;想要进一步发展&#xff0c;不仅要对外谋取&#xff0c;也要对内优化…