Fixing main process initialization code
Content Provider is no longer the 1st entry point for an app. Moving it to a custom application class instead Bug: 301442482 Test: Verified that the startup code gets called Flag: N/A Change-Id: Ibedcc7bfb0294acd9252e1d6a2a1294df32524e9
This commit is contained in:
1 parent
8fb1d8f295
commit
79085dafd4
3 files changed
+31
-10
No files matched your search
@@ -33,7 +33,6 @@ import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.launcher3.LauncherSettings.Favorites;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.model.ModelDbController;
|
||||
import com.android.launcher3.widget.LauncherWidgetHolder;
|
||||
|
||||
@@ -44,8 +43,6 @@ import java.util.function.ToIntFunction;
|
||||
public class LauncherProvider extends ContentProvider {
|
||||
private static final String TAG = "LauncherProvider";
|
||||
|
||||
public static final String AUTHORITY = BuildConfig.APPLICATION_ID + ".settings";
|
||||
|
||||
/**
|
||||
* $ adb shell dumpsys activity provider com.android.launcher3
|
||||
*/
|
||||
@@ -60,13 +57,6 @@ public class LauncherProvider extends ContentProvider {
|
||||
|
||||
@Override
|
||||
public boolean onCreate() {
|
||||
if (FeatureFlags.IS_STUDIO_BUILD) {
|
||||
Log.d(TAG, "Launcher process started");
|
||||
}
|
||||
|
||||
// The content provider exists for the entire duration of the launcher main process and
|
||||
// is the first component to get created.
|
||||
MainProcessInitializer.initialize(getContext().getApplicationContext());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user