Java Code Examples for android.content.ComponentName#toString()

The following examples show how to use android.content.ComponentName#toString() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ApplicationPackageManager.java    From AndroidComponentPlugin with Apache License 2.0 6 votes vote down vote up
@Override
public InstrumentationInfo getInstrumentationInfo(
    ComponentName className, int flags)
        throws NameNotFoundException {
    try {
        InstrumentationInfo ii = mPM.getInstrumentationInfo(
            className, flags);
        if (ii != null) {
            return ii;
        }
    } catch (RemoteException e) {
        throw e.rethrowFromSystemServer();
    }

    throw new NameNotFoundException(className.toString());
}
 
Example 2
Source File: ApplicationPackageManager.java    From AndroidComponentPlugin with Apache License 2.0 6 votes vote down vote up
@Override
public InstrumentationInfo getInstrumentationInfo(
    ComponentName className, int flags)
        throws NameNotFoundException {
    try {
        InstrumentationInfo ii = mPM.getInstrumentationInfo(
            className, flags);
        if (ii != null) {
            return ii;
        }
    } catch (RemoteException e) {
        throw e.rethrowFromSystemServer();
    }

    throw new NameNotFoundException(className.toString());
}
 
Example 3
Source File: ApplicationPackageManager.java    From AndroidComponentPlugin with Apache License 2.0 6 votes vote down vote up
@Override
public ActivityInfo getActivityInfo(ComponentName className, int flags)
        throws NameNotFoundException {
    final int userId = getUserId();
    try {
        ActivityInfo ai = mPM.getActivityInfo(className,
                updateFlagsForComponent(flags, userId, null), userId);
        if (ai != null) {
            return ai;
        }
    } catch (RemoteException e) {
        throw e.rethrowFromSystemServer();
    }

    throw new NameNotFoundException(className.toString());
}
 
Example 4
Source File: ApplicationPackageManager.java    From AndroidComponentPlugin with Apache License 2.0 5 votes vote down vote up
@Override
public ActivityInfo getActivityInfo(ComponentName className, int flags)
        throws NameNotFoundException {
    try {
        ActivityInfo ai = mPM.getActivityInfo(className, flags, mContext.getUserId());
        if (ai != null) {
            return ai;
        }
    } catch (RemoteException e) {
        throw new RuntimeException("Package manager has died", e);
    }

    throw new NameNotFoundException(className.toString());
}
 
Example 5
Source File: ApplicationPackageManager.java    From AndroidComponentPlugin with Apache License 2.0 5 votes vote down vote up
@Override
public ActivityInfo getReceiverInfo(ComponentName className, int flags)
        throws NameNotFoundException {
    try {
        ActivityInfo ai = mPM.getReceiverInfo(className, flags);
        if (ai != null) {
            return ai;
        }
    } catch (RemoteException e) {
        throw new RuntimeException("Package manager has died", e);
    }

    throw new NameNotFoundException(className.toString());
}
 
Example 6
Source File: ApplicationPackageManager.java    From AndroidComponentPlugin with Apache License 2.0 5 votes vote down vote up
@Override
public ActivityInfo getActivityInfo(ComponentName className, int flags)
        throws NameNotFoundException {
    try {
        ActivityInfo ai = mPM.getActivityInfo(className, flags, mContext.getUserId());
        if (ai != null) {
            return ai;
        }
    } catch (RemoteException e) {
        throw e.rethrowFromSystemServer();
    }

    throw new NameNotFoundException(className.toString());
}
 
Example 7
Source File: ApplicationPackageManager.java    From AndroidComponentPlugin with Apache License 2.0 5 votes vote down vote up
@Override
public ServiceInfo getServiceInfo(ComponentName className, int flags)
        throws NameNotFoundException {
    try {
        ServiceInfo si = mPM.getServiceInfo(className, flags, mContext.getUserId());
        if (si != null) {
            return si;
        }
    } catch (RemoteException e) {
        throw e.rethrowFromSystemServer();
    }

    throw new NameNotFoundException(className.toString());
}
 
Example 8
Source File: ApplicationPackageManager.java    From AndroidComponentPlugin with Apache License 2.0 5 votes vote down vote up
@Override
public ServiceInfo getServiceInfo(ComponentName className, int flags)
        throws NameNotFoundException {
    try {
        ServiceInfo si = mPM.getServiceInfo(className, flags, mContext.getUserId());
        if (si != null) {
            return si;
        }
    } catch (RemoteException e) {
        throw e.rethrowFromSystemServer();
    }

    throw new NameNotFoundException(className.toString());
}
 
Example 9
Source File: ApplicationPackageManager.java    From AndroidComponentPlugin with Apache License 2.0 5 votes vote down vote up
@Override
public ActivityInfo getActivityInfo(ComponentName className, int flags)
        throws NameNotFoundException {
    try {
        ActivityInfo ai = mPM.getActivityInfo(className, flags, mContext.getUserId());
        if (ai != null) {
            return ai;
        }
    } catch (RemoteException e) {
        throw e.rethrowFromSystemServer();
    }

    throw new NameNotFoundException(className.toString());
}
 
Example 10
Source File: ApplicationPackageManager.java    From AndroidComponentPlugin with Apache License 2.0 5 votes vote down vote up
@Override
public ProviderInfo getProviderInfo(ComponentName className, int flags)
        throws NameNotFoundException {
    try {
        ProviderInfo pi = mPM.getProviderInfo(className, flags, mContext.getUserId());
        if (pi != null) {
            return pi;
        }
    } catch (RemoteException e) {
        throw e.rethrowFromSystemServer();
    }

    throw new NameNotFoundException(className.toString());
}
 
