Remove the Deletion Helper and Automatic Storage Management jobs.

The automatic storage management settings have been left in place
and updated to use the intent to get into the deletion helper.

Bug: 28965462
Change-Id: I736c8e741b519eceb89075b74d42b38c3aa5d0f4
This commit is contained in:
Daniel Nishi
2016-06-09 10:52:35 -07:00
parent 672e1ddb14
commit aad643caf2
31 changed files with 9 additions and 2380 deletions

View File

@@ -1,31 +0,0 @@
/*
* Copyright (C) 2016 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.overlay;
import android.content.Context;
import android.support.v7.preference.PreferenceGroup;
import com.android.settings.deletionhelper.DeletionType;
/**
* Feature provider for the manual deletion helper Settings page.
*/
public interface DeletionHelperFeatureProvider {
/**
* Creates a {@link DeletionType} for clearing out stored photos and videos on the device.
*/
DeletionType createPhotoVideoDeletionType(Context context);
}

View File

@@ -61,12 +61,6 @@ public abstract class FeatureFactory {
public abstract SupportFeatureProvider getSupportFeatureProvider(Context context);
/**
* Return a provider which adds additional deletion services to the Deletion Helper.
*/
public abstract DeletionHelperFeatureProvider getDeletionHelperFeatureProvider();
public abstract StorageManagementJobProvider getStorageManagementJobProvider();
public static final class FactoryNotFoundException extends RuntimeException {
public FactoryNotFoundException(Throwable throwable) {
super("Unable to create factory. Did you misconfigure Proguard?", throwable);

View File

@@ -28,14 +28,4 @@ public final class FeatureFactoryImpl extends FeatureFactory {
return null;
}
@Override
public DeletionHelperFeatureProvider getDeletionHelperFeatureProvider() {
return null;
}
@Override
public StorageManagementJobProvider getStorageManagementJobProvider() {
return null;
}
}

View File

@@ -1,40 +0,0 @@
/*
* Copyright (C) 2016 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.overlay;
import android.app.job.JobParameters;
import android.content.Context;
/**
* Feature provider for automatic storage management jobs.
*/
public interface StorageManagementJobProvider {
/**
* Starts an asynchronous deletion job to clear out storage older than
* @param params Standard JobService parameters.
* @param daysToRetain Number of days of information to retain on the device.
* @return If the job needs to process the work on a separate thread.
*/
boolean onStartJob(Context context, JobParameters params, int daysToRetain);
/**
* Attempt to stop the execution of the job.
* @param params Parameters specifying info about this job.
* @return If the job should be rescheduled.
*/
boolean onStopJob(Context context, JobParameters params);
}