Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 70532515 authored by Abhijith Shastry's avatar Abhijith Shastry Committed by Android (Google) Code Review
Browse files

Merge "Implement createManageBlockedNumbersIntent API." into nyc-dev

parents 35e95644 b1308ec2
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -91,7 +91,12 @@
                  android:configChanges="orientation|screenSize|keyboardHidden"
                  android:theme="@style/Theme.Telecom.BlockedNumbers"
                  android:process=":ui"
                  android:exported="false" />
                  android:exported="true">
            <intent-filter>
                <action android:name="android.telecom.action.MANAGE_BLOCKED_NUMBERS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <!-- Activity that starts the outgoing call process by listening to CALL intent which
             contain contact information in the intent's data. CallActivity handles any data
             URL with the schemes "tel", "sip", and "voicemail". It also handles URLs linked to
+4 −3
Original line number Diff line number Diff line
@@ -1190,11 +1190,12 @@ public class TelecomServiceImpl {
            BlockedNumbersActivity.start(mContext);
        }

        // TODO: Add a link to TelecomManager#createManageBlockedNumbersIntent
        /**
         * @see android.telecom.TelecomManager#createManageBlockedNumbersIntent
         */
        @Override
        public Intent createManageBlockedNumbersIntent() {
            // TODO: Implement this.
            return null;
            return BlockedNumbersActivity.getIntentForStartingActivity();
        }
    };

+9 −2
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import android.app.LoaderManager;
import android.content.*;
import android.database.Cursor;
import android.os.Bundle;
import android.os.Process;
import android.os.UserManager;
import android.provider.BlockedNumberContract;
import android.text.Editable;
@@ -33,7 +32,6 @@ import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.widget.*;
import com.android.server.telecom.R;
@@ -43,6 +41,9 @@ import com.android.server.telecom.R;
 */
public class BlockedNumbersActivity extends ListActivity
        implements LoaderManager.LoaderCallbacks<Cursor>, View.OnClickListener, TextWatcher {
    private static final String ACTION_MANAGE_BLOCKED_NUMBERS =
            "android.telecom.action.MANAGE_BLOCKED_NUMBERS";
    private static final String TELECOM_PACKAGE = "com.android.server.telecom";
    private static final String[] PROJECTION = new String[] {
            BlockedNumberContract.BlockedNumbers.COLUMN_ID,
            BlockedNumberContract.BlockedNumbers.COLUMN_ORIGINAL_NUMBER
@@ -67,6 +68,12 @@ public class BlockedNumbersActivity extends ListActivity
        context.startActivity(intent);
    }

    public static Intent getIntentForStartingActivity() {
        Intent intent = new Intent(ACTION_MANAGE_BLOCKED_NUMBERS);
        intent.setPackage(TELECOM_PACKAGE);
        return intent;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);