Methods Summary |
---|
public void | handleShowToast(boolean isLocked)
String text = mContext.getString(isLocked
? R.string.lock_to_app_toast_locked : R.string.lock_to_app_toast);
if (!isLocked && mAccessibilityManager.isEnabled()) {
text = mContext.getString(R.string.lock_to_app_toast_accessible);
}
if (mLastToast != null) {
mLastToast.cancel();
}
mLastToast = makeAllUserToastAndShow(text);
|
private android.widget.Toast | makeAllUserToastAndShow(java.lang.String text)
Toast toast = Toast.makeText(mContext, text, Toast.LENGTH_LONG);
toast.getWindowParams().privateFlags |=
WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
toast.show();
return toast;
|
public void | show(boolean starting)
int showString = R.string.lock_to_app_exit;
if (starting) {
showString = R.string.lock_to_app_start;
}
makeAllUserToastAndShow(mContext.getString(showString));
|
public void | showToast(boolean isLocked)
mHandler.obtainMessage(H.SHOW_TOAST, isLocked ? 1 : 0, 0 /* Not used */).sendToTarget();
|