Removing unnecessary work adapter wrapper

Simplifying view type constants to make it easier to add new view types

Bug: 234008165
Test: Verified on device
Change-Id: I96589ceba362ea7e75afdfc3fe8da3be214aa682
This commit is contained in:
Sunny Goyal committed 2022-07-15 16:24:31 -07:00
1 parent 6c057718ac
commit cba5f9a64e
8 files changed
+87 -172

No files matched your search

@@ -24,9 +24,11 @@ import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.FrameLayout;
import android.widget.TextView;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.model.StringCache;
import com.android.launcher3.views.ActivityContext;
/**
@@ -72,12 +74,18 @@ public class WorkEduCard extends FrameLayout implements
protected void onFinishInflate() {
super.onFinishInflate();
findViewById(R.id.action_btn).setOnClickListener(this);
StringCache cache = mActivityContext.getStringCache();
if (cache != null) {
TextView title = findViewById(R.id.work_apps_paused_title);
title.setText(cache.workProfileEdu);
}
}
@Override
public void onClick(View view) {
startAnimation(mDismissAnim);
Utilities.getPrefs(getContext()).edit().putInt(WorkAdapterProvider.KEY_WORK_EDU_STEP,
Utilities.getPrefs(getContext()).edit().putInt(WorkProfileManager.KEY_WORK_EDU_STEP,
1).apply();
}