use of com.android.documentsui.OperationDialogFragment.DialogType in project android_frameworks_base by DirtyUnicorns.
the class FilesActivity method onCreate.
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
mClipper = new DocumentClipper(this);
RootsFragment.show(getFragmentManager(), null);
final Intent intent = getIntent();
final Uri uri = intent.getData();
if (mState.restored) {
if (DEBUG)
Log.d(TAG, "Stack already resolved for uri: " + intent.getData());
} else if (!mState.stack.isEmpty()) {
// in downloads.
if (uri != null && uri.getAuthority() != null && !uri.equals(mState.stack.peek()) && !LauncherActivity.isLaunchUri(uri)) {
if (DEBUG)
Log.w(TAG, "Launching with non-empty stack. Ignoring unexpected uri: " + uri);
} else {
if (DEBUG)
Log.d(TAG, "Launching with non-empty stack.");
}
refreshCurrentRootAndDirectory(AnimationView.ANIM_NONE);
} else if (Intent.ACTION_VIEW.equals(intent.getAction())) {
assert (uri != null);
new OpenUriForViewTask(this).executeOnExecutor(ProviderExecutor.forAuthority(uri.getAuthority()), uri);
} else if (DocumentsContract.isRootUri(this, uri)) {
if (DEBUG)
Log.d(TAG, "Launching with root URI.");
// If we've got a specific root to display, restore that root using a dedicated
// authority. That way a misbehaving provider won't result in an ANR.
loadRoot(uri);
} else {
if (DEBUG)
Log.d(TAG, "All other means skipped. Launching into default directory.");
loadRoot(getDefaultRoot());
}
@DialogType final int dialogType = intent.getIntExtra(FileOperationService.EXTRA_DIALOG_TYPE, DIALOG_TYPE_UNKNOWN);
// Only show it manually for the first time (icicle is null).
if (icicle == null && dialogType != DIALOG_TYPE_UNKNOWN) {
final int opType = intent.getIntExtra(FileOperationService.EXTRA_OPERATION, FileOperationService.OPERATION_COPY);
final ArrayList<DocumentInfo> srcList = intent.getParcelableArrayListExtra(FileOperationService.EXTRA_SRC_LIST);
OperationDialogFragment.show(getFragmentManager(), dialogType, srcList, mState.stack, opType);
}
}
use of com.android.documentsui.OperationDialogFragment.DialogType in project android_frameworks_base by AOSPA.
the class FilesActivity method onCreate.
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
mClipper = new DocumentClipper(this);
RootsFragment.show(getFragmentManager(), null);
final Intent intent = getIntent();
final Uri uri = intent.getData();
if (mState.restored) {
if (DEBUG)
Log.d(TAG, "Stack already resolved for uri: " + intent.getData());
} else if (!mState.stack.isEmpty()) {
// in downloads.
if (uri != null && uri.getAuthority() != null && !uri.equals(mState.stack.peek()) && !LauncherActivity.isLaunchUri(uri)) {
if (DEBUG)
Log.w(TAG, "Launching with non-empty stack. Ignoring unexpected uri: " + uri);
} else {
if (DEBUG)
Log.d(TAG, "Launching with non-empty stack.");
}
refreshCurrentRootAndDirectory(AnimationView.ANIM_NONE);
} else if (Intent.ACTION_VIEW.equals(intent.getAction())) {
assert (uri != null);
new OpenUriForViewTask(this).executeOnExecutor(ProviderExecutor.forAuthority(uri.getAuthority()), uri);
} else if (DocumentsContract.isRootUri(this, uri)) {
if (DEBUG)
Log.d(TAG, "Launching with root URI.");
// If we've got a specific root to display, restore that root using a dedicated
// authority. That way a misbehaving provider won't result in an ANR.
loadRoot(uri);
} else {
if (DEBUG)
Log.d(TAG, "All other means skipped. Launching into default directory.");
loadRoot(getDefaultRoot());
}
@DialogType final int dialogType = intent.getIntExtra(FileOperationService.EXTRA_DIALOG_TYPE, DIALOG_TYPE_UNKNOWN);
// Only show it manually for the first time (icicle is null).
if (icicle == null && dialogType != DIALOG_TYPE_UNKNOWN) {
final int opType = intent.getIntExtra(FileOperationService.EXTRA_OPERATION, FileOperationService.OPERATION_COPY);
final ArrayList<DocumentInfo> srcList = intent.getParcelableArrayListExtra(FileOperationService.EXTRA_SRC_LIST);
OperationDialogFragment.show(getFragmentManager(), dialogType, srcList, mState.stack, opType);
}
}
use of com.android.documentsui.OperationDialogFragment.DialogType in project android_frameworks_base by crdroidandroid.
the class FilesActivity method onCreate.
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
mClipper = new DocumentClipper(this);
RootsFragment.show(getFragmentManager(), null);
final Intent intent = getIntent();
final Uri uri = intent.getData();
if (mState.restored) {
if (DEBUG)
Log.d(TAG, "Stack already resolved for uri: " + intent.getData());
} else if (!mState.stack.isEmpty()) {
// in downloads.
if (uri != null && uri.getAuthority() != null && !uri.equals(mState.stack.peek()) && !LauncherActivity.isLaunchUri(uri)) {
if (DEBUG)
Log.w(TAG, "Launching with non-empty stack. Ignoring unexpected uri: " + uri);
} else {
if (DEBUG)
Log.d(TAG, "Launching with non-empty stack.");
}
refreshCurrentRootAndDirectory(AnimationView.ANIM_NONE);
} else if (Intent.ACTION_VIEW.equals(intent.getAction())) {
assert (uri != null);
new OpenUriForViewTask(this).executeOnExecutor(ProviderExecutor.forAuthority(uri.getAuthority()), uri);
} else if (DocumentsContract.isRootUri(this, uri)) {
if (DEBUG)
Log.d(TAG, "Launching with root URI.");
// If we've got a specific root to display, restore that root using a dedicated
// authority. That way a misbehaving provider won't result in an ANR.
loadRoot(uri);
} else {
if (DEBUG)
Log.d(TAG, "All other means skipped. Launching into default directory.");
loadRoot(getDefaultRoot());
}
@DialogType final int dialogType = intent.getIntExtra(FileOperationService.EXTRA_DIALOG_TYPE, DIALOG_TYPE_UNKNOWN);
// Only show it manually for the first time (icicle is null).
if (icicle == null && dialogType != DIALOG_TYPE_UNKNOWN) {
final int opType = intent.getIntExtra(FileOperationService.EXTRA_OPERATION, FileOperationService.OPERATION_COPY);
final ArrayList<DocumentInfo> srcList = intent.getParcelableArrayListExtra(FileOperationService.EXTRA_SRC_LIST);
OperationDialogFragment.show(getFragmentManager(), dialogType, srcList, mState.stack, opType);
}
}
use of com.android.documentsui.OperationDialogFragment.DialogType in project platform_frameworks_base by android.
the class FilesActivity method onCreate.
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
mClipper = new DocumentClipper(this);
RootsFragment.show(getFragmentManager(), null);
final Intent intent = getIntent();
final Uri uri = intent.getData();
if (mState.restored) {
if (DEBUG)
Log.d(TAG, "Stack already resolved for uri: " + intent.getData());
} else if (!mState.stack.isEmpty()) {
// in downloads.
if (uri != null && uri.getAuthority() != null && !uri.equals(mState.stack.peek()) && !LauncherActivity.isLaunchUri(uri)) {
if (DEBUG)
Log.w(TAG, "Launching with non-empty stack. Ignoring unexpected uri: " + uri);
} else {
if (DEBUG)
Log.d(TAG, "Launching with non-empty stack.");
}
refreshCurrentRootAndDirectory(AnimationView.ANIM_NONE);
} else if (Intent.ACTION_VIEW.equals(intent.getAction())) {
assert (uri != null);
new OpenUriForViewTask(this).executeOnExecutor(ProviderExecutor.forAuthority(uri.getAuthority()), uri);
} else if (DocumentsContract.isRootUri(this, uri)) {
if (DEBUG)
Log.d(TAG, "Launching with root URI.");
// If we've got a specific root to display, restore that root using a dedicated
// authority. That way a misbehaving provider won't result in an ANR.
loadRoot(uri);
} else {
if (DEBUG)
Log.d(TAG, "All other means skipped. Launching into default directory.");
loadRoot(getDefaultRoot());
}
@DialogType final int dialogType = intent.getIntExtra(FileOperationService.EXTRA_DIALOG_TYPE, DIALOG_TYPE_UNKNOWN);
// Only show it manually for the first time (icicle is null).
if (icicle == null && dialogType != DIALOG_TYPE_UNKNOWN) {
final int opType = intent.getIntExtra(FileOperationService.EXTRA_OPERATION, FileOperationService.OPERATION_COPY);
final ArrayList<DocumentInfo> srcList = intent.getParcelableArrayListExtra(FileOperationService.EXTRA_SRC_LIST);
OperationDialogFragment.show(getFragmentManager(), dialogType, srcList, mState.stack, opType);
}
}
use of com.android.documentsui.OperationDialogFragment.DialogType in project android_frameworks_base by ResurrectionRemix.
the class FilesActivity method onCreate.
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
mClipper = new DocumentClipper(this);
RootsFragment.show(getFragmentManager(), null);
final Intent intent = getIntent();
final Uri uri = intent.getData();
if (mState.restored) {
if (DEBUG)
Log.d(TAG, "Stack already resolved for uri: " + intent.getData());
} else if (!mState.stack.isEmpty()) {
// in downloads.
if (uri != null && uri.getAuthority() != null && !uri.equals(mState.stack.peek()) && !LauncherActivity.isLaunchUri(uri)) {
if (DEBUG)
Log.w(TAG, "Launching with non-empty stack. Ignoring unexpected uri: " + uri);
} else {
if (DEBUG)
Log.d(TAG, "Launching with non-empty stack.");
}
refreshCurrentRootAndDirectory(AnimationView.ANIM_NONE);
} else if (Intent.ACTION_VIEW.equals(intent.getAction())) {
assert (uri != null);
new OpenUriForViewTask(this).executeOnExecutor(ProviderExecutor.forAuthority(uri.getAuthority()), uri);
} else if (DocumentsContract.isRootUri(this, uri)) {
if (DEBUG)
Log.d(TAG, "Launching with root URI.");
// If we've got a specific root to display, restore that root using a dedicated
// authority. That way a misbehaving provider won't result in an ANR.
loadRoot(uri);
} else {
if (DEBUG)
Log.d(TAG, "All other means skipped. Launching into default directory.");
loadRoot(getDefaultRoot());
}
@DialogType final int dialogType = intent.getIntExtra(FileOperationService.EXTRA_DIALOG_TYPE, DIALOG_TYPE_UNKNOWN);
// Only show it manually for the first time (icicle is null).
if (icicle == null && dialogType != DIALOG_TYPE_UNKNOWN) {
final int opType = intent.getIntExtra(FileOperationService.EXTRA_OPERATION, FileOperationService.OPERATION_COPY);
final ArrayList<DocumentInfo> srcList = intent.getParcelableArrayListExtra(FileOperationService.EXTRA_SRC_LIST);
OperationDialogFragment.show(getFragmentManager(), dialogType, srcList, mState.stack, opType);
}
}
Aggregations