Removed launch count increase API from Applications.
Bug: 3431684 Change-Id: I5bcf8fc6c917cc0ec60302a6c994e4e47b77c357
This commit is contained in:
@@ -18,7 +18,6 @@ package android.provider;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.ContentValues;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
|
||||
@@ -27,12 +26,10 @@ import java.util.List;
|
||||
/**
|
||||
* The Applications provider gives information about installed applications.
|
||||
*
|
||||
* @hide Only used by ApplicationsProvider and Launchers so far.
|
||||
* @hide Only used by ApplicationsProvider so far.
|
||||
*/
|
||||
public class Applications {
|
||||
|
||||
private static final String TAG = "ApplicationsProvider";
|
||||
|
||||
/**
|
||||
* The content authority for this provider.
|
||||
*/
|
||||
@@ -67,26 +64,6 @@ public class Applications {
|
||||
public static final String APPLICATION_DIR_TYPE =
|
||||
ContentResolver.CURSOR_DIR_BASE_TYPE + "/" + APPLICATION_SUB_TYPE;
|
||||
|
||||
/**
|
||||
* The path that should be used when an application is launched. The aim is
|
||||
* to help ApplicationsProvider keep track of which applications the user
|
||||
* uses the most, and improve app ranking based on this.
|
||||
*/
|
||||
public static final String INCREASE_LAUNCH_COUNT_PATH = "increase_launch_count";
|
||||
|
||||
public static final Uri INCREASE_LAUNCH_COUNT_URI = CONTENT_URI.buildUpon()
|
||||
.appendPath(INCREASE_LAUNCH_COUNT_PATH).build();
|
||||
|
||||
/**
|
||||
* The package name parameter for the "increase launch count" call.
|
||||
*/
|
||||
public static final String INCREASE_LAUNCH_COUNT_PACKAGE = "packageName";
|
||||
|
||||
/**
|
||||
* The classname parameter for the "increase launch count" call.
|
||||
*/
|
||||
public static final String INCREASE_LAUNCH_COUNT_CLASS = "className";
|
||||
|
||||
/**
|
||||
* no public constructor since this is a utility class
|
||||
*/
|
||||
@@ -101,20 +78,6 @@ public class Applications {
|
||||
return resolver.query(searchUri, null, null, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Increases the launch count of an application. Launch counts are used
|
||||
* by the ApplicationsProvider to improve ranking.
|
||||
*/
|
||||
public static void increaseLaunchCount(
|
||||
final ContentResolver resolver, final ComponentName componentName) {
|
||||
|
||||
ContentValues parameters = new ContentValues();
|
||||
parameters.put(INCREASE_LAUNCH_COUNT_PACKAGE, componentName.getPackageName());
|
||||
parameters.put(INCREASE_LAUNCH_COUNT_CLASS, componentName.getClassName());
|
||||
|
||||
resolver.insert(INCREASE_LAUNCH_COUNT_URI, parameters);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the application component name from an application URI.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user