EMMA Coverage Report (generated Thu Oct 17 06:14:17 PDT 2013)
[all classes][com.example.android.notepad]

COVERAGE SUMMARY FOR SOURCE FILE [NotesLiveFolder.java]

nameclass, %method, %block, %line, %
NotesLiveFolder.java0%   (0/1)0%   (0/3)0%   (0/70)0%   (0/18)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class NotesLiveFolder0%   (0/1)0%   (0/3)0%   (0/70)0%   (0/18)
<static initializer> 0%   (0/1)0%   (0/7)0%   (0/2)
NotesLiveFolder (): void 0%   (0/1)0%   (0/3)0%   (0/1)
onCreate (Bundle): void 0%   (0/1)0%   (0/60)0%   (0/15)

1/*
2 * Copyright (C) 2009 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 
17package com.example.android.notepad;
18 
19import android.app.Activity;
20import android.content.Intent;
21import android.net.Uri;
22import android.os.Bundle;
23import android.provider.LiveFolders;
24 
25public class NotesLiveFolder extends Activity {
26    /**
27     * The URI for the Notes Live Folder content provider.
28     */
29    public static final Uri CONTENT_URI = Uri.parse("content://"
30            + NotePad.AUTHORITY + "/live_folders/notes");
31 
32    public static final Uri NOTE_URI = Uri.parse("content://"
33            + NotePad.AUTHORITY + "/notes/#");
34 
35    @Override
36    protected void onCreate(Bundle savedInstanceState) {
37        super.onCreate(savedInstanceState);
38 
39        final Intent intent = getIntent();
40        final String action = intent.getAction();
41 
42        if (LiveFolders.ACTION_CREATE_LIVE_FOLDER.equals(action)) {
43            // Build the live folder intent.
44            final Intent liveFolderIntent = new Intent();
45 
46            liveFolderIntent.setData(CONTENT_URI);
47            liveFolderIntent.putExtra(LiveFolders.EXTRA_LIVE_FOLDER_NAME,
48                    getString(R.string.live_folder_name));
49            liveFolderIntent.putExtra(LiveFolders.EXTRA_LIVE_FOLDER_ICON,
50                    Intent.ShortcutIconResource.fromContext(this,
51                            R.drawable.live_folder_notes));
52            liveFolderIntent.putExtra(LiveFolders.EXTRA_LIVE_FOLDER_DISPLAY_MODE,
53                    LiveFolders.DISPLAY_MODE_LIST);
54            liveFolderIntent.putExtra(LiveFolders.EXTRA_LIVE_FOLDER_BASE_INTENT,
55                    new Intent(Intent.ACTION_EDIT, NOTE_URI));
56 
57            // The result of this activity should be a live folder intent.
58            setResult(RESULT_OK, liveFolderIntent);
59        } else {
60            setResult(RESULT_CANCELED);
61        }
62 
63        finish();
64    }
65}

[all classes][com.example.android.notepad]
EMMA 2.0.5312 (C) Vladimir Roubtsov