storage cleanup

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lf12345678910/article/details/77864764

\vendor\xxx\proprietary\plus\Extension\apps\StorageCleaner

    <string name="application_cache">缓存垃圾</string>
    <string name="unavalible_apk">无用安装包</string>
    <string name="garbage_files">卸载残留</string>
    <string name="start_clean">一键清理</string>

布局文件

vendor/xxx/proprietary/plus/Extension/apps/StorageCleaner/res/xml/cleaner.xml

CleanerActivity.java

private IStorageCleanerService mDataService = null;

private IStorageCleanerService mshareService = null;

mshareService.startCleaner(sharedStorageInfo.path, sharedStorageInfo.pattern);

startService(new Intent(START_CLEAR_APPLICATION_CACHE));

mDataService.startCleaner(dataStorageInfo.path, dataStorageInfo.pattern);

DataStorageCleanerService

    private class ServiceStub extends IStorageCleanerService.Stub {

AndroidManifest.xml

        <service
            android:name=".DataStorageCleanerService"
            android:permission="com.codeaurora.permission.DATA_STORAGE_CLEANER"
            android:enabled="true"
            android:exported="true" >
            <intent-filter>
                <action android:name="com.qti.datastoragecleanerservice.BIND"/>
                <action android:name="com.qti.datastoragecleanerservice.CLEAR_APPLICATION_STORAGE"/>
            </intent-filter>
        </service>

猜你喜欢

转载自blog.csdn.net/lf12345678910/article/details/77864764