Example 11
Source File: AutofillServiceInfo.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
private static ServiceInfo getServiceInfoOrThrow(ComponentName comp, int userHandle)
        throws PackageManager.NameNotFoundException {
    try {
        ServiceInfo si = AppGlobals.getPackageManager().getServiceInfo(
                comp,
                PackageManager.GET_META_DATA,
                userHandle);
        if (si != null) {
            return si;
        }
    } catch (RemoteException e) {
    }
    throw new PackageManager.NameNotFoundException(comp.toString());
}
 
Example 12
Source File: ApplicationPackageManager.java    From AndroidComponentPlugin with Apache License 2.0 5 votes vote down vote up
@Override
public ServiceInfo getServiceInfo(ComponentName className, int flags)
        throws NameNotFoundException {
    try {
        ServiceInfo si = mPM.getServiceInfo(className, flags, mContext.getUserId());
        if (si != null) {
            return si;
        }
    } catch (RemoteException e) {
        throw new RuntimeException("Package manager has died", e);
    }

    throw new NameNotFoundException(className.toString());
}
 
Example 13
Source File: ApplicationPackageManager.java    From AndroidComponentPlugin with Apache License 2.0 5 votes vote down vote up
@Override
public ActivityInfo getReceiverInfo(ComponentName className, int flags)
        throws NameNotFoundException {
    try {
        ActivityInfo ai = mPM.getReceiverInfo(className, flags, mContext.getUserId());
        if (ai != null) {
            return ai;
        }
    } catch (RemoteException e) {
        throw new RuntimeException("Package manager has died", e);
    }

    throw new NameNotFoundException(className.toString());
}
 
Example 14
Source File: ApplicationPackageManager.java    From AndroidComponentPlugin with Apache License 2.0 5 votes vote down vote up
@Override
public ProviderInfo getProviderInfo(ComponentName className, int flags)
        throws NameNotFoundException {
    try {
        ProviderInfo pi = mPM.getProviderInfo(className, flags, mContext.getUserId());
        if (pi != null) {
            return pi;
        }
    } catch (RemoteException e) {
        throw e.rethrowFromSystemServer();
    }

    throw new NameNotFoundException(className.toString());
}
 
Example 15
Source File: ApplicationPackageManager.java    From AndroidComponentPlugin with Apache License 2.0 5 votes vote down vote up
@Override
public ProviderInfo getProviderInfo(ComponentName className, int flags)
        throws NameNotFoundException {
    try {
        ProviderInfo pi = mPM.getProviderInfo(className, flags, mContext.getUserId());
        if (pi != null) {
            return pi;
        }
    } catch (RemoteException e) {
        throw new RuntimeException("Package manager has died", e);
    }

    throw new NameNotFoundException(className.toString());
}
 
Example 16
Source File: ApplicationPackageManager.java    From AndroidComponentPlugin with Apache License 2.0 5 votes vote down vote up
@Override
public ActivityInfo getReceiverInfo(ComponentName className, int flags)
        throws NameNotFoundException {
    try {
        ActivityInfo ai = mPM.getReceiverInfo(className, flags, mContext.getUserId());
        if (ai != null) {
            return ai;
        }
    } catch (RemoteException e) {
        throw e.rethrowFromSystemServer();
    }

    throw new NameNotFoundException(className.toString());
}
 
Example 17
Source File: ApplicationPackageManager.java    From AndroidComponentPlugin with Apache License 2.0 5 votes vote down vote up
@Override
public ActivityInfo getReceiverInfo(ComponentName className, int flags)
        throws NameNotFoundException {
    try {
        ActivityInfo ai = mPM.getReceiverInfo(className, flags, mContext.getUserId());
        if (ai != null) {
            return ai;
        }
    } catch (RemoteException e) {
        throw new RuntimeException("Package manager has died", e);
    }

    throw new NameNotFoundException(className.toString());
}
 
Example 18
Source File: ApplicationPackageManager.java    From AndroidComponentPlugin with Apache License 2.0 5 votes vote down vote up
@Override
public ServiceInfo getServiceInfo(ComponentName className, int flags)
        throws NameNotFoundException {
    try {
        ServiceInfo si = mPM.getServiceInfo(className, flags);
        if (si != null) {
            return si;
        }
    } catch (RemoteException e) {
        throw new RuntimeException("Package manager has died", e);
    }

    throw new NameNotFoundException(className.toString());
}
 
Example 19
Source File: ApplicationPackageManager.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
@Override
public ServiceInfo getServiceInfo(ComponentName className, int flags)
        throws NameNotFoundException {
    try {
        ServiceInfo si = mPM.getServiceInfo(className, flags, mContext.getUserId());
        if (si != null) {
            return si;
        }
    } catch (RemoteException e) {
        throw e.rethrowFromSystemServer();
    }

    throw new NameNotFoundException(className.toString());
}
 
Example 20
Source File: ApplicationPackageManager.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
@Override
public ProviderInfo getProviderInfo(ComponentName className, int flags)
        throws NameNotFoundException {
    try {
        ProviderInfo pi = mPM.getProviderInfo(className, flags, mContext.getUserId());
        if (pi != null) {
            return pi;
        }
    } catch (RemoteException e) {
        throw e.rethrowFromSystemServer();
    }

    throw new NameNotFoundException(className.toString());
}